My Discrete Mathematics Teacher gave me the following question on a test:
Find the Smallest non-negative integer $x$ that satisfies the equation: $$3(x+7) = [4(9-x) + 1] \mod 5$$
When I first looked at this question, I first noticed that there was an equals sign, but not a congruence sign.
My understanding was then that the equation was taken mod $5$. After using trial and error, I found that $x=3$ yielded:
$$3(3+7) = [4(9-3) + 1] \mod 5$$ $$30 = 25 \mod 5$$
When both sides are taken mod $5$, both sides would yield $0$.
However, my teacher, when giving us back the tests, told me (in regards to this question because I got it wrong) that:
$$30 \equiv 25 \mod 5$$
And also that the $\mod 5$ written in the question was for the right-hand side, not the left-hand side.
To this I replied to him saying that it doesn't matter if only one side was taken $\mod 5$. You can take both sides $\mod 5$ again to get:
$$30 \mod 5 = (25 \mod 5) \mod 5$$
Which would still equate to $0$ on both sides.
What you do guys think? Is my process correct?
If it is
mod 5only for the right-hand side, it means we have the mod 5function, i. e. the remainder when we divide by $5$, and not thecongruence relation, i. e. ‘having the same remainder’.With the first interpretation, there is $\color{red}{\text{no solution}}$, because if $x\ge 0$, $3(x+7)\ge 21$, while anything mod $5$ lies in $\{0,1,2,3,4\}$.
With the second interpretation, the congruence equation can be rewritten as $$7x\equiv 16\mod 5\iff2x\equiv 1\mod 3,$$ and the solution is the inverse of $2$ modulo $5$, i. e. $\;\color{red}{x\equiv 3\mod 5}$.
Final remark: There should be a difference in the notation of the interpretations: the function is denoted $x\bmod5$, while the congruence relation is denoted $x\equiv y\mod 5$ (observe the difference in spacing). If one wants to avoid any ambiguity, one may note the relation: $x\equiv y\pmod 5$.