Abstract
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.
Preview
Unable to display preview. Download preview PDF.
Bibliography
Adelson-Velskii-Landis: "An algorithm for the organization of information", Soviet. Math. Dokl, 3, 1259–1262, 1962
Aho, Hopcroft & Ullman: "The Design and Analysis of Computer Algorithms", Addison Wesley, 1974
Bayer & McCreight: "Organization and Maintenance of Large Ordered Indizes", Acta Informatica, 1 (1972), 173–189
Bentley & Yao: "An almost Optimal Algorithm for Unbounded Searching", Information Processing Letters, Vol. 5, No. 3, p. 82–87, August 1976
Brown & Tarjan: "A Representation for Linear Lists with Movable Fingers", 10th ACM Symposium on Theory of Computing, p. 19–29, 1978
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–244
Guibas, Creight, Plass, Roberts: "A new representation for linear lists, 9th ACM Symposium on Theory of Computing 1977, 49–60
Mehlhorn, K.: "Effiziente Algorithmen", Teubner Studienbücher Informatik, Stuttgart 1977
Editor information
Rights and permissions
Copyright information
© 1979 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Mehlhorn, K. (1979). Sorting presorted files. In: Weihrauch, K. (eds) Theoretical Computer Science 4th GI Conference. Lecture Notes in Computer Science, vol 67. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-09118-1_22
Download citation
DOI: https://doi.org/10.1007/3-540-09118-1_22
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-09118-9
Online ISBN: 978-3-540-35517-5
eBook Packages: Springer Book Archive