What does $(4 \mod 100) \equiv (5 \mod 99)$ mean?

139 Views Asked by At

I came across the following example on page 9 of Introduction to Arithmetic for Digital Systems by Waser and Flynn:

Example 1.5

Suppose we have two $\mod 99$ $A'$ and $B'$, having the following operations performed $\mod 100$, and then corrected to $\mod 100$ and then to a $\mod 99$ result?

(i) $A' = 47$, $B' = 24$; find $(A' + B') \mod 99$.

    47
   +24
  -----
   071    71 mod 100 ≡ 71 mod 99 = result

(ii) $A' = 47$, $B' = 57$; find $(A' + B') \mod 99$.

    47
   +57
  -----
   104    4 mod 100 ≡ 5 mod 99 = result
    +1
  -----
    05

(iii) $A' = 47$, $B' = 52$; find $(A' + B') \mod 99$.

    47
   +52
  -----
   099    99 mod 100 ≡ 0 mod 99 = result

Could someone please help me understand why $4 \mod 100 \equiv 5 \mod 99$?

I know that $N \mod \mu \equiv M \mod \mu$, iff there exists an integer $K$ such that $N - M = K\mu$, but I don't know how to interpret congruence between two different moduli.

2

There are 2 best solutions below

4
On BEST ANSWER

It's a poor description (of the linear case) of casting out $\,99$'s, a radix (base) $100$ analog of casting out nines. Namely write the sum $s$ in radix $100$ as follow $s = 100\,h + u,\,$ so $\,h =\,$ hundreds digit, $u= $ units digit in radix $100$. Then $\!\bmod 99\!:\ \color{#c00}{100\equiv 1}\Rightarrow s = \color{#c00}{100}\,h + u \equiv h+u \equiv$ digit sum, e.g. for their 2nd example $\color{#c00}1\color{#0a0}{04}\equiv \color{#c00}1+\color{#0a0}{04}\equiv 5\pmod{\!99}.$ The same works for any size integer with radix $100$ digits $\,d_i,\,$ i.e.

$$\begin{align} n = f(\color{#c00}{100})\, = &\ \ d_k 100^k + \cdots + d_1 100 + d_0\\[.3em] \Rightarrow\ n\equiv\,\ \ f(\color{#c00}1)\ \ \equiv &\ \ d_k+\cdots +d_1 + d_0\!\!\pmod{99}\end{align}\quad$$

For much further discussion on "casting out" mod reduction and divisibility tests see this answer.

1
On

Looks like a typographical error as well as some pretty rubbish notation ($=$ result?? No thanks).

There's two conventional (and closely related) ways of interpreting mod. One is as an equivalence relation (congruence mod m) which is kind of how you have written it: $$ a \equiv b \text{ mod } m \quad \text{if $m|(a-b)$} $$ (here, think of 'mod' as being attached to the relation $\equiv$, rather than either of the numbers).

The other way is as an operator on a number, that is $ a \text{ mod } m = b$ where $b$ is the unique number such that $m|(a-b)$ and $0\leq b \leq m-1$. That's how this text is using it (but in that case it is confusing that they use $\equiv$). Note however that in that case $$ 5 \text{ mod } 100 = 5 \text{ mod } 99 \neq 4 \text{ mod } 99. $$ (They do this correctly in the other examples).