11.07.2015 Views

A Random Number Generator Test Suite for the C++ ... - ETH Zürich

A Random Number Generator Test Suite for the C++ ... - ETH Zürich

A Random Number Generator Test Suite for the C++ ... - ETH Zürich

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2. What are random numbers?<strong>Random</strong> numbers are characterised by <strong>the</strong> fact that <strong>the</strong>ir value can not be predicted. Or, ino<strong>the</strong>r words, if one constructs a sequence of random numbers, <strong>the</strong> probability distribution of<strong>the</strong> following random numbers have to be completely independent of all <strong>the</strong> o<strong>the</strong>r generatednumbers.A more sophisticated ma<strong>the</strong>matical definition and discussion can be found in [6].2.1. Types of random numbersThere are three types of random numbers, quasi-, pseudo- and true- random numbers. Thesedifferent types of random numbers have different applications. (It is philosophical questionwhat we can call random or not, but here, we use <strong>the</strong> following descriptions, its simpler. . . )True <strong>Random</strong> <strong>Number</strong> The most often used example <strong>for</strong> “truly” random numbers is <strong>the</strong> decay ofa radioactive material. If a Geiger counter is put in front of such a radioactive source, <strong>the</strong>intervals between <strong>the</strong> decay events are truly random. True random numbers are gained fromphysical processes like radioactive decay or also rolling a dice. But rolling a dice is difficult,perhaps someone could control <strong>the</strong> dice so well to determine <strong>the</strong> outcome.Pseudo <strong>Random</strong> <strong>Number</strong> These numbers are generated by a computer or that is to say, by an algorithmand because of this not truly random. Every new number is generated from <strong>the</strong> previousones by an algorithm. This means that <strong>the</strong> new value is fully determined by <strong>the</strong> previous ones.But, depending on <strong>the</strong> algorithm, <strong>the</strong>y often have properties making <strong>the</strong>m very suitable <strong>for</strong>simulations.Quasi <strong>Random</strong> <strong>Number</strong> A good description quoted from [25], Chapter 7.7Sequences of n-tuples that fill n-space more uni<strong>for</strong>mly than uncorrelated randompoints are called quasi-random sequences. That term is somewhat of a misnomer,since <strong>the</strong>re is nothing random about quasi-random sequences: They arecleverly crafted to be, in fact, sub-random. The sample points in a quasi-randomsequence are, in a precise sense, maximally avoiding each o<strong>the</strong>r.Quasi random numbers are not designed to appear random, ra<strong>the</strong>r to be uni<strong>for</strong>mly distributed.One aim of such numbers is to reduce and control errors in Monte Carlo simulations.A picture is always a good way to illustrate <strong>the</strong> difference between this two types. In figure2.1 1 and 2.2 2 we have plots with different numbers of pseudo- and quasi-random numbers.This is a good demonstration to show <strong>the</strong> structure of quasi-random numbers, but it is also1 This plot was generated with <strong>the</strong> Matlab 6 rand generator, a combination of a lagged Fibonacci generator,with a cache of 32 floating point numbers and a shift register random integer generator.2 This plot was generated with <strong>the</strong> sobol.m routine <strong>for</strong> Matlab from http://www.csit.fsu.edu/~burkardt/m_src/sobol/sobol.html. This web-site includes also a variety of references <strong>for</strong> Sobolsequences and some implementations in different programming languages.2

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

Saved successfully!

Ooh no, something went wrong!