Skip to main content

Adaptive Sorting and the Information Theoretic Lower Bound

  • Conference paper
  • First Online:
STACS 2003 (STACS 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2607))

Included in the following conference series:

Abstract

We derive a variation of insertion sort that is near optimal with respect to the number of inversions present in the input. The number of comparisons performed by our algorithms, on an input sequence of length n that has I inversions, is at most n log2 ( 1/n +1) + O(n). Moreover, we give an implementation of the algorithm that runs in time O(n log2 ( 1/n +1) + n). All previously known algorithms require at least cn log2( 1/n +1) comparisons for some c > 1.

Supported in part by NSF grant CCR-9732689

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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. A. Andersson and T. W. Lai. Fast updating of well-balanced trees. In Proc. Scandinavian Workshop on Algorithm Theory, Springer Verlag (1990), 111–121.

    Google Scholar 

  2. M. Brown and R. Tarjan. Design and analysis of data structures for representing sorted lists. SIAM J. Comput. 9(1980), 594–614.

    Article  MATH  MathSciNet  Google Scholar 

  3. J. Bentley and A. Yao. An almost optimal algorithm for unbounded searching. Information Processing Letters 5(3) (1976), 82–87.

    Article  MATH  MathSciNet  Google Scholar 

  4. S. Carlsson, C. Levcopoulos and O. Petersson. Sublinear merging and natural Mergesort. Algorithmica 9 (1993), 629–648.

    Article  MATH  MathSciNet  Google Scholar 

  5. R. Cole. On the dynamic finger conjecture for splay trees. Part II: The proof. SIAM J. Comput. 30 (2000), 44–85.

    Article  MATH  MathSciNet  Google Scholar 

  6. A. Elmasry. Priority queues, pairing and adaptive sorting. 29th ICALP. In LNCS 2380 (2002), 183–194.

    Google Scholar 

  7. V. Estivill-Castro. A survey of adaptive sorting algorithms. ACM Comput. Surv. vol 24(4) (1992), 441–476.

    Article  Google Scholar 

  8. V. Estivill-Castro and D. Wood. A new measure of presortedness. Infor. and Comput. 83 (1989), 111–119.

    Article  MATH  MathSciNet  Google Scholar 

  9. M. Fredman. How good is the information theory bound in sorting?. Theoretical Computer Science 1 (1976), 355–361.

    Article  MATH  MathSciNet  Google Scholar 

  10. L. Guibas, E. McCreight, M. Plass and J. Roberts. A new representation of linear lists. ACM Symp. on Theory of Computing 9 (1977), 49–60.

    Google Scholar 

  11. D. Knuth. The art of Computer programming. Vol III: Sorting and Searching. Addison-wesley, second edition (1998).

    Google Scholar 

  12. C. Levcopoulos and O. Petersson. Splitsort-An adaptive sorting algorithm. Information Processing Letters 39 (1991), 205–211.

    MATH  MathSciNet  Google Scholar 

  13. C. Levcopoulos and O. Petersson. Adaptive Heapsort. J. of Algorithms 14 (1993), 395–413.

    Google Scholar 

  14. C. Levcopoulos and O. Petersson. Sorting shufied monotone sequences. Inform. and Comput. 112 (1994), 37–50.

    Article  MATH  MathSciNet  Google Scholar 

  15. C. Levcopoulos and O. Petersson. Exploiting few inversions when sorting: Sequential and parallel algorithms. Theoretical Computer Science 163 (1996), 211–238.

    Article  MATH  MathSciNet  Google Scholar 

  16. H. Mannila. Measures of presortedness and optimal sorting algorithms. IEEE Trans. Comput. C-34 (1985), 318–325.

    Article  MathSciNet  Google Scholar 

  17. K. Mehlhorn Data structures and algorithms. Vol.1. Sorting and Searching. Springer-Verlag, Berlin/Heidelberg. (1984)

    Google Scholar 

  18. K. Mehlhorn. Sorting presorted files. Proc. Of the 4th GI Conference on Theory of Computer Science. LNCS 67 (1979), 199–212.

    Google Scholar 

  19. A. Moffat, O. Petersson and N. Wormald A tree-based Mergesort. Acta Informatica, Springer-Verlag (1998), 775–793.

    Google Scholar 

  20. O. Petersson and A. Moffat. A framework for adaptive sorting. Discrete App. Math. 59 (1995), 153–179.

    Article  MATH  MathSciNet  Google Scholar 

  21. D. Sleator and R. Tarjan. Self-adjusting binary search trees. J. ACM 32(3) (1985), 652–686.

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Elmasry, A., Fredman, M.L. (2003). Adaptive Sorting and the Information Theoretic Lower Bound. In: Alt, H., Habib, M. (eds) STACS 2003. STACS 2003. Lecture Notes in Computer Science, vol 2607. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36494-3_57

Download citation

  • DOI: https://doi.org/10.1007/3-540-36494-3_57

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-00623-7

  • Online ISBN: 978-3-540-36494-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics