Generating pseudo-random numbers
A stochastic simulation consumes millions of numbers that must behave like independent draws from the uniform distribution on (0, 1), and yet come out identical from one run to the next. Everything else follows from them: normal, exponential or discrete variates, dependent vectors, and computations spread over many processors.
The slides “A short tutorial on random number generation” (PDF) follow the same outline. The figures draw their numbers from an MRG32k3a that reproduces those of RandomDataStreams.jl.
It all starts with the uniform
A good uniform generator on (0, 1) is the centrepiece of any random number library: draws from other distributions are obtained by transforming uniforms, through inversion, rejection or a change of variables.
A generator is described by a finite state space S, an initial state s0 (the seed), a transition function f: S → S and an output function g: S → (0, 1):
sn = f(sn−1), un = g(sn).
Since S is finite, the sequence eventually revisits a state, and repeats from there: there are a τ ≥ 0, often zero, and a period ρ such that sn+ρ = sn for all n ≥ τ.
This figure needs JavaScript.
Choosing f and g means aiming for a very long period, good uniformity of the vectors (un, …, un+d−1) in several dimensions, behaviour that statistical tests cannot tell apart from chance, and speed. The sequence remains deterministic: the same seed gives back the same numbers, which is what lets a simulation be replayed. The xkcd 221 comic is a reminder that a reproducible sequence is not random for all that.
Linear congruential generators
Lehmer (1951) proposed the simplest recurrence, that of the linear congruential generator (LCG): the state is an integer x, and
xn = (a xn−1 + c) mod m, un = xn / m, where y mod m = y − m ⌊y/m⌋.
With c = 0, the generator is called multiplicative, or a Lehmer generator. Its period is at most m if c ≠ 0, and m − 1 if c = 0, since 0 is then a fixed point.
Full period (Hull and Dobell, 1962). If c ≠ 0, the generator has period m if and only if:
- the only positive integer that divides both m and c is 1;
- every prime q that divides m also divides a − 1;
- if 4 divides m, 4 also divides a − 1.
Park and Miller’s (1988) “minimal standard” is multiplicative: xn+1 = 16,807 xn mod (231 − 1). The modulus 231 − 1 is prime; it is also the largest signed 32-bit integer.
function getlcg(seed::Integer, a::Integer, c::Integer, m::Integer)
state = seed
return function lcgrand()
state = mod(a * state + c, m)
return state / m # in (0, 1) when c = 0 and 0 < seed < m
end
end
stdmin = getlcg(1234, 16807, 0, 2^31 - 1)
[stdmin() for _ in 1:3] # 0.009657…, 0.317630…, 0.416967…
On the unit square, ten thousand pairs (un, un+1) from the minimal standard look uniform. They are not quite: all the pairs of an LCG lie on a family of parallel lines, and the d-tuples on hyperplanes (Marsaglia, 1968). The closer the lines, the better the generator; the spectral test measures their spacing. With a small modulus, m = 251, the whole period fits in the figure.
This figure needs JavaScript.
With m = 231 − 1, the flaw is the same at a finer scale, and the period, about 2.1 billion, is used up in a few seconds on a current computer.
Multiple recursions: MRG32k3a
A multiple recursive generator (MRG) generalizes the LCG by making xn depend on the k previous values:
xn = (a1 xn−1 + ⋯ + ak xn−k) mod m, un = xn / m.
The state is the vector sn = (xn−k+1, …, xn), which takes mk values, and the maximal period is mk − 1. In practice, 0 and 1 are avoided by taking, for instance, un = (xn + 1)/(m + 1), which leaves the structure unchanged. For k > 1, two non-zero coefficients, including ak, are enough for the maximal period; the cheapest recurrence is therefore xn = (ar xn−r + ak xn−k) mod m.
The coefficients still have to be chosen. The lagged Fibonacci generator, xn = (±xn−r ± xn−k) mod m, puts all the triples (un, un+k−r, un+k) in two planes: theory rules it out without any test. Good coefficients are found by maximizing a quality measure, such as the spectral test, at the cost of an expensive numerical search.
Combined MRGs
Two MRGs with moduli m1 and m2 run in parallel, and their outputs are combined:
zn = (x1,n − x2,n) mod m1, un = zn / m1.
The sequence wn = (x1,n/m1 − x2,n/m2) mod 1 is exactly that of an MRG with modulus m1m2, and un is very close to it when m1 and m2 are close: the quality of a large MRG for the price of two small ones, with a period that can reach (m1k − 1)(m2k − 1)/2.
MRG32k3a (L’Ecuyer, 1999) combines two recurrences of order 3 in this way:
| Component | Modulus | Coefficients (aj1, aj2, aj3) |
|---|---|---|
| 1 | m1 = 232 − 209 | (0, 1,403,580, −810,728) |
| 2 | m2 = 232 − 22,853 | (527,612, 0, −1,370,589) |
Its period is close to 2191 ≈ 3.1 × 1057. It long ranked among the most widely used generators in simulation; R (RNGkind("L'Ecuyer-CMRG")) and MATLAB offer it for parallel computing, even though the xoshiro and counter-based families now win on raw speed. One step takes a few lines:
const m1, m2 = 4294967087, 4294944443
const a12, a13 = 1403580, -810728
const a21, a23 = 527612, -1370589
const norm = 1 / (m1 + 1)
# s: the last three values of each component, from oldest to newest
function mrg32k3a!(s::Vector{Int64})
p1 = mod(a12 * s[2] + a13 * s[1], m1)
s[1], s[2], s[3] = s[2], s[3], p1
p2 = mod(a21 * s[6] + a23 * s[4], m2)
s[4], s[5], s[6] = s[5], s[6], p2
return (p1 > p2 ? p1 - p2 : p1 - p2 + m1) * norm
end
s = fill(12345, 6)
mrg32k3a!(s) # 0.12701112204657714, as rand(next_stream!(MRG32k3aGen()))
Generators over F₂
MRGs compute with integers. One can also work directly on bits, with linear recurrences over the field F₂ = {0, 1}, where addition is exclusive or (⊕, XOR) and multiplication is logical and (·, AND):
| x | y | x ⊕ y | x · y |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
Every operation becomes shifts, XORs and masks on machine words: these generators are very fast. A k-bit state evolves, and a w-bit output is read from it, through two linear maps:
xn = X xn−1, yn = B xn, un = ∑ℓ=1w yn,ℓ−1 2−ℓ = (0.yn,0 yn,1 … yn,w−1)2,
where X and B are binary matrices and all arithmetic is modulo 2. The w output bits are read after the binary point: y = (1, 0, 1, 1) gives 2−1 + 2−3 + 2−4 = 0.6875 = 0.10112.
Linear feedback shift registers
A k-bit linear feedback shift register (LFSR) moves in three steps: it reads the tapped bits, at positions r and k; it XORs them, xn = xn−r ⊕ xn−k; then it shifts the register by one position and inserts xn. With k = 4, taps at 1 and 4 and the seed 0001, all fifteen non-zero states go by before the seed comes back: the period 24 − 1 is maximal.
This figure needs JavaScript.
In matrix form, the recurrence is linear over F₂ (with ak ≠ 0): X is a pure shift except for its last row, (ak, ak−1, …, a1), which holds the feedback coefficients, that is, the taps. The power Xν shifts the register by ν bits at once.
Tausworthe generators
Tausworthe (1965) reads the bit stream in words of w bits spaced ν apart, and interprets them as binary fractions (the generator, B = I, has no output transformation):
un = ∑ℓ=1w xnν+ℓ−1 2−ℓ = (0.xnν xnν+1 … xnν+w−1)2.
With the register of the figure, w = ν = 3 cuts the stream 111 101 011 001 000 into 7/8, 5/8, 3/8, 1/8 and 0. The output period reaches its maximum, 2k − 1, if and only if the characteristic polynomial is primitive and ν is coprime to the period:
Q(z) = zk − a1zk−1 − ⋯ − ak−1z − ak primitive, gcd(ν, 2k − 1) = 1.
The example breaks the second condition, gcd(3, 15) = 3: its uniforms repeat after five outputs. Most often, only two coefficients are non-zero, Q(z) = zk − arzk−r − ak, which over F₂ brings us back to the XOR of the register.
Linearity over F₂ remains a structural flaw: on their own, LFSRs and Tausworthe generators fail some tests. They are combined, or replaced by generators that scramble their output: the Mersenne Twister MT19937 (Matsumoto and Nishimura, 1998), with period 219937 − 1, and Blackman and Vigna’s xoshiro family; Julia uses xoshiro256++ by default. These recent generators have their own flaws too, as “It Is High Time We Let Go of the Mersenne Twister” (Vigna, 2019) and “Unveiling Patterns in xorshift128+ Pseudorandom Number Generators” (Haramoto, Matsumoto and Saito, 2022) show.
PCG: an LCG and a permutation
Melissa O’Neill’s PCG family (permuted congruential generator, 2014) starts from a 64- or 128-bit LCG and applies a permutation to its output, a mix of shifts and rotations that erases the regularities of the low-order bits. NumPy adopted it: default_rng() is built on PCG64.
The topic is disputed. Sebastiano Vigna, author of xorshift and xoshiro, criticizes PCG: its streams, obtained by changing the LCG increment, lack the independence guarantees of MRG jumps or counter-based keys, and PCG would be “not competitive” in speed against xoshiro. That second claim is contested: practical benchmarks, such as those of RandomNumbers.jl, and its adoption by NumPy show a very fast PCG, on a par with xoshiro. RandomDataStreams.jl offers PCG64 and PCG64DXSM, checked bit for bit against NumPy, but takes its streams from a closed-form LCG jump rather than from the increment.
Counter-based generators: Philox
In the generators so far, the transition f does most of the work and the output g is simple, such as un = sn/m. Counter-based generators (CBRNGs) take the opposite approach: the transition is trivial, sn = sn−1 + 1, and all the complexity moves into g, a lightweight block cipher:
R = EK(C), where EK is a bijection parameterized by the key K = (k0, k1, …), C = (c0, c1, …) is the counter and R a block of random bits.
The counter gives the position in the sequence, C, C + 1, C + 2, …, and the key identifies the stream. The n-th number is computed directly, without producing the ones before it: a jump is an addition on the counter, a new stream a new key, and the same pair (C, K) gives the same bits on any architecture. With enough rounds, these generators pass BigCrush, TestU01’s most demanding battery, and suit GPUs as well as CPUs. Philox is the default generator of PyTorch (on GPUs) and TensorFlow; JAX uses Threefry, Salmon et al.’s other counter-based generator; NumPy and NVIDIA’s cuRAND offer Philox.
| Conventional generators (MRG, PCG, xorshift) | Counter-based generators (Philox, Threefry) | |
|---|---|---|
| Stored state | the full generator state | the counter and the key |
| Workload | the transition | the output, its rounds |
| Jump ahead | dedicated algorithms | addition on the counter |
| Independent streams | dedicated machinery | distinct keys |
| Draw order | sequential | indexed by position |
| On GPUs | serial dependency | stateless threads |
One round of Philox
Philox (Salmon, Moraes, Dror and Shaw, 2011, Random123 library) is mostly used as Philox4×32-10: four 32-bit words, ten rounds, a 128-bit block per call. It is not a cipher: the rounds are enough to pass statistical tests, not to resist cryptanalysis, and the key space is finite, 264 keys. With fewer rounds it runs faster but shows measurable correlations.
A round is a bijection of (x0, x1, x2, x3) that alternates arithmetic and bitwise mixing, with two subkeys (k0, k1):
- Multiply into 64-bit products, P0 = M0x0 and P1 = M1x2, with the odd multipliers M0 = D2511F5316 and M1 = CD9E8D5716.
- Split each product into two 32-bit halves, Pj = hij 232 + loj: bits travel from the counter words to all 64 positions.
- Fold a high half, a passing word and a subkey together with XOR: y0 = hi1 ⊕ x1 ⊕ k0 and y2 = hi0 ⊕ x3 ⊕ k1.
- Swap the low halves across the lanes: y1 = lo1 and y3 = lo0.
(y0, y1, y2, y3) = (hi1 ⊕ x1 ⊕ k0, lo1, hi0 ⊕ x3 ⊕ k1, lo0).
Being odd, the multipliers are invertible modulo 232: every output has a unique predecessor, and the round is a bijection, with no collisions. Between rounds, the subkeys advance by a Weyl step, (k0, k1) += (9E3779B916, BB67AE8516), two constants taken from the golden ratio and from √3 − 1: one addition per round, invertible as well, which breaks the symmetry between rounds.
After ten rounds, each word Rj of the block gives a uniform u = Rj/232 ∈ [0, 1), four per call. The next block comes from C ← C + 1, a jump of J blocks from C ← C + J, another stream from changing K.
This figure needs JavaScript.
RandomDataStreams.jl exports the function itself:
using RandomDataStreams
philox4x32_10((0x00000000, 0x00000000, 0x00000000, 0x00000000), (0x00000000, 0x00000000))
# (0x6627e8d5, 0xe169c58d, 0xbc57ac4c, 0x9b00dbd8): the first Random123 test vector
Jumps, streams and substreams
Some generators can jump J positions ahead in their sequence, with J huge, without producing the numbers in between: for an MRG, it is enough to raise its transition matrix to the power J, modulo its modulus, in about log2 J squarings. The period is then cut into streams, long segments that do not overlap, and each stream into substreams. For MRG32k3a (L’Ecuyer, Simard, Chen and Kelton, 2002), a stream holds 2127 values and a substream 276.
The typical use: one stream per source of randomness, per processor or per independent replication; within a stream, one substream per replication, which every configuration of the system replays. The configurations then see exactly the same uniforms, draw for draw: these are common random numbers. MRG32k3a was long almost the only generator to offer this organization; RandomDataStreams.jl extends it to other families, with a single interface.
This figure needs JavaScript.
MRG32k3aGen(): the buttons call RandomDataStreams functions, and the log shows the values Julia returns, to the last digit. After reset_substream! or reset_stream!, rand gives the same numbers again.using RandomDataStreams
gen = MRG32k3aGen() # a factory of streams
rng = next_stream!(gen) # a stream, disjoint from every stream gen will hand out next
u1 = rand(rng) # replication 1
next_substream!(rng) # next substream, 2⁷⁶ values further
u2 = rand(rng) # replication 2
reset_substream!(rng) # back to the start of the current substream
@assert rand(rng) == u2
Common random numbers
To compare two inventory policies, each is simulated on the same demand: the difference then measures the effect of the policy, not the noise of two unrelated demands. Here, 1,000 replications of 30 days compare the levels s = 50 and s = 60, each replication taking one substream:
using RandomDataStreams, Statistics
function cost(s, rng) # cost of 30 days of inventory
total, stock = 0.0, Float64(s)
for _ in 1:30
stock = min(stock + 40, 200)
d = max(0.0, 100 + 20randn(rng)) # the day's demand
sold = min(stock, d)
total += 5(d - sold) + 0.1max(0, stock - sold - 10)
stock -= sold
end
total
end
gen = MRG32k3aGen()
demand = next_stream!(gen)
crn = map(1:1000) do _
c50 = cost(50, demand)
reset_substream!(demand) # the same demand for s = 60
c60 = cost(60, demand)
next_substream!(demand) # next replication
c60 - c50
end
d50, d60 = next_stream!(gen, 2) # without common random numbers: two streams
ind = [cost(60, d60) - cost(50, d50) for _ in 1:1000]
var(crn), var(ind) # (0.144…, 645753.5…)
The variance of the difference drops from 645,754 to 0.14: without common random numbers, millions of times more replications would be needed for the same precision. Here both policies make the same calls in the same order, thirty demands per replication. When that is not the case, inversion, which consumes exactly one uniform per variate, keeps the draws aligned; rejection shifts them.
On several threads, first take one stream per replication with next_stream!(gen, n), then parallelize over the replications: the results do not depend on the number of threads. Calling next_stream! on a shared generator inside the parallel loop would hand out overlapping streams, with no visible error. The package and its generator families are presented on the Pseudo-random number generators page.
Non-uniform variates: inversion
With a good uniform generator at hand, we want normal, Weibull, Poisson or binomial variates… The reference is Luc Devroye’s book, Non-Uniform Random Variate Generation (1986). A good method is exact, or a very good approximation, simple and fast, light on memory, robust, and compatible with variance reduction techniques, quasi-Monte Carlo included.
Inversion. Let X have distribution function F, and U ∼ U(0, 1). The variable
X = F−1(U) = min{x : F(x) ≥ U},
defined by the generalized inverse, has distribution F, since P[F−1(U) ≤ x] = P[U ≤ F(x)] = F(x).
The principle holds for continuous distributions, where F(X) ∼ U(0, 1); for discrete ones, where it gives P[X = xi] = p(xi) for values in increasing order; and for mixed distributions.
This figure needs JavaScript.
Inversion is the reference method. It is monotone: X increases with U, and a single uniform suffices per variate. Common random numbers and antithetic variates, which rest on that monotonicity, thus carry over from the uniforms to the variates; with acceptance-rejection, they break down. It is also the method behind copulas.
Its weakness: F is sometimes hard to invert. For the normal distribution, neither F nor F−1 has a closed form, but excellent approximations of Φ−1 exist, and N(0, 1) is enough, since X = μ + σZ follows N(μ, σ2) when Z ∼ N(0, 1). For chi-square, gamma or beta distributions it is harder, because the form of F−1 depends on the parameters. In RandomDataStreams.jl, randn works by inversion, norminv(rand(rng)), where Julia’s standard library uses the Ziggurat, faster but incompatible with these techniques.
using RandomDataStreams
rng = next_stream!(MRG32k3aGen())
u = rand(rng) # 0.12701112204657714
x = -log(1 - u) / 2.0 # 0.0679…: exponential with rate λ = 2
z = norminv(u) # -1.1406…: Φ⁻¹(u)
norminv(1 - u) ≈ -z # true: the antithetic variate of z is -z
The equality is even exact with the generators that produce words of bits, xoshiro, PCG, Philox and Threefry: their uniforms are odd multiples of 2−53, and 1 − u is computed without rounding. With MRG32k3a and MRG63k3a, whose grid is in steps of 1/(m1 + 1), it is exact about four times in five, and true up to one rounding otherwise.
Discrete distributions
For a discrete distribution, p(xi) = P[X = xi] and F(x) = ∑xi ≤ x p(xi). The values xi and the cumulative probabilities F(xi) are stored once in two arrays; each draw then searches for I = min{i : F(xi) ≥ U} and returns xI. Linear search takes O(n) time, binary search O(log n); the best choice depends on the distribution and on the number n of values.
# xs: the values, sorted; F[i] = P[X ≤ xs[i]], with F[end] == 1
function discrete_inv(xs, F, u)
L, R = 0, length(F)
while L < R - 1 # invariant: F[L] < u ≤ F[R], with F[0] = 0
m = (L + R) ÷ 2
if F[m] < u
L = m
else
R = m
end
end
return xs[R]
end
xs, F = [0, 1, 2, 3], cumsum([0.1, 0.4, 0.3, 0.2])
discrete_inv(xs, F, 0.6) # 2, as xs[searchsortedfirst(F, 0.6)]
Composition, convolution, rejection
Composition
If F is a mixture, F(x) = ∑j pj Fj(x), whose components Fj are easier to invert than F, draw the index J = j with probability pj, then X from FJ. The method takes two uniforms per variate and rests on the decomposition P[X ≤ x] = ∑j P[X ≤ x | J = j] P[J = j] = ∑j Fj(x) pj.
Convolution
If X = Y1 + ⋯ + Yn, with independent Yi of known distributions, draw the Yi and add them up: an Erlang variate is a sum of exponentials with the same mean, a binomial a sum of Bernoulli variates.
Acceptance-rejection
This is the most important technique after inversion. Bound the density f of X by a “hat” t, f(x) ≤ t(x) for all x, normalized into a density r(x) = t(x)/a, with a = ∫ t(s) ds. Choose t so that r is easy to sample and a close to 1, in other words t close to f. Then repeat: draw Y with density r, and U ∼ U(0, 1) independent of Y, until U ≤ f(Y)/t(Y); then return Y. It takes a proposals per variate on average.
For the beta(2, 2) distribution, with density f(x) = 6x(1 − x) on (0, 1), the constant hat t = 1.5 gives a = 1.5: two proposals in three are accepted.
function beta22(rng)
while true
y = rand(rng) # density r: uniform on (0, 1)
u = rand(rng)
u <= 4y * (1 - y) && return y # f(y)/t(y) = 6y(1 - y)/1.5
end
end
This figure needs JavaScript.
The number of uniforms consumed per variate becomes random: two simulations meant to share their draws fall out of step as soon as a proposal is rejected in one and not in the other.
Box-Muller
Some distributions lend themselves to a change of variables. Box and Muller draw a point (X, Y) from the bivariate normal distribution, with density f(x, y) = e−(x2 + y2)/2/(2π), in polar coordinates (R, Θ): R = √(−2 log U1) and Θ = 2πU2, then X = R cos Θ and Y = R sin Θ, two independent normals.
function boxmuller(rng)
r = sqrt(-2log(rand(rng)))
θ = 2π * rand(rng)
return r * cos(θ), r * sin(θ)
end
The method is elegant, but each normal depends on two uniforms: the antithetic pair (1 − U1, 1 − U2) does not give −X, and the monotonicity that variance reduction relies on is lost. It can also be slower than inversion.
Multivariate distributions and copulas
To draw a random vector X with values in ℝd, the general approach is to generate the marginals, then combine them according to the desired dependence. In the simplest case, an explicit transformation is enough. For the multivariate normal X ∼ N(μ, Σ), factor Σ = LL⊤ (Cholesky factorization), and
X = μ + LZ, where Z ∼ N(0, I): d independent standard normals.
using RandomDataStreams, LinearAlgebra
rng = next_stream!(MRG32k3aGen())
μ = [1.0, 2.0]
Σ = [4.0 1.2; 1.2 1.0]
L = cholesky(Σ).L
x = μ + L * randn(rng, 2)
Copulas
A copula completely separates the marginal distributions, how each variable behaves on its own, from the dependence structure, how they move together. A d-variate copula C: [0, 1]d → [0, 1] is the distribution function of a vector (U1, …, Ud) whose margins are all uniform:
C(u) = P[U1 ≤ u1, …, Ud ≤ ud], with P[Uj ≤ uj] = uj for 0 ≤ uj ≤ 1.
Sklar’s theorem (1959). If H is a multivariate distribution function with margins F1, …, Fd, there exists a copula C such that
H(x1, …, xd) = C(F1(x1), …, Fd(xd)) for all x1, …, xd ∈ ℝ.
If the Fj are continuous, C is unique; otherwise it is unique on the product of the ranges of the margins, Ran F1 × ⋯ × Ran Fd. Conversely, for any copula C and any distribution functions F1, …, Fd, the function H defined above is a multivariate distribution function with margins F1, …, Fd.
Knowing H and its margins, the copula is recovered by inversion: C(u1, …, ud) = H(F1−1(u1), …, Fd−1(ud)), with the generalized inverses Fj−1(u) = min{x : Fj(x) ≥ u}.
Fréchet-Hoeffding bounds
Every bivariate copula is bounded:
max(u + v − 1, 0) ≤ C(u, v) ≤ min(u, v).
The upper bound comes from {U ≤ u} ∩ {V ≤ v} ⊆ {U ≤ u} and ⊆ {V ≤ v}, hence C(u, v) ≤ min(P[U ≤ u], P[V ≤ v]). The lower bound comes from 1 − C(u, v) = P[U > u ∪ V > v] ≤ (1 − u) + (1 − v), a particular case of the Bonferroni inequality, P[∩i=1d Ai] ≥ 1 − d + ∑i P[Ai]. The upper bound is reached when V = U, the lower one when V = 1 − U: the antithetic variate achieves the most negative dependence possible.
Gaussian copula
C(u1, …, ud) = ΦΣ(Φ−1(u1), …, Φ−1(ud)), where Φ is the distribution function of N(0, 1), and ΦΣ that of the d-dimensional N(0, Σ), Σ being a correlation matrix.
To sample it, draw Z ∼ N(0, Σ), set Uj = Φ(Zj), then Xj = Fj−1(Uj) with the desired margins: two inversions frame the dependence.
using RandomDataStreams, LinearAlgebra, Distributions
ρ = 0.7
L = cholesky([1.0 ρ; ρ 1.0]).L
function copula(rng)
z = L * randn(rng, 2) # Z ∼ N(0, Σ)
u = cdf.(Normal(), z) # the copula: U = Φ(Z)
return quantile(Exponential(2.0), u[1]), quantile(Normal(), u[2])
end
copula(next_stream!(MRG32k3aGen())) # (0.2716…, -1.1353…)
This figure needs JavaScript.
Copulas are estimated parametrically, non-parametrically, or with machine-learning models (Jutras-Dubé et al., Transportation Research Part C, 2024).
Further reading
- P. L’Ecuyer (2012), “Random Number Generation”, chapter 3 of the Handbook of Computational Statistics, 2nd edition, Springer: general principles.
- P. L’Ecuyer, R. Simard, E. J. Chen and W. D. Kelton (2002), “An Object-Oriented Random-Number Package with Many Long Streams and Substreams”, Operations Research, 50(6), 1073–1075: the streams and substreams of MRG32k3a.
- P. L’Ecuyer, O. Nadeau-Chamard, Y.-F. Chen and J. Lebar (2021), “Multiple Streams with Recurrence-Based, Counter-Based, and Splittable Random Number Generators”, Winter Simulation Conference, 1–16: streams with recent generators.
- J. K. Salmon, M. A. Moraes, R. O. Dror and D. E. Shaw (2011), “Parallel Random Numbers: As Easy as 1, 2, 3”, Proceedings of SC11, ACM: Philox and counter-based generators.
- M. E. O’Neill (2014), “PCG: A Family of Simple Fast Space-Efficient Statistically Good Algorithms for Random Number Generation”, technical report HMC-CS-2014-0905, Harvey Mudd College: the PCG family.
- D. Blackman and S. Vigna (2021), “Scrambled Linear Pseudorandom Number Generators”, ACM Transactions on Mathematical Software, 47(4): xoshiro and xoroshiro.
- L. Devroye (1986), Non-Uniform Random Variate Generation, Springer: non-uniform variates.