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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.4 The Ch<strong>in</strong>ese Rema<strong>in</strong>der Theorem 35<br />

Proof. (a) is trivial. — For (b) and (c) we make heavy use of Proposition<br />

3.1.13:<br />

(b) Assume gcd(a, m) =gcd(b, m) =1.Wewrite<br />

1=ax + my and 1 = bu + mv,<br />

for <strong>in</strong>tegers x, y, u, v. Then<br />

(ab) · (xu) =(ax)(bu) =(1− my) · (1 − mv) =1− m(y + v − myv),<br />

hence gcd(ab, m) = 1. By Proposition 3.1.10, this implies gcd(ab mod m, m) =<br />

1.<br />

(c) “⇒”: Assume gcd(a, m) = 1. Then there are <strong>in</strong>tegers x and y with<br />

1=ax + my.<br />

This implies ax − 1=−my ≡ 0(modm). Let b = x mod m. Thenab ≡<br />

ax ≡ 1(modm), which implies that a ·m b =1.<br />

“⇐”: Assume ab mod m = 1. This means that ab−1 =mx for some x, which<br />

implies gcd(a, m) =1. ⊓⊔<br />

Note that by the formula <strong>in</strong> the proof of (c) “⇒” it is implied that for<br />

a ∈ Z ∗ m some b with a ·m b = 1 can be found efficiently by apply<strong>in</strong>g the<br />

Extended Euclidean Algorithm 3.2.4 to a and m.<br />

Example 3.3.9. (a) In Z∗ 7 = {1, 2, 3, 4, 5, 6} we have 3 ·7 3=2and3·75=1. By <strong>in</strong>spection, ϕ(7) = 6.<br />

(b) In Z∗ 15 = {1, 2, 4, 7, 8, 11, 13, 14} the products 4·151, 4·152, 4·154,...,4·1514<br />

of 4 with elements of Z ∗ 15<br />

are 4, 8, 1, 13, 2, 14, 7, 11. By <strong>in</strong>spection, ϕ(15) = 8.<br />

(c) In Z ∗ 27 = {1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26} we have<br />

8 ·27 17 = 1. By <strong>in</strong>spection, ϕ(27) = 18.<br />

In Sect. 3.5 we will see how to calculate ϕ(n) fornumbersn whose prime<br />

decomposition is known.<br />

3.4 The Ch<strong>in</strong>ese Rema<strong>in</strong>der Theorem<br />

We start with an example. Consider 24 = 3 · 8, a product of two numbers<br />

that are relatively prime. We set up a table of the rema<strong>in</strong>ders a mod 3 and<br />

a mod 8, for 0 ≤ a

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

Saved successfully!

Ooh no, something went wrong!