Inversive Congruential Generator
   HOME

TheInfoList



OR:

Inversive congruential generators are a type of nonlinear congruential
pseudorandom number generator A pseudorandom number generator (PRNG), also known as a deterministic random bit generator (DRBG), is an algorithm for generating a sequence of numbers whose properties approximate the properties of sequences of random numbers. The PRNG-generate ...
, which use the
modular multiplicative inverse In mathematics, particularly in the area of arithmetic, a modular multiplicative inverse of an integer is an integer such that the product is congruent to 1 with respect to the modulus .. In the standard notation of modular arithmetic this congru ...
(if it exists) to generate the next number in a sequence. The standard formula for an inversive congruential generator, modulo some prime ''q'' is: : x_0 = \text, : x_ = \begin (ax_i^ + c) \bmod q & \text x_i \ne 0, \\ c & \text x_i = 0. \end Such a generator is denoted symbolically as and is said to be an ICG with parameters ''q'', ''a'', ''c'' and seed ''seed''.


Period

The sequence (x_n)_ must have x_i = x_j after finitely many steps, and since the next element depends only on its direct predecessor, also x_ = x_ etc. The maximum possible
period Period may refer to: Common uses * Era, a length or span of time * Full stop (or period), a punctuation mark Arts, entertainment, and media * Period (music), a concept in musical composition * Periodic sentence (or rhetorical period), a concept ...
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 In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An exa ...
f(x) = x^2 - cx - a \in \mathbb F_q /math> (polynomial ring over \mathbb F_q) is primitive. This is not a necessary condition; there are choices of ''q'', ''a'' and ''c'' for which f(x) is not primitive, but the sequence nevertheless has a period of ''q''. Any polynomial, primitive or not, that leads to a maximal-period sequence is called an inversive maximal-period (IMP) polynomial. Chou describes an
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algorithms are used as specificat ...
for choosing the parameters ''a'' and ''c'' to get such polynomials. 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.


Example

ICG(5, 2, 3, 1) gives the sequence 1, 0, 3, 2, 4, 1, 0, 3, 4, 2, 1, 0, ... In this example, f(x) = x^2 - 3x - 2 is irreducible in \mathbb F_5 /math>, as none of 0, 1, 2, 3 or 4 is a root. It can also be verified that ''x'' is a primitive element of \mathbb F_5 (f) and hence ''f'' is primitive.


Compound inversive generator

The construction of a compound inversive generator (CIG) relies on combining two or more inversive congruential generators according to the method described below. Let p_1, \dots, p_r be distinct prime integers, each p_j \geq 5. For each index ''j'', ''1'' ≤ ''j'' ≤ ''r'', let (x_n)_ be a sequence of elements of \mathbb F_ periodic with period length p_j. In other words, \ \in \mathbb F_. For each index ''j'', 1 ≤ ''j'' ≤ r, we consider T_j = T/p_j, where T = p_1 \cdots p_r is the period length of the following sequence (x_n)_. The sequence (x_n)_ of compound pseudorandom numbers is defined as the sum : x_n = \left(T_1 x_n^ + T_2 x_n^ + \dots + T_r x_n^\right) \bmod T. The compound approach allows combining inversive congruential generators, provided they have full period, in parallel generation systems.


Advantages of CIG

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. Secondly, there exists a steady and simple way of parameter choice, based on the Chou algorithm that guarantees maximum period length. Thirdly, compound approach has the same properties as single inversive generators, 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 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 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.


Discrepancy and its boundaries

Equidistribution and statistical independence properties of the generated sequences, which are very important for their usability in a
stochastic simulation A stochastic simulation is a simulation of a system that has variables that can change stochastically (randomly) with individual probabilities.DLOUHÝ, M.; FÁBRY, J.; KUNCOVÁ, M.. Simulace pro ekonomy. Praha : VŠE, 2005. Realizations of these ...
, can be analyzed based on the ''discrepancy'' of ''s''-tuples of successive pseudorandom numbers with s = 1 and s = 2 respectively. 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 Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or '' -logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adve ...
purposes, and the first aim of the inversive congruential generator is to provide pseudorandom numbers.


Definition

For arbitrary points _1, \dots , _\in [0,1) the discrepancy is defined by D_N(_1, \dots , _)=_J, F_N(J)- V(J), , where the supremum is extended over all subintervals of [0,1)^s, F_N(J) is N^ times the number of points among _1, \dots , _ falling into and denotes the -dimensional volume of . Until now, we had sequences of integers from 0 to , in order to have sequences of [0,1)^s, one can divide a sequences of integers by its period . From this definition, we can say that if the sequence _1, \dots , _ is perfectly random then its well distributed on the interval J=[0,1)^s then V(J)=1 and all points are in so F_N(J)=N/N=1 hence D_N(_1, \dots , _)=0 but instead if the sequence is concentrated close to one point then the subinterval is very small V(j)\approx 0 and F_N(j)\approx N/N\approx 1 so D_N(_1, \dots , _)=1 Then we have from the better and worst case: :0\leq D_N(_1, \dots , _)\leq 1.


Notations

Some further notation is necessary. For integers k\geq 1 and q\geq 2 let C_k(q) be the set of nonzero lattice points (h_1,\dots ,h_k)\in Z^k with -q/2< h_j< q/2 for 1\leq j \leq k. Define :r(h,q)= \begin q \sin (\pi, h, /q)&\texth \in C_(q)\\ 1 &\texth = 0 \end and : r (\mathbf,q)=\prod_^k r(h_j,q) for =(h_1,\dots ,h_k) \in C_k(q). For real t the abbreviation e(t)=(2\pi\cdot it) is used, and u\cdot v stands for the standard inner product of u,v in R^k.


Higher bound

Let N \geq 1 and q \geq 2 be integers. Let _n= y_n/q \in [0,1)^k with y_n \in \^k for 0\leq n< N. Then the discrepancy of the points _0 ,\dots ,_ satisfies : D_N (\mathbf_0,\mathbf_1, \dots ,\mathbf_) \frac kq + \frac 1N \sum_\frac 1 \Bigg, \sum_^ e(\mathbf\cdot \mathbf_n)\Bigg,


Lower bound

The discrepancy of N arbitrary points \mathbf_1, \dots ,\mathbf_\in [0,1)^k satisfies : D_N (\mathbf_0,\mathbf_1, \dots ,\mathbf_) \ge \frac \Bigg, \sum_^ e(\mathbf\cdot \mathbf_n)\Bigg, for any nonzero lattice point =(h_1,\dots ,h_k)\in Z^k, where l 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. For more details see the original paper.


See also

*Pseudorandom number generator *List of random number generators *Linear congruential generator *Generalized inversive congruential pseudorandom numbers *Naor-Reingold Pseudorandom Function


References

{{Reflist, refs= W.S. Chou,''On inversive Maximal Period Polynomials over Finite Fields'', Applicable Algebra in Engineering, Communication and Computing, No. 4/5, 1995, pp. 245-250. J. Eichenauer-Herrmannn. ''Inversive congruential pseudorandom numbers avoid the planes'', Math.Comp., Vol. 56,1991, pp. 297-301. J. Eichenauer-Herrmannn, H. Grothe, A. Topuzoglu, ''On the lattice structure of a nonlinear generator with modulus 2^\alpha'', J.Comput. Appl. Math., Vol. 31,1990, pp. 81-85. J. Eichenauer-Herrmannn, H. Niederreiter, ''Lower bounds for the discrepancy of inversive congruential pseudorandom numbers with power of two modulus'', Math. Comp., Vol. 58, 1992, pp. 775-779. J. Eichenauer-Herrmannn,''Statistical independence of a new class of inversive congruential pseudorandom numbers'', Math. Comp., Vol 60, 1993, pp. 375-384. P. Hellekalek, ''Inversive pseudorandom number generators:concepts, results and links'', Proceedings of the Winter Simulation Conference, 1995, pp 255-262. J. Bubicz, J. Stoklosa, ''Compound Inversive Congruential Generator Design Algorithm'', §3 . H. Niederreiter, ''New developments in uniform pseudorandom number and vector generation'', Monte Carlo and Quasi-Monte Carlo Methods in Scientific Computing, Berlin, 1995. J. Eichenauer-Herrmann, F.Emmerich, ''Compound Inversive Congruential Pseudorandom Numbers: An average-Case Analysis'', American Mathematical Society.


External links


Inversive Generators
at the
University of Salzburg The University of Salzburg (german: Universität Salzburg), also known as the Paris Lodron University of Salzburg (''Paris-Lodron-Universität Salzburg'', PLUS), is an Austrian public university A public university or public college is a univ ...
. Pseudorandom number generators