4

How could I go about solving $$x\equiv 1\mod 2$$ $$x\equiv 1\mod 3$$ $$x\equiv 1\mod 4$$ $$x\equiv 1\mod 5$$ $$x\equiv 1\mod 6$$ $$x\equiv 0\mod 7$$

I know that if I want to use the Chinese Remainder Theorem then I have to find a way for all the mod's to be relatively prime to each other but I am unsure which ones I can get rid of. Any suggestions?

Bill Dubuque
  • 272,048
  • If $x \equiv 1 \mod {12}$ then $x \equiv 1 \mod {2,3,4,6}$.

    So $x \equiv 1 \mod {60}$ and $x \equiv 0 \mod {7}$ does the trick.

    – k.stm Feb 16 '13 at 20:43

4 Answers4

3

$x\equiv1\pmod4$ implies $x\equiv1\pmod2$, while $x\equiv1\pmod6$ is equivalent to the two congruences $x\equiv1\pmod2$ and $x\equiv1\pmod3$. So you should be okay keeping only the congruences modulo $3$, $4$, $5$, and $7$.

3

In this case, the system is equivalent to the following: $$ \begin{array}{rcl} x & \equiv & 1 \qquad \mod \mathrm{lcm}(2,3,4,5,6) \\ x & \equiv & 0 \qquad \mod 7 \end{array} $$ This way the Chinese remainder theorem is applicable.

Dan Shved
  • 15,862
  • 39
  • 55
2

As a general comment, @user62015, a system of congruences with moduli that are not relatively prime can still have solutions. Take $$ \begin{cases} x \equiv a \pmod{m}\\ x \equiv b \pmod{n} \end{cases} $$ with $m,n$ not both zero. If this has a solution $x$, then there are $s, t$ such that $a + ms = x = b + n t$, or $$ b-a = ms - nt, $$ so for a solution to exist we need $(m, n) \mid b - a$. Conversely, if $(m, n) \mid b - a$, use Euclid to find $u, v$ such that $$ (m,n) = m u - n v, $$ and multiply by the integer $(b-a)/(m,n)$ to get $$ b-a = m (u (b-a)/(m,n)) - n (v (b-a)/(m,n)), $$ so that $$ x = a + m (u (b-a)/(m,n)) = b + n (v (b-a)/(m,n)) $$ is indeed a solution.

1

By CCRT $\rm\ 2,3,4,5,6\mid x-1\iff 60 = lcm(2,3,4,5,6)\mid x-1\ $ so, by Easy CRT, we have

$$\begin{array}{ll}\rm x\equiv 0\ \ (mod\ 7)\\ \rm x\equiv 1\ \ (mod\ 60)\end{array}\rm \!\iff x\equiv 1 + 60 \left[\frac{-1}{60}\ mod\ 7\right]\equiv -119,\ \ by\ \ mod\ 7\!:\, \frac{-1}{60}\equiv \frac{6}{-3}\equiv -2$$

Bill Dubuque
  • 272,048
Math Gems
  • 19,574