I had to show that a' + b' = a + b mod n, when a mod n = a' and b mod n = b'

37 Views Asked by At

I had to show the following:

For $\,\, n,a,b,a',b' \in N$;

if: $ a'\equiv a\mod{n}$ and $ b'\equiv b\mod{n} $

than $ a' + b' = \,(a+b)\mod{n}$

My try:

$\frac{a}{n} = k +a'$ , where $k \in N $ and $k$ is divisable by $n$.

$\frac{b}{n} = p + b'$ , where $p \in N$ and $p$ is divisable by $n$.

(NOTE: I think (please correct me if I am wrong) that the fact that $a',b'$ are both named to be solutions to a modulor function, that both are not divisable by n. (or do I need to explicitly state this again))

$\frac{a+b}{n} = \, (k + a')+(p+b')$

since $p$ and $k$ both are divisable by $n$; $(k + p)$ can be written as $n*h, h\in N$

$\Longrightarrow \frac{a+b}{n} = \, (n*h + ( a'+b')) $

$\Longrightarrow (a+b)\mod{n} = a' + b'$

It would be very helpful when you could say if the logical reasoning is correct, or where its flawed, and especially help me with formulations. So if the formulation of a certain part of how I tried to show what was asked for is bad or improveable, please give me as many advices as you are willing to share :)

2

There are 2 best solutions below

2
On BEST ANSWER

$a\equiv a'$ and $b\equiv b'$ mod $n$ means that $a$ and $a'$ give the same remainder when divided by $n$, or equivalently, their difference $a-a'$ is a multiple of $n$. The same applies to $b$ and $b'$. So you have $$ a-a'=kn;\qquad b-b'=rn $$ for some integers $r$ and $k$. If you add the two equations above and arrange terms you get $$ a+b-(a'+b')=(r+k)n $$ and therefore, by the same token, $a+b\equiv a'+b'$ mod $n$.

0
On

$\dfrac{a}{n} = k +a'$ is wrong, the correct relation is

$$a=kn+a',0\le a'<n.$$

Then

$$b=jn+b',0\le b'<n$$

and by addition

$$a+b=(k+j)n+a'+b'$$

so that

$$a'+b'\equiv a+b\mod n.$$


Note that we don't necessarily have

$$a'+b'=(a+b)\bmod n$$ because it may by that $a'+b'\ge n.$