Is Linear Congruential Generator a Reliable Random Number Generator?

  • Context: Undergrad 
  • Thread starter Thread starter mebigp
  • Start date Start date
  • Tags Tags
    Generator Linear
Click For Summary
SUMMARY

The discussion centers on the reliability of the Linear Congruential Generator (LCG) defined by the formula x_n = (k * x_{n-1}) mod 100, where k is a fixed positive integer. It concludes that values of k that are multiples of 10 (e.g., 10, 20, 30) produce poor randomness, as they generate a sequence that includes many zeros. To achieve better randomness, k should be selected as a number that is coprime with 100, which enhances the distribution of generated numbers between 0 and 99.

PREREQUISITES
  • Understanding of Linear Congruential Generators (LCGs)
  • Knowledge of modular arithmetic
  • Familiarity with coprime numbers
  • Basic concepts of randomness in number generation
NEXT STEPS
  • Research the properties of coprime numbers in number theory
  • Explore alternative random number generators, such as Mersenne Twister
  • Learn about the statistical tests for randomness
  • Investigate the impact of different values of k on LCG performance
USEFUL FOR

Mathematicians, computer scientists, and software developers interested in random number generation and its applications in simulations, cryptography, and statistical sampling.

mebigp
Messages
7
Reaction score
0
Linear congruential generator x_n (equivalence) k x_{n-1} (mod 100)where k is some fixed

positive integer. Is this a good random number generator (that generates from 0 to 99). for

which k is this particularly bad and are are there any k for which this is better than other

k? How many such better k are there ? You can not determine the initial seed, x_0.

I think any k that is 10,20,30.. gives a 0.
 
Physics news on Phys.org
Select a number coprime with 100.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 40 ·
2
Replies
40
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K