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
with arbitrary distinct primes
will be present here.
Let
. For integers
with gcd (a,m) = 1 a generalized inversive congruential sequence
of elements of
is defined by
![{\displaystyle y_{0}={\rm {seed}}}](https://wikimedia.riteme.site/api/rest_v1/media/math/render/svg/c35cc2782d36edbdc8b0f3f036485e0463b4f72b)
![{\displaystyle y_{n+1}\equiv ay_{n}^{\varphi (m)-1}+b{\pmod {m}}{\text{, }}n\geqslant 0}](https://wikimedia.riteme.site/api/rest_v1/media/math/render/svg/3f01909267d0016d48dd9237b18e4df3539bed01)
where
denotes the number of positive integers less than m which are relatively prime to m.
Let take m = 15 =
and
. Hence
and the sequence
is not maximum.
The result below shows that these sequences are closely related to the following inversive congruential sequence with prime moduli.
For
let
and
be integers with
![{\displaystyle a\equiv m_{i}^{2}a_{i}{\pmod {p_{i}}}\;{\text{and }}\;b\equiv m_{i}b_{i}{\pmod {p_{i}}}{\text{. }}}](https://wikimedia.riteme.site/api/rest_v1/media/math/render/svg/3e5fbb04eec48a6f6e5ebab73eae95012c917143)
Let
be a sequence of elements of
, given by
![{\displaystyle y_{n+1}^{(i)}\equiv a_{i}(y_{n}^{(i)})^{p_{i}-2}+b_{i}{\pmod {p_{i}}}\;{\text{, }}n\geqslant 0\;{\text{where}}\;y_{0}\equiv m_{i}(y_{0}^{(i)}){\pmod {p_{i}}}\;{\text{is assumed. }}}](https://wikimedia.riteme.site/api/rest_v1/media/math/render/svg/8d4d3b47583a6533454a84d134405d258a9b51a0)
Let
for
be defined as above.
Then
![{\displaystyle y_{n}\equiv m_{1}y_{n}^{(1)}+m_{2}y_{n}^{(2)}+\dots +m_{r}y_{n}^{(r)}{\pmod {m}}.}](https://wikimedia.riteme.site/api/rest_v1/media/math/render/svg/0405b423da7784cfa5e0adcd98170f7bcf34c425)
This theorem shows that an implementation of Generalized Inversive Congruential Generator is possible, where exact integer computations have to be performed only in
but not in
Proof:
First, observe that
and hence
if and only if
, for
which will be shown on induction on
.
Recall that
is assumed for
. Now, suppose that
and
for some integer
. 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.
Discrepancy bounds of the GIC Generator
[edit]
We use the notation
where
∈
of Generalized Inversive Congruential Pseudorandom Numbers for
.
Higher bound
- Let
![{\displaystyle s\geq 2}](https://wikimedia.riteme.site/api/rest_v1/media/math/render/svg/1a395f6df937866b3ea0cb9abc6b984925acb16a)
- Then the discrepancy
satisfies
<
×
×
×
for any Generalized Inversive Congruential operator.
Lower bound:
- There exist Generalized Inversive Congruential Generators with
≥
×
: ×
for all dimension s :≥ 2.
For a fixed number r of prime factors of m, Theorem 2 shows that
for any Generalized Inversive Congruential Sequence. In this case Theorem 3 implies that there exist Generalized Inversive Congruential Generators having a discrepancy
which is at least of the order of magnitude
for all dimension
. However, if m is composed only of small primes, then r can be of an order of magnitude
and hence
for every
.[1] Therefore, one obtains in the general case
for every
.
Since
, similar arguments imply that in the general case the lower bound in Theorem 3 is at least of the order of magnitude
for every
. 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
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.
- ^ G. H. Hardy and E. M. Wright, An introduction to the theory of numbers, 5th ed., Clarendon Press, Oxford, 1979.
- ^ J. Kiefer, On large deviations of the empiric d.f. Fo vector chance variables and a law of the iterated logarithm, PacificJ. Math. 11(1961), pp. 649-660.
- Eichenauer-Herrmann, Jürgen (1994), "On Generalized Inversive Congruential Pseudorandom Numbers", Mathematics of Computation, 63 (207) (first ed.), American Mathematical Society: 293–299, doi:10.1090/S0025-5718-1994-1242056-8, JSTOR 2153575