Heapsort—Adapted for presorted files
We provide a new sorting algorithm which is optimal with respect to several known, and new, measures of presortedness. A new such measure, called Osc(X), measures the oscillation within the input data. The measure has an interesting application in the sweep-line technique in computational geometry. Our algorithm is based on a new approach which yields space efficiency and it uses simple data structures. For example, after a linear time preprocessing step, the only data structures used are a static tree and a heap.
Key wordssorting algorithm measures presortedness heap geometric interpretation optimality
Unable to display preview. Download preview PDF.
- [Ede87]H. Edelsbrunner. Algorithms in Combinatorial Geometry. Springer-Verlag, Berlin/Heidelberg, F.R. Germany, 1987.Google Scholar
- [EW87]V. Estivill-Castro and D. Wood. A new measure of presortedness. Research Report CS-87-58, University of Waterloo, Department of Computer Science, Waterloo, Canada, 1987.Google Scholar
- [GMPR77]L.J. Guibas, E.M. McCreight, M.F. Plass, and J.R. Roberts. A new representation of linear lists. In Proc. 9th Annual ACM Symposium on Theory of Computing, pages 49–60, 1977.Google Scholar
- [Man84]H Mannila. Implementation of a sorting algorithm suitable for presorted files. Technical Report, Department of Computer Science, University of Helsinki, Finland, 1984.Google Scholar
- [Man85]H. Mannila. Measures of presortedness and optimal sorting algorithms. IEEE Transactions on Computers, C-34(4):318–325, 1985.Google Scholar
- [Meh79]K. Mehlhorn. Sorting presorted files. In Proc. 4th GI Conference on Theoretical Computer Science, pages 199–212, Springer-Verlag, 1979.Google Scholar
- [Meh84a]K. Mehlhorn. Data Structures and Algorithms, Vol 1: Sorting and Searching. Springer-Verlag, Berlin/Heidelberg, F.R. Germany, 1984.Google Scholar
- [Meh84b]K. Mehlhorn. Data Structures and Algorithms, Vol. 3: Multidimensional Searching and Computational Geometry. Springer-Verlag, Berlin/Heidelberg, F.R. Germany, 1984.Google Scholar
- [ORo87]J. O'Rourke. Art Gallery Theorems and Algorithms. Oxford University Press, New York/Oxford, 1987.Google Scholar
- [PS85]F.P. Preparata and M.I. Shamos. Computational Geometry: An Introduction. Springer-Verlag, New York, N.Y., 1985.Google Scholar