My aim here to learn the Chinese Remainder theorem. But am stuck at finding the inverses.
Suppose we have 42 mod 5, but according to the CRT question, we must make it 42 * x congruent to 1 (mod 5)
I know the answer is 3 by hit and trial, but can someone help me solve it using the eulidean and extended eulid alg?
The CRT is not needed to find an inverse modulo a prime: it is just not what it is used for.
Here, we can do as follows:
$$42\pmod5=2\pmod5\implies 42^{-1}\pmod5=2^{-1}\pmod 5=3\pmod 5$$
Why the last equality? Because
$$\;2\cdot 3=1\pmod 5\implies 2=3^{-1}\pmod 5\;\;or\;\;3=2^{-1}\pmod 5\;$$