1

True or false?

$$24 \equiv 77 \mod 16 $$

$1.$ $77/16 = 4.8125 $

$2.$ $4.8125 - 4 = .8125$

$3.$ $0.8125 \times 16 = 13$

$4.$ $24 != 13$

So the answer is false? Am I right?

V-X
  • 665
MethodManX
  • 1,127

4 Answers4

3

A simpler approach: $a\equiv b\pmod{n}$ if and only if $n$ divides $(b-a)$.

In this problem, $77-24=53$, which is not a multiple of $16$ ($53/16=3.3125$), so $77\not \equiv 24\pmod{16}$.

vadim123
  • 82,796
1

Yes, you are right. Although we tend to avoid using decimals and fractions with modular arithmetic, and thus you just have to keep your integers as integers. This would've been a cleaner way of writing what you just did (the math is basically the same): $$ 77 = 64 + 13 = 4\cdot 16 + 13 \equiv 13 \not\equiv24 \mod{16} $$

Arthur
  • 199,419
1

Please, stop using fractions when evaluation of modulus...

$$24 \equiv 8 \mod 16$$

$$77 \equiv 13 \mod 16$$

thus your equation is not valid.

V-X
  • 665
  • The OP's calculations were correct, this is a valid way of computing mod with a four-function calculator. – vadim123 May 29 '13 at 17:28
  • I know that it is a valid method, but it is ugly. And it doesn't have anything to do with modular arithmetics. – V-X May 29 '13 at 17:30
  • @V-X Please try to be patient with those first encountering modular addition (and in general, aim to be constructive). – amWhy May 29 '13 at 18:27
  • 16 is a lucky number choice of a number, but e.g for 17 OP would need to perform rounding which would be much less educative... I think my request for not using fractions in whole number operation was not that impatient.. – V-X May 29 '13 at 18:35
  • I think V-X is right here: the use of decimal fractions is fine...yes, as long as the calculator can contain all the decimal digits and there are not many operations to do, otherwise it could be that carried approximation errors would be decisive...Not a good idea, imo. – DonAntonio May 29 '13 at 23:28
0

Hint: $\ \rm mod\,\ 2n\!:\ 24\equiv 77\,\Rightarrow\, mod\,\ 2\!:\ 24\equiv 77\,\Rightarrow\, 0\equiv 1$

Key Ideas
  • 4,224