3

So I had recently learned about Chinese Remainder theorem, and I got a Question to solve: Find X if- $X\equiv 1\bmod 2\\X\equiv 2 \bmod 3\\X\equiv 3 \bmod 4\tag*{}$ So I went on to find the solution modulus, $N=24$ & $N_1=12\\ N_2 = 8\\ N_3 = 6\tag*{}$ And now I just had to find the three inverse modulus, but for the first one $12y_1\equiv 1 \bmod 2\tag*{}$ there's no $y_1$ satisfying the equation. I was stuck on this part. Please Highlight what I am doing wrong.

3 Answers3

8

The CRT doesn't apply right away because your moduli are not relatively prime. So there my not be a solution. If the last congruence had been $x\equiv 2 \pmod{4}$ then this would contradict the first congruence.

So in cases like this, one has to be observant and note that any solution to $x \equiv 3 \pmod{4}$ also satisfies $x\equiv 1 \pmod{2}$. So your first congruence is superfluous, and you can delete it. In more complicated cases, you can proceed in gimusi's answer. If you hit a contradiction doing that, then there is no solution.

4

Note that CRT guarantees that a unique solution $\bmod {12}$ exists but doesn't give any particular method to solve the system other than those used for the proof.

Indeed note that for the given system the third equation is equivalent to the first (in the sense that the third implies the first one butnot viceversa)

  • $X\equiv 1\bmod 2$
  • $X\equiv 2 \bmod 3$
  • $X\equiv 3 \bmod 4\implies X\equiv 3 \bmod {2^2}$

thus we can study the following reduced system

  • $X\equiv 2 \bmod 3$
  • $X\equiv 3 \bmod 4$

and find that $$X\equiv -1 \equiv 11\bmod {12}$$

Notably

  • $X\equiv 2 \bmod 3 \implies X=2+3k$
  • $X\equiv 3 \bmod 4\implies 2+3k \equiv 3 \bmod 4 \implies -k \equiv 1 \bmod 4 \implies k\equiv -1 \bmod 4 \implies k=-1+4h \implies X=2+3(-1+4h)=-1+12h$
user
  • 154,566
2

$x \equiv 1 (\mod 2) \Rightarrow x-1$ divisible by $2$ $\Rightarrow x-1+2=x+1$ is divisible by $2$.

$x \equiv 2 (\mod 3) \Rightarrow x-2$ divisible by $3$ $\Rightarrow x-2+3=x+1$ is divisible by $3$.

$x \equiv 3 (\mod 4) \Rightarrow x-3$ divisible by $4$ $\Rightarrow x-3+4=x+1$ is divisible by $4$.

Because $x+1$ is divisible by $2;3;4$, it is also divisible by the least common multiple of them, which is $12$ (but not neccesarily the product of them or $24$, because these numbers are not relatively prime)

We can imply that $x \equiv -1 $(mod $12)$ or $x \equiv 11 $(mod $12)$, which means $x$ can be expressed in the form $x=12k+11$ for non-negative integers $k$.

DonielF
  • 1,126
  • 1
  • 8
  • 22
user061703
  • 3,877