Is this a simple LCM or Ad hoc problem or modular arithmetic problem?

263 Views Asked by At

I've got a Kindergarten problem, which is to find smallest number which will be satisfied following condition:

If we divide that number with $4, 6$ and $10$ then $2, 4$ and $8$ will be remainder respectively.

I've find out so may number that could be satisfied the condition such as $58, 118, 178$ and so on...

I've tried with the below method:

  1. LCM$(4, 6, 10) = 60$
  2. Subtract $2$ (the least remainder among $3$) from $60$ = $58$
  3. And Try to divide $2$ other numbers $(6, 10)$ to get $4$ and $8$

I think this is a simple LCM problem, if this is true is my approach is correct?

1

There are 1 best solutions below

0
On

Your solution is correct.

However, here is a more general way to show there are (or there aren't) solutions.

By the Chinese remainder theorem, if there exists at least one solution, there is exactly one between 1 and lcm(4,6,10)=60. Now we can just check up to 60. since you found 58 is a solution, it's the smallest one.