Journal of the ACM (JACM)
Analysis of the space of search trees under the random insertion algorithm
Journal of Algorithms
Software—Practice & Experience
Analysis of Hoare's FIND algorithm with median-of-three partition
Random Structures & Algorithms - Special issue: average-case analysis of algorithms
Introspective sorting and selection algorithms
Software—Practice & Experience
The art of computer programming, volume 3: (2nd ed.) sorting and searching
The art of computer programming, volume 3: (2nd ed.) sorting and searching
Expected time bounds for selection
Communications of the ACM
Communications of the ACM
Optimal Sampling Strategies in Quicksort and Quickselect
SIAM Journal on Computing
Analysis of multiple quickselect variants
Theoretical Computer Science
Comparisons in Hoare's Find Algorithm
Combinatorics, Probability and Computing
Adaptive sampling for quickselect
SODA '04 Proceedings of the fifteenth annual ACM-SIAM symposium on Discrete algorithms
The analysis of Range Quickselect and related problems
Theoretical Computer Science
Hi-index | 0.00 |
Quickselect with median-of-3 is largely used in practice and its behavior is fairly well understood. However, the following natural adaptive variant, which we call proportion-from-3, had not been previously analyzed: “choose as pivot the smallest of the sample if the relative rank of the sought element is below 1/3, the largest if the relative rank is above 2/3, and the median if the relative rank is between 1/3 and 2/3.” We first analyze the average number of comparisons made when using proportion-from-2 and then for proportion-from-3. We also analyze ν-find, a generalization of proportion-from-3 with interval breakpoints at ν and 1-ν. We show that there exists an optimal value of ν and we also provide the range of values of ν where ν-find outperforms median-of-3. Then, we consider the average total cost of these strategies, which takes into account the cost of both comparisons and exchanges. Our results strongly suggest that a suitable implementation of ν-find could be the method of choice in a practical setting. We also study the behavior of proportion-from-s with s3 and in particular we show that proportion-from-s-like strategies are optimal when s→∞.