Simplify functions involving modular arithmetic

130 Views Asked by At

enter image description here

In this question, the answer says that $f \circ g(x) = x$. But I am unable to get this result. The expression I am able to get is that $$f \circ g(x) = 7(x\text{ mod } 3) + 57(x\text{ mod }7) \pmod {21}.$$ I am unable to proceed any further.

1

There are 1 best solutions below

0
On BEST ANSWER

Let $x \mod 3 = a$ and $x \mod 7 = b$. Thus $a = x + 3 y$ and $b = x + 7 z$ for some integers $y$ and $z$. Express $7 a + 57 b$ in terms of $y$ and $z$. What do you get mod $21$?