I have this expression: $\tau=a+b \mod x$ and from this I want calculate $b$. From my side I obtain that $b=\tau \mod x - a \mod x$ but the solution is: $b=\tau - a \mod x$. Why ? I don't understand.
Asked
Active
Viewed 32 times
0
-
Apply the definition of $y$ mod $x$ to your initial expression and work in $\mathbb{Z}$. That's the easiest way until you get familiar with arithmetics in $\mathbb{Z}/n\mathbb{Z}$, the worderful world of modulos - and that will help build your intuition and understanding of how modulos work. – Evargalo Jun 20 '17 at 09:05
-
The expression $a\equiv b \pmod{c}$ means that $a-b$ is divided by $c$ – Minz Jun 20 '17 at 09:05
1 Answers
1
$\tau=a+b\bmod x$ means that there is an integer $k$ such that $$\tau=a+b+kx.$$ Hence $b=\tau-a-kx$, that is, $$ b\equiv \tau-a\bmod{x}. $$
Paolo Leonetti
- 15,423
- 3
- 24
- 57