Abstract
Until recently, it was not known whether it was possible to sortstably (i.e., keeping equal elements in their initial order) an array ofn elements using onlyO(n) data moves andO(1) extra space. In [13] an algorithm was given to perform this task inO(n2) comparisons in the worst case. Here, we develop a new algorithm for the problem that performs onlyO(n1+ε) comparisons (0<ε<1 is any fixed constant) in the worst case. This bound on the number of comparisons matches (asymptotically) the best known bound for the same problem with the stability constraint dropped.
Key words
Sorting Stability Data moves In-placePreview
Unable to display preview. Download preview PDF.
References
- [1]E. H. Friend, Sorting on Electronic Computers,Journal of the ACM,3(2) (1956), 134–168.CrossRefGoogle Scholar
- [2]B. C. Huang and M. A. Langsten, Practical In-place Merging,Communications of the ACM,31(3) (1988), 348–352.CrossRefGoogle Scholar
- [3]B. C. Huang and M. A. Langston, Fast Stable Merging and Sorting in Constant Extra Space,Proceedings of the International Conference on Computing and Information, 1989, pp. 71–80.Google Scholar
- [4]J. Katajainen and T. Pasanen, Sorting Multisets Stably in Minimum Space,Proceedings of the 3rd Scandinavian Workshop on Algorithm Theory, Lecture Notes in Computer Science, Vol. 621, Springer-Verlag, Berlin, 1992, pp. 410–421.Google Scholar
- [5]D. E. Knuth,The Art of Computer Programming, Vol. III, Addison-Wesley, Reading, MA, 1973.Google Scholar
- [6]M. A. Kronrod, Optimal Ordering Algorithm Without Operational Field,Soviet Math. Dokl.,10 (1969), 744–746.Google Scholar
- [7]T. W. Lai and D. Wood, Implicit Selection,Proceedings of the 1st Scandinavian Workshop on Algorithm Theory, Lecture Notes in Computer Science, Vol. 318, Springer-Verlag, Berlin, 1988, pp. 14–23.Google Scholar
- [8]J. I. Munro, An Implicit Data Structure Supporting Insertion, Deletion, and Search inO(lg2 n) Time,Journal of Computer and System Sciences,21 (1980), 236–250.CrossRefGoogle Scholar
- [9]J. I. Munro and V. Raman, Fast Stable In-Place Sorting withO(n) Data Moves,Proceedings ofthe 11th FST & TCS Conference, New Delhi, Lecture Notes in Computer Science, Vol. 560, Springer-Verlag, Berlin, 1991, pp. 266–277.Google Scholar
- [10]J. I. Munro and V. Raman, Sorting Multisets and Vectors In-Place,Proceedings of the 2nd Workshop on Algorithms and Data Structures, Lecture Notes in Computer Science, Vol. 519, Springer-Verlag, Berlin, 1991, pp. 473–480.Google Scholar
- [11]J. I. Munro and V. Raman, Sorting with Minimum Data Movement,Journal of Algorithms,13 (1992), 374–393.CrossRefGoogle Scholar
- [12]J. I. Munro and V. Raman, Selection from Read-Only Memory and Sorting with Optimum Data Movement,Proceedings of the 12th FST & TCS Conference, New Delhi, Lecture Notes in Computer Science, Vol. 652, Springer-Verlag, Berlin, 1992, pp. 380–391; to appear inTheoretical Computer Science.Google Scholar
- [13]J. I. Munro, V. Raman, and J. S. Salowe, Stable In Situ Sorting and Minimum Data Movement,BIT,30 (1990), 220–234.Google Scholar
- [14]V. Raman, Sorting In-Place with Minimum Data Movement, Ph.D. Thesis, Technical Report CS 91-12, Department of Computer Science, University of Waterloo (1991).Google Scholar
- [15]L. Trabb Pardo, Stable Sorting and Merging with Optimal Space and Time Bounds,SIAM Journal of Computing,6 (1977), 351–372.CrossRefGoogle Scholar
- [16]J. W. J. Williams, Algorithm 232, Heapsort,Communications of the ACM,7 (1964), 347–348.Google Scholar
Copyright information
© Springer-Verlag New York Inc 1996