1

I have to solve this system of congruences: $$ \begin{cases} x^2+2x+2\equiv 0\pmod{10}\\ 7x\equiv 20\pmod{22} \end{cases} $$ after some calculations $$ \begin{cases} x\equiv 1\pmod{5}\\ x\equiv 2\pmod{5}\\ x\equiv 0\pmod{2}\\ x\equiv 6\pmod{2}\\ x\equiv 6\pmod{11}\\ \end{cases} $$ since $x\equiv 6\pmod{2}$ and $x\equiv 0\pmod{2}\\$ are equal, we get: $$ \begin{cases} x\equiv 1\pmod{5}\\ x\equiv 2\pmod{5}\\ x\equiv 0\pmod{2}\\ x\equiv 6\pmod{11}\\ \end{cases} $$

$$ \begin{cases} x\equiv 1\pmod{5}\\ x\equiv 6\pmod{11}\\ \end{cases}\implies x\equiv 46\pmod{55} $$

$$ \begin{cases} x\equiv 0\pmod{2}\\ x\equiv 2\pmod{5}\\ \end{cases}\implies x\equiv 2\pmod{10} $$ but, $\gcd(55,10)\ne1$, so I cannot apply the Chinese theorem. What have I done wrong?

PinkyWay
  • 4,565
Shyvert
  • 177
  • 1
    Apply CRT to $,x\equiv 1\pmod{5},\ x\equiv 6\pmod{22},,$ and $,x\equiv 2\pmod{5},\ x\equiv 6\pmod{22}.\ $ We need to take all possible combinations of the roots ${1,2}\pmod{5}$ and $,6\pmod{22},,$ as described here – Bill Dubuque Apr 15 '20 at 15:42
  • in general, how do I know That I will have two distinct solutions? – Shyvert Apr 15 '20 at 16:10
  • 1
    By applying CRT as in the Remark in the link, This is closer to your case since it involves different polynomials as here. – Bill Dubuque Apr 15 '20 at 16:15
  • I updated the Remark in the prior link so it applies to the case of different polynomials. – Bill Dubuque Apr 15 '20 at 16:20
  • So could we have found another solution by solving these 4 systems individually?

    $ \begin{cases} x\equiv 1;(mod;5)\ x\equiv 0;(mod;2) \end{cases} $, $ \begin{cases} x\equiv 1;(mod;5)\ x\equiv 6;(mod;11) \end{cases} $, $ \begin{cases} x\equiv 2;(mod;5)\ x\equiv 0;(mod;11) \end{cases} $, $ \begin{cases} x\equiv 2;(mod;5)\ x\equiv 6;(mod;11) \end{cases} $

    – Shyvert Apr 15 '20 at 16:32
  • 1
    No, e.g. the first system doesn't imply $x\equiv 6\pmod{11}$ which is needed for the 2nd polynomial. You need to take all possible combinations that yield roots of both polynomials. – Bill Dubuque Apr 15 '20 at 16:42
  • I added an answer explaining how it works in general. – Bill Dubuque Apr 15 '20 at 17:17
  • Thanks for the help, just to be sure, I'll try again.

    The solutions of $x^2+2x+2\equiv 0;(mod;10)$ are:

    $$ \begin{cases} x\equiv 1;(mod;5)\ x\equiv 0;(mod;2)\ \end{cases}\implies x\equiv 6;(mod;10) $$ $$ \begin{cases} x\equiv 2;(mod;5)\ x\equiv 0;(mod;2)\ \end{cases}\implies x\equiv 2;(mod;10) $$

    – Shyvert Apr 15 '20 at 17:29
  • then the initial system becomes: $$ \begin{cases} x\equiv 6;(mod;5\cdot2)\ x\equiv 6;(mod;11\cdot2)\ \end{cases}, \begin{cases} x\equiv 2;(mod;10)\ x\equiv 6;(mod;22)\ \end{cases} $$ I'm only considering the first system, the other one should be similar $$ \begin{cases} x\equiv 6;(mod;5)\ x\equiv 6;(mod;11)\ x\equiv 0;(mod;2)\ \end{cases}\implies x\equiv 6;(mod;110) $$ I split the message in two because it's too long – Shyvert Apr 15 '20 at 17:29
  • 1
    I added the details of your special case to my answer. Hopefully that clarifies the underlying combinatorial logic (which works the same for any polynomials). – Bill Dubuque Apr 15 '20 at 18:58

3 Answers3

2

\begin{cases} x\equiv 0\;(mod\;2)\\ \hline x\equiv 1\;(mod\;5)\\ x\equiv 2\;(mod\;5)\\ \hline x\equiv 6\;(mod\;11)\\ \end{cases}

So you want a solution modulo $2 \cdot 5 \cdot 11 = 110$.

This is how I would solve it.

\begin{array}{r|rrr} & 2 & 5 & 11 \\ \hline 55 & 1 & 0 & 0\\ 22 & 0 & 2 & 0\\ 10 & 0 & 0 & -1 \\ \hline \end{array}

Note that the top row is the three prime moduli that we are using.

The left column is $\dfrac{2 \cdot 5 \cdot 11}{2} = 55 \quad $, $\dfrac{2 \cdot 5 \cdot 11}{5} = 22 \quad$, and $\quad \dfrac{2 \cdot 5 \cdot 11}{11} = 10$.

The remaining entries show $55, 22, 10$ modulo $2, 5, 11$.

The goal is to multiply $55, 22$ and $10$ by the appropriate integers so that the three diagonal elements are all $1$.

  • $55$ already gives us a diagonal element of $1$.
  • Since $2 \cdot 3 \equiv 1 \pmod 5$, we change $22$ to $22 \cdot 3 = 66$.
  • Since $-1 \cdot -1 \equiv 1 \pmod{11}$, we change $10$ to $10 \cdot (-1) = -10$.

\begin{array}{r|rrr} & 2 & 5 & 11 \\ \hline 55 & 1 & 0 & 0\\ 22 & 0 & 2 & 0\\ 10 & 0 & 0 & -1 \\ \hline 55 & 1 & 0 & 0\\ 66 & 0 & 1 & 0\\ -10 & 0 & 0 & 1 \\ \hline \end{array}

We use those numbers, $55, 66, -10$ as follows

$\left. \begin{align} x &\equiv 0 \pmod 2 \\ x &\equiv 1 \pmod 5 \\ x &\equiv 6 \pmod{11} \end{align} \right\} \iff x \equiv 0(55) + 1(66) + 6(-10) \equiv 6 \pmod{110}$

$\left. \begin{align} x &\equiv 0 \pmod 2 \\ x &\equiv 2 \pmod 5 \\ x &\equiv 6 \pmod{11} \end{align} \right\} \iff x \equiv 0(55) + 2(66) + 6(-10) \equiv 72 \pmod{110}$

2

Though in this case it is simpler to substitute the root of the linear polynomial into the quadratic (as in Integrand's answer), it is instructive to explain the general method of solution that you attempted in your question. The stumbling block there concerns how to split & recombine the systems via CRT, so let's closely examine this logic to see how it works generally.

Suppose that $\,p,q,\bar q$ are pair-coprime integers and $\,f,g\,$ are integer coefficient polynomials.

$f(x)\equiv 0\pmod{\!pq}\!\!\overset{\small \rm CRT}\iff \begin{align} f(x)&\equiv 0\pmod{\!p}\iff x\in {\rm r}_p(f) := {\rm roots\ of} \,f\bmod p\\ f(x)&\equiv 0\pmod{\!q}\iff x\in {\rm r}_q(f)\end{align}$

$g(x)\equiv 0\pmod{\!p\bar q}\!\!\overset{\small \rm CRT}\iff \begin{align} g(x)&\equiv 0\pmod{\!p}\iff x\in {\rm r}_p(g)\\ g(x)&\equiv 0\pmod{\!\bar q}\iff x\in {\rm r}_{\bar q}(g)\end{align}$

Therefore $\,x\,$ is a root of both polynomial congruences iff $\,x\,$ satisfies

$$\begin{align}&\bmod p\!:\,\ x\in {\rm r}_p(f)\ \ \& \ \,x\in {\rm r}_p(g)\iff x\in {\rm r}_p(f)\cap {\rm r}_p(g)\\ &\bmod q\!:\,\ x \in {\rm r}_q(f)\\ &\bmod \bar q\!:\ x\in {\rm r}_{\bar q}(g)\end{align}\qquad\qquad\ \ \ $$

By CRT, each choice of a root for each modulus corresponds to a unique root $\!\bmod pq\bar q,\,$ i.e.

$$\begin{align} x&\equiv r_i\in {\rm r}_p(f)\cap {\rm r}_p(g)\!\!\pmod{\!p}\\ x&\equiv s_j \in {\rm r}_q(f)\ \ \ \,\qquad \pmod{\!q}\\ x&\equiv t_k \in {\rm r}_{\bar q}(g)\qquad\ \ \ \pmod{\!\bar q}\end{align} \iff x\equiv x_{i,j,k}\!\!\!\pmod{\!pq\bar q}\qquad$$

so the number of roots $\!\bmod pq\bar q\,$ is $\,|{\rm r}_p(f)\cap {\rm r}_p(g)|\cdot |{\rm r}_q(f)| \cdot |{\rm r}_{\bar q}(g)|$.


In the OP we have $\,p,q,\bar q = 2,5,11,\,$ so applying the above:

$\!\!\!\begin{align}\bmod 2\!:\ &0\equiv f = x^2\!+2x+2\equiv x^2\!\!\iff\! x\equiv 0\\ &0\equiv g = \,7\,x\,-\,20\,\equiv\, x\,\iff\: x\equiv 0,\ {\rm thus\ we\ have}\ \ {\rm r}_2(f)\cap {\rm r}_2(g) \equiv \{0\}\end{align}$

$\!\!\bmod 5\!:\ 0\equiv f = x^2+2x+2\equiv (x\!-\!1)(x\!-\!2)\!\iff\! x\equiv \color{#0a0}{1,2 =: r},\ \,{\rm so}\,\ {\rm r}_5(f) \equiv \{1,2\}$

$\!\!\bmod 11\!:\ 0\equiv g\equiv 7x-20\iff x\equiv \frac{20}7\equiv \frac{-2}{-4}\equiv \frac{1}2\equiv \frac{12}2\equiv 6,\ \,{\rm thus}\ \ {\rm r}_{11}(g) \equiv \{6\}$

So, as above, by CRT the common roots are precisely the solutions of

$$\begin{align} x&\equiv 0\!\!\pmod{\!2}\\ x&\equiv r\!\!\pmod{\!5},\ \color{#0a0}{r\in \{1,2\}}\\ x&\equiv 6\!\!\pmod{\!11}\end{align}\qquad$$

Now $\,x\equiv 0\equiv 6\pmod{\!\!2},\,x\equiv 6\pmod{\!\!11}\iff x\equiv 6\pmod{\!\!22}\,$ by CCRT

so $\,x = 6\!+\!22k.\,$ CRT combining this with the remaining congruence mod $5$ yields

$\!\!\bmod\color{#c00} 5\!:\,\ \color{#0a0}r\equiv x\equiv 6\!+\!22k\equiv 1\!+\!2k\iff 2k\equiv r\!-\!1\smash{\overset{\times 3\!}\iff} \color{#c00}{k\equiv 3r\!-\!3}$

So we obtain $\ x = 6+22\color{#c00}k = 6\!+\!22(\color{#c00}{3r\!-\!3+5n}) \equiv 6,72\pmod{\!\!110},\,$ for $\,\color{#0a0}{r = 1,2}$.

Bill Dubuque
  • 272,048
1

Solving the linear congruence gives $x\equiv 6\bmod 22$. Write $x=22n+6$ and substitute into the quadratic congruence: $$ (22n+6)^2 +2(22n+6)+2 \equiv 0\bmod 10 $$ $$ \Rightarrow 4n^2+4n+6+4n+2+2 \equiv 0\bmod 10 $$ $$ \Rightarrow 4n^2+8n \equiv 0\bmod 10 $$Everything is even, so let's cancel 2: $$ \Rightarrow 2n^2+4n\equiv 0 \bmod 5 $$ $$ \Rightarrow 2n^2\equiv n \bmod 5 $$ $$ \Rightarrow n^2\equiv 3n \bmod 5 $$So, $n$ is either $0$ or $3$ mod $5$. Together, these give the solutions $x=\{6,72\}\bmod 110$.

Integrand
  • 8,457