Abstract
A heuristic algorithm is presented to construct permutations which require as many moves in sorting by Shellsort as possible. The approximations obtained are compared with those found by other known methods. Experiments were performed with up ton=2047 elements to be sorted, and the results show the distinct superiority of the heuristic approximations. The actual times needed by Shellsort to sort the worst permutations achieved were determined and compared with the corresponding times of Shellsort in the average case, as well as with the times of quicksort and heapsort in their worst cases.
Similar content being viewed by others
References
H. Erkiö,On the worst case of Shellsort, Report C-1980-54, University of Helsinki, Department of Computer Science, 1980.
B. L. Golden,A statistical approach to the TSP, Networks 7,3 (1977), 209–225.
E. J. Gumbel,Statistics of Extremes, Columbia University Press, New York, 1958.
T. N. Hibbard,An empirical study of minimal storage sorting, Comm. ACM 6,5 (May 1963), 206–213.
D. E. Knuth,The Art of Computer Programming, Vol. 3: Sorting and Searching (2nd printing). Addison-Wesley, 1975.
V. Pratt,Shellsort and sorting networks, Ph. D. Thesis. Stanford University, 1972.
D. L. Shell,A high-speed sorting procedure, Comm. ACM 2,7 (July 1959), 30–32.
Yu. G. Stoyan and V. Z. Socolovsky,The minimization method for some permutation functionals, Information Processing Letters 8,2 (Feb. 1979), 110–111.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Erkiö, H. A heuristic approximation of the worst case of Shellsort. BIT 20, 130–136 (1980). https://doi.org/10.1007/BF01933185
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01933185