So a mathematician gives me a system like this:
$$
\begin{eqnarray*}
B_1 + z_1 M_1 &\equiv& B_2 \pmod {M_2}
\\ B_1 + z_1 M_1 + z_2 M_1M_2 &\equiv& B_3 \pmod {M_3}
\\ &\cdots&
\\ B_1 + z_1M_1 + z_2 M_1M_2 + \cdots + z_{k-1}M_1 M_2 \cdots M_{k-1} &\equiv& B_k \pmod{M_k}.
\end{eqnarray*}
$$
But I forgot how to solve such systems. So I wonder does $B_1+z_1 M_1 \equiv B_2 \pmod {M_2}$ mean that $z_1 = (B_2 \bmod M_2 - B_1)/M_1$?
Answer
$B_1+z_1m_1=B_2(\mod m_2)\Rightarrow$
$\Rightarrow (B_1+z_1m_1)-B_2=am_2\Rightarrow $
$\Rightarrow z_1m_1=B_2-B_1+am_2 \Rightarrow$
$\Rightarrow z_1=\frac{B_2-B_1+am_2 }{m_1}$ , where $a$ is an integer
No comments:
Post a Comment