Sunday, February 7, 2016

Modular Arithmetic and Congruences




I understand that ab(modn) means when you divide each a and b by n you get the same remainder. But why do people say: "a divided by n gives you remainder b"?



They say that in the first 30 seconds of this video lecture http://www.youtube.com/watch?v=QXIlkq06Ct0&feature=youtube_gdata_player



Example



1217(mod5)



12 divided 5 has remainder of 2




17 divided by 5 has remainder of 2



Neither has the latter relation, so why do people sometimes say this.


Answer



12 is the same as 2 mod5 and
17 is the same as 2 mod5



Lets say you have abmodn. Then the numbers you are working with are basically from the set {0,1,2,3,...,n-1}, the number n=0 (mod n), n+1=1 (mod n), n+2=2 (mod n), ect.




If two numbers, a and b are related by abmodn, then (a-b)=nc,for cN, that is (a-b) is a multiple of n. So in your case above, 22+52+102+15ect.mod5. So 2 is the same as 12 which is the same as 15 mod5



When you have abmodn, with a>b and b{0,1,,n1}, then in fact a divided by n is b, this is the case in the video. When this is not the case, it causes for confusion, as in your example. It would make sense to write 172mod5 however.


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection f:AB and I want to get bijection. Can I just resting codomain to f(A)? I know that every function i...