Pseudorandom Numbers
Numerical Methods
David Mayerich
Scalable Tissue Imaging and Modeling (STIM) Laboratory
Department of Electrical and Computer Engineering
Cullen College of Engineering
University of Houston
David Mayerich
STIM Laboratory, University of Houston

The Need for Random Numbers
-
We often need values of \(x\) that obey some distribution \(P(x)\)
-
This is generally referred to as random number generation
-
The algorithm used is known as a random number generator
-
Random numbers are extensively used in numerical algorithms
-
Simulation - particularly of noisy systems
-
Sorting and searching algorithms (randomized quicksort)
-
Probabilistic algorithms - Monte-Carlo methods
-
High-dimensional integration
-
Computer graphics, video games (procedural animation)
-
Cryptography
-
Machine learning, optimization, genetic algorithms
-
Digital computers are deterministic - algorithms cannot generate random numbers
-
David Mayerich
STIM Laboratory, University of Houston
Generating Pseudo-Random Numbers
-
Numbers that seem random - and can be used in place of random numbers for most applications - are pseudo-random
-
Linear Congruential Generator (LCG) - deterministic algorithm for generating a sequence of numbers that seems random:
David Mayerich
STIM Laboratory, University of Houston
-
\(m>0\) is the modulus
-
\(0<a<m\) is the multiplier
-
\(0\leq c < m\) is the increment
-
\(X_0\) is the seed
Linear Congruential Generator (EXAMPLE)
-
Demonstrate a linear congruential generator with the following characteristics:
David Mayerich
STIM Laboratory, University of Houston
an LCG is expressed as \(X_{n+1}=(aX_n + c)\text{ mod } m\)
Multiplicative LCGs
-
A Multiplicative Linear Congruential Generator (MLCG) is a simpler LCG that has an increment of \(c=0\)
-
Calculate the sequence of an MLCG with the following properties:
David Mayerich
STIM Laboratory, University of Houston
(incomplete) H.2 Pseudorandom Numbers
By STIM Laboratory
(incomplete) H.2 Pseudorandom Numbers
- 18