Lecture 18 21 127 Concepts of Math 10 10 2012 Homework 4 comments What is the contradiction of P Q I dunno that s MEANINGLESS The negation is P Q Modular Arithmetic In recitation on Thursday you proved that a particular relation on Z is an equivalence relation For a given fixed n N we define the relation by saying for any x y Z x y k Z nk x y That is x y if and only if their difference is divisible by n Because this relation depends on n we typically write mod n at the end of any line that uses to indicate that the claim depends on the choice of n For instance the following are true statements 1 4 mod 3 2 7 mod 5 101 10001 mod 10 2 6 7 mod 10 2 4 mod 6 2 18 mod 10 5 6 1 mod 4 5 3 7 2 6 15 7 12 20 2 mod 6 The equivalence classes under the relation mod n correspond to the possible remainders upon division by n To say that n x y means that nx and ny have the same remainder However notice that this is not what the relation is defined as This is a separate observation that we need to prove This amounts to showing that any integer when divided by n yields a unique representation as a multiple of n plus some remainder that is between 0 and n 1 Division Lemma Let n N be given and fixed Let x Z be arbitrary and fixed Then k r Z x kn r 0 r n 1 The symbol means There exist unique This asserts the existence of integers k r Z with the ensuing property and it also asserts that there are no other integers with that property Proof Let n N and x Z be given Define the set M Z n x Certainly M has a maximum element This is a consequence that follows from the Well Ordering Principle Let k be that maximum element Define r x kn AFSOC 0 r n 1 This means r 0 or r n 1 1 If r 0 this means x kn 0 and so x kn This contradicts the definition of M If r n 1 then r n and so x kn n This means x kn n 0 and so x k 1 n 0 i e k 1 n x This shows k 1 M which contradicts the fact that k is the maximum element of M This shows the existence of such k r Now we prove uniqueness Suppose there are K R that also satisfy the conditions This means x Kn R and 0 R n 1 By subtracting equations we find that 0 Kn R kn r n K k R r and so r R n K k Since 0 r n 1 and 0 R n 1 we find that n 1 r R n 1 Thus the only way r R can be a multiple of n is if r R 0 Thus r R Then we find that n K k 0 and since n N it must be that K k 0 and so K k This shows uniqueness With the Division Lemma now in hand we can say something about the equivalence classes mod n To say that n x y means that x and y yield the same remainder upon division by n and the Division Lemma tells us that remainder is unique Thus we can represent any equivalence class x considering it mod n by replacing x with its remainder when x is divided by n To make this distinction clear we will write x n to mean the equivalence class of x under the relation considered mod n Consider n 2 The equivalence classes are 0 2 all of the even integers and 1 2 all of the odd integers Consider n 3 The equivalence classes 0 3 the multiples of 3 and 1 3 the multiples of 3 plus 1 and 2 3 the multiples of 3 plus 2 In general for arbitrary n there are n total equivalence classes and they are represented by 0 n 1 n n 2 n n 1 n What we will prove now is that because we have this nice partition of Z into these equivalence classes based on remainders whenever we do arithmetic mod n we only need to consider the equivalence classes Basically we don t need to do a bunch of arithmetic and then reduce the result mod n we can just be working mod n all along Here s a motivating example What is the smallest natural number k such that 5k 1 mod 7 We could try plugging in values for k but computing large exponents can be cumbersome and figuring out whether a large number is exactly one more than a multiple of 7 can be even harder Modular Arithmetic Lemma Let n N be given and fixed Let a b Z be arbitrary and fixed Suppose that a r mod n and b s mod n Then a b r s mod n a b r s mod n Notice that this Lemma tells us we can just work with the equivalence classes mod n Whatever a b we are given we can just reduce them to their remainders r and s and work with those instead The idea is that 0 r s n 1 so they are guaranteed to be small compared to a and b Proof Suppose a r mod n and b s mod n This means k Z such that a kn r b n s Adding these equations yields a b kn r n s k n r s 2 Thus a b r s mod n since we can express a b as a multiple of n plus the remainder r s Multiplying the two equations yields a b kn r n s k n2 ks r n r s n k n ks r r s Thus a b r s mod n since we can express a b as a multiple of n plus the remainder r s Let s use this to solve that test problem I gave you Finding powers of 5 is hard but this lemma tells us we can reduce everything mod 7 along the way 52 5 5 25 4 mod 7 Then 53 52 5 4 5 20 6 mod 7 and 54 53 5 6 5 30 2 mod 7 and 55 54 5 2 5 10 3 mod 7 and 56 55 5 3 5 15 1 mod 7 and there s our answer That was much easier than calculating 56 15625 and figuring out that 15625 7 2232 1 wasn t it Divisibility Trick for 3 Prove that a natural number x is divisible by 3 if and only if the sum of its digits is also divisible by 3 Proof Let x N be arbitrary and fixed We can represent this number using its decimal expansion by writing n 1 …
View Full Document
Unlocking...