Distributional convergence for the number of symbol comparisons used by QuickSelect

Most previous studies of the sorting algorithm QuickSort have used the number of key comparisons as a measure of the cost of executing the algorithm. Here we suppose that the n independent and identically distributed (iid) keys are each represented as a sequence of symbols from a probabilistic source and that QuickSort operates on individual symbols, and we measure the execution cost as the number of symbol comparisons. Assuming only a mild “tameness” condition on the source, we show that there is a limiting distribution for the number of symbol comparisons after normalization: first centering by the mean and then dividing by n. Additionally, under a condition that grows more restrictive as p increases, we have convergence of moments of orders p and smaller. In particular, we have convergence in distribution and convergence of moments of every order whenever the source is memoryless, i.e., whenever each key is generated as an infinite string of iid symbols. This is somewhat surprising: Even for the classical model that each key is an iid string of unbiased (“fair”) bits, the mean exhibits periodic fluctuations of order n.

[1]  Volkert Paulsen,et al.  THE MOMENTS OF FIND , 1997 .

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

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

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

[5]  Donald E. Knuth,et al.  Mathematical Analysis of Algorithms , 1971, IFIP Congress.

[6]  Patrick Billingsley,et al.  Probability and Measure. , 1986 .

[7]  Ludger Rüschendorf,et al.  Rates of convergence for Quicksort , 2002, J. Algorithms.

[8]  Svante Janson,et al.  A characterization of the set of fixed points of the Quicksort transformation , 2000, ArXiv.

[9]  Wojciech Szpankowski,et al.  Quicksort Algorithm Again Revisited , 1999, Discret. Math. Theor. Comput. Sci..

[10]  James Allen Fill,et al.  Analysis of the Expected Number of Bit Comparisons Required by Quickselect , 2008, ANALCO.

[11]  Hosam M. Mahmoud,et al.  Probabilistic Analysis of MULTIPLE QUICK SELECT , 1998, Algorithmica.

[12]  Svante Janson,et al.  Smoothness and decay properties of the limiting Quicksort density function , 2000, ArXiv.

[13]  Hsien-Kuei Hwang,et al.  Quickselect and the Dickman Function , 2002, Combinatorics, Probability and Computing.

[14]  Philippe Flajolet,et al.  Dynamical Sources in Information Theory : A General Analysis of Trie Structures , 1999 .

[15]  M. V. Wilkes,et al.  The Art of Computer Programming, Volume 3, Sorting and Searching , 1974 .

[16]  A. Gut Probability: A Graduate Course , 2005 .

[17]  H. Rosenthal On the subspaces ofLp(p>2) spanned by sequences of independent random variables , 1970 .

[18]  Sartaj Sahni,et al.  Analysis of algorithms , 2000, Random Struct. Algorithms.

[19]  Sheldon M. Ross,et al.  A First Course in Probability , 1979 .

[20]  Hosam M. Mahmoud,et al.  Analysis of Quickselect: An Algorithm for Order Statistics , 1995, RAIRO Theor. Informatics Appl..

[21]  Luc Devroye,et al.  Exponential Bounds for the Running Time of a Selection Algorithm , 1984, J. Comput. Syst. Sci..

[22]  Svante Janson,et al.  Quicksort asymptotics , 2002, J. Algorithms.

[23]  Luc Devroye,et al.  ON THE PROBABILISTIC WORST-CASE TIME OF “FIND” , 2001 .

[24]  Takehiko Nakama,et al.  Analysis of execution costs for QuickSelect , 2009 .

[25]  Kai Lai Chung,et al.  A Course in Probability Theory , 1949 .

[26]  R. Grübel,et al.  Asymptotic distribution theory for Hoare's selection algorithm , 1996, Advances in Applied Probability.

[27]  Uwe Rr Osler The Contraction Method for Recursive Algorithms , 1999 .

[28]  C. A. R. Hoare Algorithm 63: partition , 1961, CACM.

[29]  James Allen Fill,et al.  The limiting distribution for the number of symbol comparisons used by QuickSort is nondegenerate (extended abstract) , 2012, ArXiv.

[30]  James Allen Fill,et al.  Distributional Convergence for the Number of Symbol Comparisons Used by Quickselect , 2012, Advances in Applied Probability.

[31]  Svante Janson,et al.  The number of bit comparisons used by Quicksort: an average-case analysis , 2004, SODA '04.

[32]  Rudolf Grübel Hoare's selection algorithm: a Markov chain approach , 1998 .

[33]  O. Kallenberg Foundations of Modern Probability , 2021, Probability Theory and Stochastic Modelling.

[34]  H. Mahmoud,et al.  Average-case analysis of multiple Quickselect: An algorithm for finding order statistics , 1996 .

[35]  李幼升,et al.  Ph , 1989 .

[36]  Helmut Prodinger,et al.  Multiple Quickselect - Hoare's Find Algorithm for Several Elements , 1995, Inf. Process. Lett..

[37]  Philippe Flajolet,et al.  The Number of Symbol Comparisons in QuickSort and QuickSelect , 2009, ICALP.