Hostname: page-component-8448b6f56d-c4f8m Total loading time: 0 Render date: 2024-04-24T19:06:33.779Z Has data issue: false hasContentIssue false

Analysis of swaps in radix selection

Published online by Cambridge University Press:  01 July 2016

Amr Elmasry*
Affiliation:
University of Copenhagen
Hosam Mahmoud*
Affiliation:
The George Washington University
*
Postal address: Department of Computer Science, University of Copenhagen, Universitetsparken 1, DK-2100 Copenhagen Ø, Denmark. Email address: elmasry@mpi-inf.mpg.de
∗∗ Postal address: Department of Statistics, The George Washington University, Washington, DC 20052, USA. Email address: hosam@gwu.edu
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

Radix Sort is a sorting algorithm based on analyzing digital data. We study the number of swaps made by Radix Select (a one-sided version of Radix Sort) to find an element with a randomly selected rank. This kind of grand average provides a smoothing over all individual distributions for specific fixed-order statistics. We give an exact analysis for the grand mean and an asymptotic analysis for the grand variance, obtained by poissonization, the Mellin transform, and depoissonization. The digital data model considered is the Bernoulli(p). The distributions involved in the swaps experience a phase change between the biased cases (p ≠ ½) and the unbiased case (p = ½). In the biased cases, the grand distribution for the number of swaps (when suitably scaled) converges to that of a perpetuity built from a two-point distribution. The tool for this proof is contraction in the Wasserstein metric space, and identifying the limit as the fixed-point solution of a distributional equation. In the unbiased case the same scaling for the number of swaps gives a limiting constant in probability.

Type
General Applied Probability
Copyright
Copyright © Applied Probability Trust 2011 

Footnotes

Part of this work was carried out while the author was at Max-Planck-Institut für Informatik. The author is currently on leave from Alexandria University of Egypt.

References

Barbour, A. D., Holst, L. and Janson, S. (1992). Poisson Approximation. Oxford University Press.Google Scholar
Chung, K. L. (1974). A Course in Probability Theory, 2dn edn. Academic Press, New York.Google Scholar
Cormen, T. H., Leiserson, C. E., Rivest, R. L. and Stein, C. (2001). Introduction to Algorithms, 2nd edn. MIT Press, Cambridge, MA.Google Scholar
De La Briandais, R. (1959). File searching using variable length keys. In Proc. Western Joint Computer Conf., AFIPS, San Francisco, CA, pp. 295298.Google Scholar
Fagin, R., Nievergelt, J., Pippenger, N. and Strong, H. (1979). Extendible hashing—a fast access method for dynamic files. ACM Trans. Database Systems 4, 315344.Google Scholar
Feller, W. (1968). An Introduction to Probability Theory and Its Applications, Vol. 1, 3rd edn. John Wiley, New York.Google Scholar
Fill, J. A. and Janson, S. (2004). The number of bit comparisons used by Quicksort: an average-case analysis. In Proc. ACM-SIAM Symp. Discrete Algorithms, Association for Computing Machinery, New York, pp. 300307.Google Scholar
Fill, J. A. and Nakama, T. (2008). Analysis of the expected number of bit comparisons required by Quickselect. In Proc. 10th Workshop Algorithm Engineering and Experiments and the 5th Workshop on Analytic Algorithmics and Combinatorics, Society for Industrial and Applied Mathematics, Philadelphia, PA, pp. 249256.Google Scholar
Flajolet, P., Gourdon, X., and Dumas, P. (1995). Mellin transforms and asymptotics: harmonic sums. Theoret. Comput. Sci. 144, 358.Google Scholar
Fredkin, E. (1960). Trie memory. Commun. ACM 3, 490499.Google Scholar
Hoare, C. A. R. (1962). Quicksort. Comput. J. 5, 1015.CrossRefGoogle Scholar
Hollerith, H. (1894). The electric tabulating machine. J. Roy. Statist. Soc. 57, 678682.Google Scholar
Hwang, H.-K. and Tsai, T.-H. (2002). Quickselect and the Dickman function. Combinatorics Prob. Comput. 11, 353371.Google Scholar
Jacquet, P. and Szpankowski, W. (1998). Analytical depoissonization and its applications. Theoret. Comput. Sci. 201, 162.Google Scholar
Knape, M. and Neininger, R. (2008). Approximating perpetuities. Methodology Comput. Appl. Prob. 10, 507529.Google Scholar
Knuth, D. E. (1998). The Art of Computer Programming, Vol. 3, 2nd edn. Addison-Wesley, Reading, MA.Google Scholar
Lent, J. and Mahmoud, H. M. (1996). Average-case analysis of multiple Quickselect: an algorithm for finding order statistics. Statist. Prob. Lett. 28, 299310.Google Scholar
Mahmoud, H. M. (2000). Sorting. Wiley-Interscience, New York.Google Scholar
Mahmoud, H. M. (2010). Distributional analysis of swaps in Quick Select. Theoret. Comput. Sci. 411, 17631769.Google Scholar
Mahmoud, H. M. and Ward, M. D. (2008). Average-case analysis of cousins in m-ary tries. J. Appl. Prob. 45, 888900.Google Scholar
Mahmoud, H. M., Modarres, R. and Smythe, R. T. (1995). Analysis of QUICKSELECT: an algorithm for order statistics. RAIRO Inf. Théor. Appl. 29, 255276.Google Scholar
Mahmoud, H., Flajolet, P., Jacquet, P. and Régnier, M. (2000). Analytic variations on bucket selection and sorting. Acta Informatica 36, 735760.Google Scholar
Martı´nez, C. and Prodinger, H. (2009). Moves and displacements of particular elements in quicksort. Theoret. Comput. Sci. 410, 22792284.Google Scholar
Mehlhorn, K. (1984). Data Structures and Algorithms. Springer, Berlin.Google Scholar
Prodinger, H. (1995). Multiple Quickselect–Hoare's Find algorithm for several elements. Inform. Process. Lett. 56, 123129.Google Scholar
Sedgewick, R. (1977). The analysis of Quicksort programs. Acta Informatica 7, 327355.Google Scholar
Sedgewick, R. (1978). Implementing quicksort programs. Commun. ACM 21, 847857.CrossRefGoogle Scholar
Sedgewick, R. (1980). Quicksort. Garland, New York.Google Scholar
Sedgewick, R. (1998). Algorithms in C, Parts 1–4, 3nd edn. Addison-Wesley, Reading, MA.Google Scholar
Stuart, A. and Ord, J. (1987). Kendall's Advanced Theory of Statistics, Vol. 1, 5th edn. Oxford University Press, New York.Google Scholar
Vallée, B., Clément, J., Fill, J. A. and Flajolet, P. (2009). The number of symbol comparisons in quicksort and quickselect. In Automata, Languages and Programming (Lecture Notes Comput. Sci. 5555), eds Albers, S. et al., Springer, Berlin, pp. 750763.Google Scholar