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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
M. Brown. Implementation and analysis of binomial queue algorithms. SIAM J. Comput. 7 (1978), 298–319.
M. Brown and R. Tarjan. Design and analysis of data structures for representing sorted lists. SIAM J. Comput. 9 (1980), 594–614.
R. Cole. On the dynamic finger conjecture for splay trees. Part II: The proof. SIAM J. Comput. 30 (2000), 44–85.
V. Estivill-Castro. A survey of adaptive sorting algorithms. ACM Comput. Surv. vol 24(4) (1992), 441–476.
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.
D. Knuth. The Art of Computer Programming. Vol III: Sorting and Searching. Addison-wesley, second edition (1998).
C. Levcopoulos and O. Petersson. Splitsort-An adaptive sorting algorithm. Information Processing Letters 39 (1991), 205–211.
C. Levcopoulos and O. Petersson. Adaptive Heapsort. J. of Alg. 14 (1993), 395–413.
C. Levcopoulos and O. Petersson. Exploiting few inversions when sorting: Sequential and parallel algorithms. Theoretical Computer Science 163 (1996), 211–238.
H. Mannila. Measures of presortedness and optimal sorting algorithms. IEEE Trans. Comput. C-34 (1985), 318–325.
K. Mehlhorn. Sorting presorted files. Proc. Of the 4th GI Conference on Theory of Computer Science. LNCS 67 (1979), 199–212.
K. Mehlhorn Data Structures and Algorithms. Vol. 1. Sorting and Searching. Springer-Verlag, Berlin/Heidelberg. (1984).
A. Moffat, G. Eddy and O. Petersson. Splaysort: fast, verstile, practical. Softw. Pract. and Exper. Vol 126(7) (1996), 781–797.
A. Moffat, O. Petersson and N. Wormald A tree-based Mergesort. Acta Informatica, Springer-Verlag (1998), 775–793.
D. Sleator and R. Tarjan. Self-adjusting binary search trees. J. ACM 32(3) (1985), 652–686.
J. Vuillemin. A data structure for manipulating priority queues. Comm. ACM 21(4) (1978), 309–314.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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