Simultaneous Linear Congruences- Chinese Remainder Theorem (CRT)
We will now consider the solutions of simultaneous congruences. In the 1st century AD, the Chinese mathematician Sun-Tsu considered problems like ‘find a number which leaves remainders 2,3,2 when divided by 3,5,7 respectively’. Equivalently, he wanted to find $x$ such that the congruences $$x \equiv 2 \pmod{3}, \quad x \equiv 3 \pmod {5}, \quad x \equiv 2 \pmod {7}$$ are simultaneously true. Note that if $x_0$ is any solution, then so is $x_0 +(3 \times 5 \times 7)t$ for any integer $t$, so the solutions form a union of congruence classes mod (105). We shall show that in this particular case the solutions form a single congruence class, but in other cases we may find that there are several classes or none: as an example, the simultaneous congruences $$x \equiv 3 \pmod {9},\quad x \equiv 2 \pmod {6}$$ have no solutions, for if $x \equiv 3 \pmod {9}$ then 3 divides $x$, whereas if $x \equiv 2\pmod {6}$ then 3 does not divide $x$. The difficulty here is that the moduli 9 and 6 have