The worst case permutation for median-of-three quicksort
The Computer Journal
Analysis of Hoare's FIND algorithm with median-of-three partition
Random Structures & Algorithms - Special issue: average-case analysis of algorithms
The art of computer programming, volume 3: (2nd ed.) sorting and searching
The art of computer programming, volume 3: (2nd ed.) sorting and searching
Implementing Quicksort programs
Communications of the ACM
Algorithm 347: an efficient algorithm for sorting with minimal storage [M1]
Communications of the ACM
Communications of the ACM
Communications of the ACM
Comparisons in Hoare's Find Algorithm
Combinatorics, Probability and Computing
Smoothed analysis of algorithms: Why the simplex algorithm usually takes polynomial time
Journal of the ACM (JACM)
Smoothed analysis of binary search trees
Theoretical Computer Science
Smoothed Analysis of Binary Search Trees and Quicksort under Additive Noise
MFCS '08 Proceedings of the 33rd international symposium on Mathematical Foundations of Computer Science
A Practical Quicksort Algorithm for Graphics Processors
ESA '08 Proceedings of the 16th annual European symposium on Algorithms
Hi-index | 0.00 |
We provide a smoothed analysis of Hoare's find algorithm and we revisit the smoothed analysis of quicksort. Hoare's find algorithm --- often called quickselect --- is an easy-to-implement algorithm for finding the k -th smallest element of a sequence. While the worst-case number of comparisons that Hoare's find needs is ***(n 2), the average-case number is ***(n ). We analyze what happens between these two extremes by providing a smoothed analysis of the algorithm in terms of two different perturbation models: additive noise and partial permutations. In the first model, an adversary specifies a sequence of n numbers of [0,1], and then each number is perturbed by adding a random number drawn from the interval [0,d ]. We prove that Hoare's find needs $\Theta(\frac{n}{d+1} \sqrt{n/d} + n)$ comparisons in expectation if the adversary may also specify the element that we would like to find. Furthermore, we show that Hoare's find needs fewer comparisons for finding the median. In the second model, each element is marked with probability p and then a random permutation is applied to the marked elements. We prove that the expected number of comparisons to find the median is in $\Omega\big((1\,{-}\,p) \frac np \log n\big)$, which is again tight. Finally, we provide lower bounds for the smoothed number of comparisons of quicksort and Hoare's find for the median-of-three pivot rule, which usually yields faster algorithms than always selecting the first element: The pivot is the median of the first, middle, and last element of the sequence. We show that median-of-three does not yield a significant improvement over the classic rule: the lower bounds for the classic rule carry over to median-of-three.