10.12.2012 Views

Prime Numbers

Prime Numbers

Prime Numbers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.5 The primality test of Agrawal, Kayal, and Saxena (AKS test) 207<br />

cannot do better than Õ(ln6 n) for the total running time. Note too that from<br />

Exercise 4.30, this total running time is indeed bounded by Õ(ln6 n) for almost<br />

all primes n. (For most composite numbers n, the running time is less.)<br />

But in our never-ending quest for the best possible algorithm, we ask<br />

whether Õ(ln6 n) can be achieved for all numbers n. It seems as if this should<br />

be the case; that is, it seems as if we should be able to choose r = Õ(ln2 n)<br />

always. Such a result follows independently from strong forms of two different<br />

conjectures. One of these is the Artin conjecture asserting that if n is neither<br />

−1 nor a square (which is certainly an allowable hypothesis for us), then there<br />

are infinitely many primes r with n a primitive root for r. Anysuchprimer<br />

with r>1+lg 2 n may be used in Algorithm 4.5.1, and it seems reasonable<br />

to assume that there is always such a prime smaller than 2 lg 2 n (for n>2).<br />

It is interesting that in [Hooley 1976] there is a proof of the Artin conjecture<br />

assuming the GRH (see the comments in Exercise 2.39), and it may be that<br />

this proof can be strengthened to show that there is good value for rlg 2 n with q = Õ(ln2 n)<br />

and r =2q + 1 not dividing n ± 1; see [Agrawal et al. 2004]. Such a value for<br />

r is valid in Algorithm 4.5.1. Indeed, it would suffice if the order of n modulo<br />

r is either q or 2q. But otherwise, its order is 1 or 2, and we have stipulated<br />

that r does not divide n ± 1. These conjectures strengthen our view that the<br />

complexity of Algorithm 4.5.1 should be Õ(ln6 n).<br />

Using a deep theorem in [Fouvry 1985], one can show that r may be chosen<br />

with r = O(ln 3 n); see [Agrawal et al. 2004]. Thus, the total bit complexity<br />

for the algorithm is Õ(ln7.5 n). This is nice, but there is a drawback to using<br />

Fouvry’s theorem. The proof is not only difficult, it is ineffective. This means<br />

that from the proof there is no way to present a numerically explicit upper<br />

bound for the number of bit operations. This ineffectivity is due to the use of<br />

a theorem of Siegel; we have already seen the consequences of Siegel’s theorem<br />

in Theorem 1.4.6, and we will see it again in our discussion of class numbers<br />

of quadratic forms.<br />

So using Fouvry’s result, we get close to the natural limit of Õ(ln6 n), but<br />

not quite there, and the time estimate is ineffective. In the next subsection<br />

we shall discuss how these defects may be removed.<br />

4.5.3 Primality testing with Gaussian periods<br />

In Theorem 4.5.2 we are concerned with the polynomial x r −1. In the following<br />

result from [Lenstra and Pomerance 2005] we move toward a more general<br />

polynomial f(x).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!