Title:
|
Analysis of Hoare's FIND algorithm with median-of-three partition
|
Author:
|
Kirschenhofer, P; Martínez Parra, Conrado; Prodinger, H
|
Other authors:
|
Universitat Politècnica de Catalunya. Departament de Ciències de la Computació |
Abstract:
|
Hoare's Find algorithm can be used to select the jth element out of a file of n elements. It bears a remarkable similarity to Quicksort; in each pass of the algorithm, a pivot element is used to split the file into two subfiles, and recursively, the algorithm proceeds with the subfile that contains the sought element. As in Quicksort, different strategies for selecting the pivot are reasonable. In this paper, we consider the Median-of-three version, where the pivot element is chosen as the median of a random sample of three elements. We give explicit formulae for both the average number of passes and comparisons, when any relative ordering of the n elements in the file is equally likely. |
Subject(s):
|
-Àrees temàtiques de la UPC::Informàtica -Hoare's Find algorithm -Quicksort |
Rights:
|
|
Document type:
|
Article - Published version Report |
Share:
|
|