Comparisons in Hoare's Find Algorithm

  • Authors:
  • Peter Kirschenhofer;Helmut Prodinger

  • Affiliations:
  • Institut für Algebra und Diskrete Mathematik, Technical University of Vienna, Wiedner Hauptstrasse 8-10, A-1040 Vienna, Austria (e-mail: {Peter.Kirschenhofer}{Helmut.Prodinger}@tuwien.ac.at);Institut für Algebra und Diskrete Mathematik, Technical University of Vienna, Wiedner Hauptstrasse 8-10, A-1040 Vienna, Austria (e-mail: {Peter.Kirschenhofer}{Helmut.Prodinger}@tuwien.ac.at)

  • Venue:
  • Combinatorics, Probability and Computing
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

We study the number of comparisons in Hoare's Find algorithm. Using trivariate generating functions, we get an explicit expression for the variance of the number of comparisons, if we search for the jth element in a random permutation of n elements. The variance is also asymptotically evaluated under the assumption that j is proportional to n. Similar results for the number of passes (recursive calls) are given, too.