2

I am aware of something called the Chinese Remainder Theorem, using modulo inverses.

For example,

$$3x \equiv 17 \pmod{2014}$$

Instead of finding inverse modulo, How can I use the Chinese Remainder Theorem?

Or any other methods?

user26486
  • 11,331
Ama
  • 491

3 Answers3

1

Using $\ 2014 = 2\cdot 19\cdot 53\ $ we apply CRT.

$ {\rm mod}\ 19\!:\ x \equiv \dfrac{17}{3}\equiv \dfrac{17+19}{3}\equiv\ \color{#0a0}{12}$

$ {\rm mod}\ 53\!:\ x \equiv \dfrac{17}{3}\equiv \dfrac{17-53}{3}\equiv \color{#c00}{-12}$

$ {\rm mod}\ 19\!:\ \color{#0a0}{12}\equiv x\equiv \color{#c00}{-12}+53n\equiv -12-4n\iff4n\equiv -24\iff n\equiv -6$

Thus $\,{\rm mod}\ 19\cdot 58\!:\ x\equiv -12+53(-6)\equiv -330\equiv 677$

Finally $\,{\rm mod}\ 2\!:\ 3x\equiv 17\iff x\equiv 1,\,$ hence $\ x\equiv 677\pmod{2\cdot 19\cdot 58}$

Beware $ $ Modular fraction arithmetic is well-defined only for fractions with denominator coprime to the modulus. See here for further discussion.

Remark $\ $ Generally it is much easier not to use CRT to invert small numbers, e.g. we can universally invert $3$ mod $\,n\,$ as follows. ${\rm mod}\ 3\!:\ n\not\equiv 0\,\Rightarrow\,n\equiv \pm 1,\,$ so $\, \color{brown}{3\mid 1\pm n}\,$ hence

$${\rm mod}\ n\!:\,\ \dfrac{1}{3}\equiv \color{brown}{\dfrac{1\pm n}{3}} = k\in\Bbb Z$$

This corresponds to using a single step of the extended Euclidean algorithm (using remainders of least magnitude, i.e. using $\{-1,0,1\}$ as reps mod $\,3.)$

Bill Dubuque
  • 272,048
  • The way you used fractional notation for, e.g., $\frac{17}{3}$, doesn't denote division in the division operation on real numbers sense but instead it denotes the modular multiplicative inverse (because $x-\frac{17}{3}$ is not even an integer, and so $19\mid x-\frac{17}{3}$ is impossible). Thus you've used modular multiplicative inverses, which OP asked not to use (or maybe he meant not to use it in the direct sense $x\equiv\frac{17}{3}\pmod{2014}$). But he did ask for a proof using Chinese Remainder Theorem, so this answer is fair enough. – user26486 Feb 23 '15 at 16:36
  • @user314 $\ $ If $,(a,n) = 1,$ then $,ax\equiv b,\pmod n,$ has a unique solution, denoted $,x \equiv b/a.\ $ The grade-school rules of fraction arithmetic hold for all such fractions with denominator coprime to the modulus (clear if you know the universal property of localization; otherwise it can be directly verified). Follow the link for more. – Bill Dubuque Feb 23 '15 at 18:33
  • I was claiming that you were using modular multiplicative inverses while OP said not to use it. – user26486 Feb 23 '15 at 18:47
  • @use I didn't use inverses. Rather, I cancelled $,a\ne 0$ in a field $\ \Bbb Z/\color{#0a0}p,,$ e.g. my 2nd line is $\tag{}$ ${\rm mod}\ \color{#0a0}{19}!:\ \color{#c00}{3}x\equiv 17\equiv \underbrace{\color{#c00}312}_{\large 17+\color{#0a0}{19}\ }\iff x\equiv 12,, $ via cancel $\ \color{#c00}3\not\equiv 0,\ $ i.e. $\ x\equiv \dfrac{\color{#c00}3\cdot 12}{\color{#c00}3}\equiv 12$ $\tag*{}$ In any case, surely the point of the exercise is to gain practice with modular reduction using CRT, in which case it really doesn't matter how one computes $,17/3,$ in $,\Bbb Z/p,,\ p\ne 3.\ \ $ – Bill Dubuque Feb 23 '15 at 20:11
0

We don't even need CRT

As $17\equiv-1\pmod3,2014\equiv1;17+2014\equiv0$ and $(2014+17)/3=677$

$3x\equiv17\pmod{2014}\equiv17+2014$

$\iff3(x-677)\equiv0\pmod{2014}$

As $3\nmid2014,(3,2014)=1\implies x-677\equiv0\pmod{2014}$

See $\#12$th property of Congruence

  • But the OP asks how to do it using CRT. Of course it is trivial to invert $3$ not using CRT since $,m\equiv \mp 1\pmod 3,$ so $, 1/3\equiv (m\pm 1)/3 \pmod m $ – Bill Dubuque Feb 23 '15 at 16:41
0

I know this solution doesn't use CRT (there has already been given a solution that uses this) but I thought i'd give the easiest way to solve it.

Since $2013 = 3\times 671$ multiplying both sides of the congruence by $671$ gives:

$2013x \equiv 671(17) \bmod 2014$

Then:

$-x \equiv 671(17) \bmod 2014$

Hence:

$x \equiv -671(17) = ... \equiv 677 \bmod 2014$.

fretty
  • 11,156
  • 1
  • 26
  • 37