Is Linear Congruential Generator a Reliable Random Number Generator?

  • Thread starter Thread starter mebigp
  • Start date Start date
  • Tags Tags
    Generator Linear
Click For Summary
Linear Congruential Generators (LCGs) can produce random numbers between 0 and 99 using the formula x_n = (k * x_{n-1}) mod 100. Choosing a multiplier k that is a multiple of 10, such as 10, 20, or 30, results in poor randomness, consistently yielding 0. For better randomness, k should be selected as a number coprime with 100, which enhances the generator's performance. The discussion raises questions about the optimal values of k and the quantity of such effective k. Overall, the choice of k significantly influences the reliability of the LCG as a random number generator.
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.
 
The standard _A " operator" maps a Null Hypothesis Ho into a decision set { Do not reject:=1 and reject :=0}. In this sense ( HA)_A , makes no sense. Since H0, HA aren't exhaustive, can we find an alternative operator, _A' , so that ( H_A)_A' makes sense? Isn't Pearson Neyman related to this? Hope I'm making sense. Edit: I was motivated by a superficial similarity of the idea with double transposition of matrices M, with ## (M^{T})^{T}=M##, and just wanted to see if it made sense to talk...

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 3 ·
Replies
3
Views
778
  • · Replies 40 ·
2
Replies
40
Views
3K
  • · Replies 21 ·
Replies
21
Views
7K
Replies
5
Views
3K
Replies
22
Views
5K