Congruence equation for modulus 2

34 Views Asked by At

Suppose $a,b\in\mathbb{Z}$ and $n\in \mathbb{N}$. Is the equation

$$((a+n)(b+n)) mod_2 = ((a-n)(b-n)) mod_2$$

satisfied?

This is not a homework or such. (I'm not a student) I need to decide if two signs are equal. Unfortunately I don't know really how to solve these kind of congruence equations.

Although I ultimately only need the answer, a derivation would however be nice, too.

2

There are 2 best solutions below

0
On BEST ANSWER

Starting from the LHS \begin{equation} \begin{aligned} ((a+n)(b+n))mod_2 =& (ab+an+bn+n^2)mod_2 \\ =&(ab-an-bn +n^2)mod_2 \\ =&((a-n)(b-n))mod_2 \end{aligned} \end{equation} Where we have used the fact that $(-x)mod_2 = (x)mod_2$}

1
On

It's always true. Using elementary identities you can simplify $$((a+n)(b+n)) mod_2 = ((a-n)(b-n)) mod_2 $$

$$(a*b + n^2 + a*n+b*n) mod_2 = (a*b+n^2-a*n-b*n) mod_2 \\as\ n^2 and \ a*b\ are\ contribute\ same\ you \ can \ cancel \ them $$ $$(a*n+b*n) mod_2 = (-a*n-b*n) mod_2 \\ if \ n \ is \ even\ equality \ is \ obvious\ otherwise \\(a+b) mod_2 = (-a-b) mod_2 \\now \ suppose \ this \ equality \ doesn't \ hold \\ (a+b+a+b) mod_2 = 1 => 2(a+b)mod_2 = 1 => contradiction $$ therefore this equality holds for all $$a,b\in\mathbb{Z} \ and \ n\in\mathbb{N} $$