The Number of Symbol Comparisons in QuickSort and QuickSelect

  • Authors:
  • Brigitte Vallée;Julien Clément;James Allen Fill;Philippe Flajolet

  • Affiliations:
  • GREYC, CNRS and University of Caen, Caen Cedex, France 14032;GREYC, CNRS and University of Caen, Caen Cedex, France 14032;Applied Mathematics and Statistics, The Johns Hopkins University, Baltimore, USA 21218-2682;Algorithms Project, INRIA-Rocquencourt, Le Chesnay, France 78153

  • Venue:
  • ICALP '09 Proceedings of the 36th International Colloquium on Automata, Languages and Programming: Part I
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

We revisit the classical QuickSort and QuickSelect algorithms, under a complexity model that fully takes into account the elementary comparisons between symbols composing the records to be processed. Our probabilistic models belong to a broad category of information sources that encompasses memoryless (i.e., independent-symbols) and Markov sources, as well as many unbounded-correlation sources. We establish that, under our conditions, the average-case complexity of QuickSort is O (n log2 n ) [rather than O (n logn ), classically], whereas that of QuickSelect remains O (n ). Explicit expressions for the implied constants are provided by our combinatorial---analytic methods.