Consider m=24, i.e., Xn+1 =(aXn) mod 24. (Hint: This is a common case for a linear congruential algorithm when m is a power of 2.)
What should be the value of a to achieve the maximum period?
so and so on
In general
The maximum period possible is
Which is
So we need to find an whose period modulo is as large as possible
We can check that
As we must have we can say that any of the values will work
And that the maximum period we will get is 2
Get Answers For Free
Most questions answered within 1 hours.