Abstract
We describe a sorting algorithm that is optimally adaptive with respect to several important measures of presortedness. In particular, the algorithm requires O(nlog(k/n)) time on sequences with k inversions; O(n+ k log k) time on sequences X that have a longest ascending subsequence of length n−k and for which Rem(X)=k; and O(n log k) time on sequences that can be decomposed into k monotone shuffles. The algorithm makes use of an adaptive merging operation implemented using finger search trees.
Preview
Unable to display preview. Download preview PDF.
References
T. Altman and Y. Igarashi. Roughly sorting: sequential and parallel approach. Journal of Information Processing, 12(2):154–158, 1989.
M.R. Brown and R.E. Tarjan. Design and analysis of a data structure for representing sorted lists. SIAM Journal on Computing, 9:594–614, 1980.
S. Carlsson, C. Levcopoulos, and O. Petersson. Sublinear merging and Natural Mergesort. Algorithmica. To appear. Prel. version in Proc. Internat. Symp. on Algorithms, pages 251–260, LNCS 450, Springer-Verlag, 1990.
V. Estivill-Castro and D. Wood. A new measure of presortedness. Information and Computation, 83(1):111–119, 1989.
V. Estivill-Castro and D. Wood. A generic adaptive sorting algorithm. Research Report CS-90-31, Department of Computer Science, University of Waterloo, Waterloo, Canada, August 1990.
C. Levcopoulos and O. Petersson. Adaptive Heapsort. Journal of Algorithms. To appear. Prel. version in Proc. 1989 Workshop on Algorithms and Data Structures, pages 499–509, LNCS 382, Springer-Verlag, 1989.
C. Levcopoulos and O. Petersson. Sorting shuffled monotone sequences. Information and Computation. To appear. Prel. version in Proc. 2nd Scandinavian Workshop on Algorithm Theory, pages 181–191, LNCS 447, Springer-Verlag, 1990.
H. Mannila. Measures of presortedness and optimal sorting algorithms. IEEE Transactions on Computers, C-34(4):318–325, 1985.
H. Mannila and E. Ukkonen. A simple linear-time algorithm for in situ merging. Information Processing Letters, 18(4):203–208, 1984.
K. Mehlhorn. Data Structures and Algorithms, Vol. 1: Sorting and Searching. Springer-Verlag, Berlin, Germany, 1984.
A. Moffat. Adaptive merging and a naturally Natural Mergesort. In Proc. 14'th Australian Computer Science Conference, pages 08.1–08.8. University of New South Wales, February 1991.
A. Moffat, O. Petersson, and N.C. Wormald. Further analysis of an adaptive sorting algorithm. In Proc. 15'th Australian Computer Science Conference, pages 603–613. University of Tasmania, January 1992.
O. Petersson and A. Moffat. A framework for adaptive sorting. In Proc. 3rd Scandinavian Workshop on Algorithm Theory, pages 422–433. LNCS 621, Springer-Verlag, July 1992.
W. Pugh. Skip lists: a probabilistic alternative to balanced trees. Communications of the ACM, 33(6):668–676, 1990.
S.S. Skiena. Encroaching lists as a measure of presortedness. BIT, 28(4):775–784, 1988.
R.E. Tarjan. Amortised computational complexity. SIAM Journal on Applied and Discrete Methods, 6:306–318, 1985.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Moffat, A., Petersson, O., Wormald, N.C. (1992). Sorting and/by merging finger trees. In: Ibaraki, T., Inagaki, Y., Iwama, K., Nishizeki, T., Yamashita, M. (eds) Algorithms and Computation. ISAAC 1992. Lecture Notes in Computer Science, vol 650. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-56279-6_102
Download citation
DOI: https://doi.org/10.1007/3-540-56279-6_102
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-56279-5
Online ISBN: 978-3-540-47501-9
eBook Packages: Springer Book Archive