Quicksort asymptotics

  • Authors:
  • James Allen Fill;Svante Janson

  • Affiliations:
  • Department of Mathematical Sciences, The Johns Hopkins University, 34th and Charles Streets, Baltimore, MD;Department of Mathematics, Uppsala University, Sweden

  • Venue:
  • Journal of Algorithms - Analysis of algorithms
  • Year:
  • 2002

Quantified Score

Hi-index 0.01

Visualization

Abstract

The number of comparisons Xn used by Quicksort to sort an array of n distinct numbers has mean µn of order n log n and standard deviation of order n. Using different methods, Régnier and Rösler each showed that the normalized variate Yn := (Xn - µn)/n converges in distribution, say to Y; the distribution of Y can be characterized as the unique fixed point with zero mean of a certain distributional transformation.We provide the first rates of convergence for the distribution of Yn to that of Y, using various metrics. In particular, we establish the bound 2n-1/2 in the d2-metric, and the rate O(nε - (1/2)) for Kolmogorov-Smirnov distance, for any positive ε.