Chinese Remainder Theorem Calculator
The Chinese Remainder Theorem
The Chinese Remainder Theorem provides a unique solution to a system of linear congruences, provided the moduli are pairwise coprime.
System of Congruences:
\( x \equiv a_1 \pmod{m_1} \)
\( x \equiv a_2 \pmod{m_2} \)
\( \dots \)
\( x \equiv a_n \pmod{m_n} \)
Steps:
- Calculate \(N = m_1 \times m_2 \times \dots \times m_n\).
- For each congruence, calculate \(N_i = N / m_i\).
- For each congruence, find the modular multiplicative inverse \(y_i\) such that \(N_i y_i \equiv 1 \pmod{m_i}\).
- The unique solution for x is given by the formula:
\( x \equiv (a_1 N_1 y_1 + a_2 N_2 y_2 + \dots + a_n N_n y_n) \pmod{N} \)
Solves a system of linear congruences.
Powered by: Calco
