Docsity

Understanding Random Number Generators: Properties, Features, and Applications, Slides of Computational Techniques

Partial preview of the text

Download Understanding Random Number Generators: Properties, Features, and Applications and more Slides Computational Techniques in PDF only on Docsity!

Random

Number

Generators

Random

Number

Generators

Based

upon

specific

mathematical

algorithms

Which

are

repeatable

and

sequential

Problems

Difficult

to

isolate

Often need to replace current generator

Require - Knowledge of current generator - Sometimes in โ€ depth understanding of random number generators themselves

Large

scale

tests

cause

most

problems

Needing sometimes millions or billions of random numbers

Desirable

Properties

When

performing

Monte

Carlo

Simulations

Attributes of each particle should be independent of those attributes of any other particle

Fill the entire attribute space in a manner which is consistent with the physics

Cycle

What

Does

This

Show

Us?

Properties

of

pseudorandom

sequences

of

integers

The sequence has a finite number of integers

The sequence gets traversed in a particular order - The sequence repeats if the period of the generator is exceeded

Equations

LCG

Using

LCG

Choosing Correct Input is Key

LCG

(a,c,m,X0)

LCG (5, 1, 16,

    Yields

    ยป 1,6,15,12,13,2,11,8,9,14,7,4,5,10,3,0, ยป 1,6,15,12,13,2,11,8,9,14,โ€ฆ - When the next result depends upon only the previous integer, the longest period possible is P=M - Odd/Even pattern - lack of randomness results from using a power of two for M 

Table

Example

LCG(5,0,16,1)

Yields

M

is a power of

(here:

2^4)

C= - Maximum period is going to be 2^(m โ€ 2) - Correlation (each differ by

Prime

Numbers

Using

a

prime

as

the

divisor

for

the

modulus

can

can

result

in

a

period

of

m

as

maximum

period

There

are

cases

of

prime

moduli

that

fail

bitwise

testing

Case

by

case

basis

Seed

Using

the

date

and

time

Enter the date and time into an equations and return an integer then make sure it is odd

Standard seed for these equations

N

Tuple

Generalization

Choose

R

and

R

Choose Rn and R(n+1)

Then plot this point of interest in a surrounding area. - Plot these points in succession - The area will be uniformly covered by the LCG in a โ€œrandomโ€ order - Covering of only part of the unit or certain areas of the unit would prove to be not useful for Monte Carlo Methods