SIGAL 1990: Algorithms pp 251-260 | Cite as

Sublinear merging and natural merge sort

  • Svante Carlsson
  • Christos Levcopoulos
  • Ola Petersson
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 450)

Abstract

The complexity of merging two sorted sequences into one is linear in the worst case as well as in the average case. There are, however, instances for which a sublinear number of comparisons is sufficient. We consider the problem of measuring and exploiting such instance easiness. The merging algorithm presented, Adaptmerge, is shown to optimally adapt to different kinds of measures of instance easiness. In the sorting problem, the concept of instance easiness has received a lot of attention and is interpreted by a measure of presortedness. We apply Adaptmerge in the already adaptive sorting algorithm Natural Merge Sort. The resulting algorithm optimally adapts to several, known and new, measures of presortedness. We also prove some interesting results concerning the relation between measures of presortedness proposed in the literature.

Keywords

Linear Time Binary Search Sorting Algorithm Merging Algorithm Sorting Problem 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    T. Altman and Y. Igarashi. Roughly sorting: sequential and parallel approach. Journal of Information Processing, 12(2):154–158, 1989.MathSciNetGoogle Scholar
  2. [2]
    V. Estivill-Castro and D. Wood. A new measure of presortedness. Information and Computation, 83(1):111–119, 1989.CrossRefGoogle Scholar
  3. [3]
    E. Horowitz and S. Sahni. Fundamentals of Computer Algorithms. Computer Science Press, Rockville, Maryland, 1984.Google Scholar
  4. [4]
    C. Levcopoulos and O. Petersson. Heapsort—adapted for presorted files. In Proc. 2nd SWAT. LNCS, Springer-Verlag, 1990. To appear.Google Scholar
  5. [6]
    H. Mannila. Measures of presortedness and optimal sorting algorithms. IEEE Transactions on Computers, C-34(4):318–325, 1985.Google Scholar
  6. [7]
    K. Mehlhorn. Data Structures and Algorithms, Vol 1: Sorting and Searching. 1984.Google Scholar
  7. [8]
    S.S. Skiena. Encroaching lists as a measure of presortedness. BIT, 28(4):775–784, 1988.MathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1990

Authors and Affiliations

  • Svante Carlsson
    • 1
  • Christos Levcopoulos
    • 1
  • Ola Petersson
    • 1
  1. 1.Algorithm Theory Group, Department of Computer ScienceLund UniversityLundSweden

Personalised recommendations