Advertisement

Tight lower bounds for Shellsort

  • Mark Allen Weiss
  • Robert Sedgewick
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 318)

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 Θ(N3/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 Θ(N4/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 Ω(N1 + ∈/→log N) for increment sequences of practical interest, and that no increment sequence exists that would make Shellsort optimal.

Keywords

Early Pass Frobenius Function Frobenius Number General Permutation Tight Lower Bound 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

6. References

  1. [Bra42]
    A. Brauer, "On a Problem of Partitions", American J Mathematics 64 (1942), 299–312.Google Scholar
  2. [Gon84]
    G. Gonnet, Handbook of Algorithms and Data Structures, Addison-Wesley, 1984.Google Scholar
  3. [Hib63]
    T.N. Hibbard, "An empirical study of minimal storage sorting", Communications of the ACM 6 5(1963), 206–213.Google Scholar
  4. [Inc85]
    J. Incerpi, "A Study of the Worst-Case of Shellsort", Ph.D. Thesis, Brown University, 1985.Google Scholar
  5. [InS83]
    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. [Joh60]
    S.M. Johnson, "A linear diophantine problem", Canadian J. Math. 12 (1960), 390–398.Google Scholar
  7. [Knu73]
    D.E. Knuth, The Art of Computer Programming. Volume 3: Sorting and Searching, Addison-Wesley, Reading, Mass. (1973).Google Scholar
  8. [NiW72]
    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. [PaS65]
    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. [Pra71]
    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. [Sed86]
    R. Sedgewick, "A New Upper Bound for Shellsort", J. of Algorithms 2 (1986), 159–173.Google Scholar
  12. [Sel77]
    E.S. Selmer, "On the linear diophantine problem of Frobenius", J. reine angew. Math. 294 (1977), 1–17.Google Scholar
  13. [Sel87]
    E.S. Selmer, "On Shellsort and the Frobenius problem", unpublished manuscript.Google Scholar
  14. [Sh884]
    W.J. Curran Sharp, Solution to Problem 7382 (Mathematics), Educational Times, London (1884).Google Scholar
  15. [She59]
    D.L. Shell, "A high-speed sorting procedure", Communications of the ACM 2 7(1959), 30–32.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1988

Authors and Affiliations

  • Mark Allen Weiss
    • 1
  • Robert Sedgewick
    • 2
  1. 1.School of Computer ScienceFlorida International UniversityUniversity Park Miami
  2. 2.Department of Computer SciencePrinceton UniversityPrinceton

Personalised recommendations