Radix Sort is a sorting algorithm based on analyzing digital data. We study the number of swaps made by Radix Select (a one-sided version of Radix Sort) to find an element with a randomly selected rank. This kind of grand average provides a smoothing over all individual distributions for specific fixed-order statistics. We give an exact analysis for the grand mean and an asymptotic analysis for the grand variance, obtained by poissonization, the Mellin transform, and depoissonization. The digital data model considered is the Bernoulli(p). The distributions involved in the swaps experience a phase change between the biased cases (p = 1 2 ) and the unbiased case (p = 1 2 ). In the biased cases, the grand distribution for the number of swaps (when suitably scaled) converges to that of a perpetuity built from a two-point distribution. The tool for this proof is contraction in the Wasserstein metric space, and identifying the limit as the fixed-point solution of a distributional equation. In the unbiased case the same scaling for the number of swaps gives a limiting constant in probability.Keywords: Random structure; algorithm; order statistic; recurrence; perpetuity; phase change; digital data; digital sorting; selection; Mellin transform; poissonization; depoissonization 2010 Mathematics Subject Classification: Primary 60C05 Secondary 60F05; 68P10
Radix methodsRadix Sort is a sorting technique based on analyzing the digital composition of keys. Digits (possibly bits at the lowest machine level) are extracted from keys and used to classify the keys. Radix Sort dates back to the nineteenth century and can be found in the work of Hollerith (1894) on tabulating machines. It provides a good alternative for comparison-based sorting algorithms like Quick Sort and Merge Sort, where keys are compared according to an ordering relation; see Knuth (1998, pp. 116-119), Mahmoud (2000, pp. 148-151), and Mehlhorn (1984, pp. 42-68) for a broad discussion of these sorting algorithms.Two different variants of Radix Sort are known, the least-significant-digit (LSD) Radix Sort and the most-significant-digit (MSD) Radix Sort. The LSD Radix Sort starts with the leastsignificant digit and orders the keys accordingly. It repeatedly orders the keys moving towards the most-significant digit and using one digit at a time; see, for example, Cormen et al. (2001, p. 178) for details. To guarantee the correctness of the LSD variant, every ordering round