Skip to main content

Tight lower bounds for Shellsort

  • Conference paper
  • First Online:
SWAT 88 (SWAT 1988)

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

Included in the following conference series:

Abstract

Shellsort is a simple classic algorithm that runs competitively on both mid-sized and nearly sorted files. It uses an increment sequence, the choice of which can drastically affect the algorithm's running time. Due to the results of Pratt, the running time of Shellsort was long thought to be Θ(N 3/2) for increment sequences that are "almost geometric". However, recent results have lowered the upper bound substantially, although the new bounds were not known to be tight.

In this paper, we show that an increment sequence given by Sedgewick is Θ(N 4/3) by analyzing the time required to sort a particularly bad permutation. Extending this proof technique to various increment sequences seems to lead to lower bounds that in general match the known upper bounds and suggests that Shellsort runs in Ω(N 1 + ∈/→log N) for increment sequences of practical interest, and that no increment sequence exists that would make Shellsort optimal.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

6. References

  1. A. Brauer, "On a Problem of Partitions", American J Mathematics 64 (1942), 299–312.

    Google Scholar 

  2. G. Gonnet, Handbook of Algorithms and Data Structures, Addison-Wesley, 1984.

    Google Scholar 

  3. T.N. Hibbard, "An empirical study of minimal storage sorting", Communications of the ACM 6 5(1963), 206–213.

    Google Scholar 

  4. J. Incerpi, "A Study of the Worst-Case of Shellsort", Ph.D. Thesis, Brown University, 1985.

    Google Scholar 

  5. J. Incerpi and R. Sedgewick, "Improved Upper Bounds on Shellsort", Proceedings 24th Annual Symposium on Foundations of Computer Science, Tucson 1983, 48–55.

    Google Scholar 

  6. S.M. Johnson, "A linear diophantine problem", Canadian J. Math. 12 (1960), 390–398.

    Google Scholar 

  7. D.E. Knuth, The Art of Computer Programming. Volume 3: Sorting and Searching, Addison-Wesley, Reading, Mass. (1973).

    Google Scholar 

  8. A. Nijenhuis and H.S. Wilf, "Representations of integers by linear forms in nonnegative integers", J. Number Theory 4 (1972), 98–106.

    Google Scholar 

  9. A.A. Papernov and G.V. Stasevich, "A method of information sorting in computer memories", Problems of Information Transmission 1 3(1965), 63–75.

    Google Scholar 

  10. V. Pratt, Shellsort and Sorting Networks, Garland Publishing, New York (1979). (Originally presented as the author's Ph.D. thesis, Stanford University, 1971.)

    Google Scholar 

  11. R. Sedgewick, "A New Upper Bound for Shellsort", J. of Algorithms 2 (1986), 159–173.

    Google Scholar 

  12. E.S. Selmer, "On the linear diophantine problem of Frobenius", J. reine angew. Math. 294 (1977), 1–17.

    Google Scholar 

  13. E.S. Selmer, "On Shellsort and the Frobenius problem", unpublished manuscript.

    Google Scholar 

  14. W.J. Curran Sharp, Solution to Problem 7382 (Mathematics), Educational Times, London (1884).

    Google Scholar 

  15. D.L. Shell, "A high-speed sorting procedure", Communications of the ACM 2 7(1959), 30–32.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Rolf Karlsson Andrzej Lingas

Rights and permissions

Reprints and permissions

Copyright information

© 1988 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Weiss, M.A., Sedgewick, R. (1988). Tight lower bounds for Shellsort. In: Karlsson, R., Lingas, A. (eds) SWAT 88. SWAT 1988. Lecture Notes in Computer Science, vol 318. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-19487-8_29

Download citation

  • DOI: https://doi.org/10.1007/3-540-19487-8_29

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-19487-3

  • Online ISBN: 978-3-540-39288-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics