Abstract
We design main memory algorithms that sort in worst-case time such that the time varies smoothly from linear to optimal time for files that vary from being nearly sorted and have little disorder to being very unsorted. They are adaptive sorting algorithms. To this end, we:
-
introduce three basic ways of measuring nearly sortedness or disorder;
-
give a sorting algorithm, Strip Sort, that is worst-case-optimally adaptive to one of them;
-
give an axiomatic definition of measures of disorder;
-
and provide an infinitude of sorting algorithms that can be proved to be adaptive, with respect to many different measures, under some reasonable assumptions.
Preview
Unable to display preview. Download preview PDF.
References
J. Chen and S. Carlsson. On partitions and presortedness of sequences. In Proceedings of the 2nd Symposium on Discrete Algorithms, pages 63–71, San Francisco, Ca., 1991. ACM-SIAM.
C.R. Cook and D.J. Kim. Best sorting algorithms for nearly sorted lists. Communications of the ACM, 23:620–624, 1980.
V. Estivill-Castro. Sorting and Measures of Disorder. PhD thesis, University of Waterloo, 1991. Available as Department of Computer Science Research Report CS-91-07.
V. Estivill-Castro, H. Mannila, and D. Wood. Right invariant metrics and measures of presortedness. Discrete Applied Mathematics, to appear.
V. Estivill-Castro and D. Wood. A generic adaptive sorting algorithm. Computer Journal. To appear.
V. Estivill-Castro and D. Wood. External sorting, initial runs creation and nearly sortedness. Technical Report to appear, Department of Computer Science, University of Waterloo, 1991.
V. Estivill-Castro and D. Wood. Practical adaptive sorting. In F. Dehne, F. Fiala, and W.W. Koczkodaj, editors, Advances in Computing and Information — Proceedings of the International Conference on Computing and Information, pages 47–54, Ottawa, Canada, 1991. Springer-Verlag Lecture Notes in Computer Science 497.
V. Estivill-Castro and D. Wood. Randomized adaptive sorting. Technical Report CS-91-21, Department of Computer Science, University of Waterloo, 1991.
V. Estivill-Castro and D. Wood. Randomized sorting of shuffled monotone sequences. Technical Report CS-91-24, Department of Computer Science, University of Waterloo, 1991.
L.J. Guibas, E.M. McCreight, and M.F. Plass. A new representation of linear lists. In The Proceedings of the 9th ACM Annual Symposium on Theory of Computing, pages 49–60, 1977.
D.E. Knuth. The Art of Computer Programming, Vol.3: Sorting and Searching. Addison-Wesley Publishing Co., Reading, Mass., 1973.
C. Levcopoulos and O. Petersson. Heapsort — adapted for presorted files. In F. Dehne, J.R. Sack, and N. Santoro, editors, Proceedings of the Workshop on Algorithms and Data Structures, pages 499–509. Springer-Verlag Lecture Notes in Computer Science 382, 1989.
C. Levcopoulos and O. Petersson. Sorting shuffled monotone sequences. In J.R. Gilbert and R. Karlsson, editors, Proceedings of the 2nd Scandinavian Workshop on Algorithm Theory, pages 181–191, Bergen, Sweden, 1990. Springer-Verlag Lecture Notes in Computer Science 447.
H. Mannila. Measures of presortedness and optimal sorting algorithms. IEEE Transactions on Computers, C-34:318–325, 1985.
S.S. Skiena. Encroaching lists as a measure of presortedness. BIT, 28:755–784, 1988.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Estivill-Castro, V., Wood, D. (1991). Sorting, measures of disorder, and worst-case performance. In: Maurer, H. (eds) New Results and New Trends in Computer Science. Lecture Notes in Computer Science, vol 555. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0038186
Download citation
DOI: https://doi.org/10.1007/BFb0038186
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-54869-0
Online ISBN: 978-3-540-46457-0
eBook Packages: Springer Book Archive