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 [math]\displaystyle{ m=p_1,\dots p_r }[/math] with arbitrary distinct primes [math]\displaystyle{ p_1,\dots ,p_r \ge 5 }[/math] will be present here. Let [math]\displaystyle{ \mathbb{Z}_{m} = \{0,1,...,m-1\} }[/math]. For integers [math]\displaystyle{ a,b \in \mathbb{Z}_{m} }[/math] with gcd (a,m) = 1 a generalized inversive congruential sequence [math]\displaystyle{ (y_{n})_{n \geqslant 0} }[/math] of elements of [math]\displaystyle{ \mathbb{Z}_{m} }[/math] is defined by
where [math]\displaystyle{ \varphi(m)=(p_{1}-1)\dots (p_{r}-1) }[/math] denotes the number of positive integers less than m which are relatively prime to m.
Let take m = 15 = [math]\displaystyle{ 3 \times 5\, a=2 , b=3 }[/math] and [math]\displaystyle{ y_0= 1 }[/math]. Hence [math]\displaystyle{ \varphi (m)= 2 \times 4=8 \, }[/math] and the sequence [math]\displaystyle{ (y_{n})_{n \geqslant 0}=(1,5,13,2,4,7,1,\dots ) }[/math] is not maximum.
The result below shows that these sequences are closely related to the following inversive congruential sequence with prime moduli.
For [math]\displaystyle{ 1\le i \le r }[/math] let [math]\displaystyle{ \mathbb{Z}_{p_{i}}= \{0,1,\dots ,p_{i}-1\}, m_{i}= m / p_{i} }[/math] and [math]\displaystyle{ a_{i} ,b_{i} \in \mathbb{Z}_{p_{i}} }[/math] be integers with
Let [math]\displaystyle{ (y_{n})_{n \geqslant 0} }[/math] be a sequence of elements of [math]\displaystyle{ \mathbb{Z}_{p_{i}} }[/math], given by
Let [math]\displaystyle{ (y_{n}^{(i)})_{n \geqslant 0} }[/math] for [math]\displaystyle{ 1\le i \le r }[/math] be defined as above. Then
This theorem shows that an implementation of Generalized Inversive Congruential Generator is possible, where exact integer computations have to be performed only in [math]\displaystyle{ \mathbb{Z}_{p_{1}},\dots , \mathbb{Z}_{p_{r}} }[/math] but not in [math]\displaystyle{ \mathbb{Z}_{m}. }[/math]
Proof:
First, observe that [math]\displaystyle{ m_{i}\equiv 0\pmod {p_{j}}, \; \text {for} \; i\ne j, }[/math] and hence [math]\displaystyle{ y_{n}\equiv m_{1}y_{n}^{(1)} + m_{2}y_{n}^{(2)} + \dots + m_{r}y_{n}^{(r)} \pmod m }[/math] if and only if [math]\displaystyle{ y_{n}\equiv m_{i} (y_{n}^{(i)})\pmod {p_{i}} }[/math], for [math]\displaystyle{ 1\le i \le r }[/math] which will be shown on induction on [math]\displaystyle{ n \geqslant 0 }[/math].
Recall that [math]\displaystyle{ y_{0}\equiv m_{i} (y_{0}^{(i)})\pmod {p_{i}} }[/math] is assumed for [math]\displaystyle{ 1\le i \le r }[/math]. Now, suppose that [math]\displaystyle{ 1\le i \le r }[/math] and [math]\displaystyle{ y_{n}\equiv m_{i} (y_{n}^{(i)})\pmod {p_{i}} }[/math] for some integer [math]\displaystyle{ n \geqslant 0 }[/math]. Then straightforward calculations and Fermat's Theorem yield
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.
We use the notation [math]\displaystyle{ D_m ^{s}=D_m (x_0,\dots , x_m-1) }[/math] where [math]\displaystyle{ x_n=(x_n, x_n+1 ,\dots , x_n+s-1) }[/math] ∈ [math]\displaystyle{ [0,1)^s }[/math] of Generalized Inversive Congruential Pseudorandom Numbers for [math]\displaystyle{ s\ge 2 }[/math].
Higher bound
Lower bound:
For a fixed number r of prime factors of m, Theorem 2 shows that [math]\displaystyle{ D_m^{(s)} = O (m^{-1/2} (\log m )^s) }[/math] for any Generalized Inversive Congruential Sequence. In this case Theorem 3 implies that there exist Generalized Inversive Congruential Generators having a discrepancy [math]\displaystyle{ D_m^{(s)} }[/math] which is at least of the order of magnitude [math]\displaystyle{ m^{-1/2} }[/math] for all dimension [math]\displaystyle{ s\ge 2 }[/math]. However, if m is composed only of small primes, then r can be of an order of magnitude [math]\displaystyle{ (\log m)/\log\log m }[/math] and hence [math]\displaystyle{ \textstyle \prod_{i=1}^r (2s-2 + s(p_i)^{-1/2})= O{(m^\epsilon )} }[/math] for every [math]\displaystyle{ \epsilon\gt 0 }[/math].[1] Therefore, one obtains in the general case [math]\displaystyle{ D_m^{s}=O(m^{-1/2+\epsilon}) }[/math] for every [math]\displaystyle{ \epsilon\gt 0 }[/math].
Since [math]\displaystyle{ \textstyle \prod_{i=1}^r ((p_{i} - 3)/(p_{i} - 1))^{1/2} \geqslant 2^{-r/2} }[/math], similar arguments imply that in the general case the lower bound in Theorem 3 is at least of the order of magnitude [math]\displaystyle{ m^{-1/2 - \epsilon} }[/math] for every [math]\displaystyle{ \epsilon\gt 0 }[/math]. 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 [math]\displaystyle{ m^{-1/2} (\log\log m)^{1/2} }[/math] 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.
Original source: https://en.wikipedia.org/wiki/Generalized inversive congruential pseudorandom numbers.
Read more |