Inversive congruential generator

Inversive congruential generators are a type of nonlinear congruential pseudorandom number generator, which use the modular multiplicative inverse (if it exists) to generate the next number in a sequence.

The standard formula for an inversive congruential generator, modulo some prime q is: Such a generator is denoted symbolically as ICG(q, a, c, seed) and is said to be an ICG with parameters q, a, c and seed seed.

after finitely many steps, and since the next element depends only on its direct predecessor, also

The maximum possible period for the modulus q is q itself, i.e. the sequence includes every value from 0 to q − 1 before repeating.

A sufficient condition for the sequence to have the maximum possible period is to choose a and c such that the polynomial

Any polynomial, primitive or not, that leads to a maximal-period sequence is called an inversive maximal-period (IMP) polynomial.

Chou describes an algorithm for choosing the parameters a and c to get such polynomials.

[1] Eichenauer-Herrmann, Lehn, Grothe and Niederreiter have shown that inversive congruential generators have good uniformity properties, in particular with regard to lattice structure and serial correlations.

The construction of a compound inversive generator (CIG) relies on combining two or more inversive congruential generators according to the method described below.

of compound pseudorandom numbers is defined as the sum The compound approach allows combining inversive congruential generators, provided they have full period, in parallel generation systems.

The CIG are accepted for practical purposes for a number of reasons.

Firstly, binary sequences produced in this way are free of undesirable statistical deviations.

Inversive sequences extensively tested with variety of statistical tests remain stable under the variation of parameter.

[2][3][4] Secondly, there exists a steady and simple way of parameter choice, based on the Chou algorithm[1] that guarantees maximum period length.

Thirdly, compound approach has the same properties as single inversive generators,[5][6] but it also provides period length significantly greater than obtained by a single inversive congruential generator.

They seem to be designed for application with multiprocessor parallel hardware platforms.

There exists an algorithm[7] that allows designing compound generators with predictable period length, predictable linear complexity level, with excellent statistical properties of produced bit streams.

The procedure of designing this complex structure starts with defining finite field of p elements and ends with choosing the parameters a and c for each inversive congruential generator being the component of the compound generator.

It means that each generator is associated to a fixed IMP polynomial.

Such a condition is sufficient for maximum period of each inversive congruential generator[8] and finally for maximum period of the compound generator.

The construction of IMP polynomials is the most efficient approach to find parameters for inversive congruential generator with maximum period length.

Equidistribution and statistical independence properties of the generated sequences, which are very important for their usability in a stochastic simulation, can be analyzed based on the discrepancy of s-tuples of successive pseudorandom numbers with

The discrepancy computes the distance of a generator from a uniform one.

A low discrepancy means that the sequence generated can be used for cryptographic purposes, and the first aim of the inversive congruential generator is to provide pseudorandom numbers.

but instead if the sequence is concentrated close to one point then the subinterval J is very small

be the set of nonzero lattice points

satisfies for any nonzero lattice point

denotes the number of nonzero coordinates of

These two theorems show that the CIG is not perfect because the discrepancy is greater strictly than a positive value but also the CIG is not the worst generator as the discrepancy is lower than a value less than 1.

There exist also theorems which bound the average value of the discrepancy for Compound Inversive Generators and also ones which take values such that the discrepancy is bounded by some value depending on the parameters.

A visualization of the algorithm.