0
$\begingroup$

Question 1: Given the system$$\begin{align*} & x\equiv 3\mod 4\tag{1}\\ & x\equiv 2\mod 5\tag{2}\\ & x\equiv 5\mod 11\tag{3}\end{align*}$$ Solve for $x$ using the Chinese Remainder Theorem.

I was taught that the remainder theorem says that given$$\begin{align*} & x\equiv b_1\mod n_2\tag4\\ & x\equiv b_2\mod n_2\tag5\\ & \cdots\cdots\cdots\cdots\cdots\cdot\tag6\\ & x\equiv b_r\mod n_r\tag7\end{align*}$$ Then $x\equiv b_1c_1\dfrac {N}{n_1}+b_2 c_2\dfrac {N}{n_2}+\cdots+b_rc_r\dfrac {N}{n_r}\mod N$ where $N=\prod\limits_{n=1}^r n_r$ and $c_i\dfrac N{n_i}\equiv 1\mod n_i$.


Using this, we have $(b_1,b_2,b_3)=(3,2,5)$ and $(c_1,c_2,c_3)=(1,2,1)$. Hence, $x\equiv 120\equiv 0\mod 30$. Which is obviously wrong.

By trial and error, I found the answer to be $27$.

Questions:

  1. How do I solve for $x$, and what went wrong in my follow through?
  2. Is there an easier way to calculate $c_i\frac {N}{n_i}\equiv1\mod n_i$ (I believe this is called the inverse)?
  • 0
    You've made mistakes in finding $c_i$ for each $i$. To find a multiplicative inverse (if it exists), and the extended Euclidean algorithm to keep things organised.2017-02-02
  • 0
    Yes, $c_2=-1$ or $4$, not $2$.2017-02-02
  • 0
    And $20c_3\equiv 1\pmod{11}$ so $c_3=5$.2017-02-02

1 Answers 1

0

You asked for an easier (general) way. Usually it is easier two solve them a pair at a time.

${\rm mod}\ 11\!:\,\ x\equiv 5\,\Rightarrow\, x = 5+11\color{#c00}j$
${\rm mod}\ \color{#c00}5\!:\,\ \color{#c00}2\equiv x\equiv 5+11j\equiv \color{#c00}j\ $ so $\,x = 5+11(\!\!\!\!\!\!\!\color{#c00}{\overbrace{2+5k}^{\large j\ \equiv\ 2\pmod{\! 5}}}\!\!\!\!\!\!\!\!)=27+55\color{#0a0}k$

${\rm mod}\ \color{#0a0}4\!:\,\ 3\equiv x\equiv 27+55k\equiv 3-k\ $ so $\ \color{#0a0}{k\equiv 0}\ $ so $\, x = 27+55(\!\!\!\!\!\!\!\color{#0a0}{\underbrace{0+4n}_{\large k\ \equiv\ 0\pmod{\! 4}}}\!\!\!\!\!\!\!\!) = 27+220n$

Remark $\ $ This method works generally, see this answer for a proof.