Using, Generating and Testing with Pseudo-Random Numbers
summary
Explains how deterministic engines like linear congruential generator (example multiplier 16807) and Mersenne Twister produce pseudo-random sequences, why modulus bias breaks a fair 1–6 dice, and how seed sources (random_device, time, seed sequences) change state and parallel behavior. Demonstrates Fisher‑Yates shuffle, C++ sample, and distributions: uniform, normal (mean 20, sd 10) and Poisson (rare jump ~1/32) by racing blobs; shows tests (fixed‑seed, mock zero) and points to DieHard batteries and crypto vs PRNG pitfalls.
AI-written summary · about
chapters (9)
- 0:00The nature of randomness
- 2:00Applications and use cases
- 5:36How generators work
- 10:52Technical challenges
- 17:01Practical implementation
- 21:59Sampling and shuffling
- 32:41Testing random code
- 39:23Distributions in practice
- 44:09Entropy and conclusions
related talks
54mI Just Wanted a Random Integer!
29mRandomness In Tests (Don't Do It)
15mTuning Random Generators: Property-Based Testing as Probabilistic Programming
08mUnlucky Simulation
38mPurely Random
20mWhat's the fuzz all about? Randomized data generation for robust unit testing
27mRANDOM DATA GENERATION WITH SCALACHECK
32mGenerative Testing: Properties, State and Beyond
