SearcharxivSearch

arXiv · 1202.2595

The number of bit comparisons used by Quicksort: an average-case analysis

Abstract

The analyses of many algorithms and data structures (such as digital search trees) for searching and sorting are based on the representation of the keys involved as bit strings and so count the number of bit comparisons. On the other hand, the standard analyses of many other algorithms (such as Quicksort) are performed in terms of the number of key comparisons. We introduce the prospect of a fair comparison between algorithms of the two types by providing an average-case analysis of the number of bit comparisons required by Quicksort. Counting bit comparisons rather than key comparisons introduces an extra logarithmic factor to the asymptotic average total. We also provide a new algorithm, "BitsQuick", that reduces this factor to constant order by eliminating needless bit comparisons.

Explore related subjects

Keep this discovery

BibTeXRIS

James Allen Fill, Svante Janson. 2012-02-13. The number of bit comparisons used by Quicksort: an average-case analysis. https://arxiv.org/abs/1202.2595

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

KEEP EXPLORING

Related papers

Averaging principles for nonautonomous multiscale stochastic Burgers equations with reflection

In this paper, we study averaging principles for nonautonomous multiscale stochastic Burgers equations with reflection. First, we derive a general averaging principle applicable to such equations under minimal assumptions. Subsequently, since the coefficients of the obtained averaged equation still depend on the small scaling parameter $\e$, we impose either periodic or asymptotic conditions on the coefficients, thereby obtain two distinct averaged equations whose coefficients are independent of $\e$ and establish two averaging principles. Stopping times and Khasminskii's time discretization schemes play an important role. Finally, a concrete example is provided to illustrate the applicability and validity of the theoretical results.

math.PR

Spectral properties of Random Matrices

We give the theoretical foundations of random matrix theory through the definitions of a random matrix, a random probability measure and the corresponding empirical spectral distribution. The technical tool we use is the Stieltjes transform method through which we prove optimal convergence of the empirical spectral distribution of random sample covariance matrices to the deterministic Marchenko-Pastur distribution. We also give new results about the rigidity of the eigenvalues of this random sample covariance matrix and the rate of their convergence. We then define the Dyson equation method to prove new local laws about a random matrix model that interpolates between the Marchenko-Pastur distribution, the elliptical law and the circular law. Through our work these local laws can be considered universal.

math.PR

Moments approach for the elephant random walk

We discuss the method of moments for the one-dimensional elephant random walk (ERW). We first derive a differential recurrence relation for the characteristic function of the ERW, which yields a corresponding system of recurrence relations for its moments. We then obtain asymptotic approximations for the moments in each of the three parameter regimes of the ERW. Finally, by establishing the convergence of the moments and verifying the corresponding moment-determinacy conditions, we identify the limiting distributions of the ERW in each regime.

math.PR