A while ago I learnt that most computers uses a linear congruential generator to generate pseudorandom numbers. A linear congruential generator looks like this:
X(n+1) ≡ (a * X(n) + b) mod m
where a, b and m are constants and X(0) is the initial seed that starts the generator.
I also learnt that if you know the first few generated pseudorandom numbers it is possible to predict the next number without knowing any of the constants and without knowing X(0). I wanted to see how that was possible and found a proof of it online, but since I don't know very much about modular arithmetic I didn't quite understand some parts of the proof, and would like some help understanding it.
in the proof they started with the linear congruential generator. Then they defined a new sequence of numbers as:
Y(n) = X(n+1) - X(n)
then they say that the reason for this is because if X(n+1) ≡ (a * X(n) + b) mod m is true, then Y(n+1) ≡ (a * Y(n)) mod m must be true as well. My question is, how do I know this? Or what do I have to know about modular arithmetic in order to prove that equation?
X(n+1) ≡ (a * X(n) + b) mod m
where a, b and m are constants and X(0) is the initial seed that starts the generator.
I also learnt that if you know the first few generated pseudorandom numbers it is possible to predict the next number without knowing any of the constants and without knowing X(0). I wanted to see how that was possible and found a proof of it online, but since I don't know very much about modular arithmetic I didn't quite understand some parts of the proof, and would like some help understanding it.
in the proof they started with the linear congruential generator. Then they defined a new sequence of numbers as:
Y(n) = X(n+1) - X(n)
then they say that the reason for this is because if X(n+1) ≡ (a * X(n) + b) mod m is true, then Y(n+1) ≡ (a * Y(n)) mod m must be true as well. My question is, how do I know this? Or what do I have to know about modular arithmetic in order to prove that equation?