QuickSelect (also known as Find), introduced by Hoare ((1961) Commun. ACM 4 321–322.), is a randomized algorithm for selecting a specified order statistic from an input sequence of
$n$ objects, or rather their identifying labels usually known as keys. The keys can be numeric or symbol strings, or indeed any labels drawn from a given linearly ordered set. We discuss various ways in which the cost of comparing two keys can be measured, and we can measure the efficiency of the algorithm by the total cost of such comparisons.
We define and discuss a closely related algorithm known as QuickVal and a natural probabilistic model for the input to this algorithm; QuickVal searches (almost surely unsuccessfully) for a specified population quantile
$\alpha \in [0, 1]$ in an input sample of size
$n$. Call the total cost of comparisons for this algorithm
$S_n$. We discuss a natural way to define the random variables
$S_1, S_2, \ldots$ on a common probability space. For a general class of cost functions, Fill and Nakama ((2013) Adv. Appl. Probab. 45 425–450.) proved under mild assumptions that the scaled cost
$S_n / n$ of QuickVal converges in
$L^p$ and almost surely to a limit random variable
$S$. For a general cost function, we consider what we term the QuickVal residual:
\begin{equation*} \rho _n \,{:\!=}\, \frac {S_n}n - S. \end{equation*}
The residual is of natural interest, especially in light of the previous analogous work on the sorting algorithm QuickSort (Bindjeme and Fill (2012) 23rd International Meeting on Probabilistic, Combinatorial, and Asymptotic Methods for the Analysis of Algorithms (AofA'12), Discrete Mathematics, and Theoretical Computer Science Proceedings, AQ, Association: Discrete Mathematics and Theoretical Computer Science, Nancy, pp. 339–348; Neininger (2015) Random Struct. Algorithms 46 346–361; Fuchs (2015) Random Struct. Algorithms 46 677–687; Grübel and Kabluchko (2016) Ann. Appl. Probab. 26 3659–3698; Sulzbach (2017) Random Struct. Algorithms 50 493–508). In the case
$\alpha = 0$ of QuickMin with unit cost per key-comparison, we are able to calculate–àla Bindjeme and Fill for QuickSort (Bindjeme and Fill (2012) 23rd International Meeting on Probabilistic, Combinatorial, and Asymptotic Methods for the Analysis of Algorithms (AofA'12), Discrete Mathematics and Theoretical Computer Science Proceedings, AQ, Association: Discrete Mathematics and Theoretical Computer Science, Nancy, pp. 339–348.)–the exact (and asymptotic)
$L^2$-norm of the residual. We take the result as motivation for the scaling factor
$\sqrt {n}$ for the QuickVal residual for general population quantiles and for general cost. We then prove in general (under mild conditions on the cost function) that
$\sqrt {n}\,\rho _n$ converges in law to a scale mixture of centered Gaussians, and we also prove convergence of moments.