Introduction
Computers use random numbers all of the time. For example, a game
might use a random number to represent the result of a dice roll,
or a random number might be used to select the winner in a
sweepstakes. However, most "random numbers" used by computers
aren't that random at all. While the numbers generated may appear
to be random, their source is deterministic. The most common random
number generation algorithm implemented on computers is the linear
congruential generator (LCG).
Linear Congruential Generator
The linear congruential generator is defined by this recurrence
relation:
Xn+1 = (aXn + c) mod
m
a is the multiplier.
c is the increment.
m is the modulus.
a, c, and m remain constant while X
changes with each successive evaluation of the function.
X0 is called the seed. mod stands for the
modulo operation (i.e. it gives the remainder of dividing
(aXn + c) by m).
Example: If a=1103515245,
X0=1984, c=12345, and m=32768, then
X1 would be 31993, X2 would be
17470, etc.
The Puzzle
To solve this puzzle, you have to become a linear congruential
random number generator. Your starting condition is:
a=1103515245, X0=1984, c=12345, and
m=1024. Calculate X118, X589,
X593, X640, X887, and
X934.
N X589 X118.X593
W 0X887
X934.X640
Note, this puzzle doesn't require a computer. It can be done by
hand or with a calculator. Using the hints and some educated
guessing, it can be done in an hour or two using a
calculator.