1

I am given an iterative method to solve a system using the Chinese remainder theorem, but there is one step of which I don't understand the reason.

We have a system of congruences \begin{cases} x\equiv a_{1} \mod n_{1} \\ x \equiv a_{2} \mod n_{2} \\ ...\\x \equiv a_{k} \mod n_{k}\end{cases}that meet the requirements for the Chinese remainder theorem ($n_{1},...,n_{k} \in \mathbb{N}_{0}$ and $gcd(n_{i},n_{j})=1$ for $i \neq j$). (1) Find $\lambda_{1}, \lambda_{2}$ so that $\lambda_{1} n_{1}+ \lambda_{2} n_{2} = 1$. This is possible by the theorem of Bézout-Bachet because $gcd(n_{1},n_{2})=1$. (2) Now, replace the first two congruences \begin{cases} x\equiv a_{1} \mod n_{1} \\ x \equiv a_{2} \mod n_{2} \end{cases} by $x \equiv a_{2} \lambda_{1} n_{1} + a_{1} \lambda_{2} n_{2} \mod n_{1} n_{2}$. (3) Repeat this until you are left with only one equation.

My question: How do you get to the replacement in step 2? What is the reasoning behind this?

simp
  • 883

2 Answers2

3

If you have $$x\equiv a_2\lambda_1 n_1+ a_1\lambda_2 n_2 \pmod{n_1n_2},$$ then you certainly have

$$x\equiv a_2\lambda_1 n_1+ a_1\lambda_2 n_2 \pmod{n_1},$$

which reduces to

$$x\equiv a_1\lambda_2 n_2 \pmod{n_1},$$

You can replace $\lambda_2 n_2$ by $1$ in this last congruence by reducing

$\lambda_1 n_1 + \lambda_2 n_2 =1$ modulo $n_1$ to get $ \lambda_2 n_2 \equiv 1 \pmod{n_1}.$ So you have $x \equiv a_1 \pmod{n_1}$. Likewise for the other subscript.

  • To prove the systems are equivalent you need to prove implications in both directions. – Bill Dubuque May 02 '17 at 23:39
  • @BillDubuque That wasn't the question. – B. Goddard May 03 '17 at 00:42
  • Sure it is, viz. "the reasoning behind this". – Bill Dubuque May 03 '17 at 00:58
  • @BillDubuque The "reasoning behind" the substitution. The substitution is one way. I feel like I'm back on sci.math. – B. Goddard May 03 '17 at 01:00
  • No, the crux of the matter is that it leads to an equivalent system, and this requires proof of both directions. – Bill Dubuque May 03 '17 at 02:49
  • @BillDubuque The fact that you're italicizing so many words is a sign you need to step back. No proof was asked for. The OP wanted the substitution explained. I explained it. Done. If you don't like the explanation, post one of your own. If you just want to be an annoying nitpick, find someone besides me. – B. Goddard May 03 '17 at 13:13
  • 1
    This is an important point. Beginners often make errors that amount to making analogous equational transformations that yield only necessary (but not suffcient) conditions for solutions. I highly recommend that you reflect on this matter a bit more rather than inaccurately dismiss it as "nitpicking". – Bill Dubuque May 03 '17 at 15:31
  • There's those italics again. They're really all-caps. When dealing with a student, one strives for understanding. You, it seems, would rather drown them with details so that you can show off your brilliant grasp of the subject. No wonder US education is in the toilet. Instead of giving a complete technical answer served up on a silver platter, many of us think it is better to let the student fill in some details on his own. – B. Goddard May 03 '17 at 15:34
0

The accepted answer does not explictly address an important point: $ $ the $\rm\color{#0a0}{ necessity\ (\Rightarrow})\:\!$ and $\rm\color{#c00}{sufficiency\ (\Leftarrow)}\!\:$ of the CRT solutions (e.g. without such there could be extraneous solutions that require verification). This is easily remedied by invoking CRT in its most natural bidirectional $\rm\color{#c00}{equiv}\color{#0a0}{alence}$ ($\color{#c00}{\Leftarrow}\!\color{#0a0}\Rightarrow)$ form - as below.

By (Easy) CRT = Chinese Remainder Theorem, there is an integer $\,a_{1,2}\,$ such that

$$\begin{align} &x\equiv a_1\!\!\pmod{\!n_1}\\ &x\equiv a_2\!\!\pmod{\!n_2}\end{align}\color{#c00}{\Leftarrow}\!\color{#0a0}\Rightarrow x\equiv a_{1,2}\!\!\pmod{\!n_1 n_2}\qquad$$

Thus we obtain an equivalent system of congruences by replacing the first $\rm\color{#0af}{two}$ congruences of our system by the equivalent $\rm\color{#0af}{single}$ congruence $\,x\equiv a_{1,2}\pmod{\!n_1 n_2}.\,$ This reduces the number of congruences, so inductively iterating this process we eventually reach a single congruence that is $\rm\color{#c00}{equiv}\color{#0a0}{alent}$ to the original system of congruences - which is the sought solution of the system.

Important $ $ Note that the derived smaller system remains solvable since the new modulus $\,n_1 n_2\,$ remains coprime to the other $\,n_k\,$ (by $\,n_1,n_2\,$ are coprime to $\,n_k\,$ and Euclid's Lemma).

Bill Dubuque
  • 272,048