There seems to be some confusion between "random numbers" and "unpredictable
numbers". One needs sequences of numbers that have certain statistical
properties in simulations, especially in Monte Carlo methods. These
numbers are frequently called "pseudo-random numbers" or more compactly
"random numbers."
One uses "unpredictable numbers" for computer games. A common way to
generate these is to get one unpredictable number, from say the system
clock, and use that number to start a sequence of pseudo-random numbers.
I can't speak for others, but when I'm developing, debugging or certifying
a code, I like it to get the same answer (or commit the same mistake) every
time I run it with the same input. Therefore, I _do_not_ like the idea
that the intrinsic random_number intrinsic subroutine gets started with a
different (unpredictable) seed every time I run the program.
There are at least two possibilities to satisfy users who really want
unpredictable numbers, as opposed to random numbers. First, they could
generate their own unpredictable seed, as Steve Lionel has pointed out,
or one could have a run-time option, perhaps signalled by an environment
variable, that controls whether the random_number intrinsic subroutine
gets started with a different seed every time I run the program, or it
gets started with some processor-dependent but constant value.
On the other hand, one who wants random numbers, as opposed to unpredictable
numbers, could explicitly provide a seed before starting to use the intrinsic
random_number subroutine.
If you want a transportable collection of high-quality random number
generators (uniform, Gaussian, exponential and Poisson), in Fortran 77
or C, that produces the same sequence of numbers on every platform,
contact Fred Krogh, [log in to unmask] The uniform generator is
a multiplicative congruential one, x_{i+1} = a x_i \mod m. The other
generators are based on the uniform one. The quality measures for the
uniform generator, that Knuth cites in "Seminumerical algorithms" (page
~100) for dimensions 2..6 are
\log_2 \nu_{2:6} = 18, 12, 8.6, 7.3, 6
\mu_{2:6} = 3, 3.05, 3.39, 4.55, 6.01
The period is m-1 = 2^{36}-234 = 68719476502 = 2 * 43801 * 784451. The
multiplier a = 612662 \approx 0.58 \times 2^{20} is a primitive root of m.
--
What fraction of Americans believe | Van Snyder
Wrestling is real and NASA is fake? | [log in to unmask]
Any alleged opinions are my own and have not been approved or disapproved
by JPL, CalTech, NASA, Dan Goldin, Bill Clinton, the Pope, or anybody else.
|