help with modulo arithmetic

math_fan

New member
Joined
Jan 6, 2014
Messages
8
Hello,

I'm having a problem with modulo arithmetic, not homework, just something that is confusing me. I'd be glad if anyone can help me.

Let a = 37 and b = 151
Then a and b are congruent to 1 MOD 6
If I take the average of these numbers, the result c = (a + b)/2 = 94 is congruent to 4 MOD 6

My problem is, if I start by using the modulo values of

a\(\displaystyle \ \equiv\) 1 MOD 6
b\(\displaystyle \ \equiv\) 1 MOD 6

then I get c = (a+b)/2 \(\displaystyle \equiv\) 1 MOD 6

instead of c \(\displaystyle \equiv\) 4 MOD 6

Can someone tell me what I'm doing wrong?

Thank you
 
I've just noticed that (a+b) \(\displaystyle \equiv\) 2 MOD 6

so that \(\displaystyle \dfrac{(a+b)\ MOD\ 6}{2\ MOD\ 6}\equiv\ 1\ MOD\ 6\)

and this agrees with the second part of my OP.

Why the discrepancy between \(\displaystyle \dfrac{(a+b)\ MOD\ 6}{2\ MOD\ 6}\ \ \ \ \ \ \ \ and\ \ \ \ \ \ \ \left (\dfrac{a+b}{2}\right )\ MOD\ 6\ \ ?\)
 
Top