Chinese Remainder Theorem - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

Chinese Remainder Theorem

Description:

Then there exists a unique A Zm such that A ai mod mi for i = 1...k. A can be computed as: ... Question 2: Given x = 6 mod 13 and x = 2 mod 17, find x. ... – PowerPoint PPT presentation

Number of Views:2011
Avg rating:3.0/5.0
Slides: 11
Provided by: becky89
Category:

less

Transcript and Presenter's Notes

Title: Chinese Remainder Theorem


1
Chinese Remainder Theorem
2
An example
  • Find a number x such that have remainders of 1
    when divided by 3, 2 when divided by 5 and 3 when
    divided by 7. i.e.
  • x 1 mod 3
  • x 2 mod 5
  • x 3 mod 7

3
Introduction
  • used to speed up modulo computations
  • Integers can be represented by their residues
    modulo a set of pairwise relatively prime moduli.
  • E.g. In Z10, integer 8 can be represented by the
    residues of the 2 relatively prime factors of 10
    (25) as a tuple (0, 3)

4
Chinese Remainder Theorem (CRT)
  • Let m1, m2, , mk be pairwise relatively prime
    integers. That is, gcd(mi, mj) 1 for 1?iltj ?k.
    Let ai?Zmi for 1?i ?k and set Mm1m2mk. Then
    there exists a unique A ?Zm such that A?ai mod mi
    for i 1k.
  • A can be computed as
  • Where for 1?i?k.

5
Proof
  • A is a solution
  • Since
  • for any j?I
  • Therefore,

6
Proof (cont.)
  • A is unique in Zm
  • If A is not the unique answer, there must exist
    another answer A? ai mod mi in Zm.
  • Then A ? A mod mi
  • ? A-A r1m1 r2m2 rkmk
  • ? rimj where i?j (since mis are relatively
    prime)
  • ? rimi rim1m2mk rim
  • ? mA-A
  • ? A ? A mod m, proving uniqueness.

7
Properties
  • (AB) mod M ?
  • ((a1 b1) mod m1, , (ak bk)mod mk)
  • (A-B) mod M ?
  • ((a1 - b1) mod m1, , (ak - bk)mod mk)
  • (A?B) mod M ?
  • ((a1 ? b1) mod m1, , (ak ? bk)mod mk)

8
Example 1
  • Represent 973 in Z1813 as a k-tuple
  • Answer
  • M 1813 37 49 ? m1 37 m2 49
  • A 973
  • ? A (A mod m1, A mod m2) (11, 42)

9
Example 2
  • Give x 11 mod 37 x 42 mod 49, find x.
  • Answer
  • since M1 49 M1-1 mod m1 34 and M2 37
    M2-1 mod m2 4

10
Exercises
  • Question 1
  • Represent 75 in Z77 using Chinese Remainder
    Theorem.
  • Question 2
  • Given x 6 mod 13 and x 2 mod 17, find x.
Write a Comment
User Comments (0)
About PowerShow.com