Skip to main content

A General Method for Improving Insertion-Based Adaptive Sorting

  • Conference paper
Book cover Algorithms and Computation (ISAAC 2012)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7676))

Included in the following conference series:

  • 1434 Accesses

Abstract

A presortedness measure describes to which extent a sequence of key values to be sorted is already partially sorted. We introduce a new natural measure of presortedness, which is a composition of two existing ones: Block that gives the number of already sorted disjoint subsequences of the input, and Loc defined as \(\prod^{n}_{i=2} d_i\), where d i  denotes the distance between the (i − 1)th and the ith element of the input in the ordered sequence up to the ith element. We also give a general method for improving insertion-based adaptive sorting, applying it to Splaysort to produce an algorithm that is optimal with respect to the new composite measure. Our experiments are performed for splay-tree sorting which has been reported to be among the most efficient adaptive sorting algorithms. Our experimental results show that, in addition to the theoretical superiority, our method improves standard Splaysort by a large factor when the input contains blocks of reasonable size.

This research was partially supported by the Academy of Finland. A preliminary version of some of the results is published in the doctoral dissertation [1].

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Saikkonen, R.: Bulk Updates and Cache Sensitivity in Search Trees. PhD thesis, Helsinki University of Technology (2009)

    Google Scholar 

  2. Carlsson, S., Levcopoulos, C., Petersson, O.: Sublinear merging and natural mergesort. Algorithmica 9(6), 629–648 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  3. Mehlhorn, K.: Sorting Presorted Files. In: Weihrauch, K. (ed.) GI-TCS 1979. LNCS, vol. 67, pp. 199–212. Springer, Heidelberg (1979)

    Google Scholar 

  4. Petersson, O., Moffat, A.: A framework for adaptive sorting. Discrete Applied Mathematics 59(2), 153–179 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  5. Saikkonen, R., Soisalon-Soininen, E.: Bulk-Insertion Sort: Towards Composite Measures of Presortedness. In: Vahrenhold, J. (ed.) SEA 2009. LNCS, vol. 5526, pp. 269–280. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  6. Moffat, A., Eddy, G., Petersson, O.: Splaysort: Fast, versatile, practical. Software, Practice and Experience 126(7), 781–797 (1996)

    Article  Google Scholar 

  7. Mannila, H.: Measures of presortedness and optimal sorting algorithms. IEEE Transactions on Computers C-34, 318–325 (1985)

    Article  MathSciNet  Google Scholar 

  8. Cole, R.: On the dynamic finger conjecture for splay trees, part II: The proof. SIAM Journal on Computing 30(1), 44–85 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  9. Fredman, M.L.: Two applications of a probabilistic search technique: Sorting X+Y and building balanced search trees. In: 7th Annual ACM Symposium on Theory of Computing (STOC 1975), pp. 240–244. ACM Press (1975)

    Google Scholar 

  10. Elmasry, A., Hammad, A.: An Empirical Study for Inversions-Sensitive Sorting Algorithms. In: Nikoletseas, S.E. (ed.) WEA 2005. LNCS, vol. 3503, pp. 597–601. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  11. Levcopoulos, C., Petersson, O.: Splitsort – an adaptive sorting algorithm. Information Processing Letters 39, 205–211 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  12. Estivill-Castro, V., Wood, D.: A survey of adaptive sorting algorithms. ACM Computing Surveys 24(4), 441–476 (1992)

    Article  Google Scholar 

  13. Bentley, J.L., McIlroy, M.D.: Engineering a sort function. Software, Practice and Experience 23(11), 1249–1265 (1993)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Saikkonen, R., Soisalon-Soininen, E. (2012). A General Method for Improving Insertion-Based Adaptive Sorting. In: Chao, KM., Hsu, Ts., Lee, DT. (eds) Algorithms and Computation. ISAAC 2012. Lecture Notes in Computer Science, vol 7676. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-35261-4_25

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-35261-4_25

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-35260-7

  • Online ISBN: 978-3-642-35261-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics