I'm having a hard time finding an answer to this. I've found several places that discuss it, but they do a very poor job of helping me (specifically me, maybe I'm dumb) understand what they're doing. For the below example, the solution should work for c=0 as well as any other whole number. I've shown values just to be clear that I'm talking about the same equation in the same state, but going forward and in reverse.
I have an LCG: Xn = X×a + c % m (I do believe this is full cycle)
- For: a=67, c=0, m=101, X=1
- Xn = ((1×67) + 0) % 101
- Xn = 67
If I were instead to know the values as follows...
- For: a=67, c=0, m=101, Xn = 67
- 67 = ((X×67) + 0) % 101
- X = ?
... how would I rearrange to solve for X? I am assuming X could only be at max m.