Let us suppose that I have a full cycle LCG, following the standard equation
Hence, as it has a full cycle, it will have a period of m, and will output values ranging from 0 to m. However, I want to limit the output values to somewhere between 0 to some arbitrary constant a, where a is less than m. All the while maintaining its original period length.
I don't have experience in this field, but I was thinking that wherever I want to use the output value, I just take mod a of the number, and be done with it? will this ruin the randomness or is a valid solution?
How do I go about doing this?
