
LCG
An LCG, or Linear Congruential Generator, is a simple method for generating a sequence of pseudo-random numbers. It works using a formula: each new number is calculated by multiplying the current number by a fixed multiplier, adding a constant, and then taking the remainder when divided by a large number. This process creates a sequence that appears random but is actually deterministic, making LCGs useful for simulations, gaming, and other applications where reproducible random sequences are needed. The quality of the sequence depends on choosing appropriate constants to ensure good distribution and cycling properties.