170 likes | 789 Views
Chinese Remainder Theorem. Ying Ding Junru Chen. Chinese Remainder Theorem. Sun Zi suanjing ( 孫子算經 The Mathematical Classic by Sun Zi ) Shushu Jiuzhang ( 數書九章 Mathematical Treatise in Nine Sections) Simultaneous Congruence. DEF: Congruence Modulo n.
E N D
Chinese Remainder Theorem Ying Ding Junru Chen
Chinese Remainder Theorem • Sun Zisuanjing (孫子算經 The Mathematical Classic by Sun Zi) • ShushuJiuzhang (數書九章 Mathematical Treatise in Nine Sections) • Simultaneous Congruence
DEF: Congruence Modulo n • For integers x & y and positive integer n,
Example 1: • Solve X:
Method 1: • Enumeration X: 5, 8, 11, 14, 17, 20, 23… X: 3, 10, 17, 24, 31…
Method 2: • Chinese Remainder Theorem
M= a + b a = 14 b = 24
Chinese Remainder Theorem • Let m1,m2,…,mn be pairwise relatively prime positive integers and a1, a2, …, anarbitrary integers. Then the system x ≡ a1 (mod m1)x ≡ a2 (mod m2) :x ≡ an (mod mn) has a unique solution modulo m = m1m2…mn.
x ≡ a1 (mod m1)x ≡ a2 (mod m2) :x ≡ an (mod mn) m = m1m2…mn Proof: Let Mk = m / mk 1 k n Since m1, m2,…, mn are pairwise relatively prime, gcd (Mk, mk) = 1 (by the Definition of relatively prime. P274) integer yks.t.Mk yk≡ 1 (mod mk) (by the theorem on gcd(a,b). P273) ak Mkyk≡ ak (mod mk) , 1 k n since ak Mkyk≡ 0(mod mi), i ≠ k Letx = a1 M1 y1+a2 M2 y2+…+an Mnyn x ≡ aiMiyi≡ ai(mod mi) 1 i n xis a solution. All other solution y satisfies y≡ x (mod mk).
a = 35 b = 84 c = 90 Since Thus n = 8 and X = 1049