dissertacao.pdf
dissertacao.pdf
dissertacao.pdf
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
To apply the Miller-Rabin test, we need the following theorem:<br />
Theorem 13. Given an integer N, let<br />
N − 1 = 2 s d<br />
with d odd, and s 0. Then N is probably prime if:<br />
or<br />
for some r less than s.<br />
a d ∼ = 1 (mod N) (33)<br />
(a d ) 2r ∼ = (N − 1) (mod N) (34)<br />
The running time of this probabilistic algorithm is O(k log 3 N), where k is<br />
the number of times we run the test with different bases a. Therefore the Miller-<br />
Rabin Primality test is a probabilistic primality test running in polynomial time.<br />
Could we make this a deterministic primality test? The answer is yes, we can,<br />
but we lose its efficiency.<br />
Theorem 14. Let N > 1 be an odd composite integer. Then N passes the<br />
Miller-Rabin Primality Test for at most N−1<br />
4<br />
bases a with 1 < a < N.<br />
So here is yet another deterministic primality test: given that an integer N<br />
passes k > N−1<br />
4 tests, we are sure it is prime. However, the running time of this<br />
algorithm is O( N<br />
4 log3 (N)), still infeasible. There is one interesting result that<br />
would permit this test to become both deterministic and efficient:<br />
Theorem 15. If the Generalized Riemann Hypothesis (GRH) is true and N<br />
passes the Miller-Rabin Primality Test for all bases a : 1 < a < 2(log N) 2 , then<br />
N is prime.<br />
So the proof of the GRH would lead to a deterministic version of the Miller-<br />
Rabin Primality Test with running time O(log 5 N). Though this is only a<br />
conjecture and therefore the test can be applied reliably only in its probabilistic<br />
version, it is one of the most used primality tests within programs such as<br />
Mathematica. The reason follows:<br />
Theorem 16. The probability that a composite N passes the Miller-Rabin Pri-<br />
mality Test for a random base a is 1<br />
4<br />
at most.<br />
This means that, if we test for 100 different random bases, the probability<br />
that all the tests are wrong is less than 1<br />
10 40 !<br />
25