{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# lec6 - 3 S 3%m 3 =(6 S 3%7=1 Thus(S 1 S 2 S 3 =(1,2,6 For a...

This preview shows pages 1–7. Sign up to view the full content.

1 CSE20 Lecture 6 4/19/11 CK Cheng UC San Diego

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Residual Numbers (NT-1 and Shaum’s Chapter 11) Introduction Definition Operations Range of numbers Conversion 2
Conversion 3 Number x Residual number (x 1 , x 2 , …, x k ) +, -, x operations for each x i under m i Chinese Remainder Theorem Mod Operation Moduli (m 1 , m 2 , …, m k ) Results

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Chinese Remainder Theorem Given a residual number (r 1 , r 2 , …, r k ) with moduli (m 1 , m 2 , …, m k ), where all m i are mutually prime, set M= m 1 ×m 2 × …×m k , and M i =M/m i . Let S i be the solution that (M i ×S i )%m i = 1 Then we have the corresponding number x = (∑ i=1,k (M i S i r i ))%M. 4
Example Given (m 1 ,m 2 ,m 3 )=(2,3,7), M=2×3×7=42, we have M 1 =m 2 ×m 3 =3×7=21 (M 1 S 1 )%m 1 =(21 S 1 )%2=1 M 2 =m 1 ×m 3 =2×7=14 (M 2 S 2 )%m 2 =(14 S 2 )%3=1 M 3 =m 1 ×m 2 =2×3=6 (M 3 S 3 )%m 3 =(6 S 3 )%7=1 Thus,

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 3 S 3 )%m 3 =(6 S 3 )%7=1 Thus, (S 1 , S 2 , S 3 ) = (1,2,6) For a residual number (0,2,1): x=(M 1 S 1 r 1 + M 2 S 2 r 2 + M 3 S 3 r 3 )%M 5 Example For a residual number (1,2,5): • x=(M 1 S 1 r 1 + M 2 S 2 r 2 + M 3 S 3 r 3 )%M = (21×1×1 + 14×2×2 + 6×6×5)%42 = (21 + 56 + 180)%42 = 257%42 = 5 6 Proof of Chinese Remainder Theorem Let A = ∑ i=1,k (M i S i r i ), we show that 1. A%m v = r v and 2. x=A%M is unique. 1. A%m v = (∑ i=1,k (M i S i r i ) )% m v = (Σ(M i S i r i ) % m v )%m v = (M v S v r v )%m v = [(M v S v )%m v × r v %m v ]%m v = r v %m v = r v 2. Proof was shown in lecture 5. 7...
View Full Document

{[ snackBarMessage ]}

### Page1 / 7

lec6 - 3 S 3%m 3 =(6 S 3%7=1 Thus(S 1 S 2 S 3 =(1,2,6 For a...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online