Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chinese Remainder Theorem Ying Ding Junru Chen. Chinese Remainder Theorem Sun Zi suanjing ( 孫子算經 The Mathematical Classic by Sun Zi) Shushu Jiuzhang (

Similar presentations


Presentation on theme: "Chinese Remainder Theorem Ying Ding Junru Chen. Chinese Remainder Theorem Sun Zi suanjing ( 孫子算經 The Mathematical Classic by Sun Zi) Shushu Jiuzhang ("— Presentation transcript:

1 Chinese Remainder Theorem Ying Ding Junru Chen

2 Chinese Remainder Theorem Sun Zi suanjing ( 孫子算經 The Mathematical Classic by Sun Zi) Shushu Jiuzhang ( 數書九章 Mathematical Treatise in Nine Sections) Simultaneous Congruence

3 DEF: Congruence Modulo n

4 Example 1:

5 Method 1:

6 Method 2:

7

8 Chinese Remainder Theorem Let m 1,m 2,…,m n be pairwise relatively prime positive integers and a 1, a 2, …, a n arbitrary integers. Then the system x ≡ a 1 (mod m 1 ) x ≡ a 2 (mod m 2 ) : x ≡ a n (mod m n ) has a unique solution modulo m = m 1 m 2 …m n.

9 Proof: Let M k = m / m k  1  k  n Since m 1, m 2,…, m n are pairwise relatively prime, gcd ( M k, m k ) = 1 (by the Definition of relatively prime. P274)  integer y k s.t. M k y k ≡ 1 (mod m k ) (by the theorem on gcd(a,b). P273)  a k M k y k ≡ a k (mod m k ),  1  k  n since a k M k y k ≡ 0(mod m i ),  i ≠ k Let x = a 1 M 1 y 1 +a 2 M 2 y 2 +…+a n M n y n x ≡ a i M i y i ≡ a i (mod m i )  1  i  n x is a solution. All other solution y satisfies y ≡ x (mod m k ). m = m 1 m 2 …m n x ≡ a 1 (mod m 1 ) x ≡ a 2 (mod m 2 ) : x ≡ a n (mod m n )

10 Han Xin Count Solders

11

12


Download ppt "Chinese Remainder Theorem Ying Ding Junru Chen. Chinese Remainder Theorem Sun Zi suanjing ( 孫子算經 The Mathematical Classic by Sun Zi) Shushu Jiuzhang ("

Similar presentations


Ads by Google