Abstract
The concept of presortedness and its use in sorting are studied. Natural ways to measure presortedness are given and some general properties necessary for a measure are proposed. A concept of a sorting algorithm optimal with respect to a measure of presortedness is defined, and examples of such algorithms are given. An insertion sort is shown to be optimal with respect to three natural measures. The problem of finding an optimal algorithm for an arbitrary measure is studied and partial results are proven.
Preview
Unable to display preview. Download preview PDF.
References
R. Ash: Information theory. Interscience Publishers, 1965.
M.R. Brown & R.E. Tarjan: Design and analysis of a data structure for representing sorted lists. SIAM Journal on Computing 9, 3 (Aug. 1980), 594–614.
C.R. Cook & D.J. Kim: Best sorting algorithm for nearly sorted lists. Communications of the ACM 23, 11 (Nov. 1980), 620–624.
R.B.K. Dewar, S.M. Merritt & M. Sharir: Some modified algorithms for Dijkstra's longest upsequence problem. Acta Informatica 18 (1982), 1–15.
E.W. Dijkstra: Some beautiful arguments using mathematical induction. Acta Informatica 13 (1980), 1–13
E.W. Dijkstra: Smoothsort, an alternative to sorting in situ. Science of Computer Programming 1 (1982), 223–233.
M.H. Ellis & J.M. Steele: Fast searching of Weyl sequences using comparisons. SIAM Journal on Computing 10, 1 (Feb. 1981), 88–95.
M.L. Fredman: Two applications of a probabilistic search technique: sorting X+Y and building balanced search trees. In: Proceedings of the 7th Annual ACM Symposium on Theory of Computing, 1975, p. 240–244
M.L. Fredman: How good is the information theory bound in sorting? Theoretical Computer Science 1 (1976), 355–361.
L.J. Guibas, E.M. McCreight, M.F. Plass & J.R. Roberts: A new representation of linear lists. In: Proceedings of the 9th Annual ACM Symposium on Theory of Computing, 1977, p. 49–60.
L.H. Harper, T.H. Payne, J.E. Savage & E. Straus: Sorting X+Y. Communications of the ACM 18, 6 (June 1975), 347–349.
S. Hertel: Smoothsort's behaviour on presorted sequences. Information Processing Letters 16 (1983), 165–170.
S. Huddleston & K. Mehlhorn: A new data structure for representing sorted lists. Acta Informatica 17 (1982), 157–184.
D.E. Knuth: The Art of Computer Programming, Vol. III: Sorting and Searching. Addison-Wesley, 1973.
S.R. Kosaraju: Localized search in sorted lists. In: Proceedings of the 11th Annual ACM Conference on Theory of Computing, 1981, p. 62–69.
H. Mannila: Measures of presortedness and optimal sorting algorithms. Report C-1984-14, Department of Computer Science, University of Helsinki, 1984.
K. Mehlhorn: Searching, sorting and information theory. In: Mathematical Foundations of Computer Science 1979, J. Becvar (ed.), Springer-Verlag, 1979, p. 131–145.
K. Mehlhorn: Sorting presorted files. In: 4th GI Conference on Theoretical Computer Science, Springer-Verlag, 1979, p. 199–212.
R. Sedgewick: Quicksort. Ph.D. Thesis, Stanford University, 1975.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1984 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Mannila, H. (1984). Measures of presortedness and optimal sorting algorithms. In: Paredaens, J. (eds) Automata, Languages and Programming. ICALP 1984. Lecture Notes in Computer Science, vol 172. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-13345-3_29
Download citation
DOI: https://doi.org/10.1007/3-540-13345-3_29
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-13345-2
Online ISBN: 978-3-540-38886-9
eBook Packages: Springer Book Archive