In some problems, it is desirable to simulate a problem using sequences that are negatively correlated. This problem explains a way of getting negatively correlated sequences:

Consider the multiplicative congruential generator:

$$x_{n+1} \equiv ax_n \mod m$$

$$\text{seed} \ = x_0$$

$$y_{n+1} \equiv ay_n \mod m$$

$$\text{seed} \ = m - x_0$$

Show that $x_i + y_i \equiv 0 \mod m$ for any $i$.

Thoughts: I am a bit uncertain how to approach this problem should we solve for $x_n$ and $y_n$ and then put them together? It does not seem that would work either so I am unsure how to proceed, any suggestions are greatly appreciated. Will update if I think of anything.

Taking the hint below: for $n = 0$ we have $$x_1 = ax_0 \mod m$$ and $$y_1 = ay_0 \mod m = (am - ax_0) \mod m$$ Thus $$x_1 + y_1 \equiv (ax_0 + ay_0) \mod m \equiv (a x_o + am - ax_0)\mod m \equiv am \mod m$$ Don't see how $am$ all of a sudden becomes $0$.


1 Answer 1


We proceed by induction. For the base case, note that $y_0=m-x_0$, so that $x_0+y_0=x_0+m-x_0\equiv 0($ mod $m)$

Now, assume that for some $k\in\Bbb N$, $x_k + y_k \equiv 0($ mod $ m)$. Then $x_{k+1} + y_{k+1} = ax_k + ay_k = a(x_k + y_k) \equiv 0($ mod $m)$.

You are not showing equality to zero, only equivalence. Mod by $m$ just means, basically, pretend $m=0$.

  • $\begingroup$ Please see edit I am still lost on how we can show it $\endgroup$
    – Wolfy
    Commented Feb 21, 2017 at 21:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .