Analysis of Quickfind with Small Subfiles
In this paper we investigate variants of the well-known Hoare’s Quickfind algorithm for the selection of the j-th element out of n when recursion stops for subfiles whose size is below a predefined threshold and a simpler algorithm is run instead. We provide estimates for the combined number of passes, comparisons and exchanges under three policies for the small subfiles: insertion sort and two variants of selection sort, but the analysis could be easily adapted for alternative policies. We obtain the average cost for each of these variants and compare them with the costs of the standard variant which does not use cutoff. We also give the best explicit cutoff bound for each of the variants.
KeywordsAverage Cost Cutoff Function Optimal Sampling Strategy Quicksort Algorithm Pivot Selection
Unable to display preview. Download preview PDF.
- Hoare, C. Find (Algorithm 65). Communications of the ACM. (1961), 321–322.Google Scholar
- HWANG, H.-K., AND TSAI, T.-H. Quickselect and Dickman function. Combinatorics, Probability and Computing (2002). To appear.Google Scholar
- Knuth, D. Mathematical analysis of algorithms. In Information Processing ‘71, Proc. of the 1971 IFIP Congress (Amsterdam, 1972), North-Holland, pp. 19–27.Google Scholar
- Knuth, D. The Art of Computer Programming: Sorting and Searching, 2nd ed., vol. 3. Addison-Wesley, Reading, Mass., 1998.Google Scholar
- Sedgewick, R. Quicksort. Garland, New York, 1978.Google Scholar
- Sedgewick, R., and Flajolet, P. An Introduction to the Analysis of Algorithms. Addison-Wesley, Reading, Mass., 1996.Google Scholar