A pseudorandom number generator is a deterministic state-update algorithm producing numbers intended to imitate an independent sequence from a prescribed probability distribution. For Monte Carlo integration, desirable features include good one-dimensional and multidimensional uniformity, a period far longer than the calculation, negligible detectable dependence, reproducible seeds, sufficient numerical precision and fast generation. Uniform marginal distributions alone do not provide independent draws.
A pseudorandom number is an output of a deterministic algorithm chosen to imitate samples from a specified probability law. For example, a linear congruential generator returns fractions on a finite grid in . Their intended uniform distribution is an approximation, and their serial dependence must be assessed separately from the generator's period.
Choose integers , , and a seed . Iterate and return . This gives a deterministic finite-state pseudorandom number generator with output in . A nonzero increment gives a mixed generator; gives a multiplicative generator. Its period is at most , but even a full period does not guarantee good multidimensional uniformity or statistical independence.
A linear congruential generator has period for every seed if and only if , every prime dividing divides , and implies . The coprimality of prevents the orbit from being trapped in a residue class; the multiplier conditions permit full-period lifting through each prime power. Combining the prime-power periods by the Chinese remainder theorem gives period . For , the multiplier criterion reduces to , together with . A positive increment alone is insufficient.

Articles by others on the same topic (1)

A pseudorandom number generator (PRNG) is an algorithm that generates a sequence of numbers that approximates the properties of random numbers. Unlike true random number generators, which rely on physical processes or unpredictable phenomena to generate random numbers (such as radioactivity or thermal noise), PRNGs use deterministic algorithms to produce a sequence of numbers that may appear random.