07.01.2013 Views

Dietzfelbinger M. Primality testing in polynomial time ... - tiera.ru

Dietzfelbinger M. Primality testing in polynomial time ... - tiera.ru

Dietzfelbinger M. Primality testing in polynomial time ... - tiera.ru

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

88 6. The Solovay-Strassen Test<br />

relatively prime. It is important to note that even <strong>in</strong> this case � �<br />

a<br />

n does not<br />

<strong>in</strong>dicate � � �whether � � � a is a quadratic residue modulo n or not. (For example,<br />

2 2 2<br />

15 = 3 · 5 =(−1)(−1) = 1 while 2 is a quadratic nonresidue modulo<br />

15.) Our def<strong>in</strong>ition will have the useful consequence that the Jacobi symbol<br />

is multiplicative <strong>in</strong> the upper and <strong>in</strong> the lower position, that square factors<br />

<strong>in</strong> the upper and <strong>in</strong> the lower position can be ignored, and that � �<br />

−1<br />

n can<br />

easily be evaluated.<br />

Lemma 6.2.2. If n, m range over odd <strong>in</strong>tegers ≥ 3, anda, b range over<br />

<strong>in</strong>tegers, then<br />

(a) � � � � � �<br />

a·b a b<br />

n = n · n ;<br />

(b) � a·b 2 � � �<br />

a<br />

n = n ,ifgcd(b, n) =1;<br />

(c) � � � � � �<br />

a a a<br />

n·m = n · m ;<br />

(d) � a<br />

n·m2 � � �<br />

a = n ,ifgcd(a, m) =1;<br />

(e) � � � � � � � �<br />

a+cn a<br />

a a mod n<br />

n = n , for all <strong>in</strong>tegers c (<strong>in</strong> particular, n = n );<br />

(f) � 2 2k � � � � 2k+1 � � � � �<br />

·a a 2 ·a 2 a<br />

n = n and n = n · n ,fork≥1; (g) � �<br />

−1<br />

(n−1)/2<br />

n =(−1) ;<br />

(h) � � � �<br />

0<br />

1<br />

n =0and n =1.<br />

Proof. Parts (a) and (b) follow by apply<strong>in</strong>g Lemma 6.1.6(a) and (b) to the<br />

factors <strong>in</strong> Def<strong>in</strong>ition 6.2.1. — Part (c) is an immediate consequence of Def<strong>in</strong>ition<br />

6.2.1. — Part (d), <strong>in</strong> turn, follows by not<strong>in</strong>g that � �<br />

a<br />

m ∈{1, −1} and<br />

apply<strong>in</strong>g (c) twice. — For part (e), we use that for every prime factor p of<br />

n we have that � � � �<br />

a+cn a<br />

p = p , by Lemma 6.1.6(c). — For part (f), we note<br />

that � � � �<br />

4 2 2<br />

n = n = 1, and then apply (b) repeatedly to elim<strong>in</strong>ate factors of<br />

4� <strong>in</strong>� the upper � � position. � � — For part (g), we note the follow<strong>in</strong>g. By def<strong>in</strong>ition,<br />

−1 −1 −1<br />

n = ··· ,wheren = p1 ···pr is the prime number decomposi-<br />

p1 pr<br />

tion of n. We apply Lemma 6.1.6 to see that this product equals (−1) s ,where<br />

s is the number of <strong>in</strong>dices i so that pi ≡ 3 (mod 4). On the other hand, we<br />

have<br />

n ≡ (p1 mod 4) ···(pr mod 4) ≡ (−1) s<br />

(mod 4).<br />

This means that 1<br />

2 (n − 1) is odd if and only if s is odd, and hence (−1)s =<br />

(−1) (n−1)/2 . — Part (h) is trivial. ⊓⊔<br />

6.3 The Law of Quadratic Reciprocity<br />

In this section, we identify a method to efficiently calculate � �<br />

a<br />

n . Most helpful<br />

for this is an amaz<strong>in</strong>g relationship that connects the values � � � �<br />

a n<br />

n and a ,for<br />

a, n ≥ 3 odd.<br />

To gather some <strong>in</strong>tuition, we put up a table of some of the values � �<br />

a<br />

n ;<br />

see Table 6.1. We cover odd a ≥ 3, but also <strong>in</strong>clude the special cases a = −1<br />

(cong<strong>ru</strong>ent modulo n to the odd number 2n − 1) and a = 2 (cong<strong>ru</strong>ent to<br />

n +2).

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

Saved successfully!

Ooh no, something went wrong!