Please show us the definition you were given for "mod".I've just learnt a new chapter on discrete mathematics but I'm sort of unclear. Can someone kindly explain why -4 mod 4 = 0 mod 4? And also how 17 mod 5 = 2?
Please use the reply button while responding to a particular post - so that a proper reference is clear.This was NOT intended asss a new thread, it was a response to the problem posed in the thread where I posted it.
Ah... Okay I get it now. And yes. I believe what I'm learning at the moment is related to the first term you've mentioned. However, it does relate back to number theory correct?Please show us the definition you were given for "mod".
The term is used in two different ways, an operation (remainder, commonly in programming) and as a modifier for an equivalence (which is standard in number theory). In your course, I would expect to see the latter, but what you are writing looks like the former. I need to be sure whether you are doing what you are taught, or are misunderstanding it.
In number theory, we say that a≡b(modn) when n∣(a−b). That is true in both of your examples: 4∣(−4−0), and 5∣(17−2), so that −4≡0(mod4) and 17≡2(mod5).
Oh... okay. So is it correct for me to assume that -4 mod 4 can also equal to 4 mod 4? But the reason why it is 0 mod 4 is because we want the most simplest term?-4 mod 4 = 0 mod 4? And also how 17 mod 5 = 2?
-4mod 4 = x mod 4
We would like x to equal 0, 1, 2 or 3
In mod 4, 4 = 0. You can always add 0 to a value and it will not change (it may look different)
Now -4 + 4 = 0
So -4 mod 4 = 0 mod 4
17 mod 5 = y mod 5
We would like y to equal 0, 1, 2, 3 or 4
5=0 in mod5
Now 17 - 5 - 5 - 5 = 2,
So 17 mod 5 = 2 mod 5
Alternate method
When you divide 17 by 5, the remainder is 2. hence 17mod 5 = 2 mod 5
When you divide -4 by 4, the remainder is 0. So -4 mod4 = 0mod4
Note: If you have -7 mod 5. the remainder is -2. Just add 5 to the -2 to get 3
And yes. I believe what I'm learning at the moment is related to the first term you've mentioned. However, it does relate back to number theory correct?
Please show us a definition and an example from your course (an image of a book or printed notes is best), so we can be sure of the form you are learning. Also, what is the course?So is it correct for me to assume that -4 mod 4 can also equal to 4 mod 4? But the reason why it is 0 mod 4 is because we want the most simplest term?
Please note that it is unusual for -x mod y = x mod y. -4 mod 4 = 4 mod 4 only because -4 and 4 differ by a multiple of 4. Note that -3mod4 = 1mod4.Oh... okay. So is it correct for me to assume that -4 mod 4 can also equal to 4 mod 4? But the reason why it is 0 mod 4 is because we want the most simplest term?