1 CSE20 Lecture 6 4/19/11 CK Cheng UC San Diego. Residual Numbers (NT-1 and Shaum’s Chapter 11) Introduction Definition Operations Range of numbers Conversion.

Slides:



Advertisements
Similar presentations
The Euler Phi-Function Is Multiplicative (3/3)
Advertisements

Number Theory Algorithms and Cryptography Algorithms Prepared by John Reif, Ph.D. Analysis of Algorithms.
Chapter 3: Linear transformations
CS 140 Lecture 16 System Designs Professor CK Cheng CSE Dept. UC San Diego 1.
CSE 20 Lecture 9 Boolean Algebra: Theorems and Proofs CK Cheng April 26, 2011 Lecture notes 1.
1 CS 140L Lecture 8 System Design Professor CK Cheng CSE Dept. UC San Diego.
Chapter 8 – Introduction to Number Theory. Prime Numbers prime numbers only have divisors of 1 and self –they cannot be written as a product of other.
Having Proofs for Incorrectness
Chapter 8 Introduction To Number Theory. Prime Numbers Prime numbers only have divisors of 1 and Prime numbers only have divisors of 1 and self. self.
Chapter 8 Introduction to Number Theory. Prime Numbers prime numbers only have divisors of 1 and self –they cannot be written as a product of other numbers.
Chapter 8 More Number Theory. Prime Numbers Prime numbers only have divisors of 1 and itself They cannot be written as a product of other numbers Prime.
Quotient-Remainder Theory, Div and Mod
#1 Factor Each (to prime factors): #2 #3 #4 Solve:
1 CS 140 Lecture 3 Combinational Logic Professor CK Cheng CSE Dept. UC San Diego.
CS 140 Lecture 16 System Designs Professor CK Cheng CSE Dept. UC San Diego 1.
Chapter II. THE INTEGERS
Complexity1 Pratt’s Theorem Proved. Complexity2 Introduction So far, we’ve reduced proving PRIMES  NP to proving a number theory claim. This is our next.
Congruence of Integers
CS 140 Lecture 4 Combinational Logic: K-Map Professor CK Cheng CSE Dept. UC San Diego 1.
1 CSE20 Lecture 5 4/12/11 CK Cheng UC San Diego. Residual Numbers (NT-1 and Shaum’s Chapter 11) Introduction Definition Operations Range of numbers 2.
Chapter 8 – Introduction to Number Theory Prime Numbers
CS 140 Lecture 5 Professor CK Cheng CSE Dept. UC San Diego.
DTTF/NB479: Dszquphsbqiz Day 9 Announcements: Homework 2 due now Homework 2 due now Computer quiz Thursday on chapter 2 Computer quiz Thursday on chapter.
CS 140L Lecture 7 Transformation between Mealy and Moore Machines Professor CK Cheng CSE Dept. UC San Diego.
CS 140 Lecture 5 Professor CK Cheng CSE Dept. UC San Diego 1.
Chapter 8 – Introduction to Number Theory Prime Numbers  prime numbers only have divisors of 1 and self they cannot be written as a product of other numbers.
CSE20 Lecture 3 Number Systems: Negative Numbers 1.Sign and Magnitude Representation 2.1’s Complement Representation 3.2’s Complement Representation 1.
CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 tel: Teaching Assistants Jingwei Lu

Module :MA3036NI Cryptography and Number Theory Lecture Week 7
Excellent Course of Liaoning Chapter 2 Matrix The Inverse of a Matrix & the Adjugate Matrix.
Advanced Algebraic Algorithms on Integers and Polynomials Prepared by John Reif, Ph.D. Analysis of Algorithms.
Chapter 5: Permutation Groups  Definitions and Notations  Cycle Notation  Properties of Permutations.
Chinese Remainder Theorem Dec 29 Picture from ………………………
1 CSE20 Lecture 6: Number Systems 5. Residual Numbers (cont) & 6. Cryptography CK Cheng UC San Diego.
1 Section Congruences In short, a congruence relation is an equivalence relation on the carrier of an algebra such that the operations of the algebra.
Chinese Remainder Theorem. How many people What is x? Divided into 4s: remainder 3 x ≡ 3 (mod 4) Divided into 5s: remainder 4 x ≡ 4 (mod 5) Chinese Remainder.
Chapter Integration of substitution and integration by parts of the definite integral.
Math 3121 Abstract Algebra I
Chinese Remainder Theorem Ying Ding Junru Chen. Chinese Remainder Theorem Sun Zi suanjing ( 孫子算經 The Mathematical Classic by Sun Zi) Shushu Jiuzhang (
Lecture 2-3 Basic Number Theory and Algebra. In modern cryptographic systems, the messages are represented by numerical values prior to being encrypted.
Flows and Networks Plan for today (lecture 3): Last time / Questions? Output simple queue Tandem network Jackson network: definition Jackson network: equilibrium.
Lecture 5: K-Map minimization in larger input dimensions and K-map minimization using max terms CSE 140: Components and Design Techniques for Digital Systems.
CS480 Cryptography and Information Security
Chapter 4 With Question/Answer Animations 1. Chapter Motivation Number theory is the part of mathematics devoted to the study of the integers and their.
Choosing RNS Moduli Assume we wish to represent 100, Values Standard Binary  lg 2 (100,000) 10  =   =17 bits RNS(13|11|7|5|3|2), Dynamic.
CSE 140: Components and Design Techniques for Digital Systems
Chapter 6 Section 3.
Introduction to Cryptography
Advanced Algorithms Analysis and Design
CSE20 Lecture 5: Number Systems 5. Residual Numbers
CSE 311 Foundations of Computing I
CSE 20 Survey CK Cheng UC San Diego
CSE 140 Lecture 11 Standard Combinational Modules
Direct Proof and Counterexample IV
CSE 140: Components and Design Techniques for Digital Systems
Modular Arithmetic and Change of Base
Chapter 1: Introduction
Introduction to Cryptography
CS 140 Lecture 19 Standard Modules
Sensitivity Analysis by Adjoint Network
CSE20 Lecture 3 Number Systems
CSE 140 Lecture 3 Combinational Logic: Implementation
Professor CK Cheng CSE Dept. UC San Diego
CSE 140 Lecture 4 Combinational Logic: K-Map
Direct Proof and Counterexample IV
Lecture 4-4 #P-complete Problems
Lecture 5 Number Theory & Proof Methods
Lecture 2-3 Basic Number Theory and Algebra
CSE 140 Lecture 11 Standard Combinational Modules
Presentation transcript:

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

Residual Numbers (NT-1 and Shaum’s Chapter 11) Introduction Definition Operations Range of numbers Conversion 2

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

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 =(21S 1 )%2=1 M 2 =m 1 ×m 3 =2×7=14(M 2 S 2 )%m 2 =(14S 2 )%3=1 M 3 =m 1 ×m 2 =2×3=6(M 3 S 3 )%m 3 =(6S 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 =(21×1×0 + 14×2×2 + 6×6×1 )%42 = ( )%42 = 92%42 = 8 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 = ( )%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