Unformatted text preview:

Lecture 19 21 127 Concepts of Math 10 12 2012 Modular Arithmetic Chinese Remainder Theorem The Chinese Remainder Theorem General Sun Tzu attempts to divide his troops into certain formations He tries to make two rows of soldiers but finds there is one soldier left over He tries to make three circles of equal size but finds there is one soldiers left over again He tries to make five flanks of equal size but finds there are two soldiers left over At this point he gives up and tries to find the exact number of troops he has Because of recent battle losses he can only remember that there are somewhere between 125 and 150 soldiers in total in this regiment Can you determine exactly how many soldiers he has x 1 mod 2 x 1 mod 3 x 2 mod 5 125 x 150 The Chinese Remainder Theorem guarantees the existence of infinitely many integral solutions to a system of congruences like this supposing that the numbers on the right hand side of the mods are all relatively prime See next subsection below for a definition Furthermore it says that all of these solutions are congruent modulo 2 3 5 30 in this case anyway Check out Homework 6 Problem 6 for more details You will work through a couple of the steps of the proof and apply it to an example like this With this example we find that 7 is the unique integer between 1 and 30 that satisfies the given system of congruences From there we just add multiples of 30 until we land in the range 125 x 150 Lo and behold X 127 is the solution we sought A definition and result to be used Definition Given x y Z we say x and y are relatively prime if and only if they have no common factors divisors other than 1 For instance 12 and 35 are relatively prime but 12 and 33 are not Also notice that a prime p and any integer a that is not a multiple of p are relatively prime That is if p is prime and p a then p and a are relatively prime MIRP Lemma Multiplicative Inverses for Relatively Prime things Suppose n N and a Z and that a and n are relatively prime Consider the congruence ax 1 mod n Then there exists a solution x to this congruence In fact there are infinitely many solutions to this congruence and they are all congruent modulo n Multiplicative inverses Let X represent that congruence class guaranteed in the previous Lemma we say X is the multiplicative inverse of a modulo n and we write x a 1 mod n Let s see some examples Consider n 4 and a 3 Notice 3 3 9 1 mod 4 Thus 3 1 3 mod 4 That is the multiplicative inverse of 3 modulo 4 is 3 itself 1 Consider n 4 and a 2 Notice that any multiple of 2 is even and thus cannot be congruent to 1 modulo 4 which requires oddness This might be expected though because the MIRP Lemma only guarantees the existence of such a solution when a n are relatively prime here though 2 and 4 have a common factor of 2 Consider n 10 and a 3 Notice that 3 7 21 1 mod 10 so 3 1 7 mod 10 Notice that this also shows 7 1 3 mod 10 In general a 1 1 a mod n assuming a 1 exists in the first place A comment about finding these solutions since the MIRP Lemma guarantees the solutions are all congruent modulo n we know that exactly one of the solutions lies between 1 and n This is convenient This means we can just check all of the numbers from 1 to n testing for a solution We don t have to intuit the answer or randomly guess and check we have a more methodical guess andcheck algorithm Let p be a prime Consider n p and any a between 1 and p 1 Since a cannot be a multiple of p this guarantees a and p are relatively prime so all such a have multiplicative inverses modulo p Notice that 1 1 1 mod p regardless of p because 1 1 1 mod p Also notice that p 1 1 p 1 mod p regardless of p because p 1 p 1 p2 2p 1 p p 2 1 1 mod p Consider p 5 Notice that 1 1 1 mod 5 2 1 3 mod 5 3 1 2 mod 5 4 1 4 mod 5 Consider p 7 Notice that 1 1 1 mod 7 2 1 4 mod 7 3 1 5 mod 7 4 1 2 mod 7 5 1 3 mod 7 6 1 6 mod 7 Notice that these solutions in the middle column are just a permutation of the numbers 1 through p 1 This is not a coincidence Try to prove that this happens Unfortunately we don t have time in this course to talk about these results more in depth If you re interested I encourage you to check out a book on basic number theory from the Sorrells Library The Challenge Problem on next week s Homework has you investigate these ideas too There are two important things to take away from this discussion two important things that you need to think about for the context of this course First these definitions and results will be helpful in that problem on the homework about the Chinese Remainder Theorem In particular you ll need to cite a result in one part and then you ll need to use this method of guessing and checking in another part where you apply the CRT Second this notion of an abstract multiplicative inverse is important to think about You have probably always thought of the inverse of a number as its reciprocal given a real number r R its inverse is 2 1 r because r 1r 1 except when r 0 of course The general notion of a multiplicative inverse just adapts this definition to whatever context applies we still want the product of the two objects to be 1 in whatever sense multiplication and 1 make sense In fact we will see later on when we talk about functions that the idea of the inverse of a function just means multiplication is composition of functions and 1 is the identity function Okay enough of that let s actually talk about functions Functions Think about the types of functions you have seen before What context did you use them in How did you define what a function is How did you use them The goal of the next couple of weeks is to really rigorize the notion of a function investigate the properties of functions and prove some things about them using many different and interesting examples Definition Definition Let A B be sets Let f be a relation between A and B so f A B Also assume that f has the property that a A b B a …


View Full Document

CMU MSC 21127 - Lecture 19 - 10.12

Loading Unlocking...
Login

Join to view Lecture 19 - 10.12 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 19 - 10.12 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?