The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998 The.Algorithm.Design.Manual.Springer-Verlag.1998

18.04.2013 Views

Random Number Generation The Stanford Graphbase (see Section ) contains a machine-independent random number generator based on the recurrence . With the proper initialization, this generator has a period of at least . Algorithm 488 [Bre74], Algorithm 599 [AKD83], and Algorithm 712 [Lev92] of the Collected Algorithms of the ACM are Fortran codes for generating random numbers according to several probability distributions, including normal, exponential, and Poisson distributions. They are available from Netlib (see Section ). Sim++ is a library of routines for implementing discrete event simulations, built by Robert Cubert and Paul Fishwick, of the University of Florida. It contains random number generators for a variety of different distributions, including uniform, exponential, and normal. Check out http://www.cis.ufl.edu/ fishwick/simpack/simpack.html if you need a random number generator to control a simulation. Fishwick's book [Fis95] describes model design using SimPack. LEDA (see Section ) provides a comprehensive random source in C++ for generating random bits, integers, and double precision reals. Sedgewick [Sed92] provides simple implementations of linear and additive congruential generators in C++. See Section for details. XTango (see Section ) is an algorithm animation system for UNIX and X-windows, which includes an animation illustrating the uniformity of random number generation. Notes: Knuth [Knu81] has a thorough and interesting discussion of random number generation, which I heartily recommend. He presents the theory behind several methods, including the middle square and shift-register methods we have not described here, as well as a detailed discussion of statistical tests for validating random number generators. Another good source is [PFTV86] - our recommended constants for the linear congruential generator are drawn from here. Comparisons of different random number generators in practice include [PM88]. Tables of random numbers appear in most mathematical handbooks, as relics from the days before there was ready access to computers. Most notable is [RC55], which provides one million random digits. The deep relationship between randomness, information, and compressibility is explored within the theory of Kolmogorov complexity, which measures the complexity of a string by its compressibility. Truly random strings are incompressible. The string of seemingly random digits of cannot be random under this definition, since the entire sequence is defined by any program implementing a series expansion for . Li and Vitáni [LV93] provide a thorough introduction to the theory of Kolmogorov complexity. file:///E|/BOOK/BOOK4/NODE142.HTM (4 of 5) [19/1/2003 1:30:27]

Random Number Generation Related Problems: Constrained and unconstrained optimization (see page ), generating permutations (see page ), generating subsets (see page ), generating partitions (see page ). Next: Factoring and Primality Testing Up: Numerical Problems Previous: Linear Programming Algorithms Mon Jun 2 23:33:50 EDT 1997 file:///E|/BOOK/BOOK4/NODE142.HTM (5 of 5) [19/1/2003 1:30:27]

Random Number Generation<br />

<strong>The</strong> Stanford Graphbase (see Section ) contains a machine-independent random number generator<br />

based on the recurrence . With the proper initialization, this generator has a<br />

period of at least .<br />

<strong>Algorithm</strong> 488 [Bre74], <strong>Algorithm</strong> 599 [AKD83], and <strong>Algorithm</strong> 712 [Lev92] of the Collected<br />

<strong>Algorithm</strong>s of the ACM are Fortran codes for generating random numbers according to several<br />

probability distributions, including normal, exponential, and Poisson distributions. <strong>The</strong>y are available<br />

from Netlib (see Section ).<br />

Sim++ is a library of routines for implementing discrete event simulations, built by Robert Cubert and<br />

Paul Fishwick, of the University of Florida. It contains random number generators for a variety of<br />

different distributions, including uniform, exponential, and normal. Check out http://www.cis.ufl.edu/<br />

fishwick/simpack/simpack.html if you need a random number generator to control a simulation.<br />

Fishwick's book [Fis95] describes model design using SimPack.<br />

LEDA (see Section ) provides a comprehensive random source in C++ for generating random bits,<br />

integers, and double precision reals. Sedgewick [Sed92] provides simple implementations of linear and<br />

additive congruential generators in C++. See Section for details.<br />

XTango (see Section ) is an algorithm animation system for UNIX and X-windows, which includes<br />

an animation illustrating the uniformity of random number generation.<br />

Notes: Knuth [Knu81] has a thorough and interesting discussion of random number generation, which I<br />

heartily recommend. He presents the theory behind several methods, including the middle square and<br />

shift-register methods we have not described here, as well as a detailed discussion of statistical tests for<br />

validating random number generators. Another good source is [PFTV86] - our recommended constants<br />

for the linear congruential generator are drawn from here. Comparisons of different random number<br />

generators in practice include [PM88].<br />

Tables of random numbers appear in most mathematical handbooks, as relics from the days before there<br />

was ready access to computers. Most notable is [RC55], which provides one million random digits.<br />

<strong>The</strong> deep relationship between randomness, information, and compressibility is explored within the<br />

theory of Kolmogorov complexity, which measures the complexity of a string by its compressibility.<br />

Truly random strings are incompressible. <strong>The</strong> string of seemingly random digits of cannot be random<br />

under this definition, since the entire sequence is defined by any program implementing a series<br />

expansion for . Li and Vitáni [LV93] provide a thorough introduction to the theory of Kolmogorov<br />

complexity.<br />

file:///E|/BOOK/BOOK4/NODE142.HTM (4 of 5) [19/1/2003 1:30:27]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!