Transitional behaviors of the average cost of quicksort with median-of-(2t + 1)

A fine analysis is given of the transitional behavior of the average cost of quicksort with median-of-three. Asymptotic formulae are derived for the stepwise improvement of the average cost of quicksort when iterating median-of-threek rounds for all possible values ofk. The methods used are general enough to apply to quicksort with median-of-(2t + 1) and to explain in a precise manner the transitional behaviors of the average cost from insertion sort to quicksort proper. Our results also imply nontrivial bounds on the expected height, “saturation level,” and width in a random locally balanced binary search tree.

[1]  Hsien-Kuei Hwang Sur la répartition des valeurs des fonctions arithmétiques. Le nombre de facteurs premiers d'un entier , 1998 .

[2]  Philippe Flajolet,et al.  Singularity Analysis of Generating Functions , 1990, SIAM J. Discret. Math..

[3]  Donald E. Knuth,et al.  The art of computer programming, volume 3: (2nd ed.) sorting and searching , 1998 .

[4]  C. Q. Lee,et al.  The Computer Journal , 1958, Nature.

[5]  P. Hartman Ordinary Differential Equations , 1965 .

[6]  Hsien-Kuei Hwang,et al.  A Poisson * Negative Binomial Convolution Law for Random Polynomials over Finite Fields , 1998, Random Struct. Algorithms.

[7]  Andrew M. Odlyzko,et al.  Bandwidths and profiles of trees , 1985, J. Comb. Theory, Ser. B.

[8]  Conrado Martínez,et al.  Optimal Sampling Strategies in Quicksort , 1998, ICALP.

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

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

[11]  Leonidas J. Guibas A principle of independence for binary tree searching , 2004, Acta Informatica.

[12]  J. Doug Tygar,et al.  Optimal Sampling Strategies for Quicksort , 1995, Random Struct. Algorithms.

[13]  Gaston H. Gonnet,et al.  Handbook Of Algorithms And Data Structures , 1984 .

[14]  Philippe Flajolet,et al.  An introduction to the analysis of algorithms , 1995 .

[15]  N. Bleistein,et al.  Asymptotic Expansions of Integrals , 1975 .

[16]  E. L. Ince Ordinary differential equations , 1927 .

[17]  Helmut Prodinger,et al.  On the Number of Descendants and Ascendants in Random Search Trees , 1998, Electron. J. Comb..

[18]  Luc Devroye On the expected height of fringe-balanced trees , 2005, Acta Informatica.

[19]  Roderick Wong,et al.  Asymptotic approximations of integrals , 1989, Classics in applied mathematics.

[20]  Robert Sedgewick,et al.  Algorithms in C , 1990 .

[21]  Robert Sedgewick,et al.  The analysis of Quicksort programs , 1977, Acta Informatica.

[22]  Derick Wood,et al.  Locally Balanced Binary Trees , 1976, Comput. J..

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

[24]  S. Rice,et al.  Saddle point approximation for the distribution of the sum of independent random variables , 1980, Advances in Applied Probability.

[25]  Yeong-Nan Yeh,et al.  Presorting algorithms: An average-case point of view , 2000, Theor. Comput. Sci..

[26]  J. Ian Munro,et al.  The Analysis of a Fringe Heuristic for Binary Search Trees , 1985, J. Algorithms.

[27]  D. Greene Labelled formal languages and their uses , 1983 .

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

[29]  Hsien-Kuei Hwang A Poisson * negative binomial convolution law for random polynomials over finite fields , 1998 .

[30]  Lubor Kollár Optimal Sorting of Seven Element Sets , 1986, MFCS.

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

[32]  H. E. Daniels,et al.  Tail Probability Approximations , 1987 .