chinese remainder theorem
DESCRIPTION
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. - PowerPoint PPT PresentationTRANSCRIPT
Chinese Remainder Theorem
Ying DingJunru 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
•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, …, an arbitrary integers. Then the system
x ≡ a1 (mod m1)x ≡ a2 (mod m2)
:x ≡ an (mod mn)
has a unique solution modulo 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 yk s.t. Mk yk ≡ 1 (mod mk)
(by the theorem on gcd(a,b). P273) ak Mk yk ≡ ak (mod mk) , 1 k n
since ak Mk yk ≡ 0(mod mi), i ≠ k
Let x = a1 M1 y1+a2 M2 y2+…+an Mn yn
x ≡ ai Mi yi ≡ ai (mod mi) 1 i nx is a solution. All other solution y satisfies y ≡ x (mod mk).
m = m1m2…mn
x ≡ a1 (mod m1)x ≡ a2 (mod m2):x ≡ an (mod mn)
Han Xin Count Solders
•M= a + b + c
a = 35 b = 84 c = 90
Since
Thus n = 8 and X = 1049