Chinese Remainder Theorem

Chinese Remainder Theorem

Introduction Construction Applications The Coda Chinese Remainder Theorem Debabrota Basu Department of Computer Science School of Computing October 5, 2016 October 5, 2016 D. Basu CS1231R: CRT 1/24 Introduction Construction Applications The Coda \You probably said or were told at some point that diamonds are forever, right? That depends on your definition of forever! A theorem { that really is forever." { Eduardo S´anzde Cabez´on October 5, 2016 D. Basu CS1231R: CRT 2/24 Introduction Construction Applications The Coda History Sun Tzu first mentioned this problem in his 3rd century book Sunzi Suanjing. Aryabhata described an algorithm to solve it in 6th century A.D. Fibonacci mentioned a special case of it in Liber Abaci, published in 1202. Gauss used congruences to give it the modern formulation in his Disquisitiones Arithmeticae of 1801. October 5, 2016 D. Basu CS1231R: CRT 3/24 Introduction Construction Applications The Coda An Example There are certain things whose number is unknown. Repeatedly divided by 3, the remainder is 2; by 5 the remainder is 3; and by 7 the remainder is 2. What will be the number? -Sun Tzu October 5, 2016 D. Basu CS1231R: CRT 4/24 { Primitive version { Two integers a and b are called pairwise coprime or relatively prime, if gcd(a; b) = 1. { ni's are called modulis or divisors. Introduction Construction Applications The Coda Chinese Remainder Theorem (I) Theorem (Remainder Version) If K i. fnigi=1 are pairwise coprime integers greater than 1, QK ii. N = i=1 ni, and K iii. faigi=1 are K integers, such that ai 2 f0; 1; : : : ; ni − 1g for every i, then there exists an unique integer x 2 f0; 1;:::;N − 1g such that the remainder of x divided by ni is ai for every i. October 5, 2016 D. Basu CS1231R: CRT 5/24 { Two integers a and b are called pairwise coprime or relatively prime, if gcd(a; b) = 1. { ni's are called modulis or divisors. Introduction Construction Applications The Coda Chinese Remainder Theorem (I) Theorem (Remainder Version) If K i. fnigi=1 are pairwise coprime integers greater than 1, QK ii. N = i=1 ni, and K iii. faigi=1 are K integers, such that ai 2 f0; 1; : : : ; ni − 1g for every i, then there exists an unique integer x 2 f0; 1;:::;N − 1g such that the remainder of x divided by ni is ai for every i. { Primitive version October 5, 2016 D. Basu CS1231R: CRT 5/24 { ni's are called modulis or divisors. Introduction Construction Applications The Coda Chinese Remainder Theorem (I) Theorem (Remainder Version) If K i. fnigi=1 are pairwise coprime integers greater than 1, QK ii. N = i=1 ni, and K iii. faigi=1 are K integers, such that ai 2 f0; 1; : : : ; ni − 1g for every i, then there exists an unique integer x 2 f0; 1;:::;N − 1g such that the remainder of x divided by ni is ai for every i. { Primitive version { Two integers a and b are called pairwise coprime or relatively prime, if gcd(a; b) = 1. October 5, 2016 D. Basu CS1231R: CRT 5/24 Introduction Construction Applications The Coda Chinese Remainder Theorem (I) Theorem (Remainder Version) If K i. fnigi=1 are pairwise coprime integers greater than 1, QK ii. N = i=1 ni, and K iii. faigi=1 are K integers, such that ai 2 f0; 1; : : : ; ni − 1g for every i, then there exists an unique integer x 2 f0; 1;:::;N − 1g such that the remainder of x divided by ni is ai for every i. { Primitive version { Two integers a and b are called pairwise coprime or relatively prime, if gcd(a; b) = 1. { ni's are called modulis or divisors. October 5, 2016 D. Basu CS1231R: CRT 5/24 Introduction Construction Applications The Coda Chinese Remainder Theorem (II) Theorem (Congruence Modulo Version) If K i. fnigi=1 are pairwise coprime integers greater than 1, QK ii. N = i=1 ni, and K iii. faigi=1 are K integers, then there exists an unique residue class x(modN) such that, x ≡ a1(mod n1); x ≡ a2(mod n2); . x ≡ aK (mod nK ): October 5, 2016 D. Basu CS1231R: CRT 6/24 { Z=niZ is the quotient ring of Z generated by the equivalence class [ni] . Introduction Construction Applications The Coda Chinese Remainder Theorem (III) Theorem (Ring Isomorphism Version) If K i. fnigi=1 are pairwise coprime integers greater than 1, and QK ii. N = i=1 ni, then the map x mod N 7! (x mod n1; : : : ; x mod nK ) defines a ring isomorphism, ∼ Z=NZ = Z=n1Z × ::: × Z=nK Z: October 5, 2016 D. Basu CS1231R: CRT 7/24 Introduction Construction Applications The Coda Chinese Remainder Theorem (III) Theorem (Ring Isomorphism Version) If K i. fnigi=1 are pairwise coprime integers greater than 1, and QK ii. N = i=1 ni, then the map x mod N 7! (x mod n1; : : : ; x mod nK ) defines a ring isomorphism, ∼ Z=NZ = Z=n1Z × ::: × Z=nK Z: { Z=niZ is the quotient ring of Z generated by the equivalence class [ni] . October 5, 2016 D. Basu CS1231R: CRT 7/24 { x mod I denotes the image of the element x in the quotient ring R=I defined by the ideal I. Introduction Construction Applications The Coda Chinese Remainder Theorem (IV) Theorem (Generalized Version) If K i. fIigi=1 are pairwise coprime two-sided ideals of a ring R, and K ii. I = \i=1Ii, then the map x mod I 7! (x mod I1; : : : ; x mod IK ) defines a ring isomorphism, ∼ R=I = R=I1 × ::: × R=IK : October 5, 2016 D. Basu CS1231R: CRT 8/24 Introduction Construction Applications The Coda Chinese Remainder Theorem (IV) Theorem (Generalized Version) If K i. fIigi=1 are pairwise coprime two-sided ideals of a ring R, and K ii. I = \i=1Ii, then the map x mod I 7! (x mod I1; : : : ; x mod IK ) defines a ring isomorphism, ∼ R=I = R=I1 × ::: × R=IK : { x mod I denotes the image of the element x in the quotient ring R=I defined by the ideal I. October 5, 2016 D. Basu CS1231R: CRT 8/24 Solution methods{ Geometric approach Modular or algebraic approach General solution : not possible to obtain (Hilbert's 10th problem) Introduction Construction Applications The Coda Linear Diophantine's Equation Problem Given a; b; c 2 Z, ax + by = c; find integers x and y satisfying this equation. October 5, 2016 D. Basu CS1231R: CRT 9/24 Introduction Construction Applications The Coda Linear Diophantine's Equation Problem Given a; b; c 2 Z, ax + by = c; find integers x and y satisfying this equation. Solution methods{ Geometric approach Modular or algebraic approach General solution : not possible to obtain (Hilbert's 10th problem) October 5, 2016 D. Basu CS1231R: CRT 9/24 Step 2: Find out the minimal element c Plug in y = 0.The basic solution is ( a ; 0). Step 3: The general solution is c x = −bt + a y = at for t 2 Z. Introduction Construction Applications The Coda Geometric approach Step 1: Find out the equation of curve b c x = − y + : a a The solutions to the Diophantine equation correspond to lattice points that lie on the curve. October 5, 2016 D. Basu CS1231R: CRT 10 / 24 Step 3: The general solution is c x = −bt + a y = at for t 2 Z. Introduction Construction Applications The Coda Geometric approach Step 1: Find out the equation of curve b c x = − y + : a a The solutions to the Diophantine equation correspond to lattice points that lie on the curve. Step 2: Find out the minimal element c Plug in y = 0.The basic solution is ( a ; 0). October 5, 2016 D. Basu CS1231R: CRT 10 / 24 Introduction Construction Applications The Coda Geometric approach Step 1: Find out the equation of curve b c x = − y + : a a The solutions to the Diophantine equation correspond to lattice points that lie on the curve. Step 2: Find out the minimal element c Plug in y = 0.The basic solution is ( a ; 0). Step 3: The general solution is c x = −bt + a y = at for t 2 Z. October 5, 2016 D. Basu CS1231R: CRT 10 / 24 Introduction Construction Applications The Coda a-axis b -axis ax + by = c October 5, 2016 D. Basu CS1231R: CRT 11 / 24 { Thus, the problem reduces to finding out the equivalence class ca−1 for mod b. { This is canonical to finding the isomorphism Z ! Z=bZ and to evaluate it for ca−1. Introduction Construction Applications The Coda Modular or Algebraic approach ax + by = c ) ax = −by + c ) ax ≡ c(mod b) ) x ≡ ca−1(mod b) October 5, 2016 D. Basu CS1231R: CRT 12 / 24 Introduction Construction Applications The Coda Modular or Algebraic approach ax + by = c ) ax = −by + c ) ax ≡ c(mod b) ) x ≡ ca−1(mod b) { Thus, the problem reduces to finding out the equivalence class ca−1 for mod b. { This is canonical to finding the isomorphism Z ! Z=bZ and to evaluate it for ca−1. October 5, 2016 D. Basu CS1231R: CRT 12 / 24 { Does there exist a solution? { If it exists, how is it? { Is it unique? Introduction Construction Applications The Coda System of Linear Diophantine's Equations Problem K K Given integers fnigi=1 and faigi=1, x = a1 + x1n1; . x = aK + xK nK ; K find integers x and fxigi=1 satisfying this equation. October 5, 2016 D. Basu CS1231R: CRT 13 / 24 Introduction Construction Applications The Coda System of Linear Diophantine's Equations Problem K K Given integers fnigi=1 and faigi=1, x = a1 + x1n1; .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    35 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us