Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
March 3, 2007
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Function
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Lemma 4.1
Lemma 4.1 Given relatively prime integers a and m, there exists an integer b, unique modulo m, such that a b 1 (mod m).
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Lemma 4.1
Lemma 4.1 Given relatively prime integers a and m, there exists an integer b, unique modulo m, such that a b 1 (mod m). Denition If a b 1 (mod m), then we say that b is the inverse of a modulo m.
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Proof of Lemma 4.1 By the Euclidean algorithm (Algorithm 1.8) we can nd integers b and c such that a b + m c = 1. This means that a b is congruent to 1 modulo m. Let e be any other integer satisfying a e 1 (mod m).
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Function
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
We will prove more. The starting point is an algorithm that appeared in the rst century A.D. simultaneously in China, in the writings of Sun-Tsu, and in Judea, in a book by Nichomachus of Gerasa.
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Of course, one need only compute the values of Mi modulo M, which keeps the computations a little more reasonable.
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Function
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Question
What if two or more of the moduli are divisible by the same prime? The Chinese Remainder Theorem does not work in this case.
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Question
What if two or more of the moduli are divisible by the same prime? The Chinese Remainder Theorem does not work in this case. We rst observe that if we have a congruence with a modulus which is divisible by more than one prime, then we can split our single congruence into several congruences as long as the new moduli are relatively prime and their product is the original modulus.
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Example
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Example
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Example
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Example - Cont.
Example - Cont. are split into four congruences: x x x x 3 (mod 9) 7 (mod 27) 3 (mod 5) 7 (mod 28).
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Example - Cont.
Example - Cont. are split into four congruences: x x x x 3 (mod 9) 7 (mod 27) 3 (mod 5) 7 (mod 28).
We now have two congruences that both involve powers of p. One of two things has to happen:
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Two Things
Two Things 1. The congruences are contradictory and so there are no solutions. This is the case with the example given above. If x 3 (mod 9), then x 3, 12, or 21 (mod 27). or
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Two Things
Two Things 1. The congruences are contradictory and so there are no solutions. This is the case with the example given above. If x 3 (mod 9), then x 3, 12, or 21 (mod 27). or 2. Both of the congruences for powers of p are implied by the congruence with the higher power. This means we can get rid of one of our equations, leaving us with three congruences with relatively prime moduli for which we can use the Chinese Remainder Theorem.
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Example
Example Consider the system of congruences, x x 7 (mod 200) 82 (mod 375).
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Example
Example Consider the system of congruences, x x 7 (mod 200) 82 (mod 375).
This splits into four congruences: x x x x 7 (mod 25) 82 (mod 125) 7 (mod 8) 82 (mod 3).
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Example - Cont.
Example - Cont. The congruence modulo 25 is a special case of the congruence modulo 125, so we really have three congruences to relatively prime moduli:
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Example - Cont.
Example - Cont. The congruence modulo 25 is a special case of the congruence modulo 125, so we really have three congruences to relatively prime moduli: x x x 82 (mod 125) 7 (mod 8) 82 1 (mod 3),
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Example - Cont.
Example - Cont. The congruence modulo 25 is a special case of the congruence modulo 125, so we really have three congruences to relatively prime moduli: x x x 82 (mod 125) 7 (mod 8) 82 1 (mod 3),
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Function
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Lemma 4.6
Lemma 4.6 If gcd(m, n) = 1, then (m n) = (m) (n).
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Lemma 4.6
Lemma 4.6 If gcd(m, n) = 1, then (m n) = (m) (n). Proof Let a be a positive integer less than and relatively prime to m n. In other words, a is one of the integers counted by (m n).
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Lemma 4.6
Lemma 4.6 If gcd(m, n) = 1, then (m n) = (m) (n). Proof Let a be a positive integer less than and relatively prime to m n. In other words, a is one of the integers counted by (m n). We consider the correspondence a (a mod m, a mod n).
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Proof of Lemma 4.6 - Cont. The integer a is relatively prime to m and relatively prime to n, so a mod m and a mod n are relatively prime to m and n, respectively.
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Proof of Lemma 4.6 - Cont. The integer a is relatively prime to m and relatively prime to n, so a mod m and a mod n are relatively prime to m and n, respectively. This means that each integer counted by (m n) corresponds to a pair of integers, the rst counted by (m) and the second counted by (n).
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
So the number of such pairs is at most (m n): (m n) (m) (n). In Exercise 4.17 you are asked to prove that if p is a prime, then (pa ) = pa1 (p 1).
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Theorem 4.7
With this equality and Lemma 4.6, we can calculate (n) for n that we can factor.
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function
Solving Linear Congruences Chinese Remainder Theorem Moduli are not Relatively Prime Properties of Eulers Functio
Theorem 4.7
With this equality and Lemma 4.6, we can calculate (n) for n that we can factor. Theorem 4.7 Let
a a a n = p11 p22 pr r
Chapter 4 - Solving Linear Congruences, Chinese Remainder Theorem, and Eulers Function