CHINESE REMAINDER THEOREM

Similar documents
Chapter 1 Review of Equations and Inequalities

Discrete Mathematics and Probability Theory Fall 2014 Anant Sahai Homework 5. This homework is due October 6, 2014, at 12:00 noon.

What is proof? Lesson 1

Winter Camp 2009 Number Theory Tips and Tricks

WORKSHEET ON NUMBERS, MATH 215 FALL. We start our study of numbers with the integers: N = {1, 2, 3,...}

Cool Results on Primes

Algebra Exam. Solutions and Grading Guide

5.1 Simplifying Rational Expressions

MATH 115, SUMMER 2012 LECTURE 4 THURSDAY, JUNE 21ST

Alex s Guide to Word Problems and Linear Equations Following Glencoe Algebra 1

= 5 2 and = 13 2 and = (1) = 10 2 and = 15 2 and = 25 2

Please bring the task to your first physics lesson and hand it to the teacher.

Solving with Absolute Value

MATH 103 Pre-Calculus Mathematics Test #3 Fall 2008 Dr. McCloskey Sample Solutions

Physics Motion Math. (Read objectives on screen.)

Q: How can quantum computers break ecryption?

MATH 25 CLASS 12 NOTES, OCT Contents 1. Simultaneous linear congruences 1 2. Simultaneous linear congruences 2

Math 131 notes. Jason Riedy. 6 October, Linear Diophantine equations : Likely delayed 6

( )( b + c) = ab + ac, but it can also be ( )( a) = ba + ca. Let s use the distributive property on a couple of

Topic Contents. Factoring Methods. Unit 3: Factoring Methods. Finding the square root of a number

MATH 308 COURSE SUMMARY

Section 20: Arrow Diagrams on the Integers

Instructor Notes for Chapters 3 & 4

Modular Arithmetic Instructor: Marizza Bailey Name:

Take the Anxiety Out of Word Problems

MATH 2112/CSCI 2112, Discrete Structures I Winter 2007 Toby Kenney Homework Sheet 5 Hints & Model Solutions

#29: Logarithm review May 16, 2009

Numbers. The aim of this lesson is to enable you to: describe and use the number system. use positive and negative numbers

Egyptian Fractions: Part I

Algebra. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

1 Modular Arithmetic Grade Level/Prerequisites: Time: Materials: Preparation: Objectives: Navajo Nation Math Circle Connection

4.4 Solving Congruences using Inverses

Solving Quadratic & Higher Degree Equations

Fall 2017 Test II review problems

Special Theory of Relativity Prof. Shiva Prasad Department of Physics Indian Institute of Technology, Bombay. Lecture - 15 Momentum Energy Four Vector

MITOCW ocw f99-lec01_300k

Egyptian Fractions: Part I

6: Polynomials and Polynomial Functions

Mathematical Induction

ax b mod m. has a solution if and only if d b. In this case, there is one solution, call it x 0, to the equation and there are d solutions x m d

Notes: Pythagorean Triples

MITOCW ocw f99-lec09_300k

ASTRO 114 Lecture Okay. What we re going to discuss today are what we call radiation laws. We ve

Grades 7 & 8, Math Circles 10/11/12 October, Series & Polygonal Numbers

Solving Quadratic & Higher Degree Equations

Some Review Problems for Exam 1: Solutions

Gradient. x y x h = x 2 + 2h x + h 2 GRADIENTS BY FORMULA. GRADIENT AT THE POINT (x, y)

Week 7 Algebra 1 Assignment:

Finding Prime Factors

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24

1 Overview and revision

Number Theory Math 420 Silverman Exam #1 February 27, 2018

Math 016 Lessons Wimayra LUY

Appendix C: Accuracy, Precision, and Uncertainty

Solutions to Problem Set 4 - Fall 2008 Due Tuesday, Oct. 7 at 1:00

MATHEMATICAL INDUCTION

Astronomy 102 Math Review

MATH 3240Q Introduction to Number Theory Homework 4

CS 360, Winter Morphology of Proof: An introduction to rigorous proof techniques

Chapter 1. Foundations of GMAT Math. Arithmetic

Quadratic Equations Part I

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER /2018

2. l = 7 ft w = 4 ft h = 2.8 ft V = Find the Area of a trapezoid when the bases and height are given. Formula is A = B = 21 b = 11 h = 3 A=

This format is the result of tinkering with a mixed lecture format for 3 terms. As such, it is still a work in progress and we will discuss

Q 2.0.2: If it s 5:30pm now, what time will it be in 4753 hours? Q 2.0.3: Today is Wednesday. What day of the week will it be in one year from today?

Number Theory Proof Portfolio

Number theory (Chapter 4)

The PROMYS Math Circle Problem of the Week #3 February 3, 2017

MTH 346: The Chinese Remainder Theorem

Grade 7/8 Math Circles. Mathematical Thinking

Module 3 Study Guide. GCF Method: Notice that a polynomial like 2x 2 8 xy+9 y 2 can't be factored by this method.

Introduction to Algebra: The First Week

Confidence intervals

CIRCLES AND TABLES AND SLEEPING

Notes on Systems of Linear Congruences

Section 4. Quantitative Aptitude

Lies My Calculator and Computer Told Me

Blankits and Covers Finding Cover with an Arbitrarily Large Lowest Modulus

Math 90 Lecture Notes Chapter 1

Induction 1 = 1(1+1) = 2(2+1) = 3(3+1) 2

Basic elements of number theory

Math 109 HW 9 Solutions

Basic elements of number theory

Ch. 12 Higher Degree Equations Rational Root

MATH 115, SUMMER 2012 LECTURE 12

Eigenvalues and eigenvectors

Conduction and Radiation Prof. C. Balaji Department of Mechanical Engineering Indian Institute of Technology, Madras

3.4 Complex Zeros and the Fundamental Theorem of Algebra

Grade 7/8 Math Circles. Continued Fractions

Generating Function Notes , Fall 2005, Prof. Peter Shor

Math 308 Midterm Answers and Comments July 18, Part A. Short answer questions

HAMPSHIRE COLLEGE: YOU CAN T GET THERE FROM HERE : WHY YOU CAN T TRISECT AN ANGLE, DOUBLE THE CUBE, OR SQUARE THE CIRCLE. Contents. 1.

Math 2602 Finite and Linear Math Fall 14. Homework 8: Core solutions

CS 124 Math Review Section January 29, 2018

MITOCW ocw f99-lec16_300k

Error Correcting Codes Prof. Dr. P. Vijay Kumar Department of Electrical Communication Engineering Indian Institute of Science, Bangalore

Warm-up Simple methods Linear recurrences. Solving recurrences. Misha Lavrov. ARML Practice 2/2/2014

Gearing Up for Geometry!

Electric Circuits Part 2: Kirchhoff s Rules

Partial Fractions. June 27, In this section, we will learn to integrate another class of functions: the rational functions.

Transcription:

CHINESE REMAINDER THEOREM MATH CIRCLE AT WASHINGTON UNIVERSITY IN ST. LOUIS, APRIL 19, 2009 Baili MIN In a third-centry A. D. Chinese book Sun Tzu s Calculation Classic one problem is recorded which can be translated into English as: Suppose we have an unknown number of objects. When counted in threes, 2 are left over, when counted in fives, 3 are left over, and when counted in sevens, 2 are left over. How many objects are there? For today s adventure we are going to explore the solutions to this kind of problems to see if we can learn some general method. Let s go! 1 I wandered lonely as a cloud, That floats on high o er vales and hills Problem 1.1 Find the smallest positive integer d 1 that can be evenly divided by 5 and 7 but has remainder 1 when divided by 3. Remark: There are some notations we will use a lot later. If you divide 5 by 3 you get the remainder 2, so we write 5 2 (mod 3). More generally, if you divide x by z and get a remainder y, so we can imagine that x = y + k z for some integer k, and therefore we write x y(mod z). (Notice the positions for x, y and z.) Perhaps you want to do some exercises before putting your hands on this problem. 5 (mod 2) 8 (mod 3) 100 (mod 7) So far so good? Return to the problem, then notations for those conditions are: d 1 1(mod 3) d 1 0(mod 5) d 1 0(mod 7) 1

What to do next? Hint: The condition of being exactly divided 5 and 7 is equivalent to that being exactly divided by 35 = 5 7, or d 1 is a multiple of 35, or d 1 = k 35 where k = 1, 2, 3,. So for this condition, you can write a list of numbers: Then from those numbers, just pick the smallest number which satisfies the first condition: the remainder of d 1 divided by 3 is 1, or d 1 1(mod 3). So, what is your answer? We can do more similar problems, and these problems(together with the previous one) will help us to solve the classic problem at the beginning. Problem 1.2 Find the smallest positive integer d 2 which is evenly divided by 3 and 7(or mathematically d 2 0(mod 3) and d 2 0(mod 7)) and its remainder if divided by 5 is 1(or mathematically d 2 1(mod 5)). Hint: Again, from the last two conditions, you can write a list of numbers which are multiples of (some integer you want to find), or of the form k where k = 1, 2,. (How to fill in this circle? Refer to the first step in the previous problem.) Then from those numbers, just pick the smallest number which satisfies the first condition: the remainder of d 2 divided by 5 is 1 or d 2 1(mod 5). So, what is your answer? One more: Problem 1.3 Find the smallest positive integer d 3 such that d 3 0(mod 3), d 3 0(mod 5)) and d 3 1(mod 7). Hint: What do the three conditions tell us? Same steps as in the previous two problems. But remember to make some necessary modifications. 2

Problem 1.4 Now go to our classic problem, which reads mathematically: Suppose x is a positive integer and it satisfies three conditions: x 2(mod 3), x 3(mod 5) and x 2(mod 7). Find such x. We solve that in the following way: The remainders are different from those three problems we have done. Calculuate the number d = 2 d 1 + 3 d 2 + 2 d 3. Does d solve our classic problem? Does d 2 105, if d > 2 105, solve the problem? Does d 105, if d > 105, solve the problem? Does d + 105 also solve the problem? Does d + 2 105 also solve the problem? Does d + 3 105 also solve the problem? Does d + 10 105 also solve the problem? Now can you guess what the for the general expression for the solution to our classic problem is? If you have got an expression as X = Y + k Z, where k is any integer, you can reexpress it as a shorter mathematical formula: X Y (mod Z). After you finish this, please turn to the next page to compare the result. :) 3

2 More welcome notes to weary bands, Of travellers in some shady haunt, Among Arabian sands. Sun Tzu s Calculation Classic provided the solution: those integers x with x 233(mod 105). But this is only true for that specific problem with those divisors and remainders. What if we change the divisors and remainders? It didn t say. In his book Mathematical Treatise in Nine Sections written in 1247 A. D., a Chinese mathematician Jiushao QIN gave an algorithm which could be used to solve more generalized problem. This is the origin of Chinese Remainder Theorem. Notice the number 105, it can be factorized as 105 = 3 5 7. So to summarize what we have done: Step 1 Solve those three problems separately. (We solved three things: d 1 1(mod 3) but is a multiple of 5 7; d 2 1(mod 5) but is a multiple of 3 7 and d 3 1(mod 7) but is a multiple of 3 5.) Step 2 Multiply the remainder of those results respectively and find their summation d. (d 1 corresponds to the divisor 3, whose remainder is 2, so we have 2 d 1 ; d 2 corresponds to the divisor 5, whose remainder is 3, so we have 3 d 2 and d 3 corresponds to the divisor 7, whose remainder is 2, so we have 2 d 3, and putting these together we get the summation d = 2 d 1 + 3 d 2 + 2 d 3.) Step 3 Find the product of these divisors, denoted by m. (m = 3 5 7 = 105 in the previous case.) Step 4 Express the final solution x by the formula x d(mod m). (like x 233(mod 105).) One remark is that this expression contains ALL solutions to this problem. You may spend some time checking integers from 1 to 500, and will see that there are no exceptions. 4

We will continue to explore this method. Problem 2.1 Suppose x is an integer which satisfies x 1(mod 3), x 2(mod 11) and x 3(mod 17). Find all such x. Step 1 Solve those three problems separately: d 1 1(mod 3) and d 1 0(mod ), or equivalently d 1 = k where k is any integer: d 2 1(mod 11) and d 2 0(mod ), or equivalently d 2 = k where k is any integer: d 3 1(mod 17) and d 3 0(mod ), or equivalently d 3 = k where k is any integer: Step 2 Find d. d = d 1 + d 2 + d 3 = Step 3 Find m. m = = Step 4 Express the final solution. x = + k, where k is any integer or x (mod ) You should list some numbers from your final expression and verify that they solve the problem! 5

3 Sometime too hot the eye of heaven shines, And often is his gold complexion dimm d Is this method alway valid? Let s try this problem: Problem 3.1 Suppose x is a positive integer which satisfies x 1(mod 2), x 1(mod 4) and x 1(mod 5). Find all such x. By our previous method, what do you get? Have troubles? Please turn to the next page. 6

I am guessing that you were stuck at even the first step using the previous method: you should get d 1 1(mod 2) and d 1 0(mod 4 5). But for the first condition we know that d 1 should be an odd number, and for the second one we know that d 1 should be an even number. Obviously, that is impossible! So, what went wrong? For our first project, the divisors are 3, 5 and 7. You can see that for each pair of them, they are coprime, that is, the common divisor is only 1. For the second project, the divisors are 3, 11 and 17, each pair of which is still coprime. But is that the same for the third project? Very unfortunately, no, because of 2, 4 and 5, the pair of 2 and 4 is not coprime as 2 is a common divisor for both of them. Actually for that method we require that all divisors are pairwise coprime. What if not all pairs are coprime? The idea is natural: convert them so that they are coprime. But the process is a little complicated and tricky. We will see that from the following problem. Problem 3.2 List all numbers x greater or equal to 1 but less than 30, such that (a) x 1(mod 2) (b) x 1(mod 4). Can you see some relation between those two groups of numbers? Problem 3.3 So one condition is unnecessary and you can drop it. What is it? Problem 3.4 Now after dropping the unnecessary condition, are the divisors pairwise coprime? Problem 3.5 If so, apply our original method again. What solutions can you get? 7

4 And then, there were none. Let s continue with the trick of converting divisors which are not pairwise coprime. The big problem we are going to solve is actually from the course Number Theory and Polynomials I took in my college. Solve for x which satisfies x 3(mod 8), x 11(mod 20), and x 1(mod 15). We are going to crack it by solving the following problems: Problem 4.1 Find a positive integer i 1 such that x 11(mod 4) is equivalent to x i 1 (mod 4). Hint: Filling the circles: x 11(mod 4) means x = 11 + k 4 = + 2 4 + k 4 (breaking 11 into two parts) = + (k + 2) 4 So x 11(mod 4) is equivalent to x (mod 4), thus i 1 is just the number. Problem 4.2 Find a positive integer i 2 such that x 11(mod 5) is equivalent to x i 2 (mod 4). Hint: Filling the circles: x 11(mod 5) means x = 11 + k 5 = + 2 5 + k 5 (breaking 11 into two parts) = + (k + 2) 5 So x 11(mod 5) is equivalent to x (mod 5), thus i 2 is just the number. One important result we need to know is x 11(mod 20), or x 11(mod 4 5) is equivalent to two equations: x 11(mod 4) and x 11(mod 5). And I believe you have simplified the last two equations. So now we have an equivalent series of conditions(fill in those circles): x 3(mod 8), x (mod 4), x (mod 5) and x 1(mod 15) 8

Examine the first two conditions: Problem 4.3 x 3(mod 8) and x (mod 4)( is whatever you got previously) can be reduced to one condition. What is that? Hint: Refer to a problem on Page 7. So your answer would be x (mod ). Before rushing to the next step, we summarize what we have done so far: The original conditions are now converted to: x (mod ), x (mod 5) and x 1(mod 15) Very unluckily, 5 and 15 are still not relatively coprime. So there is still some work to do. We want to convert the case for the divisor 15 = 3 5 Problem 4.4 x 1(mod 15) is equivalent to two equations: x i 3 (mod 3) and x i 4 (mod 5). Find positive integers i 3, which should be less or equal to 3, and i 4, which should be less or equal to 5. Hint: Momicing the stated result at the bottom on Page 8, you should guess x (mod 3) and x (mod 5). Make sure your two numbers are no greater than 3 and 5 respectively. Again, we summerize that the new conditions we need to consider to solve the problem are(fill in those circles): x (mod ), x (mod 5), x (mod 3) and x (mod 5) Notice that the second and the fourth should be identical. Otherwise you must have made some mistakes somewhere. For those two identical conditions, you can just cross one of them out. After you get your results, you can turn to the next page to check. 9

The new conditions are x 3(mod 8), x 1(mod 5) and x 1(mod 3). Now we are able to solve our final problem: Problem 4.5 Find x which satisfies x 3(mod 8), x 1(mod 5) and x 1(mod 3). Just momic the steps on Page 5(Ah, a good chance to review the method!). Try to solve this problem here. And, since this problem is under equivalent conditions as the problem on Page 8, we can kill two birds with one stone! :D 10

5 And miles to go before I sleep, And miles to go before I sleep. The mathematics related ito this topic is something about congruence relation, or even further, something about rings, ideals. if you are interested, you may try to read some textbooks on number theory. You don t need any calculus knowledge to do that. 11