Page 78 - DCAP601_SIMULATION_AND_MODELING
P. 78
Simulation and Modelling
Notes 2. 2D: pairs of random numbers are used to define the coordinates of points in a plane.
3. 3D: groups of three random numbers are used to specify the coordinates of points in 3
dimensional space. By dragging the mouse on the picture you can rotate your viewpoint.
Dragging the mouse while holding down the shift key allows you to zoom in and out.
The initial choices of multiplier and modulus are that of the RANDU generator, distributed by
IBM in the 1960’s. Only after it was widely distributed was it noticed to have a serious problem
when generating 3 dimensional points. See if you can see the Marsaglia effect in the 3D view, by
rotating your viewpoint. Better behaviour results with a different multiplier, such as 69069.
A random number generator (often abbreviated as RNG) is a computational or physical device
designed to generate a sequence of numbers or symbols that lack any pattern, i.e. appear random.
Hardware-based systems for random number generation are widely used, but often fall short of
this goal, though they may meet some of the statistical tests for randomness intended to ensure
that they do not have any easily discernible patterns. Methods for generating random results
have existed since ancient times, including dice, coin flipping, the shuffling of playing cards, the
use of yarrow stalks (by divination) in the I Ching, and many other techniques.
The many applications of randomness have led to many different methods for generating random
data. These methods may vary as to how unpredictable or statistically random they are, and
how quickly they can generate random numbers.
Before the advent of computational random number generators, generating large amounts of
sufficiently random numbers (important in statistics) required a lot of work. Results would
sometimes be collected and distributed as random number tables.
A growing number of government-run lotteries, and lottery games, are using RNGs instead of
more traditional drawing methods, such as using ping-pong or rubber balls.
!
Caution Linear Congruential Method is used only for uniform random numbers
Physical Methods
The earliest methods for generating random numbers — dice, coin flipping, roulette wheels —
are still used today, mainly in games and gambling as they tend to be too slow for applications
in statistics and cryptography.
Some physical phenomena, such as thermal noise in Zener diodes appear to be truly random
and can be used as the basis for hardware random number generators. However, many mechanical
phenomena feature asymmetries and systematic biases that make their outcomes not truly
random. The many successful attempts to exploit such phenomena by gamblers, especially in
roulette and blackjack are testimony to these effects.
There are several imaginative sources of random numbers online. A common technique is to
run a hash function against a frame of a video stream from an unpredictable source. This technique
was used by Lava rand which used images of a number of lava lamps. Lithium Technologies
uses a camera pointed at the sky on a windy and cloudy day. Random.org uses variations in the
amplitude of atmospheric noise. Details about how they turn their input into random numbers
can be found on their respective sites.
Completely randomized design falls within the category of true random number generation.
The generation of true random numbers outside the computer environment is based on the
theory of entropy. Sources of entropy include nuclear decay and atmospheric conditions. HotBits
uses radioactive decay, while Random.org uses radio noise to generate randomness.
72 LOVELY PROFESSIONAL UNIVERSITY