Problems of Information Transmission, Vol. 38, No. 1, 2002, pp. 20–25. Translated from Problemy Peredachi Informatsii, No. 1, 2002, pp. 24–30.
Original Russian Text Copyright
2002 by Ryabko, Matchikina.
An Eﬃcient Generation Method
for Uniformly Distributed Random Numbers
B. Ya. Ryabko and E. P. Matchikina
Received October 8, 2001
Abstract—The problem of constructing eﬃcient methods for generating uniformly distributed
random numbers from nonuniformly distributed ones with a given arbitrarily small error is
considered. An estimate of the complexity of these methods is given as a function of the error,
which is measured as the deviation of numbers generated from uniformly distributed. Methods
whose complexity is lower in order than that of known methods are proposed.
The problem of random number generation is well known in information theory. Von Neumann
 was the ﬁrst who solved the problem of transformation of a sequence of symbols generated
by a Bernoulli source into a sequence of equiprobable and independent symbols. The original
sequence is to be split into pairs, each pair transformed by the following rule: 00 → Λ, 01 → 0,
10 → 1, 11 → Λ, where Λ is an empty sequence. Elias  generalized this method for an arbitrary
block length, so that the loss function deﬁned as the supremum (over all Bernoulli sources) of the
diﬀerence between the source entropy and average codeword length per source symbol tends to zero
with growth of the block size (in von Neumann’s method, this value is equal to 3/4). However,
the method needs an exponentially growing memory size as the block length increases. In , a
fast algorithm is developed, which realizes Elias’s method with nonexponential memory size. For
obtaining uniformly distributed symbols, Peres  proposed a block method based on iterating von
Neumann’s procedure, where the loss function also tends to zero. It should be noted that all these
methods require no knowledge of the source statistics, i.e., are universal. They generate “ideally”
uniformly distributed sequences (i.e., consisting of independent and equiprobable symbols). The
problem of transformation of a sequence generated by a Markov source into an “ideal” one was
considered in .
In the case of a known source statistics, other methods are also known for generating a uni-
form distribution. The method of  is similar to the process of arithmetic decoding; however,
the necessity of computation with ever growing precision leads to the exponential growth of the
algorithm complexity. Methods of homophonic coding also produce a uniform distribution at the
output. Eﬃcient algorithms of homophonic coding were proposed in .
We consider the problem of generating random numbers that are arbitrarily close to ideally
uniformly distributed in the sense of some metric. Such a formulation of the problem for a known
source statistics was considered in [8,9], where the existence of optimal algorithms was only shown.
Further study of these and related problems was made in [10, 11].
In the paper, we describe and analyze generation methods for uniformly distributed random
numbers with a prescribed arbitrarily small error and propose algorithms, whose complexity is less
in order of growth than that of known methods. Moreover, the complexity of the methods proposed
is signiﬁcantly less than that of zero-error methods, which justiﬁes their consideration.
Supported in part by the Russian Foundation for Basic Research, project no. 99-01-00586a, and INTAS,
Grant no. 00-738.
2002 MAIK “Nauka/Interperiodica”