Random Number Generation

Random number generation involves producing sequences of numbers or symbols in such a way that no future value can be predicted better than by chance. These sequences may exhibit patterns when retrospectively analyzed, but they are inherently unpredictable.
  • Used in cryptography
  • Simulations
  • Games
  • Statistics

Types of Random Number Generators

True Random Number Generators (TRNGs)

Derive randomness from physical processes, such as electronic noise or radioactive decay.

Pseudorandom Number Generators (PRNGs)

Use mathematical algorithms to produce sequences that approximate the properties of random numbers.

Hybrid RNGs

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 m

    An 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

Overall, random number generation is a fundamental concept with wide-ranging applications in technology and science.