Minimal residue making congruence system solvable (CRT)

124 Views Asked by At

A number when divided by $902$, $802$ and $702$ leaves remainder of $602$, $502$ and $402$ respectively. What would be the minimum remainder of when the number is divided by $2005$?

My attempt:

For the given number $n$, $n + 300$ is divisible by $902$, $802$ and $702$. Hence $n + 300$ can be written as $\mathrm{lcm}(902,802,702)\cdot K$ where $K$ is the integer and we can keep varying $K$ from $1$ onwards to manually check the minimum remainder. However this is not a great approach. Any simplistic approach to this problem would be appreciated.

2

There are 2 best solutions below

4
On

Lots of obfuscation.

$n \equiv 502 \pmod {802}$ so $n\equiv 502 \equiv 101 \pmod {401}$.

So $n =101 + 401K$ for some $K$ so $\pmod {2005 = 401 \times 5}$ we have $n \equiv 101 + 401k$ for $k = 0,1,2,3,4$

So $n \equiv 101 + 401k \pmod {2005}$. The least that can be is $101$ if $k=0$ and we'd have $n \equiv 101 \pmod 5$.

Now if we want

$n\equiv 602 \pmod{902}$

$n \equiv 502 \pmod {802}$

$n \equiv 402 \pmod {702}$ and

$n \equiv 101 \pmod 5$ we just need

$n \equiv 0 \pmod 2; n \equiv 602 \pmod 451; n \equiv 502 \pmod{401}; n\equiv 402\pmod{351}; $ and $n\equiv 101 \pmod 5$.

And as $2, 451, 401, 351, 5$ are relatively prime. So by CRT we can have that.

(And thank god we don't have to find that...... well, it wouldn't be that bad[1] but... we don't have to find it; it's enough to know it exists)

And so $n \equiv 101\pmod 5$ and $n \equiv 101 \pmod {401}$ and so $n\equiv 101 \pmod {2005}$ and $101$ is the smallest possible remainder.

====

[1] If we actually want to solve:

$n \equiv -300 \pmod {902, 802, 702}$ so $n\equiv -300 \pmod{2;451;401;351}$ so $n \equiv -300 \pmod {126957402}$ and $n \equiv 1\pmod 5$ so $n\equiv -300 + 126957402k \pmod {634,787,010}$ where $k = 0,1,2,3, 4$ but as $n \equiv 1 \pmod 5$ we must have $k=3$ so $n \equiv 380871906 \pmod {634,787,010}$ and indeed $380871906 \pmod {2005} \equiv 101$.

And $380871906 \equiv 602;502;402 \pmod{902;802;702}$.

0
On

We seek the least $\,r\in \Bbb N\,$ such that the following congruence system is solvable

$$\begin{align} &x\equiv -300\pmod{702}\\ &x\equiv -300\pmod{802}\\ &x\equiv -300\pmod{902}\\ &x\equiv\ \ \ r\quad \pmod{2005} \end{align}\qquad$$

By the CRT solvability criterion it has a solution $\!\iff\!$ each pair has a solution, and a pair $\,x\equiv a\pmod{\!m},\ x\equiv b\pmod{\!n}\,$ is solvable $\!\iff\!$ they are consistent mod the gcd $\,d=(m,n),\,$ i.e. $\,a\equiv x\equiv b\pmod{\! d},\,$ i.e. $\,\color{#c00}{d\mid a-b}.\,$ The first three are consistent since they have obvious solution $\,x = -300\,$ so it remains to check that the last is consistent with the first three, which is true for the first and third because their modulus is coprime to $2005.\,$ For the second we require $\,(2005,802)=\color{#c00}{401\mid r+300}.\,$ Thus $\,r=101\,$ is clearly the least $\,r\in\Bbb N\,$ making it solvable.