3 research outputs found
Analysis of Hoare's FIND algorithm with median-of-three partition
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
Analysis of Hoare's FIND algorithm with median-of-three partition
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.Postprint (published version
Analysis of Hoare's FIND algorithm with median-of-three partition
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