A LCG has full period if its period length is . There are several conditions for an LCG to reach full period. For example, and must be relatively prime; any prime divides must also divide . Long period is easy to achieve but is not everything, because LCGs with is perfectly 1-distributed, but they have terrible statistical properties like extremely high autocorrelation.
Another requirement for a good LCG is to minimize the ``parallel hyperplanes'' phenomenon . Let be the distance between two parallel hyperplanes seen from orientation . Then is the -dimensional maximum distance between two parallel hyperplanes from all orientations. The search for optimal parameters that minimizes thus becomes the most important issue for LCGs. Fortunately, one test called Spectral test is designed to quickly calculate given , , and .
The generalized congruential generators have the following form (see ):
In this project we have implemented a special kind of LCG called Prime Modulus Multiplicative Linear Congruential Generator (PMMLCG.) Its parameters are and being a prime. The advantage of PMMLCG is that it eliminates an addition, has an almost full period (of length ), and can be subjected to the Spectral test.