Solving system Chinese Remainder Theorem

162 Views Asked by At

I have to calculate $2019x \equiv18^{2019} \, mod \, 45$

This is equivalent to: \begin{cases} 2019x \equiv 18^{2019} \, \text{mod} \, 5 \\ 2019x \equiv 18^{2019} \, \text{mod} \, 9 \end{cases} We know that $2019x \, mod \, 5 = 4x $ and $2019x \, mod \, 9 = 3x $. So we get: \begin{cases} 4x \equiv 1 \, \text{mod} \, 5 \\ 3x \equiv 0 \, \text{mod} \, 9 \end{cases}. We can now multiply by the inverses. So we get: \begin{cases} x \equiv 4 \, \text{mod} \, 5 \\ x \equiv 0 \, \text{mod} \, 3 \end{cases}. The last step will be here to use the Chinese Remainder theorem. I'm asking if my method is correct because it is the first time I'm practicing this kind of questions and I want to be sure.

Thanks in advance!

2

There are 2 best solutions below

0
On BEST ANSWER

The method is correct but it should be $\!\bmod 5\!:\ {-}x\equiv 4x\equiv \color{#c00}2,\,$ so $\,x\equiv -2\equiv 3,\,$ and also $\,x\equiv 0\equiv 3\pmod{\!3} \iff x\equiv 3\pmod{\!15}\,$ by LCM or CCRT = Constant case CRT.

0
On

$18^{2019} \equiv (-2)(-2)^{2018} \equiv (-2)(-1)^{1009} \equiv 2 \text{ (mod 5)}$

$2019 x \equiv -x \equiv 2 \Rightarrow x \equiv 3 \text{ (mod 5)}$

Luckily, the second congruence is $x \equiv 0 \text{ (mod 3)}$. No need for CRT, since 3|3

Combine both congruences: $$x \equiv 3 \text{ (mod 15)}$$