Search arXiv⌕ Search

arXiv · 0706.2437

Analysis of the expected number of bit comparisons required by Quickselect

Abstract

When algorithms for sorting and searching are applied to keys that are represented as bit strings, we can quantify the performance of the algorithms not only in terms of the number of key comparisons required by the algorithms but also in terms of the number of bit comparisons. Some of the standard sorting and searching algorithms have been analyzed with respect to key comparisons but not with respect to bit comparisons. In this paper, we investigate the expected number of bit comparisons required by Quickselect (also known as Find). We develop exact and asymptotic formulae for the expected number of bit comparisons required to find the smallest or largest key by Quickselect and show that the expectation is asymptotically linear with respect to the number of keys. Similar results are obtained for the average case. For finding keys of arbitrary rank, we derive an exact formula for the expected number of bit comparisons that (using rational arithmetic) requires only finite summation (rather than such operations as numerical integration) and use it to compute the expectation for each target rank.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

James Allen Fill, Take Nakama. 2007-06-16. Analysis of the expected number of bit comparisons required by Quickselect. https://arxiv.org/abs/0706.2437

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

KEEP EXPLORING

Related papers

Well-posedness of kinetic McKean-Vlasov equations

We consider the McKean-Vlasov equation $dX_t = b(t, X_t, [X_t])dt + σ(t, X_t, [X_t])dW_t$ where $[X_t]$ is the law of $X_t$. We specifically consider the kinetic case, where the equation is degenerate because the dimension of the Brownian motion $W$ is strictly smaller than that of the solution $X$, as commonly required in classical models of collisional kinetic theory. Assuming Hölder continuous coefficients and a weak Hörmander condition, we prove the well-posedness of the equation. This result advances the existing literature by filling a crucial gap: it addresses the previously unexplored case where the diffusion coefficient $σ$ depends on the law $[X_t]$. Notably, our proof employs a simplified and direct argument eliminating the need for PDEs involving derivatives with respect to the measure argument. A critical ingredient is the sub-Riemannian metric structure induced by the corresponding Fokker-Planck operator.

math.PR↗

Ergodic properties of the harmonic process

In this paper we study detailed fluctuation results for a class of non-equilibrium steady states. The main example is the boundary driven harmonic model \cite{frassek2022exact}. In this model, the non-equilibrium steady state (NESS) is a mixture of products of geometric distributions, of which the local parameters are in turn distributed as uniform order statistics. For such a NESS, we prove law of large numbers, central limit theorem and large deviation results for fields of a general local functions (generalizing the density field). We also obtain quantitative results on the deviation from local equilibrium.

math.PR↗

First pair coalescence among three geodesics

In directed last-passage percolation with i.i.d. exponential vertex weights, the coalescence time $\operatorname{Coal}(a,b)$ of two semi-infinite geodesics started from vertices $a$ and $b$ in a fixed direction has a heavy tail with (KPZ) exponent $2/3$, and hence infinite expectation. We study instead the first coalescence among triples of semi-infinite geodesics in first- and last-passage percolation models (FPP/LPP) on $\mathbb{Z}^2$ that arise from stationary compatible families, such as Busemann geodesics. For directed FPP and LPP with arbitrary weights, we prove that $$\mathbb{E}\bigl[\min\{\operatorname{Coal}(a,a-e_1),\operatorname{Coal}(a,a-e_2)\}\bigr]<\infty.$$ We also consider FPP and LPP models in which antidiagonal motion is allowed, and prove that for every integer $k>0$, \[\mathbb{E}\bigl[\min\{\operatorname{Coal}(a,a-k(e_1-e_2)),\operatorname{Coal}(a,a+k(e_1-e_2))\}\bigr]<\infty.\] These results support the heuristic prediction that adjacent coalescence times are negatively associated.

math.PR↗