research

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-2t+12t+1 versions of Quickselect as well as further variations of the algorithm.Comment: Theorem 4.4 revised; accepted for publication in Analytic Algorithmics and Combinatorics (ANALCO14

    Similar works

    Full text

    thumbnail-image

    Available Versions