Download presentation
Presentation is loading. Please wait.
Published byJonathan Gordon Modified over 9 years ago
1
Chinese Remainder Theorem
2
How many people What is x? Divided into 4s: remainder 3 x ≡ 3 (mod 4) Divided into 5s: remainder 4 x ≡ 4 (mod 5) Chinese Remainder Theorem
3
x ≡ a 1 (mod m 1 ) x ≡ a 2 (mod m 2 ) x ≡ a k (mod m k ) Theorem: If m 1,m 2,…,m k are relatively prime and a 1,a 2,…,a k are integers, then have a unique solution modulo m, where m = m 1 m 2 …m k. (That is, there is a solution x with and all other solutions are congruent modulo m to this solution.)
4
(1)Compute m = m 1 m 2 … m n. (2)Determine M 1 = m/m 1 ; M 2 = m/m 2 ; … ; M n = m/m n (3) Find the inverse of M 1 mod m 1, M 2 mod m 2, …, M n mod m n which are y 1, y 2,…, y n, (4) Compute x = a 1 M 1 y 1 + a 2 M 2 y 2 +…+ a n M n y n (5) Solve x ≡ y (mod m) Steps of solution:
5
Example : Solve the system of congruences x≡ 2 (mod 3), x≡ 3 (mod 5), x≡ 2 (mod 7) Solution: (1) m= 3 · 5 · 7=105 (2) M 1 = m/m 1 =105/3=35, M 2 = 21; M 3 = 15 (3) y 1 = 2 is an inverse of 35 mod 3 because 35 ≡ 2 (mod 3) y 2 = 1 is an inverse of 21 mod 5 because 21 ≡ 1 (mod 5) y 3 = 1 is an inverse of 15 mod 7 because 15 ≡ 1 (mod 7) (4) x= a 1 M 1 y 1 + a 2 M 2 y 2 + a 3 M 3 y 3 = 2 · 35 · 2 + 3 · 21 · 1 + 2 · 15 · 1=233 (5) 233 ≡ 23 (mod 105)
6
x≡ 2 (mod 3), x≡ 3 (mod 5), x≡ 2 (mod 7) m357105 a232 M352115 2.y 1 1.y 2 1.y 3 y211 2.35.23.21.12.15.1233 233 ≡ 23 (mod 105)
7
We conclude that 23 is the smallest positive integer that: 23 mod 3 = 2 23 mod 5 = 3 23 mod 7 = 2
8
Find all the solution to the system of congruences x≡ 2 (mod 3), x≡ 1 (mod 4), x≡ 3 (mod 5)
9
x≡ 2 (mod 3), x≡ 1 (mod 4), x≡ 3 (mod 5) m34560 a213 M201512 2.y 1 3.y 2 2.y 3 y233 2.20.21.15.33.12.3233 233≡ 53 (mod 60)
10
Home Work Find all the solution to the system of congruences x≡ 1 (mod 2), x≡ 2 (mod 3), x≡ 3 (mod 5), x≡ 4 (mod 11)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.