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.
Preview
Unable to display preview. Download preview PDF.
6. References
A. Brauer, "On a Problem of Partitions", American J Mathematics 64 (1942), 299–312.
G. Gonnet, Handbook of Algorithms and Data Structures, Addison-Wesley, 1984.
T.N. Hibbard, "An empirical study of minimal storage sorting", Communications of the ACM 6 5(1963), 206–213.
J. Incerpi, "A Study of the Worst-Case of Shellsort", Ph.D. Thesis, Brown University, 1985.
J. Incerpi and R. Sedgewick, "Improved Upper Bounds on Shellsort", Proceedings 24th Annual Symposium on Foundations of Computer Science, Tucson 1983, 48–55.
S.M. Johnson, "A linear diophantine problem", Canadian J. Math. 12 (1960), 390–398.
D.E. Knuth, The Art of Computer Programming. Volume 3: Sorting and Searching, Addison-Wesley, Reading, Mass. (1973).
A. Nijenhuis and H.S. Wilf, "Representations of integers by linear forms in nonnegative integers", J. Number Theory 4 (1972), 98–106.
A.A. Papernov and G.V. Stasevich, "A method of information sorting in computer memories", Problems of Information Transmission 1 3(1965), 63–75.
V. Pratt, Shellsort and Sorting Networks, Garland Publishing, New York (1979). (Originally presented as the author's Ph.D. thesis, Stanford University, 1971.)
R. Sedgewick, "A New Upper Bound for Shellsort", J. of Algorithms 2 (1986), 159–173.
E.S. Selmer, "On the linear diophantine problem of Frobenius", J. reine angew. Math. 294 (1977), 1–17.
E.S. Selmer, "On Shellsort and the Frobenius problem", unpublished manuscript.
W.J. Curran Sharp, Solution to Problem 7382 (Mathematics), Educational Times, London (1884).
D.L. Shell, "A high-speed sorting procedure", Communications of the ACM 2 7(1959), 30–32.
Author information
Authors and Affiliations
Editor information
Rights 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