Sorting presorted files

  • Kurt Mehlhorn
Vorträge (In Alphabetischer Reihenfolge)
Part of the Lecture Notes in Computer Science book series (LNCS, volume 67)


A new sorting algorithm is presented. Its running time is O(n(1+log(F/n)) where F=|{(i,j); i<j and xi<xj}| is the total number of inversions in the input sequence xn xn−1 xn−2 ... x2 x1. In other words, presorted sequences are sorted quickly, and completely unsorted sequences are sorted in O(n log n) steps. Note that F<-n2/2 always. Furthermore, the constant of proportionality is fairly small and hence the sorting method is competitive with existing methods.


Input Sequence Binary Search Cleaning Process Large Element Interior Node 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. Adelson-Velskii-Landis: "An algorithm for the organization of information", Soviet. Math. Dokl, 3, 1259–1262, 1962Google Scholar
  2. Aho, Hopcroft & Ullman: "The Design and Analysis of Computer Algorithms", Addison Wesley, 1974Google Scholar
  3. Bayer & McCreight: "Organization and Maintenance of Large Ordered Indizes", Acta Informatica, 1 (1972), 173–189CrossRefGoogle Scholar
  4. Bentley & Yao: "An almost Optimal Algorithm for Unbounded Searching", Information Processing Letters, Vol. 5, No. 3, p. 82–87, August 1976CrossRefGoogle Scholar
  5. Brown & Tarjan: "A Representation for Linear Lists with Movable Fingers", 10th ACM Symposium on Theory of Computing, p. 19–29, 1978Google Scholar
  6. Fredman, M. L.: "Two applications of a Probabilistic Search Technique: Sorting X + Y and Building Balanced Search Trees", 7th ACM Symposium on Theory of Computing, 1975 240–244Google Scholar
  7. Guibas, Creight, Plass, Roberts: "A new representation for linear lists, 9th ACM Symposium on Theory of Computing 1977, 49–60Google Scholar
  8. Mehlhorn, K.: "Effiziente Algorithmen", Teubner Studienbücher Informatik, Stuttgart 1977Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1979

Authors and Affiliations

  • Kurt Mehlhorn

There are no affiliations available

Personalised recommendations