Skip to main content

Measures of presortedness and optimal sorting algorithms

Extended abstract

  • Conference paper
  • First Online:

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

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.

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. R. Ash: Information theory. Interscience Publishers, 1965.

    Google Scholar 

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

    Google Scholar 

  3. C.R. Cook & D.J. Kim: Best sorting algorithm for nearly sorted lists. Communications of the ACM 23, 11 (Nov. 1980), 620–624.

    Google Scholar 

  4. R.B.K. Dewar, S.M. Merritt & M. Sharir: Some modified algorithms for Dijkstra's longest upsequence problem. Acta Informatica 18 (1982), 1–15.

    Google Scholar 

  5. E.W. Dijkstra: Some beautiful arguments using mathematical induction. Acta Informatica 13 (1980), 1–13

    Google Scholar 

  6. E.W. Dijkstra: Smoothsort, an alternative to sorting in situ. Science of Computer Programming 1 (1982), 223–233.

    Google Scholar 

  7. M.H. Ellis & J.M. Steele: Fast searching of Weyl sequences using comparisons. SIAM Journal on Computing 10, 1 (Feb. 1981), 88–95.

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

  11. L.H. Harper, T.H. Payne, J.E. Savage & E. Straus: Sorting X+Y. Communications of the ACM 18, 6 (June 1975), 347–349.

    Google Scholar 

  12. S. Hertel: Smoothsort's behaviour on presorted sequences. Information Processing Letters 16 (1983), 165–170.

    Google Scholar 

  13. S. Huddleston & K. Mehlhorn: A new data structure for representing sorted lists. Acta Informatica 17 (1982), 157–184.

    Google Scholar 

  14. D.E. Knuth: The Art of Computer Programming, Vol. III: Sorting and Searching. Addison-Wesley, 1973.

    Google Scholar 

  15. S.R. Kosaraju: Localized search in sorted lists. In: Proceedings of the 11th Annual ACM Conference on Theory of Computing, 1981, p. 62–69.

    Google Scholar 

  16. H. Mannila: Measures of presortedness and optimal sorting algorithms. Report C-1984-14, Department of Computer Science, University of Helsinki, 1984.

    Google Scholar 

  17. K. Mehlhorn: Searching, sorting and information theory. In: Mathematical Foundations of Computer Science 1979, J. Becvar (ed.), Springer-Verlag, 1979, p. 131–145.

    Google Scholar 

  18. K. Mehlhorn: Sorting presorted files. In: 4th GI Conference on Theoretical Computer Science, Springer-Verlag, 1979, p. 199–212.

    Google Scholar 

  19. R. Sedgewick: Quicksort. Ph.D. Thesis, Stanford University, 1975.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jan Paredaens

Rights and permissions

Reprints 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

Publish with us

Policies and ethics