Abstract
Encroaching lists are a generalization of monotone sequences in permutations. Since ordered permutations contain fewer encroaching lists than random ones, the number of such listsm provides a measure of presortedness with advantages over others in the literature. Experimental and analytic results are presented to cast light on the properties of encroaching lists. Also, we describe a new sorting algorithm,melsort, with complexityO(nlogm). Thus it is linear for well ordered sets and reduces to mergesort andO(nlogn) in the worst case.
Similar content being viewed by others
References
D. Knuth, The Art of Computer Programming, Vol. 3: Searching and Sorting. Addison-Wesley Publishing Co., Reading, MA, 1973.
C. Schensted,Longest increasing and decreasing subsequences, Canadian J. Math. (1961), Vol. 13, pp. 179–191.
B. F. Logan and L. A. Shepp,A variational problem for random Young tableaux, Advances in Mathematics (1977), Vol. 26, pp. 206–222.
A. M. Versik and S. V. Kerov,Asymptotics of the Plancherel measure of the symmetric group and the limiting form of Young tables, Dokl. Akad. Nauk SSSR (1977), Vol. 233, pp. 1024–1028.
J. L. Bentley, H. T. Kung, M. Schkolnick, and C. D. Thompson,On the average number of maxima in a set of vectors and applications, J. ACM (1978), Vol. 25, pp. 536–543.
E. E. Lindstrom, J. S. Vitter, and C. K. Wong,Sorting, IEEE Trans. on Computers (April 1985), Vol. C-34, pp. 293–295.
E. Dijkstra,Smoothsort, an alternative for sorting in situ, Science of Computer Programming (1982), Vol. 1, pp. 223–233.
S. Hertel,Smoothsort's behavior on presorted sequences, Info. Processing Letters (13 May 1983), Vol. 16, pp. 165–170.
C. Cook and D. Kim,Best sorting algorithm for nearly sorted lists, CACM (November 1980), Vol. 23, pp. 620–624.
K. Mehlhorn,Sorting presorted files, In:Lect. Notes in Computer Science V. 67, K. Weihrauch, ed., Springer, Berlin, 1979, pp. 199–212.
H. Mannila,Measures of presortedness and optimal sorting algorithms, IEEE Trans. on Computers (April 1985), Vol. C-34, pp. 318–325.
R. L. Wainwright,A class of sorting algorithms based on quicksort, CACM (April 1985), Vol. 28, pp. 396–402.
Author information
Authors and Affiliations
Additional information
This work was partially supported by National Science Foundation Grant CCSR-8714565.
Rights and permissions
About this article
Cite this article
Skiena, S.S. Encroaching lists as a measure of presortedness. BIT 28, 775–784 (1988). https://doi.org/10.1007/BF01954897
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01954897