A statistical view on exchanges in Quickselect
Abstract
In this paper we study the number of key exchanges required by Hoare's FIND algorithm (also called Quickselect) when operating on a uniformly distributed random permutation and selecting an independent uniformly distributed rank. After normalization we give a limit theorem where the limit law is a perpetuity characterized by a recursive distributional equation. To make the limit theorem usable for statistical methods and statistical experiments we provide an explicit rate of convergence in the Kolmogorov--Smirnov metric, a numerical table of the limit law's distribution function and an algorithm for exact simulation from the limit distribution. We also investigate the limit law's density. This case study provides a program applicable to other cost measures, alternative models for the rank selected and more balanced choices of the pivot element such as median-of- versions of Quickselect as well as further variations of the algorithm.
Keywords
Cite
@article{arxiv.1307.8403,
title = {A statistical view on exchanges in Quickselect},
author = {Benjamin Dadoun and Ralph Neininger},
journal= {arXiv preprint arXiv:1307.8403},
year = {2013}
}
Comments
Theorem 4.4 revised; accepted for publication in Analytic Algorithmics and Combinatorics (ANALCO14)