1

I am learning how to solve system of congruences and I am having some trouble with one exercise.

$5x=3mod7$

$2x=4mod8$

$3x=6mod9$

For

$x=2mod7$

$x=2mod8$ and $x=6mod8$

$x=2mod9$, $x=5mod9$, and $x=8mod9$

$M: M=7*8*9=504.$

Now to figure out M1, M2, and M3:

M1=72, M2=63, and M3=56

Here is were I am having some trouble.

72X1=1mod7----------->X1=4

63X2=1mod8----------->X2=7

56X3=1mod9----------->X3=5

Therefore $X0= 5(4)72+2(7)(63)+3(5)(56)$

$X0=3162$

So $X=138 mod504$

Is this correct? I feel like I am missing some steps.

Hidaw
  • 971
  • 1
    You can simplify life a little by noting that $2x\equiv4\bmod8$ is the same as $x\equiv2\bmod4$, and $3x\equiv6\bmod9$ is $x\equiv2\bmod3$. – Gerry Myerson Nov 02 '18 at 02:19
  • 1
    Why did you delete & repost it? Again, cancelling 2 from the last two yield $,x\equiv 2$ mod 4 & 3,and $x \equiv 2 $ also works mod 7, same as I said 2 hours ago. Is that not clear? Or must you use the CRT formula? – Bill Dubuque Nov 02 '18 at 02:20

1 Answers1

1

First we can cancel factors from the final two congruences as follows.

$2x\equiv 4\pmod{8}\iff 2x = 4+8j\iff x = 2+4j\iff x=2\pmod{4}$

Similarly $\,3x \equiv 6\pmod{9}\iff x\equiv 2\pmod{3}$

Note $\,x\equiv 2\,$ is also the (unique!) solution of $\,5x\equiv 3\pmod{7}$

So the congruences are equivalent to $\,x\equiv 2\pmod{\!3,4,7}\!\iff x\equiv 2\pmod{\!84}\,$ by CCRT.

If you must use the CRT formula then you can make it easy as follows. Let $X = x-2.\,$ Solve the system $X\equiv \color{#c00}0$ for all three moduli. The CRT formula will have a factor of $\,\color{#c00}0\,$ in all $3$ summands, so the result is $0$. Thus $\,x-2 = X \equiv 0\,$ so $\,x \equiv 2\,$ is the solution by the CRT formula. Note that we don't need to compute inverses of moduli etc since all those terms are annihilated by the $0$ factors.

Bill Dubuque
  • 272,048