Towards a realistic analysis of the QuickSelect algorithm
Résumé
We revisit the analysis of the classical QuickSelect algorithm. Usually, the analysis deals with the mean number of key comparisons, but here we view keys as words produced by a source, and words are compared via their symbols in lexicographic order. Our probabilistic models belong to a broad category of information sources that encompasses memoryless (i.e., independent-symbols) and Markov sources, as well as many unbounded-correlation sources. The " realistic " cost of the algorithm is here the total number of symbol comparisons performed by the algorithm, and, in this context, the average-case analysis aims to provide estimates for the mean number of symbol comparisons. For the QuickSort algorithm, known average-case complexity results are of Θpn log nq in the case of key comparisons, and Θpn log 2 nq for symbol comparisons. For QuickSelect algorithms, and with respect to key comparisons, the average-case complexity is Θpnq. In this present article, we prove that, with respect to symbol comparisons, QuickSelect's average-case complexity remains Θpnq. In each case, we provide explicit expressions for the dominant constants, closely related to the probabilistic behaviour of the source. We began investigating this research topic with Philippe Flajolet, and the short version of the present paper (the ICALP'2009 paper) was written with him. As usual, Philippe played a central role, notably on the following points: The first, third, and fourth authors thank two ANR Projects: ANR BOOLE (ANR 2009 BLAN 0011) and ANR MAGNUM (ANR 2010 BLAN 0204). Research for the second author was supported by The Johns Hopkins University's Acheson J. Duncan Fund for the Advancement of Research in Statistics.
Origine | Fichiers produits par l'(les) auteur(s) |
---|
Loading...