Random Number Generation
- Used in cryptography
- Simulations
- Games
- Statistics
Types of Random Number Generators
Derive randomness from physical processes, such as electronic noise or radioactive decay.
Use mathematical algorithms to produce sequences that approximate the properties of random numbers.
Combine physical and algorithmic sources for improved randomness.
PRNG Family: Variants & Examples
- Linear Congruential Generators (LCGs)
One of the earliest and simplest PRNG types, running on the formula:
Xₖ₊₁ = (a × Xₖ) mod mAn example is the Lehmer RNG (also known as Park–Miller), used in systems like the Sinclair ZX81 and CRAY's RANF. Source
- ACORN (Additive Congruential RNG)
Introduced in 1989, ACORN remains robust even decades later. It belongs to the family of additive congruential PRNGs and offers reliable uniform distribution. Source
- Counter-Based RNGs (CBRNGs)
These generators use a simple, incrementing counter as state, enabling independent number generation—ideal for parallel computing. Examples include Threefry, Philox, and ARS. Source
- Mersenne Twister (MT19937)
A widely adopted general-purpose PRNG, created in 1997, it uses a Mersenne prime period (2¹⁹⁹³⁷–1). MT19937 offers excellent statistical properties and is broadly used across programming languages and libraries—from Python to MATLAB—though it is not cryptographically secure. Source