Random Number Generation

Computer Science Level 3

The "random" numbers produced by computers aren't purely random. They are actually pseudo-random, meaning that they are produced by mathematical formulas that simulate randomness.

The linear congruential generator takes a seed \(X_0\) and generates subsequent pseudo-random numbers using the formula: \[X_{n + 1} = (aX_n + c) \mod m\]

\(X_1\) is the first pseudo-random number generated, \(X_2\) is the second, and so on.

Let R be the 2000th pseudo-random number generated by the linear congruential generator when \(X_0 = 42\), \(a = 25\), \(c = 31\), and \(m = 2^{20}\). What are the last three digits of R?


Problem Loading...

Note Loading...

Set Loading...