0

The formula I found:

$$\sum_{i=1}^{k} a_{i}b_{i}b^{`}_{i} (\mod m_{i})$$

where:

$b_{i} = \frac{M}{m_{i}}$
$b_{i}^{`} = b_{i}^{-1} (mod m_{i})$


And for example:

$$x \equiv -7 \mod 13$$ $$x \equiv 39 \mod 15$$

$M = 13*15 = 195$
$b_{1} = 13$
$b_{2} = 15$
$b_{1}^{`} = \frac{1}{13} mod 13? = \frac{1}{13}?$
$b_{2}^{`} = \frac{1}{15} mod 15? = \frac{1}{15}?$

It would make $x = (a_{1} mod 13) + (a_{2} mod 15) = -7 + 9 = 2$, which is wrong. What am I missing? Maybe the formula is wrong?

khernik
  • 1,369

1 Answers1

0

The formula is correct... but the values are not: For example, $b_1$ should be equal to $\frac{195}{13}=15$ rather than 13. Getting them right will also resolve your problems with the inverses $b_1'=\frac{1}{15}\pmod{13}$ makes sense; unlike $\frac{1}{13}\pmod{13}$