Hostname: page-component-76fb5796d-5g6vh Total loading time: 0 Render date: 2024-04-28T21:03:18.295Z Has data issue: false hasContentIssue false

An efficient method for generating a discrete uniform distribution using a biased random source

Published online by Cambridge University Press:  07 March 2023

Xiaoyu Lei*
Affiliation:
The University of Chicago
*
*Postal address: 5747 South Ellis Avenue, Chicago, Illinois, USA. Email: leixy@uchicago.edu

Abstract

We present an efficient algorithm to generate a discrete uniform distribution on a set of p elements using a biased random source for p prime. The algorithm generalizes Von Neumann’s method and improves the computational efficiency of Dijkstra’s method. In addition, the algorithm is extended to generate a discrete uniform distribution on any finite set based on the prime factorization of integers. The average running time of the proposed algorithm is overall sublinear: $\operatorname{O}\!(n/\log n)$.

Type
Original Article
Copyright
© The Author(s), 2023. Published by Cambridge University Press on behalf of Applied Probability Trust

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Dijkstra, E. W. (1990). Making a fair roulette from a possibly biased coin. Inf. Process. Lett. 36, 193.10.1016/0020-0190(90)90072-6CrossRefGoogle Scholar
Elias, P. (1972). The efficient construction of an unbiased random sequence. Ann. Math. Statist. 43, 865870.10.1214/aoms/1177692552CrossRefGoogle Scholar
Hoeffding, W. and Simons, G. (1994). Unbiased coin tossing with a biased coin. Ann. Math. Statist. 41, 341352.CrossRefGoogle Scholar
Jakimczuk, R. (2012). Sum of prime factors in the prime factorization of an integer. Int. Math. Forum 7, 26172621.Google Scholar
Pae, S. (2005). Random number generation using a biased source. Doctoral thesis, University of Illinois Urbana-Champaign.Google Scholar
Stout, Q. F. and Warren, B. (1984). Tree algorithms for unbiased coin tossing with a biased coin. Ann. Prob. 12, 212222.10.1214/aop/1176993384CrossRefGoogle Scholar
Von Neumann, J. (1951). Various techniques used in connection with random digits. J. Res. Nat. Bureau Standards Appl. Math. 12, 3638.Google Scholar