Chinese Remainder Theorem

Slides:



Advertisements
Similar presentations
1 Lect. 12: Number Theory. Contents Prime and Relative Prime Numbers Modular Arithmetic Fermat’s and Euler’s Theorem Extended Euclid’s Algorithm.
Advertisements

Cryptography and Network Security
5.1 Number Theory. The study of numbers and their properties. The numbers we use to count are called the Natural Numbers or Counting Numbers.
1 Section 2.4 The Integers and Division. 2 Number Theory Branch of mathematics that includes (among other things): –divisibility –greatest common divisor.
CSE115/ENGR160 Discrete Mathematics 03/13/12 Ming-Hsuan Yang UC Merced 1.
Number Theory and Cryptography
Long Division by One-Digit Numbers.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Slide 10-1 Copyright © 2005 Pearson Education, Inc. SEVENTH EDITION and EXPANDED SEVENTH EDITION.
WHOLE NUMBERS; INTEGERS Whole numbers: Z 0,+ = the natural numbers  {0}. Integers:
Decimal Division You must learn the rules. Dividing a decimal by a whole number 1.2 ÷ 2 Divisor = 2 Dividend = 1.2 Step 1: move the decimal in the dividend.
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
Answers Prime & Composite Etc… Factors and Multiples LCM & GCF
The Integers and Division
Homework Review notes Complete Worksheet #2. Homework State whether the conditional sentence is true or false 1.If 1 = 0, then 1 = – 1 True F F T.
9/2/2015Discrete Structures1 Let us get into… Number Theory.
Mathematics of Cryptography Part I: Modular Arithmetic
Module :MA3036NI Cryptography and Number Theory Lecture Week 7
The Integers & Division. a divides b if a is not zero there is a m such that a.m = b “a is a factor of b” “b is a multiple of a” a|b Division.
Prep Math Competition, Lec. 1Peter Burkhardt1 Number Theory Lecture 1 Divisibility and Modular Arithmetic (Congruences)
Copyright © Curt Hill Divisibility and Modular Arithmetic A Topic in Number Theory.
Chapter The Integers and Division Division
Chinese Remainder Theorem Dec 29 Picture from ………………………
Division Short Division Long Division Key Vocabulary.
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.
© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 13 Mathematical Systems.
Module #9 – Number Theory 1/5/ Algorithms, The Integers and Matrices.
Relating Multiplication and Division M4A1 Students will represent and understand mathematical relationships. Essential Question: How can we use our understanding.
DIVISION. Standards G4.1M.C2.PO4A. Use multiple strategies to divide whole numbers using 4-digit dividends and divisors from 1 to 12 with remainders.
Chinese Remainder Theorem Ying Ding Junru Chen. Chinese Remainder Theorem Sun Zi suanjing ( 孫子算經 The Mathematical Classic by Sun Zi) Shushu Jiuzhang (
Discrete Mathematics
Divisibility and Modular Arithmetic
Slide Copyright © 2009 Pearson Education, Inc. 5.1 Number Theory.
The Chinese Remainder Theorem A presentation by Vincent Kusiak.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 2 The Fundamentals: Algorithms,
Chapter 4 With Question/Answer Animations 1. Chapter Summary Divisibility and Modular Arithmetic - Sec 4.1 – Lecture 16 Integer Representations and Algorithms.
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.
Number Theory Lecture 1 Text book: Discrete Mathematics and its Applications, 7 th Edition.
Number Theory. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic principles of divisibility,
Number-Theoretic Algorithms
Mathematics of Cryptography
Chapter Applications of Number Theory Some Useful Results
CS 2210:0001Discrete Structures Modular Arithmetic and Cryptography
Introduction to Cryptography
Advanced Algorithms Analysis and Design
Integers and Division Section 3.4.
CSE20 Lecture 5: Number Systems 5. Residual Numbers
CMSC Discrete Structures
Number Theory and Cryptography
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Long Division by One-Digit Numbers.
Applied Discrete Mathematics Week 3: Algorithms
Applied Discrete Mathematics Week 4: Number Theory
Review Basic Math Divisibility tests Prime and Composite Numbers
Discrete Math for CS CMPSC 360 LECTURE 13 Last time:
The Integers & Division
Long Division by One-Digit Numbers.
Long Division by One-Digit Numbers.
CMSC 203, Section 0401 Discrete Structures Fall 2004 Matt Gaston
Copyright © Zeph Grunschlag,
Divisibility and Modular Arithmetic
Long Division by One-Digit Numbers.
Applied Discrete Mathematics Week 10: Introduction to Counting
Long Division by One-Digit Numbers.
Number Theory.
Discrete Mathematics Chapter 4 Number Theory. Discrete Mathematics Chapter 4 Number Theory.
Lecture 3 Strings and Things (Section 1.1)
Number Theory: Prime & Composite Numbers
Presentation transcript:

Chinese Remainder Theorem Part 1: Modular arithmetic Part 2: Sun-Tsu’s problem Part 3: Chinese Remainder Theorem Part 4: Some more famous problems Divides Relatively prime Congruent Inverse (multiplicative) Divisor

Modular Arithmetic a = b mod n 13 divided by 12 has a remainder of 1 13 is congruent to 1 mod 12 13 = 1 + 12n 13 = 1 mod 12

Modular Arithmetic If a = b mod n; then n divides a-b If a = b mod n and c = d mod n; then (a+c) = (b+d) mod n then (a-c) = (b-d) mod n then ac=bd mod n If p is prime and a ≠ 0 mod p then there exists a b such that ab = 1 mod p

Modular Arithmetic Multiplicative Inverses If p is prime and a ≠ 0 mod p then there exists a b such that ab = 1 mod p What is an inverse? Example: Mod 7

Sun-Tsu’s Problem The original form of the theorem was contained in the 3rd-century book Sunzi's Mathematical Classic (孫子 算經) by the Chinese mathematician Sun Tzu. There are certain things whose number is unknown. When divided by 3 the remainder is 2, when divided by 5, the remainder is 3, when divided by 7 the remainder is 2. What is the number of things?

Sun-Tsu’s Problem There are certain things whose number is unknown. When divided by 3 the remainder is 2, when divided by 5, the remainder is 3, when divided by 7 the remainder is 2. What is the number of things? x = 2 mod 3 x = 3 mod 5 x = 2 mod 7

Chinese Remainder Theorem Let m1, m2, ..., mk be pairwise relatively prime. Then the system: x= a1 mod m1 x= a2 mod m2 x= ak mod mk Has one unique solution modulo M, where M= m1 x m2 x ... x mk This solution can be found in the form: x = a1M1y1 + a2M2y2 + .. + akMkyk Were Mk = M/mk and Mkyk = 1 mod mk

Your turn… I’m thinking of a number… When divided by 4 the remainder is 3 when divided by 7, the remainder is 2 when divided by 9 the remainder is 1 What is my number?

Pirates! A band of 17 pirates stole a sack of gold coins. When they tried to divide the fortune into equal portions, 2 coins remained. In the ensuing brawl over who should get the extra coins, one pirate was killed. The wealth redistributed, but this time an equal division left 10 coins. Again an argument develop, another pirate was killed. But now the total was evenly distributed among the pirates. What was the least number of gold coins that could have been stolen?

Eggs  A girl was carrying a basket of eggs, and a man driving a horse hit the basket and broke all the eggs. Wishing to pay for the damage, he asked the girl how many eggs there were. The girl said she did not know, but she remembered that when she counted them by twos, there was one left over; when she counted them by threes, there were two left over; when she counted them by fours, there were three left over; when she counted them by fives, there were four left; and when she counted them by sixes, there were five left over. Finally, when she counted them by sevens, there were none left over. `Well,' said the man, `I can tell you how many you had.' What was his answer?

References http://www.math.harvard.edu/~knill/crt/lib/Kangshe ng.pdf http://sms.math.nus.edu.sg/smsmedley/Vol-30- 1/The%20History%20of%20the%20Chinese%20Remin der%20Theorem%20(Law%20Huang%20lng).pdf http://www.cut-the-knot.org/blue/chinese.shtml http://mathworld.wolfram.com/ChineseRemainderTh eorem.html