14.07.2013 Views

dissertacao.pdf

dissertacao.pdf

dissertacao.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

2.1.4 AKS Test<br />

In 2004, a major breakthrough was achieved by a team of computer scientists<br />

from the Indian Institute of Technology Kanpur. In an email sent worldwide,<br />

Manindra Agrawal, Neeraj Kayal and Nitin Saxena (AKS) announced the world<br />

they had found a deterministic polynomial time algorithm to verify an integer’s<br />

primality.<br />

Although the running time of the original algorithm was O (log 21<br />

2 N)[29],<br />

some recent efforts by Hendrik Lenstra and Carl Pomerance have created a<br />

variation of the algorithm whose time complexity is O (log 6 N) [29] (which is<br />

still slower than the Miller-Rabin Deterministic Test under the GRH).<br />

The algorithm is based on the following result:<br />

Theorem 17. Let a ∈ Z, N ∈ N, N ≥ 2 and (a, N) = 1. Then N is prime if<br />

and only if:<br />

(X + a) N = X N + a (mod N). (35)<br />

This criteria, which is stronger than those presented before as it is both<br />

necessary and sufficient for an integer to be prime, cannot be applied straight-<br />

forwardly to check an integer’s primality because, for large N, there are too<br />

many coefficients to calculate in the binomial. So the great development in<br />

2004 was to, based on this criteria, create a deterministic algorithm for check-<br />

ing primality. The original AKS algorithm is presented next:<br />

Algorithm 4. The AKS algorithm. Given a positive integer N > 1:<br />

1. Choose a ∈ Z and b > 1. If N = a b , then STOP and output COMPOS-<br />

ITE.<br />

2. Find the smallest r such that or(N) > log 2 (N).<br />

3. If 1 < (a, N) < N, for some a ≤ r, output COMPOSITE.<br />

4. If N ≤ r, output PRIME.<br />

5. For a = 1, 2, ..., ⌊ φ(r) log(N)⌋, do:<br />

if ((X +a) N ≇ X N +a (mod X r −1, N))), output COMPOSITE. (36)<br />

6. Output PRIME<br />

26

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

Saved successfully!

Ooh no, something went wrong!