Documente Academic
Documente Profesional
Documente Cultură
ating
uniform random numbers, including those based on linear recurrences, modulo 2
arithmetic, and combinations o f these. A range o f theoretical and empirical te
sts
is provided to assess the quality o f a uniform random number generator. We refe
r
t o Chapter 3 for a discussion on methods for random variable generation from " 43
arbitrary distributions
such methods are invariably based on uniform random
number generators.
1.1 RANDOM NUMBERS
At the heart o f any Monte Carlo method is a random number generator: a
procedure tha t produces an infinite stream
/ 1 ,[/ 2 ,[/ 3 ,...~Dis t
o f random variables tha t are independent and identically distributed (iid) acc
ording
to some probability distribution Dist. When this distribution is the uniform dis
tribution on the interval (0,1) (that is, Dist = U(0,1)), the generator is said
to be
a uniform random number generator. Most computer languages already contain a bui
lt-in uniform random number generator. The user is typically requested
only to input an initial number, called the seed , and upon invocation the rando
m
Handbook of Monte Carlo Methods. By D. P. Kroese, T. Taimre, Z. I. Botev 1 Copy
right 2011 John Wiley & Sons, Inc. 2 UNIFORM RANDOM NUMBER GENERATION
number generato r produce s a sequenc e of independen t uniform rando m variable
s on
th e interval (0,1) . In MATLAB , for example, thi s is provide d by th e ran d
function.
The concept of a n infinite iid sequence of rando m variables is a mathematical
abstractio n tha t may b e impossible t o implemen t on a computer . Th e bes t
one can
hope to achieve in practice is t o produce a sequence of "random" numbers with
statistica l properties tha t are indistinguishable from those of a tru e sequen
ce of
iid rando m variables. Although physical generation method s based on universal
background radiatio n or quantu m mechanics seem t o offer a stabl e source of s
uch
tru e randomness , th e vas t majorit y of curren t rando m numbe r generator s
ar e base d
on simple algorithms tha t can be easily implemented on a computer. Following
L'Ecuyer [10], such algorithm s can b e represente d as a tupl e (S,f^,U,g), whe
re
iS is a finite set of states ,
/ is a function from S t o <S ,
is a probabilit y distributio n on S,
U is th e outpu t space; for a uniform random number generator U is th e
interva l (0,1) , and we will assume so from now on, unless otherwise specified,
g is a function from S t o U.
A rando m numbe r generator the n ha s th e following structure :
Algorith m 1.1 (Generi c Rando m Numbe r Generator )
1. Initialize : Draw the seed SQ from the distribution on S. Set t = 1.
2. Transition : Set St
= f{St
-i).
3. Output : SetUt = g(St
).
4- Repeat : Set t = t + 1 and return to Step 2.