Professional Documents
Culture Documents
Number Theory 4
Number Theory 4
Example
x ≡ 2 (mod 5)
Find x ∈ Z satisfying 3 congruences: x ≡ 1 (mod 3)
x ≡ 3 (mod 4)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Chapter 3: Congruences
Slide 3: System of Linear Congruences
Example
x ≡ 2 (mod 5)
Find x ∈ Z satisfying 3 congruences: x ≡ 1 (mod 3)
x ≡ 3 (mod 4)
7%5 = 2
x = 7 is a solution because 7%3 = 1
7%4 = 3
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Chapter 3: Congruences
Slide 3: System of Linear Congruences
Example
x ≡ 2 (mod 5)
Find x ∈ Z satisfying 3 congruences: x ≡ 1 (mod 3)
x ≡ 3 (mod 4)
7%5 = 2
x = 7 is a solution because 7%3 = 1
7%4 = 3
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Theorem 3.7
Given the system of congruences x ≡ ci (mod ni )
such that gcd(ni , nj ) = 1 for all. The general solution is x ∈ [a]N
∏
N = ni
where a = x0 % N
( )
x = ∑ c × N × N −1 mod n
0 i ni ni i
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Theorem 3.7
Given the system of congruences x ≡ ci (mod ni )
such that gcd(ni , nj ) = 1 for all. The general solution is x ∈ [a]N
∏
N = ni
where a = x0 % N
( )
x = ∑ c × N × N −1 mod n
0 i ni ni i
x ≡ 2 (mod 5)
Example: Solve the system x ≡ 1 (mod 3)
x ≡ 3 (mod 4)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Theorem 3.7
Given the system of congruences x ≡ ci (mod ni )
such that gcd(ni , nj ) = 1 for all. The general solution is x ∈ [a]N
∏
N = ni
where a = x0 % N
( )
x = ∑ c × N × N −1 mod n
0 i ni ni i
x ≡ 2 (mod 5)
Example: Solve the system x ≡ 1 (mod 3)
x ≡ 3 (mod 4)
Solution
c1 = 2 c2 = 1 c3 = 3
n1 = 5 n2 = 3 n3 = 4
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Theorem 3.7
Given the system of congruences x ≡ ci (mod ni )
such that gcd(ni , nj ) = 1 for all. The general solution is x ∈ [a]N
∏
N = ni
where a = x0 % N
( )
x = ∑ c × N × N −1 mod n
0 i ni ni i
x ≡ 2 (mod 5)
Example: Solve the system x ≡ 1 (mod 3)
x ≡ 3 (mod 4)
Solution
c1 = 2 c2 = 1 c3 = 3
n1 = 5 n2 = 3 n3 = 4 → N = 5 × 3 × 4 = 60
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Theorem 3.7
Given the system of congruences x ≡ ci (mod ni )
such that gcd(ni , nj ) = 1 for all. The general solution is x ∈ [a]N
∏
N = ni
where a = x0 % N
( )
x = ∑ c × N × N −1 mod n
0 i ni ni i
x ≡ 2 (mod 5)
Example: Solve the system x ≡ 1 (mod 3)
x ≡ 3 (mod 4)
Solution
c1 = 2 c2 = 1 c3 = 3
n1 = 5 n2 = 3 n3 = 4 → N = 5 × 3 × 4 = 60
N N N
n1 = 12 n2 = 20 n1 = 15
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Theorem 3.7
Given the system of congruences x ≡ ci (mod ni )
such that gcd(ni , nj ) = 1 for all. The general solution is x ∈ [a]N
∏
N = ni
where a = x0 % N
( )
x = ∑ c × N × N −1 mod n
0 i ni ni i
x ≡ 2 (mod 5)
Example: Solve the system x ≡ 1 (mod 3)
x ≡ 3 (mod 4)
Solution
c1 = 2 c2 = 1 c3 = 3
n1 = 5 n2 = 3 n3 = 4 → N = 5 × 3 × 4 = 60 The
N N N
n1 = 12 n2 = 20 n1 = 15
particular solution is: x0 = (2)(12)(12−1 mod 5) +
(1)(20)(20−1 mod 3) + (3)(15)(15−1 mod 4) continue...
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Next: we must compute inverse mod (3 of them)
12−1 mod 5 20−1 mod 3 15−1 mod 4
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Next: we must compute inverse mod (3 of them)
12−1 mod 5 20−1 mod 3 15−1 mod 4
12 1 0 20 1 0 15 1 0
–(2) 5 0 1 –(6) 3 0 1 –(3) 4 0 1
–(2) 2 1 ... –(1) 2 1 ... –(1) 3 1 ...
–(2) 1 –2 ... –(2) 1 –1 ... –(3) 1 –1 ...
0 0 0
12−1 mod 5 = −2 20−1 mod 3 = −1 15−1 mod 4 = −1
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Next: we must compute inverse mod (3 of them)
12−1 mod 5 20−1 mod 3 15−1 mod 4
12 1 0 20 1 0 15 1 0
–(2) 5 0 1 –(6) 3 0 1 –(3) 4 0 1
–(2) 2 1 ... –(1) 2 1 ... –(1) 3 1 ...
–(2) 1 –2 ... –(2) 1 –1 ... –(3) 1 –1 ...
0 0 0
12−1 mod 5 = −2 20−1 mod 3 = −1 15−1 mod 4 = −1
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Next: we must compute inverse mod (3 of them)
12−1 mod 5 20−1 mod 3 15−1 mod 4
12 1 0 20 1 0 15 1 0
–(2) 5 0 1 –(6) 3 0 1 –(3) 4 0 1
–(2) 2 1 ... –(1) 2 1 ... –(1) 3 1 ...
–(2) 1 –2 ... –(2) 1 –1 ... –(3) 1 –1 ...
0 0 0
12−1 mod 5 = −2 20−1 mod 3 = −1 15−1 mod 4 = −1
a = x0 % N → a = −113 % 60 = 7
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Next: we must compute inverse mod (3 of them)
12−1 mod 5 20−1 mod 3 15−1 mod 4
12 1 0 20 1 0 15 1 0
–(2) 5 0 1 –(6) 3 0 1 –(3) 4 0 1
–(2) 2 1 ... –(1) 2 1 ... –(1) 3 1 ...
–(2) 1 –2 ... –(2) 1 –1 ... –(3) 1 –1 ...
0 0 0
12−1 mod 5 = −2 20−1 mod 3 = −1 15−1 mod 4 = −1
a = x0 % N → a = −113 % 60 = 7
x ∈ [a]N → x ∈ [7]60
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
HOMEWORK
Please do Problem 25 (a,b,c,d)
PRACTICE: Please
{ solve this problem NOW
x ≡ 5 (mod 7)
Solve the system
x ≡ 10 (mod 11)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
HOMEWORK
Please do Problem 25 (a,b,c,d)
PRACTICE: Please
{ solve this problem NOW
x ≡ 5 (mod 7)
Solve the system
x ≡ 10 (mod 11)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .