Find a number $x<100$ for which all three statements are true:
- When $x$ is divided by $3$, the remainder is $2$.
- When $x$ is divided by $4$, the remainder is $3$.
- When $x$ is divided by $5$, the remainder is $4$.
|
Find a number $x<100$ for which all three statements are true:
|
|||||||
|
|
The number $-1$ is less than 100, and all three statements are true. If you don't like $-1$, can you see how to fix it? |
|||||||||||||||
|
|
Hint $\rm\,\ 3,4,5\:|\:x\!+\!1 \iff lcm(3,4,5)\:|\:x\!+\!1\iff 60\:|\:x\!+\!1\iff x\equiv -1\equiv 59\pmod{60}$ |
|||
|
|
|
Basically, to solve this, you want to look at the Chinese Remainder Theorem. For this problem, you have a system of three congruencies:
Now, for the Chinese Remainder Theorem, the GCD of all of the modulus must be 1, so $GCD(3, 4, 5)$. If you examine 3, 4, and 5, you will notice that all three are relatively prime. Thus their GCD will be 1. So, now, the theorem states that a solution exists a solution to
Which is
Where $\overline{(m_2 m_3)}\pmod{m_1}$ is the inverse of $m_2 m_3$ in mod $m_1$. If you simply plug in the numbers from the original problem, you now get (I am going to leave off the final modulus for the moment, but the overall answer will be in mod 3*4*5=60:
Now, the inverse of 2 in mod 3 is 2, because $2*2=4$, $4 \pmod 3 = 1$. Similarly, you're able to find that $\bar{3}\pmod 4 = 3$ and $\bar{2}\pmod 5=3$
Now, accounting for the mod that I left off at the beginning, we get
So, there's what the value is, below 100, 59 should satisfy those three linear congruencies. |
|||||
|