Skip to main content

Priority Queues, Pairing, and Adaptive Sorting

  • Conference paper
  • First Online:

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

Abstract

We introduce Binomialsort, an adaptive sorting algorithm that is optimal with respect to the number of inversions. The number of comparisons performed by Binomialsort, on an input sequence of length n that has I inversions, is at most 2nlogI/n + O(n) [1]. The bound on the number of comparisons is further reduced to 1.89nlogI/n + O(n) by using a new structure, which we call trinomial queues. The fact that the algorithm is simple and relies on fairly simple structures makes it a good candidate in practice.

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

Buying options

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. M. Brown. Implementation and analysis of binomial queue algorithms. SIAM J. Comput. 7 (1978), 298–319.

    Article  MATH  MathSciNet  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. 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 

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

    Article  Google Scholar 

  5. 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.

    MathSciNet  Google Scholar 

  6. D. Knuth. The Art of Computer Programming. Vol III: Sorting and Searching. Addison-wesley, second edition (1998).

    Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  9. 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 

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

    Article  MathSciNet  Google Scholar 

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

    Google Scholar 

  12. K. Mehlhorn Data Structures and Algorithms. Vol. 1. Sorting and Searching. Springer-Verlag, Berlin/Heidelberg. (1984).

    Google Scholar 

  13. A. Moffat, G. Eddy and O. Petersson. Splaysort: fast, verstile, practical. Softw. Pract. and Exper. Vol 126(7) (1996), 781–797.

    Article  Google Scholar 

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

    Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  16. J. Vuillemin. A data structure for manipulating priority queues. Comm. ACM 21(4) (1978), 309–314.

    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

© 2002 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Elmasry, A. (2002). Priority Queues, Pairing, and Adaptive Sorting. In: Widmayer, P., Eidenbenz, S., Triguero, F., Morales, R., Conejo, R., Hennessy, M. (eds) Automata, Languages and Programming. ICALP 2002. Lecture Notes in Computer Science, vol 2380. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45465-9_17

Download citation

  • DOI: https://doi.org/10.1007/3-540-45465-9_17

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-43864-9

  • Online ISBN: 978-3-540-45465-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics