Quicksort Algorithm Again Revisited

We consider the standard Quicksort algorithm that sorts n distinct keys with all possible n! orderings of keys being equally likely. Equivalently, we analyze the total path length L(n) in a randomly built \emphbinary search tree. Obtaining the limiting distribution of L(n) is still an outstanding open problem. In this paper, we establish an integral equation for the probability density of the number of comparisons L(n). Then, we investigate the large deviations of L(n). We shall show that the left tail of the limiting distribution is much ''thinner'' (i.e., double exponential) than the right tail (which is only exponential). Our results contain some constants that must be determined numerically. We use formal asymptotic methods of applied mathematics such as the WKB method and matched asymptotics.

[1]  Donald E. Knuth,et al.  The art of computer programming: sorting and searching (volume 3) , 1973 .

[2]  P. Hadjicostas,et al.  Some properties of a limiting distribution in Quicksort , 1995 .

[3]  Uwe Rr Osler A Fixed Point Theorem for Distributions , 1999 .

[4]  Luc Devroye,et al.  A note on the height of binary search trees , 1986, JACM.

[5]  Henry C. Thacher,et al.  Applied and Computational Complex Analysis. , 1988 .

[6]  Philippe Jacquet,et al.  Asymptotic Behavior of the Lempel-Ziv Parsing Scheme and Digital Search Trees , 1995, Theor. Comput. Sci..

[7]  Hosam M. Mahmoud,et al.  Evolution of random search trees , 1991, Wiley-Interscience series in discrete mathematics and optimization.

[8]  Uwe Rr Osler,et al.  A Limit Theorem for "quicksort" , 1999 .

[9]  William F. Eddy,et al.  How Many Comparisons Does Quicksort Use? , 1995, J. Algorithms.

[10]  Mireille Régnier A Limiting Distribution for Quicksort , 1989, RAIRO Theor. Informatics Appl..

[11]  U. Rösler A limit theorem for "Quicksort" , 1991, RAIRO Theor. Informatics Appl..

[12]  P. Zweifel Advanced Mathematical Methods for Scientists and Engineers , 1980 .

[13]  David Thomas,et al.  The Art in Computer Programming , 2001 .

[14]  Irene A. Stegun,et al.  Handbook of Mathematical Functions. , 1966 .

[15]  Michael Cramer A Note Concerning the Limit Distribution of the Quicksort Algorithm , 1996, RAIRO Theor. Informatics Appl..

[16]  Donald E. Knuth,et al.  The Art of Computer Programming: Volume 3: Sorting and Searching , 1998 .

[17]  E. Rodney Canfield,et al.  From recursions to asymptotics: on Szekeres' formula for the number of partitions , 1996, Electron. J. Comb..

[18]  Dexter Kozen Random Search Trees , 1992 .

[19]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[20]  U. Rösler A fixed point theorem for distributions , 1992 .

[21]  P. Hennequin Combinatorial Analysis of Quicksort Algorithm , 1989, RAIRO Theor. Informatics Appl..

[22]  S. Rachev,et al.  Probability metrics and recursive algorithms , 1995, Advances in Applied Probability.

[23]  Pascal Hennequin Analyse en moyenne d'algorithmes, tri rapide et arbres de recherche , 1991 .

[24]  R. B. Hayward,et al.  Large Deviations for Quicksort , 1996, J. Algorithms.