0

My Problem:

x mod(3) = 2
x mod(5) = 4
x mod(7) = 1
Solve for x

I was given a formula x = (x mod(3) * 70 + x mod(5) * 21 + x mod(7) * 15) mod(105) to solve for x.

I want to know how to derive this formula. I can see a relation between the numbers 35, 21, 15 as part of the 3*5*7 = 105 equation. But how to use this to get the formula, I have no idea.

I was manually able to get the answer by finding the intersecting value of 3 sets.

set 1: All numbers < 105 which will give an remainder of 2 when divided by 3

set 2: All numbers < 105 which will give an remainder of 4 when divided by 5

set 3: All numbers < 105 which will give an remainder of 1 when divided by 7

The only intersection happened with the number 29 which is the answer I got when the formula is applied.

One Face
  • 101

1 Answers1

0

You need the formula for the inverse isomorphism in the Chinese remainder theorem: if $a,b$ are coprime and $ua+vb=1$ is a Bézout's relation between $a$ and $b$, this inverse isomorphism is $$\begin {align} \mathbf Z/a\mathbf Z\times \mathbf Z/b\mathbf Z &\longrightarrow \mathbf Z/ab\mathbf Z,\cr (x\bmod a, y\bmod b)&\longmapsto yua+xvb\bmod ab. \end{align}$$ Can you proceed from there?

Bernard
  • 175,478