Search arXivSearch

arXiv · 1202.2601

Distributional convergence for the number of symbol comparisons used by QuickSort

Abstract

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 (i.i.d.) 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, that is, whenever each key is generated as an infinite string of i.i.d. symbols. This is somewhat surprising; even for the classical model that each key is an i.i.d. string of unbiased ("fair") bits, the mean exhibits periodic fluctuations of order n.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

James Allen Fill. 2013-03-13. Distributional convergence for the number of symbol comparisons used by QuickSort. https://doi.org/10.1214/12-aap866

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Generalized Edgeworth expansions for integer-valued additive functionals of uniformly elliptic Markov chains

We obtain asymptotic expansions for probabilities $\bbP(S_N=k)$ of partial sums of uniformly bounded integer-valued functionals $\DS S_N=\sum_{n=1}^N f_n(X_n)$ of uniformly elliptic inhomogeneous Markov chains. The expansions involve products of polynomials and trigonometric polynomials, and they hold without additional assumptions. As an application of the explicit formulas of the trigonometric polynomials, we relate existence of the standard Edgeworth expansions of order $r$ to the rate of equidistributions of $S_N$ modulo $m$ for small positive integers $m.$

math.PR

Permutations from Random Walk

Xavier and Yushi run a "random race" as follows. An atomless probability distribution $μ$ on the real line is chosen. The runners begin at zero. At time $i$ Xavier draws $\mathbf{X}_i$ from $μ$ and advances that distance, while Yushi advances by an independent drawing $\mathbf{Y}_i$. After $n$ such moves, what is the probability that Yushi led all the way? That the answer (namely, $4^{-n}\binom{2n}{n}$) is independent of $μ$ follows from a classical theorem of Darling, stating that for symmetric atomless increments, the distribution of each individual rank in the permutation obtained by ranking the partial sums is independent of the step law. We give a self-contained proof and extend the result to the permutations generated by partial sums of uniformly random signed permutations of any fixed, finite, generic set of reals. For atomless increments with mean zero and finite variance, without assuming symmetry, we show that random-walk permutations approach a random object that we call the "Wiener permuton," whose expected pattern densities equal the probabilities of the corresponding permutations generated by finite random walks with centered Laplace increments. Finally, we exhibit an infinite family of constructions whose limiting permutons interpolate between the Wiener permuton and the recursive separable permuton; each has the same intensity permuton, providing a single two-dimensional extension of the classical arcsine law for all of them.

math.PR

On the uniqueness of quasi-stationary distributions for population models with spatial structure

Subcritical population processes are attracted to extinction and do not have non-trivial stationary distributions, which prompts the study of quasi-stationary distributions (QSDs) instead. In contrast to what generally happens for stationary distributions, QSDs may not be unique, even under irreducibility conditions. The general conditions for uniqueness of QSDs are not always easy to check. For the branching process, besides the quasi-limiting distribution there are many other QSDs. In this paper, we investigate whether adding little extra information to the continuous-time branching process is enough to obtain uniqueness. We consider the branching process with genealogy and branching random walks, and show that they have a unique QSD.

math.PR