Jump to content

Inversive congruential generator

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Manuelnl (talk | contribs) at 09:57, 24 January 2011. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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 is

x0=seed
xi+1 ≡ (axi-1 + c) mod q if xi≠0 where 0<xi<q and q prime.
xi+1=c if xi=0

Such a generator is denoted symbolically as ICG(q,a,c,seed) and is said to be ICG with parameter q,a,c and seed.

Example:

The ICG(5,2,3,1) gives the sequence:(1,0,3,2,4,1,.....) (as in , 1 and 4 are their own inverse, 2 is the inverse of 3 and conversely).

For the sequence (xn)n≥0 ,its periods length T is maximum if T=q.If the polynomial f(x)=x²-cx-a (polynomial ring over ) is primitive then sequences have the maximum length.
In our example f(x)=x²-3x-2 is irreducible in as neither 0,1,2,3 or 4 are root of it and the period of our sequence is maximum equals to q=5.In order to show that f is primitive one should show that x is a primitive element of .
Such polynomial are called IMP polynomial (for Inversive Maximal Period).The sufficient condition for maximum sequence period is a proper choice of parameter a and c according to the algorithm described in [1].
Eichenauer,Lehn,Grothe and Niederreiter have shown that the inversive congruential generator have good uniformity properties,in particular with regard to lattice structure and serial correlations.

Compound Inversive Generator

The construction of a Compound Inversive Generator (CIG) relies on combining two or more congruential inversive generators according to the method described below.
Let p1,...,pr be distinct prime integers,each pj ≥ 5.For each index j,1≤ j ≤ r,let (xn)n≥0 be a sequence of elements of , that is periodic with period length pj.In other words,{xn(j) | 0 ≤ n ≤ pj}=.
For each index j, 1≤ j ≤ r, we consider Tj=T/pj where T=p1*...*pr is the period length of the following sequence (xn)n≥0.
The sequence (xn)n≥0 of compound pseudorandom numbers is defined as the sum

xn=T1xn(1)+T2 xn(2)+... +Trxn(r) mod T.

The compound approach allows combining Inversive Congruential Generators, provided they have full period, in parallel generation systems.

Example:

Let p1=5 and p2 =7 (r =2).To simplify, let take (xn(1))n≥0 = (0,1,2,3,4,...) and (xn(2))n≥0 =(0,1,2,3,4,5,6,...).We compute for every 1≤ j≤ 35, xj=7xj(1)+5xj(2) mod 35

then (xn)n≥0=(0, 12, 24, 1, 13, 25, 2, 14, 26, 3, 15, 27, 4, 16, 28, 5, 17, 29, 6, 18, 30, 7, 19, 31, 8, 20, 32, 9, 21, 33, 10, 22, 34, 11, 23)
(we have to do the 35 different sums to obtain 0+0 and rebegin the same sequence again,the period is well ).
This method allows obtaining very long period and modular operations may be carried out with relatively small moduli.

Advantages of CIG

The CIG are accepted for practical purposes for a number of reason.
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 steady and simple way of parameter choice,based on the Chou algorithm [1].It guarantees maximum period length.
Thirdly,compound approach gives the same properties of produced sequences as single inversive generators [5][6].Compound Inversive Generator allow obtaining period length significantly greater than obtained by a single Inversive Congruential Generator.They seem to be designed fo application with multiprocessor parallel hardware platforms.

There exists an algorithm [7] which allows designing compound generator 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 with each generator is associated 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 polynomial is the most efficient approach to find parameters for Inversive Congruential Generator with maximum period length.

Discrepancy and its bounderies

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 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 use for cryptographic purposes and the first aim of the Inversive congruential generator is to provide pseudorandom numbers.

Definition

For N arbitrary points t1,...,tN-1 ∈ [0,1)s the discrepancy is defined by

DN(t1,...,tN-1)=supJ |FN(J) – V(J)|,

where the supremum is extended over all subintervals J of [0,1)s , FN (J) is N-1 times the number of points among t1,...,tN-1 falling into J and V(J) denotes the s-dimensional volume of J.
Until now,we had sequences of integers from 0 to T-1, in order to have sequences of [0,1)s, one can divide its sequences of integers by the period T.
From this definition, we can say that if the sequence t1,...,tN-1 is perfectly random then its well distributed on the interval J=[0,1)s then V(J)=1 and all points are in J so FN(J)=N/N=1 hence DN(t1,...,tN-1)=0 but instead if the sequence is concentrated close to one point then the subinterval J is very small V(j)≈0 and FN(j)≈N/N≈1 so DN(t1,...,tN-1)=1.
Then we have from the better and worst case: 0≤ DN(t1,...,tN-1) ≤ 1

Notations

Some further notation is necessary. For integers k ≥1 and q ≥2 let Ck(q) be the set of nonzero lattice points (h1,...,hk) ∈ Zk with -q/2< hj< q/2 for 1≤ j ≤ k.

Define


and

for h=(h1,...,hk) ∈ Ck(q).For real t the abbreviation e(t)=exp(2π*it)is used, and u•v stands for the standard inner product of u,v in Rk

Higher bound

Let N ≥1 and q ≥2 be integers. Let tn = yn/q ∈ [0,1)k with yn ∈ {0,1,...q-1}k for 0≤ n< N.

Then the discrepancy of the points t0 ,..., tN-1 satisfies


+

Lower bound

The discrepancy of N arbitrary points t1,...,tN-1 ∈ [0,1)k satisfies

for any nonzero lattice point h=(h1,...,hk) ∈ Zk where l denotes the number of nonzero coordinates of h.

These two theorem show that the CIG is not perfect as 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 as one can see.

There exists also theorems which bound the average value of the discrepancy for Compound Inversive Generator and also ones which denumber values such that the discrepancy is bounded by some value depending on the parameters.For more details see the clear paper [9].

See also


References

  1. ^ a b 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.
  2. ^ J. Eichenauer,J. Herrmannn. Inversive congruential pseudorandom numbers avoid the planes, Math.Comp., Vol. 56,1991,pp. 297-301.
  3. ^ J. Eichenauer,J. Herrmannn,H.Grothe,A.Topuzoglu, On the lattice structure of a nonlinear generator with modulus 2a ,J.Comput. Appl. Math., Vol. 31,1990,pp. 81-85.
  4. ^ J. Eichenauer,J. Herrmannn,H. Niederreiter, Lower bounds fot the discrepancy of inversive congruential pseudorandom numbers withpower of two modulus, Math. Comp.,Vol. 58,1992,pp. 775-779.
  5. ^ J. Eichenauer,J. Herrmannn,Statistical independence of a new class of inversive congruential pseudorandom numbers,Math. Comp.,Vol 60,1993,pp. 375-384.
  6. ^ P. Hellekalek, Inversive pseudorandom number generators:concepts, results and links ,Proceedings of the Winter Simulation Conference,1995,pp 255-262.
  7. ^ J. Bubicz,J. Stoklosa, Compound Inversive Congruential Generator Design Algorithm, §3 .
  8. ^ H. Niederreiter, New developments in uniform pseudorandom number and vector generation, Monte Carlo and Quasi-Monte Carlo Methods in Scientific Computing,Berlin,1995.
  9. ^ J. Eichenauer-Herrmann,F.Emmerich, Compound Inversive Congruential Pseudorandom Numbers: An average-Case Analysis, American Mathematical Society.