Large Deviations for Quicksort

Abstract

Let Qn be the random number of comparisons made by quicksort in sorting n distinct keys, when we assume that all n! possible orderings are equally likely. Known results concerning moments for Qn do not show how rare it is for Qn to make large deviations from its mean. Here we give a good approximation to the probability of such a large deviation, and find that this probability is quite small. As well as the basic quicksort we consider the variant in which the partitioning key is chosen as the median of (2t + 1) keys.

DOI: 10.1006/jagm.1996.0055

Extracted Key Phrases

6 Figures and Tables

Cite this paper

@article{McDiarmid1996LargeDF, title={Large Deviations for Quicksort}, author={Colin McDiarmid and Ryan B. Hayward}, journal={J. Algorithms}, year={1996}, volume={21}, pages={476-507} }