Random Number Generation
Random Number Generation
Dr. John Mellor-Crummey
Department of Computer Science Rice University
johnmc@cs.rice.edu
COMP 528 Lecture 21 5 April 2005
Topics for Today
Understand
? Motivation ? Desired properties of a good generator ? Linear congruential generators
--multiplicative and mixed
? Tausworthe generators ? Combined generators ? Seed selection ? Myths about random number generation ? What's used today: MATLAB, R, Linux
2
Why Random Number Generation?
? Simulation must generate random values for variables in a
specified random distribution
--examples: normal, exponential, ...
? How? Two steps
--random number generation: generate a sequence of uniform FP random numbers in [0,1]
--random variate generation: transform a uniform random sequence to produce a sequence with the desired distribution
3
How Random Number Generators Work
? Most commonly use recurrence relation
xn = f (xn"1, xn"2,...)
recurrence is a function of last 1 (or a few numbers), e.g.
?
xn = (5xn"1 + 1) mod 16 !E--xaFmorpxl0e=: 5, first 32 numbers are 10, 3, 0,
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, 7, 4, 5
!--x's are integers in [0,16]
--dividing by 16, get random numbers in interval [0,1]
? Properties of pseudo-random number sequences
--from seed value, can determine entire sequence
--they pass statistical tests for randomness
--reproducibility (often desirable)
4
Random Number Sequences
? Some generators do not repeat the initial part of a sequence
tail
cycle length
period
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- random number generation
- python module
- puzzle 2 use python to simulate drawing a random card
- random numbers
- random number generators columbia university
- list ends tamalpais union high school district overview
- recursion university of delaware
- home computer science and engineering
- part 1 university of delaware
Related searches
- python random number between
- random number generator 1 10
- random number picker 1 100
- python random number in range
- random number from 1 to 100
- random number generator 1 50
- google random number generator
- random number generator list 1 10
- random number generator pairs
- pick random number between
- random number generators
- best random number generator