Name: The Silent Wind of Doom 2009-01-09 5:43
A "Linear Congruential Generator" is a common method for generating pseudorandom numbers which is implemented as follows:
1) A positive integer m and two other integers a,b both between 0 and m-1 are fixed.
2) A seed value r_0 between 0 and m-1 is input.
3) Further "random" numbers are generated by the recurrence r_{n+1} \equiv ar_n + b (\mod m). (So that 0 \le r_{n+1} \le m-1).
The following sequence of numbers (which I triple checked for typos :P) were generated by this kind of process:
6543
6331
9584
9025
3911
Find a,b, and m.
1) A positive integer m and two other integers a,b both between 0 and m-1 are fixed.
2) A seed value r_0 between 0 and m-1 is input.
3) Further "random" numbers are generated by the recurrence r_{n+1} \equiv ar_n + b (\mod m). (So that 0 \le r_{n+1} \le m-1).
The following sequence of numbers (which I triple checked for typos :P) were generated by this kind of process:
6543
6331
9584
9025
3911
Find a,b, and m.