SlideShare a Scribd company logo
The Chinese
Remainder Theorem
Reporter: Pia
Rodio
Learning
Objectives:
• Understanding the concept of the Chinese Remainder
Theorem and its significance in number theory.
• Learning how to apply the Chinese Remainder Theorem to
solve systems of congruences.
• Exploring applications of the Chinese Remainder Theorem in
cryptography.
By the end of this lesson, you will be able to
CHINESE REMAINDER THEOREM
The Chinese remainder theorem (CRT) is
used to solve a set of congruent equations
with one variable but different moduli, which
are relatively prime, as shown below:
x a₁ (mod m₁)
≡
x a
≡ 2 (mod m2)
x a
≡ k (mod mk)
Example:
The following is an example of a set of
equations with different moduli:
The solution to this set of equations is given in
the next section; for the moment, note that the
answer to this set of equations is x = 23. This
value satisfies all equations: 23 2 (mod 3), 23
≡
3 (mod 5), and 23 2 (mod 7).
≡ ≡
Continued...
x 2 (mod 3)
≡
x 3 (mod 5)
≡
x 2 (mod 7)
≡
Continue
d...
Solution To Chinese Remainder Theorem
1. Find M = m₁ × m₂ × ... × mₖ. This is the common
modulus.
2. Find M₁ = M/m₁, M₂ = M/m₂, ..., Mₖ = M/mₖ.
3. Find the multiplicative inverse of M₁, M₂, ..., Mₖ
using the corresponding moduli (m₁, m₂, ..., mₖ).
Call the inverses M₁⁻¹, M₂⁻¹, ..., Mₖ⁻¹.
4. The solution to the simultaneous equations is
x = (a₁ × M₁ × M₁⁻¹ + a₂ × M₂ × M₂⁻¹ + ... + aₖ × Mₖ × Mₖ⁻¹) mod
M
Continued.
..
Example
Find the solution to the simultaneous equations:
Solution
We follow the four steps.
1. M = 3 × 5 × 7 = 105
2. M₁ = 105 / 3 = 35, M₂ = 105 / 5 = 21, M₃ = 105 / 7 = 15
3. The inverses are M₁⁻¹ = 2, M₂⁻¹ = 1, M₃⁻¹ = 1
4. x = (2 × 35 × 2 + 3 × 21 × 1 + 2 × 15 × 1) mod 105
x = 23 mod 105
x 2 (mod
≡
3)
x 3 (mod
≡
5)
x 2 (mod
≡
7)
Continue
d...
Example
Find an integer that has a remainder of 3 when divided by 7 and
13, but is divisible by 12.
Solution
This is a CRT problem. We can form three equations and solve
them to find the value of x.
If we follow the four steps, we find x = 276. We can check that
276 3 (mod 7), 276 3 (mod 13) and 276 is divisible by 12 (the
≡ ≡
quotient is 23 and the remainder is zero).
x 3 (mod
≡
7)
x 3 (mod
≡
13)
x 0 (mod
≡
12)
Chinese Remainder Theorem
 Used to speed up modulo computations
 If working modulo a product of numbers
• eg. mod M = m₁m₂...mₖ
 Chinese Remainder theorem lets us work
in each moduli mᵢ separately
 Since computational cost is proportional to
size, this is faster than working in the full
modulus M
Chinese Remainder Theorem
 Can implement CRT in several ways
 to compute A (mod M)
• first compute all aᵢ = A mod mᵢ separately
• determine constants cᵢ below, where Mᵢ = M/mᵢ
• then combine results to get answer using:
Chinese Remainder Theorem (CRT)
Suppose m₁, ..., mₖ are pairwise relatively
prime positive integers, and suppose a₁, ..., aₖ
are integers. Then the system of k
congruences x aᵢ (mod mᵢ) (1 i k) has a
≡ ≤ ≤
unique solution modulo M = m₁ × ... × mₖ,
which is given by
where cᵢ = Mᵢ(Mᵢ⁻¹ mod mᵢ) and Mᵢ = M/mᵢ,
for 1 i k.
≤ ≤
Pia-Rodio-Number-Theory.pptx number theory
Pia-Rodio-Number-Theory.pptx number theory
Pia-Rodio-Number-Theory.pptx number theory
Thank
you for
Listening

More Related Content

PPTX
Information and network security 35 the chinese remainder theorem
PPTX
chinese remainder theorem and very important ppt
PPTX
CSE1107 Chinese Remainder Theorem in Discrete Mathmatics.pptx
PPTX
Chinese_Remainder_Theorem.pptx
PDF
Remodulization of Congruences
PDF
A study on number theory and its applications
PDF
modul pembelajaran 4
PPTX
DAA - UNIT 4 - Engineering.pptx
Information and network security 35 the chinese remainder theorem
chinese remainder theorem and very important ppt
CSE1107 Chinese Remainder Theorem in Discrete Mathmatics.pptx
Chinese_Remainder_Theorem.pptx
Remodulization of Congruences
A study on number theory and its applications
modul pembelajaran 4
DAA - UNIT 4 - Engineering.pptx

Similar to Pia-Rodio-Number-Theory.pptx number theory (20)

PPTX
akaleshchinese.pptx
PPTX
22IT051-CRT-CRNS.pptx abhnmcjdfniervfdfc
PPTX
Modular arithmetic
PDF
Chinese Reminder Theorem
PPT
ADVANCED ALGORITHMS-UNIT-3-Final.ppt
PDF
BUKU ENGLIS FOR MATHEMATICS
PDF
English math dictionary
PPTX
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
PPT
wilson's and fermat little theorem .ppt
PDF
IRJET- An Efficient Reverse Converter for the Three Non-Coprime Moduli Set {4...
PDF
Research Inventy : International Journal of Engineering and Science
PPT
Prime
PDF
PPTX
Report.AbstractMod.pptxeduction file to help understand the lesson
PPT
PDF
03-Numbers-D.pdf
PPT
PDF
Finite mathematics
PPT
Chinese remainder theorem -new.ppt
akaleshchinese.pptx
22IT051-CRT-CRNS.pptx abhnmcjdfniervfdfc
Modular arithmetic
Chinese Reminder Theorem
ADVANCED ALGORITHMS-UNIT-3-Final.ppt
BUKU ENGLIS FOR MATHEMATICS
English math dictionary
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
wilson's and fermat little theorem .ppt
IRJET- An Efficient Reverse Converter for the Three Non-Coprime Moduli Set {4...
Research Inventy : International Journal of Engineering and Science
Prime
Report.AbstractMod.pptxeduction file to help understand the lesson
03-Numbers-D.pdf
Finite mathematics
Chinese remainder theorem -new.ppt
Ad

Recently uploaded (20)

PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Basic Mud Logging Guide for educational purpose
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
01-Introduction-to-Information-Management.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Sports Quiz easy sports quiz sports quiz
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Lesson notes of climatology university.
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Insiders guide to clinical Medicine.pdf
PDF
Pre independence Education in Inndia.pdf
Renaissance Architecture: A Journey from Faith to Humanism
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Computing-Curriculum for Schools in Ghana
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Microbial diseases, their pathogenesis and prophylaxis
Basic Mud Logging Guide for educational purpose
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
human mycosis Human fungal infections are called human mycosis..pptx
01-Introduction-to-Information-Management.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Sports Quiz easy sports quiz sports quiz
VCE English Exam - Section C Student Revision Booklet
Lesson notes of climatology university.
STATICS OF THE RIGID BODIES Hibbelers.pdf
Anesthesia in Laparoscopic Surgery in India
PPH.pptx obstetrics and gynecology in nursing
Insiders guide to clinical Medicine.pdf
Pre independence Education in Inndia.pdf
Ad

Pia-Rodio-Number-Theory.pptx number theory

  • 2. Learning Objectives: • Understanding the concept of the Chinese Remainder Theorem and its significance in number theory. • Learning how to apply the Chinese Remainder Theorem to solve systems of congruences. • Exploring applications of the Chinese Remainder Theorem in cryptography. By the end of this lesson, you will be able to
  • 3. CHINESE REMAINDER THEOREM The Chinese remainder theorem (CRT) is used to solve a set of congruent equations with one variable but different moduli, which are relatively prime, as shown below: x a₁ (mod m₁) ≡ x a ≡ 2 (mod m2) x a ≡ k (mod mk)
  • 4. Example: The following is an example of a set of equations with different moduli: The solution to this set of equations is given in the next section; for the moment, note that the answer to this set of equations is x = 23. This value satisfies all equations: 23 2 (mod 3), 23 ≡ 3 (mod 5), and 23 2 (mod 7). ≡ ≡ Continued... x 2 (mod 3) ≡ x 3 (mod 5) ≡ x 2 (mod 7) ≡
  • 5. Continue d... Solution To Chinese Remainder Theorem 1. Find M = m₁ × m₂ × ... × mₖ. This is the common modulus. 2. Find M₁ = M/m₁, M₂ = M/m₂, ..., Mₖ = M/mₖ. 3. Find the multiplicative inverse of M₁, M₂, ..., Mₖ using the corresponding moduli (m₁, m₂, ..., mₖ). Call the inverses M₁⁻¹, M₂⁻¹, ..., Mₖ⁻¹. 4. The solution to the simultaneous equations is x = (a₁ × M₁ × M₁⁻¹ + a₂ × M₂ × M₂⁻¹ + ... + aₖ × Mₖ × Mₖ⁻¹) mod M
  • 6. Continued. .. Example Find the solution to the simultaneous equations: Solution We follow the four steps. 1. M = 3 × 5 × 7 = 105 2. M₁ = 105 / 3 = 35, M₂ = 105 / 5 = 21, M₃ = 105 / 7 = 15 3. The inverses are M₁⁻¹ = 2, M₂⁻¹ = 1, M₃⁻¹ = 1 4. x = (2 × 35 × 2 + 3 × 21 × 1 + 2 × 15 × 1) mod 105 x = 23 mod 105 x 2 (mod ≡ 3) x 3 (mod ≡ 5) x 2 (mod ≡ 7)
  • 7. Continue d... Example Find an integer that has a remainder of 3 when divided by 7 and 13, but is divisible by 12. Solution This is a CRT problem. We can form three equations and solve them to find the value of x. If we follow the four steps, we find x = 276. We can check that 276 3 (mod 7), 276 3 (mod 13) and 276 is divisible by 12 (the ≡ ≡ quotient is 23 and the remainder is zero). x 3 (mod ≡ 7) x 3 (mod ≡ 13) x 0 (mod ≡ 12)
  • 8. Chinese Remainder Theorem  Used to speed up modulo computations  If working modulo a product of numbers • eg. mod M = m₁m₂...mₖ  Chinese Remainder theorem lets us work in each moduli mᵢ separately  Since computational cost is proportional to size, this is faster than working in the full modulus M
  • 9. Chinese Remainder Theorem  Can implement CRT in several ways  to compute A (mod M) • first compute all aᵢ = A mod mᵢ separately • determine constants cᵢ below, where Mᵢ = M/mᵢ • then combine results to get answer using:
  • 10. Chinese Remainder Theorem (CRT) Suppose m₁, ..., mₖ are pairwise relatively prime positive integers, and suppose a₁, ..., aₖ are integers. Then the system of k congruences x aᵢ (mod mᵢ) (1 i k) has a ≡ ≤ ≤ unique solution modulo M = m₁ × ... × mₖ, which is given by where cᵢ = Mᵢ(Mᵢ⁻¹ mod mᵢ) and Mᵢ = M/mᵢ, for 1 i k. ≤ ≤