Hostname: page-component-74656f9884-rdgjk Total loading time: 0 Render date: 2026-11-07T01:59:56.461Z Has data issue: false hasContentIssue false

Comparisons in Hoare's Find Algorithm

Published online by Cambridge University Press:  01 March 1998

PETER KIRSCHENHOFER
Affiliation:
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)
HELMUT PRODINGER
Affiliation:
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)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

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.

Information

Type
Research Article
Copyright
1998 Cambridge University Press