1
$\begingroup$

Let be $m, n$ integers such that $m \wedge n = 1$. Also, let's take $r \in [0, mn - 1]$.

Can we solve the equation $an + bm \equiv r \pmod{mn}$ where $a, b$ are the variables, using the Chinese Remainder Theorem?

I believe that, because $m \wedge n = 1$, then we would have the following system for some $(r_1, r_2) \in [0, m - 1] \times [0, n - 1]$ :

$\begin{equation*} \left\{ \begin{aligned} & an + bm \equiv r_1 \pmod{m} \\ & an + bm \equiv r_2 \pmod{n} \end{aligned} \right. \end{equation*}$

Then, we could solve $a \equiv r_1 \pmod{m}$ and $b \equiv r_2 \pmod{n}$.

But, I'm not sure that the "reciprocal" Chinese Remainder Theorem could apply because it's not necessarily true?

Can we explicit the form of such a solution?

Notations : $a \wedge b$ is GCD of $a$ and $b$.

  • 0
    What is $m\wedge n$?2017-01-10
  • 0
    @Arthur GCD, sorry, I'll edit with the notation I used.2017-01-10

1 Answers 1

2

Yes, we can use CRT to solve for $\,a,b\,$ in $\, na+mb = r.\,$ Solve $\,x\equiv r\pmod{\!m},\,$ $\,x\equiv 0\pmod{\! n}.\,$ The solution $\,x\,$ yields integers $\,a,b\,$ with $\ na = x = r - mb,\ $ so $\ na+mb = r.$