Generalized inversive congruential pseudorandom numbers

From testwiki
Revision as of 04:19, 30 January 2023 by imported>OAbot (Open access bot: doi added to citation with #oabot.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

An approach to nonlinear congruential methods of generating uniform pseudorandom numbers in the interval [0,1) is the Inversive congruential generator with prime modulus. A generalization for arbitrary composite moduli m=p1,pr with arbitrary distinct primes p1,,pr5 will be present here.

Let m={0,1,...,m1}. For integers a,bm with gcd (a,m) = 1 a generalized inversive congruential sequence (yn)n0 of elements of m is defined by

y0=seed
yn+1aynφ(m)1+b(modm)n0

where φ(m)=(p11)(pr1) denotes the number of positive integers less than m which are relatively prime to m.

Example

Let take m = 15 = 3×5a=2,b=3 and y0=1. Hence φ(m)=2×4=8 and the sequence (yn)n0=(1,5,13,2,4,7,1,) is not maximum.

The result below shows that these sequences are closely related to the following inversive congruential sequence with prime moduli.

For 1ir let pi={0,1,,pi1},mi=m/pi and ai,bipi be integers with

ami2ai(modpi)and bmibi(modpi)

Let (yn)n0 be a sequence of elements of pi, given by

yn+1(i)ai(yn(i))pi2+bi(modpi)n0wherey0mi(y0(i))(modpi)is assumed. 

Theorem 1

Let (yn(i))n0 for 1ir be defined as above. Then

ynm1yn(1)+m2yn(2)++mryn(r)(modm).

This theorem shows that an implementation of Generalized Inversive Congruential Generator is possible, where exact integer computations have to be performed only in p1,,pr but not in m.

Proof:

First, observe that mi0(modpj),forij, and hence ynm1yn(1)+m2yn(2)++mryn(r)(modm) if and only if ynmi(yn(i))(modpi), for 1ir which will be shown on induction on n0.

Recall that y0mi(y0(i))(modpi) is assumed for 1ir. Now, suppose that 1ir and ynmi(yn(i))(modpi) for some integer n0. Then straightforward calculations and Fermat's Theorem yield

yn+1aynφ(m)1+bmi(aimiφ(m)(yn(i))φ(m)1+bi)mi(ai(yn(i))pi2+bi)mi(yn+1(i))(modpi),

which implies the desired result.

Generalized Inversive Congruential Pseudorandom Numbers are well equidistributed in one dimension. A reliable theoretical approach for assessing their statistical independence properties is based on the discrepancy of s-tuples of pseudorandom numbers.

Discrepancy bounds of the GIC Generator

We use the notation Dms=Dm(x0,,xm1) where xn=(xn,xn+1,,xn+s1) Template:Math [0,1)s of Generalized Inversive Congruential Pseudorandom Numbers for s2.

Higher bound

Let s2
Then the discrepancy Dms satisfies
Dm s < m1/2 Template:Math (2π Template:Mathlogm+75)s Template:Math i=1r(2s2+s(pi)1/2)+sm1 for any Generalized Inversive Congruential operator.

Lower bound:

There exist Generalized Inversive Congruential Generators with
Dm s Template:Math 12(π+2) Template:Mathm1/2 :Template:Math i=1r(pi3pi1)1/2 for all dimension s Template:Math 2.

For a fixed number r of prime factors of m, Theorem 2 shows that Dm(s)=O(m1/2(logm)s) for any Generalized Inversive Congruential Sequence. In this case Theorem 3 implies that there exist Generalized Inversive Congruential Generators having a discrepancy Dm(s) which is at least of the order of magnitude m1/2 for all dimension s2. However, if m is composed only of small primes, then r can be of an order of magnitude (logm)/loglogm and hence i=1r(2s2+s(pi)1/2)=O(mϵ) for every ϵ>0.[1] Therefore, one obtains in the general case Dms=O(m1/2+ϵ) for every ϵ>0.

Since i=1r((pi3)/(pi1))1/22r/2, similar arguments imply that in the general case the lower bound in Theorem 3 is at least of the order of magnitude m1/2ϵ for every ϵ>0. It is this range of magnitudes where one also finds the discrepancy of m independent and uniformly distributed random points which almost always has the order of magnitude m1/2(loglogm)1/2 according to the law of the iterated logarithm for discrepancies.[2] In this sense, Generalized Inversive Congruential Pseudo-random Numbers model true random numbers very closely.

See also

References

Template:Reflist

Notes

  1. Cite error: Invalid <ref> tag; no text was provided for refs named one
  2. Cite error: Invalid <ref> tag; no text was provided for refs named two