Mlcg Period D0F3A8
1. **Problem Statement:** Find the period of the multiplicative linear congruential generator (MLCG) defined by the recurrence relation $$x_{n+1} = (a \times x_n) \bmod m$$ with parameters $a=2$, $m=5$, and seed $x_0=8$.
2. **Formula and Explanation:** The period is the smallest positive integer $k$ such that $$x_k = x_0$$ again, meaning the sequence repeats after $k$ steps.
3. **Step-by-step Calculation:**
- Compute $x_1 = (2 \times 8) \bmod 5 = 16 \bmod 5 = 1$
- Compute $x_2 = (2 \times 1) \bmod 5 = 2 \bmod 5 = 2$
- Compute $x_3 = (2 \times 2) \bmod 5 = 4 \bmod 5 = 4$
- Compute $x_4 = (2 \times 4) \bmod 5 = 8 \bmod 5 = 3$
- Compute $x_5 = (2 \times 3) \bmod 5 = 6 \bmod 5 = 1$
4. **Check for repetition:** The sequence generated is $8, 1, 2, 4, 3, 1, \ldots$ and the first repetition of a previous value (other than the seed) occurs at $x_5 = 1$, which appeared at $x_1$.
5. **Period determination:** The period is the length of the cycle starting from the first repeated value. The cycle is $1, 2, 4, 3$ which has length 4.
6. **Final answer:** The period of the MLCG is **4**.
Hence, the correct choice is (b) 4.