XCII.1 (2000)
Exponential sums and the distribution of inversive congruential pseudorandom numbers
with prime-power modulus
by
Harald Niederreiter (Vienna) and Igor E. Shparlinski (Sydney)
1. Introduction. Let p ≥ 3 be a prime and m ≥ 1 an integer. We write U
m= (Z/p
mZ)
∗for the group of reduced residue classes modulo p
m, where we drop the dependence on p in the notation for simplicity (we may think of p as a fixed prime). Then |U
m| = (p − 1)p
m−1. It will often be convenient to identify elements of Z/p
mZ with the corresponding elements of the least residue system modulo p
m.
For given a, b ∈ Z/p
mZ we consider a map ψ : U
m→ Z/p
mZ of the form (1) ψ(w) = aw
−1+ b for w ∈ U
m.
It is easy to see that ψ is a permutation of U
mif and only if gcd(a, p) = 1 and b ≡ 0 (mod p). These conditions will be assumed from now on.
If we start from an initial value u
0∈ U
m, then the recurrence relation (2) u
n+1= ψ(u
n) for n = 0, 1, . . .
generates a sequence u
0, u
1, . . . of elements of U
m. It is obvious that this se- quence is purely periodic with least period length τ ≤ (p − 1)p
m−1. Detailed studies of the possible values of τ can be found in [1] and [4].
If u
0, u
1, . . . is a sequence generated by (1) and (2), then it is of inter- est for the application mentioned below to establish upper bounds for the exponential sums
(3)
N −1
X
n=0
χ(u
n),
where χ is a nontrivial additive character of Z/p
mZ and 1 ≤ N ≤ τ . In the case m = 1, and with a slight change of formula (1) to arrive at more
1991 Mathematics Subject Classification: 11K38, 11K45, 11L07, 11T23, 65C10.
[89]
interesting permutations ψ of U
1, a nontrivial upper bound for the corre- sponding exponential sums was first proved in [10] (see also [12]). In the present paper we treat the case m ≥ 2 in which the details of the method are quite different.
The exponential sums (3) are relevant in the analysis of a well-known family of pseudorandom numbers. If u
0, u
1, . . . is a sequence of elements of U
mas above, then the numbers u
0/p
m, u
1/p
m, . . . in the interval [0, 1) form a sequence of inversive congruential pseudorandom numbers with modulus p
m. For p ≥ 3 and m ≥ 2, the case we are concerned with here, this method of pseudorandom number generation was introduced in [4]. In prac- tice, one works with a large power p
mof a small prime p. For surveys of results on inversive congruential pseudorandom numbers we refer to [2], [8, Chapter 8], [9].
It is clear that upper bounds on the exponential sums (3) yield results on the distribution of the inversive congruential pseudorandom numbers u
0/p
m, u
1/p
m, . . . A quantitative version of such a result in the form of a discrepancy bound will be given in Section 4. This is the first nontrivial discrepancy bound for parts of the period of inversive congruential pseudo- random numbers with prime-power modulus. An analogous result for prime moduli was first established in [10]. Related results on the distribution in parts of the period for pseudorandom numbers generated by nonlinear methods can be found in [5], [6], [11], [12].
2. Auxiliary results. If ψ is the permutation of U
m, m ≥ 1, given by (1) and r is an arbitrary integer, then let ψ
rdenote the rth power of ψ in the group of permutations of U
m. We have the explicit formula in Lemma 1 below. Here and in the following, it will often be convenient to write u/v for an expression uv
−1in a multiplicative abelian group.
Lemma 1. For any integer r ≥ 0 there exist c
r, e
r∈ Z/p
mZ such that ψ
r(w) = (bc
r− e
r)w + ac
rc
rw − e
rfor all w ∈ U
m.
Moreover , for even r we have c
r≡ 0 (mod p) and e
r6≡ 0 (mod p) and for odd r we have c
r6≡ 0 (mod p) and e
r≡ 0 (mod p).
P r o o f. For r = 0 we can take c
0= 0 and e
0= 1. The general case follows by straightforward induction on r and the additional properties of c
rand e
rare obtained along the way.
If u
0, u
1, . . . is a sequence generated by (1) and (2), then for 1 ≤ k ≤ m
we let τ
kbe the least period length of the sequence u
0, u
1, . . . considered
modulo p
k(so that τ = τ
m).
Lemma 2. If c
r≡ 0 (mod p
k) for some r ≥ 1 and 1 ≤ k ≤ m, then τ
kdivides r.
P r o o f. From c
r≡ 0 (mod p
k) it follows by Lemma 1 that e
r6≡ 0 (mod p) and hence ψ
r(w) ≡ w (mod p
k) for all w ∈ U
m. Then r is a period length of the sequence u
0, u
1, . . . considered modulo p
k, and so τ
kdivides r.
Lemma 3. Let p ≥ 3 be a prime, let m be a positive integer , and let f and g be arbitrary integers. Put gcd(f, p
m) = p
l. Then
pm−1
X
z=0
exp 2πi(f z
2+ gz) p
m= 0 if g 6≡ 0 (mod p
l) and
pm−1
X
z=0
exp 2πi(f z
2+ gz) p
m= p
(m+l)/2if g ≡ 0 (mod p
l).
P r o o f. This follows from Lemma 6 in [3].
For 1 ≤ r ≤ τ − 1 and a nontrivial additive character χ of Z/p
mZ we introduce the exponential sum
(4) σ
r= X
w∈Um
χ(ψ
r(w) − w).
Note that χ is determined by an integer h 6≡ 0 (mod p
m), in the sense that (5) χ(v) = exp 2πihv
p
mfor all v ∈ Z/p
mZ.
Put gcd(h, p
m) = p
dwith 0 ≤ d < m, so that we can write h = p
dh
0with an integer h
06≡ 0 (mod p). By Lemma 1 we have
σ
r= X
w∈Um
χ c
r(a + bw − w
2) c
rw − e
r.
Let gcd(c
r, p
m) = p
kwith k ≥ 0, then Lemma 2 shows that k < m. Thus, we can write c
r= p
kc with an integer c 6≡ 0 (mod p). Then
(6) σ
r= X
w∈Um
exp 2πip
d+kp
m· ch
0(a + bw − w
2) p
kcw − e
r. It is trivial that
(7) σ
r= |U
m| = (p − 1)p
m−1if d + k ≥ m.
For d + k < m we obtain the following bound.
Lemma 4. With the notation above we have
|σ
r| ≤ 2p
(m+d+k)/2if d + k < m.
P r o o f. In (6) we put w = sp
m−d−k+t with 0 ≤ s < p
d+kand t ∈ U
m−d−k. Then
(8) σ
r= p
d+kX
t∈Um−d−k
exp 2πich
0p
m−d−k· a + bt − t
2p
kct − e
r.
If k = 0, then t 7→ ct − e
ris a permutation of U
m−dby Lemma 1, hence carrying out this substitution in the sum above yields
|σ
r| = p
dX
v∈Um−d
exp 2πich
0p
m−d((a + bc
−1e
r− c
−2e
2r)v
−1− c
−2v)
. The last exponential sum is always bounded by 2p
(m−d)/2, namely by a result in [13, p. 97] for d ≤ m − 2 and by the Weil bound for Kloosterman sums (see [7, Theorem 5.45]) for d = m − 1. Therefore the result of the lemma follows for k = 0.
Next we consider the case k ≥ m − d − k. Then from (8) we get
|σ
r| = p
d+kX
t∈Um−d−k
exp 2πich
0p
m−d−k· t
2− bt e
r. Furthermore,
X
t∈Um−d−k
exp 2πich
0p
m−d−k· t
2− bt e
r=
pm−d−k−1
X
z=0
exp 2πich
0p
m−d−k· z
2− bz e
r−
pm−d−k−1−1
X
z=0
exp
2πich
0p
m−d−k−1· pz
2− bz e
r. Now Lemma 3 applied to the last two sums shows that the first sum has absolute value p
(m−d−k)/2and the second sum has absolute value at most p
(m−d−k)/2, and so the lemma is again established.
Finally, we consider the case 1 ≤ k < m − d − k. In (8) we put t = zp
m−d−2k+ u, 0 ≤ z < p
k, u ∈ U
m−d−2k. Then
p
−d−kσ
r= X
u∈Um−d−2k
exp 2πich
0p
m−d−k· a + bu − u
2p
kcu − e
r×
pk−1
X
z=0
exp 2πich
0p
m−d−k· (b − 2u)p
m−d−2kz − p
2m−2d−4kz
2p
kcu − e
r= X
u∈Um−d−2k
exp 2πich
0p
m−d−k· a + bu − u
2p
kcu − e
r×
pk−1
X
z=0
exp 2πich
0p
k· p
m−d−2kz
2+ (2u − b)z e
r.
By Lemma 3, each inner sum is 0 since m − d − 2k > 0 and 2u − b ≡ 2u 6≡ 0 (mod p) for all u ∈ U
m−d−2k. Thus, we have σ
r= 0.
3. The bound for exponential sums. For a sequence u
0, u
1, . . . gen- erated by (1) and (2) with least period length τ and for integers h and N with 1 ≤ N ≤ τ we consider the exponential sum
S
N(h) =
N −1
X
n=0
exp 2πihu
np
m.
Theorem 1. Let p ≥ 3 be a prime, let m ≥ 2 be an integer , and let h be an integer with gcd(h, p
m) = p
d, 0 ≤ d < m. Then
|S
N(h)| < 49 16
p
mτ
1/2N
1/2p
(m+d)/4for 1 ≤ N ≤ τ.
P r o o f. With the notation in (5) we can write S
N(h) =
N −1
X
n=0
χ(u
n).
Note that u
n= ψ
n(u
0) for all integers n ≥ 0, and we use this identity to define u
nfor all negative integers n. It is easy to see that for any integer k we have
(9)
S
N(h) −
N −1
X
n=0
χ(u
n+k)
≤ 2|k|.
For an integer K ≥ 1 put
R(K) = {k ∈ Z : −(K − 1)/2 ≤ k ≤ (K − 1)/2} if K is odd, {k ∈ Z : −K/2 + 1 ≤ k ≤ K/2} if K is even.
Then
X
k∈R(K)
|k| ≤ K
2/4.
If we use (9) for all k ∈ R(K), then we get
(10) K|S
N(h)| ≤ W + K
2/2
with
W =
N −1
X
n=0
X
k∈R(K)
χ(u
n+k) ≤
N −1
X
n=0
X
k∈R(K)
χ(u
n+k)
=
N −1
X
n=0
X
k∈R(K)
χ(ψ
k(u
n))
.
By the Cauchy–Schwarz inequality we obtain W
2≤ N
N −1
X
n=0
X
k∈R(K)
χ(ψ
k(u
n))
2
≤ N X
w∈Um
X
k∈R(K)
χ(ψ
k(w))
2
≤ N X
k,l∈R(K)
X
w∈Um
χ(ψ
k(w) − ψ
l(w))
≤ KN p
m+ 2N X
k,l∈R(K) k>l
X
w∈Um
χ(ψ
k(w) − ψ
l(w)) . Recalling that ψ is a permutation of U
m, we can now write
X
w∈Um
χ(ψ
k(w) − ψ
l(w)) = X
w∈Um
χ(ψ
k−l(ψ
l(w)) − ψ
l(w))
= X
w∈Um
χ(ψ
k−l(w) − w), and so
(11) W
2≤ KN p
m+ 2KN
K−1
X
r=1
|σ
r|,
where σ
ris as in (4) and we assume K ≤ τ . From Lemma 2, equation (7), and Lemma 4 we derive
K−1
X
r=1
|σ
r| ≤ 2p
(m+d)/2m−d−1
X
k=0
p
k/2N
k+ (p − 1)p
m−1K−1
X
r=1 τm−d|r
1 (12)
≤ 2p
(m+d)/2m−d−1
X
k=0
p
k/2(M
k− M
k+1) + (p − 1)p
m−1K τ
m−d, where N
k, resp. M
k, is the number of r, 1 ≤ r ≤ K − 1, with gcd(c
r, p
m) = p
k, resp. c
r≡ 0 (mod p
k). For 1 ≤ k ≤ m and each r counted by M
kwe have τ
k| r by Lemma 2. By using either [4, Lemma 6] or noting that every value modulo p
kgives rise to p
m−kdistinct values modulo p
m, we see that (13) τ ≤ p
m−kτ
kfor 1 ≤ k ≤ m.
Therefore
M
k≤ K/τ
k≤ Kp
m−k/τ for 1 ≤ k ≤ m.
It follows that
m−d−1
X
k=0
p
k/2(M
k− M
k+1)
= M
0+
m−d−1
X
k=1
(p
k/2− p
(k−1)/2)M
k− p
(m−d−1)/2M
m−d≤ K +
1 − 1
p
1/2 m−d−1X
k=1
p
k/2M
k< K +
1 − 1
p
1/2Kp
mτ
∞
X
k=1
p
−k/2<
1 + 1
p
1/2Kp
mτ .
Together with (12) and (13) this yields
K−1
X
r=1
|σ
r| < 2
1 + 1
p
1/2p
mτ Kp
(m+d)/2+ p − 1 p · p
mτ Kp
d≤
2 + 2
p
1/2+ p − 1 p
3/2p
mτ Kp
(m+d)/2< 3.54 p
mτ Kp
(m+d)/2. Substituting this bound in (11), we obtain
W
2< KN p
m+ 7.08 p
mτ K
2N p
(m+d)/2. We put
K = dp
m/2e.
Then
W
2< 8.08 p
mτ K
2N p
(m+d)/2.
We remark that if τ < K, then the bound in Theorem 1 is trivial because
|S
N(h)| ≤ N ≤ τ < p
m/2< 49 16
p
mp
m/2 1/2p
m/4< 49 16
p
mτ
1/2N
1/2p
(m+d)/4. So we can assume K ≤ τ , and similarly we can assume
N
1/2≥ 49
16 p
m/4because otherwise
|S
N(h)| ≤ N < 49 16
p
mτ
1/2N
1/2p
(m+d)/4. Then
K ≤ p
m/2+ 1 ≤ 64
147 N
1/2p
m/4. From (10) we conclude
|S
N(h)| ≤ W K + K
2 <
√
8.08 p
mτ
1/2N
1/2p
(m+d)/4+ 32
147 N
1/2p
m/4<
√
8.08 + 32 147
p
mτ
1/2N
1/2p
(m+d)/4, and this yields the desired result.
4. The discrepancy bound. Let u
0/p
m, u
1/p
m, . . . , u
N −1/p
mbe inver- sive congruential pseudorandom numbers with modulus p
mand 1 ≤ N ≤ τ . The discrepancy D
Nof these numbers is defined by
D
N= sup
J ⊆[0,1)
A(J, N ) N − |J |
,
where the supremum is extended over all subintervals J of [0, 1), A(J, N ) is the number of points u
n/p
min J for 0 ≤ n ≤ N − 1, and |J | is the length of J .
Theorem 2. Let p ≥ 3 be a prime and m ≥ 2 an integer. Then the dis- crepancy D
Nof inversive congruential pseudorandom numbers with modulus p
msatisfies
D
N< p
mτ
1/2N
−1/2p
m/4(1.8 log N + 15.1) for 1 ≤ N ≤ τ.
P r o o f. By the Erd˝ os–Tur´ an inequality in the form given in [14, p. 214], for any integer H ≥ 1 we have
(14) D
N≤ 1
H + 1 + 2 N
H
X
h=1
1
πh + 1 H + 1
|S
N(h)|, where S
N(h) is as in Theorem 1. We apply this bound with
H = 3τ p
m 1/2N
1/2p
−m/4.
We can assume H ≥ 1 since otherwise the discrepancy bound in the theorem
is trivial. By Theorem 1 we obtain
H
X
h=1
1
h |S
N(h)| < 49 16
p
mτ
1/2N
1/2p
m/4m−1
X
d=0
p
d/4H
X
h=1 pd|h
1 h
≤ 49 16
p
mτ
1/2N
1/2p
m/4(1 + log H)
m−1
X
d=0
p
−3d/4< 11 2
p
mτ
1/2N
1/2p
m/41 + 1
2 log N
. Similarly we get
H
X
h=1