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
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
A. Andersson and T. W. Lai. Fast updating of well-balanced trees. In Proc. Scandinavian Workshop on Algorithm Theory, Springer Verlag (1990), 111–121.
M. Brown and R. Tarjan. Design and analysis of data structures for representing sorted lists. SIAM J. Comput. 9(1980), 594–614.
J. Bentley and A. Yao. An almost optimal algorithm for unbounded searching. Information Processing Letters 5(3) (1976), 82–87.
S. Carlsson, C. Levcopoulos and O. Petersson. Sublinear merging and natural Mergesort. Algorithmica 9 (1993), 629–648.
R. Cole. On the dynamic finger conjecture for splay trees. Part II: The proof. SIAM J. Comput. 30 (2000), 44–85.
A. Elmasry. Priority queues, pairing and adaptive sorting. 29th ICALP. In LNCS 2380 (2002), 183–194.
V. Estivill-Castro. A survey of adaptive sorting algorithms. ACM Comput. Surv. vol 24(4) (1992), 441–476.
V. Estivill-Castro and D. Wood. A new measure of presortedness. Infor. and Comput. 83 (1989), 111–119.
M. Fredman. How good is the information theory bound in sorting?. Theoretical Computer Science 1 (1976), 355–361.
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 Algorithms 14 (1993), 395–413.
C. Levcopoulos and O. Petersson. Sorting shufied monotone sequences. Inform. and Comput. 112 (1994), 37–50.
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 Data structures and algorithms. Vol.1. Sorting and Searching. Springer-Verlag, Berlin/Heidelberg. (1984)
K. Mehlhorn. Sorting presorted files. Proc. Of the 4th GI Conference on Theory of Computer Science. LNCS 67 (1979), 199–212.
A. Moffat, O. Petersson and N. Wormald A tree-based Mergesort. Acta Informatica, Springer-Verlag (1998), 775–793.
O. Petersson and A. Moffat. A framework for adaptive sorting. Discrete App. Math. 59 (1995), 153–179.
D. Sleator and R. Tarjan. Self-adjusting binary search trees. J. ACM 32(3) (1985), 652–686.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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