Abstract
Several simple, classical, little-known algorithms in the statistics and computer science literature for generating random permutations by coin tossing are examined, analyzed, and implemented. These algorithms are either asymptotically optimal or close to being so in terms of the expected number of times the random bits are generated. In addition to asymptotic approximations to the expected complexity, we also clarify the corresponding variances, as well as the asymptotic distributions. A brief comparative discussion with numerical computations in a multicore system is also given.
- R. J. Anderson. 1990. Parallel algorithms for generating random permutations on a shared memory machine. In Proceedings of the 2nd Annual ACM Symposium on Parallel Algorithms and Architectures. 95--102. Google ScholarDigital Library
- D. M. Andrés and L. P. Pérez. 2011. Efficient parallel random rearrange. In Proceedings of the International Symposium on Distributed Computing and Artificial Intelligence. Springer, 183--190.Google Scholar
- E. B. Barker and J. M. Kelsey. 2007. Recommendation for Random Number Generation using Deterministic Random Bit Generators (Revised). U.S. Department of Commerce, Technology Administration, National Institute of Standards and Technology, Computer Security Division, Information Technology Laboratory.Google Scholar
- K. J. Berry, J. E. Johnston, and P. W. Mielke, Jr. 2014. A Chronicle of Permutation Statistical Methods (1920--2000, and Beyond). Springer, Berlin.Google Scholar
- G. Brassard and S. Kannan. 1988. The generation of random permutations on the fly. Inform. Process. Lett. 28, 4 (1988), 207--212. Google ScholarDigital Library
- C.-H. Chen. 2002. Generalized association plots: Information visualization via iteratively generated correlation matrices. Stat. Sin. 12, 1 (2002), 7--30.Google Scholar
- L. Devroye. 1986. Nonuniform Random Variate Generation. Springer-Verlag, New York.Google Scholar
- L. Devroye. 2010. Complexity questions in non-uniform random variate generation. In Proceedings of COMPSTAT 2010. Springer, 3--18.Google ScholarCross Ref
- L. Devroye and C. Gravel. 2016. The expected bit complexity of the von Neumann rejection algorithm. Stat. Comput. (2016), 1--12.Google Scholar
- R. Durstenfeld. 1964. Algorithm 235: Random permutation. Commun. ACM 7, 7 (1964), 420. Google ScholarDigital Library
- A. Erdélyi, W. Magnus, F. Oberhettinger, and F. G. Tricomi. 1953. Higher Transcendental Functions. Vol. I. McGraw--Hill, New York, NY.Google Scholar
- R. A. Fisher and F. Yates. 1948. Statistical Tables for Biological, Agricultural and Medical Research. 3rd ed. Oliver 8 Boyd.Google Scholar
- P. Flajolet, É. Fusy, and C. Pivoteau. 2007. Boltzmann sampling of unlabelled structures. In Proceedings of the 9th Workshop on Algorithm Engineering and Experiments and the Fourth Workshop on Analytic Algorithmics and Combinatorics. SIAM, Philadelphia, PA, 201--211. Google ScholarDigital Library
- P. Flajolet, X. Gourdon, and P. Dumas. 1995. Mellin transforms and asymptotics: Harmonic sums. Theoret. Comput. Sci. 144, 1--2 (1995), 3--58. Google ScholarDigital Library
- P. Flajolet, M. Pelletier, and M. Soria. 2011. On Buffon machines and numbers. In Proceedings of the Twenty-2nd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’11). 172--183. Google ScholarDigital Library
- P. Flajolet and R. Sedgewick. 1995. Mellin transforms and asymptotics: Finite differences and Rice’s integrals. Theoret. Comput. Sci. 144, 1--2 (1995), 101--124.Google ScholarCross Ref
- P. Flajolet and R. Sedgewick. 2009. Analytic Combinatorics. Cambridge University Press, New York, NY, USA. Google ScholarDigital Library
- M. Fuchs, H.-K. Hwang, and V. Zacharovas. 2014. An analytic approach to the asymptotic variance of trie statistics and related structures. Theoret. Comput. Sci. 527 (2014), 1--36. Google ScholarDigital Library
- P. J. Grabner and H.-K. Hwang. 2005. Digital sums and divide-and-conquer recurrences: Fourier expansions and absolute convergence. Constr. Approx. 21, 2 (2005), 149--179.Google ScholarCross Ref
- L. Granboulan and T. Pornin. 2007. Perfect block ciphers with small blocks. In Proceedings of the 14th International Workshop on Fast Software Encryption (FSE’07). 452--465. Google ScholarDigital Library
- C. Gravel. 2015. Échantillonnage de Distributions Non Uniformes en Précision Arbitraire et Protocoles d’échantillonnage Exact Distribué Des Distributions Discrètes Quantiques. Ph.D. Dissertation. Université de Montréal.Google Scholar
- Y. Horibe. 1981. Entropy and an optimal random number transformation. IEEE Trans. Inform. Theory 27, 4 (1981), 527--529. Google ScholarDigital Library
- H.-K. Hwang. 2003. Second phase changes in random m-ary search trees and generalized quicksort: Convergence rates. Ann. Probab. 31, 2 (2003), 609--629.Google ScholarCross Ref
- H.-K. Hwang, M. Fuchs, and V. Zacharovas. 2010. Asymptotic variance of random symmetric digital search trees. Discr. Math. Theor. Comput. Sci. 12, 2 (2010), 103--165.Google Scholar
- Intel. 2012. Intel Digital Random Number Generator (DRNG): Software Implementation Guide. Intel Corporation.Google Scholar
- P. Jacquet and W. Szpankowski. 1998. Analytical de-poissonization and its applications. Theoret. Comput. Sci. 201, 1--2 (1998), 1--62. Google ScholarDigital Library
- G. W. Kimble. 1989. Observations on the generation of permutations from random sequences. Int. J. Comput. Math. 29, 1 (1989), 11--19.Google ScholarCross Ref
- D. E. Knuth. 1998a. The Art of Computer Programming. Vol. 2, Seminumerical Algorithms. Addison-Wesley, Reading, MA. Google ScholarDigital Library
- D. E. Knuth. 1998b. The Art of Computer Programming. Vol. 3. Sorting and Searching (2nd ed.). Addison-Wesley, Reading, MA. Google ScholarDigital Library
- D. E. Knuth and A. C. Yao. 1976. The complexity of nonuniform random number generation. Algorithms and Complexity: New Directions and Recent Results. Academic Press, New York, 357--428.Google Scholar
- B. Koo, D. Roh, and D. Kwon. 2014. Converting random bits into random numbers. J. Supercomput. 70, 1 (2014), 236--246. Google ScholarDigital Library
- C.-A. Laisant. 1888. Sur la numération factorielle, application aux permutations. Bull. Soc. Math. France 16 (1888), 176--183.Google ScholarCross Ref
- D. Langr, P. Tvrdík, T. Dytrych, and J. P. Draayer. 2014. Algorithm 947: Paraperm—parallel generation of random permutations with MPI. ACM Trans. Math. Softw. 41, 1 (2014), 5:1--5:26. Google ScholarDigital Library
- D. H. Lehmer. 1960. Teaching combinatorial tricks to a computer. In Proc. Sympos. Appl. Math. Combinatorial Analysis, Vol. 10. 179--193.Google ScholarCross Ref
- G. Louchard, H. Prodinger, and S. Wagner. 2008. Joint distributions for movements of elements in Sattolo’s and the Fisher-Yates algorithm. Quaest. Math. 31, 4 (2008), 307--344.Google ScholarCross Ref
- J. Lumbroso. 2013. Optimal discrete uniform generation from coin flips, and applications. CoRR abs/1304.1916 (2013). http://arxiv.org/abs/1304.1916Google Scholar
- H. M. Mahmoud. 2003. Mixed distributions in Sattolo’s algorithm for cyclic permutations via randomization and derandomization. J. Appl. Probab. 40, 3 (2003), 790--796.Google ScholarCross Ref
- B. F. J. Manly. 2006. Randomization, Bootstrap and Monte Carlo Methods in Biology. Vol. 70. CRC Press.Google Scholar
- J. L. Massey. 1981. Collision-Resolution Algorithms and Random-Access Communications. Springer.Google Scholar
- L. E. Moses and R. V. Oakford. 1963. Tables of Random Permutations. Stanford University Press.Google Scholar
- K. Nakano and S. Olariu. 2000. Randomized initialization protocols for ad hoc networks. IEEE Trans. Parallel Distrib. Syst. 11, 7 (2000), 749--759. Google ScholarDigital Library
- R. Neininger and L. Rüschendorf. 2004. A general limit theorem for recursive algorithms and combinatorial structures. Ann. Appl. Probab. 14, 1 (2004), 378--418.Google ScholarCross Ref
- V. V. Petrov. 1975. Sums of Independent Random Variables. Springer-Verlag, New York. Translated from the Russian by A. A. Brown, Ergebnisse der Mathematik und ihrer Grenzgebiete, Band 82Google Scholar
- R. L. Plackett. 1968. Random permutations. J. R. Stat. Soc. Ser. B. Stat. Methodol. 30, 3 (1968), 517--534. http://www.jstor.org/stable/2984255Google ScholarCross Ref
- B. B. Pokhodzeĭ. 1985. Complexity of tabular methods of simulating finite discrete distributions. Izv. Vyssh. Uchebn. Zaved. Mat. 7 (1985), 45--50 8 85.Google Scholar
- H. Prodinger. 2002. On the analysis of an algorithm to generate a random cyclic permutation. Ars Combin. 65 (2002), 75--78.Google Scholar
- C. R. Rao. 1961. Generation of random permutation of given number of elements using random sampling numbers. Sankhya A 23 (1961), 305--307.Google Scholar
- V. Ravelomanana. 2007. Optimal initialization and gossiping algorithms for random radio networks. IEEE Trans. Parallel Distrib. Syst. 18, 1 (2007), 17--28. Google ScholarDigital Library
- E. K. Ressler. 1992. Random list permutations in place. Inform. Process. Lett. 43, 5 (1992), 271--275. Google ScholarDigital Library
- T. Ritter. 1991. The efficient generation of cryptographic confusion sequences. Cryptologia 15, 2 (1991), 81--139. Google ScholarDigital Library
- J. M. Robson. 1969. Algorithm 362: Generation of random permutations {G6}. Commun. ACM 12, 11 (Nov. 1969), 634--635. Google ScholarDigital Library
- M. Sandelius. 1962. A simple randomization procedure. J. R. Stat. Soc. Ser. B. Stat. Methodol. 24, 2 (1962), pp. 472--481. http://www.jstor.org/stable/2984238Google ScholarCross Ref
- E. C. Titchmarsh. 1986. The Theory of the Riemann Zeta-Function (second ed.). The Clarendon Press Oxford University Press, New York.Google Scholar
- J. von Neumann. 1951. Various techniques used in connection with random digits. J. Res. Nat. Bur. Standards 12 (1951), 36--38.Google Scholar
- M. Waechter, K. Hamacher, F. Hoffgaard, S. Widmer, and M. Goesele. 2011. Is your permutation algorithm unbiased for n ≠ 2<sup>m</sup>? In Parallel Processing and Applied Mathematics. Springer, 297--306. Google ScholarDigital Library
- S. Wagner. 2009. On tries, contention trees and their analysis. Ann. Comb. 12, 4 (2009), 493--507.Google ScholarCross Ref
- M. C. Wilson. 2009. Random and exhaustive generation of permutations and cycles. Ann. Comb. 12, 4 (2009), 509--520.Google ScholarCross Ref
Index Terms
- Generating Random Permutations by Coin Tossing: Classical Algorithms, New Analysis, and Modern Implementation
Recommendations
Generating random numbers of prescribed distribution using physical sources
When constructing uniform random numbers in [0, 1] from the output of a physical device, usually n independent and unbiased bits B j are extracted and combined into the machine number Y := \sum^n_{j=1}2^{-j}B_j . In order to reduce the number of ...
A convenient way of generating gamma random variables using generalized exponential distribution
In this paper we propose a very convenient way to generate gamma random variables using generalized exponential distribution, when the shape parameter lies between 0 and 1. The new method is compared with the most popular Ahrens and Dieter method and ...
A New Approach to Analysis and Design of Chaos-Based Random Number Generators Using Algorithmic Converter
This paper presents a new approach to analysis and design of ADC-based random number generators. To this end, different full-bit and half-bit redundant stages of algorithmic converter are used to design chaotic maps. It is shown that, in the redundant ...
Comments