Chinese Remainder Theorem was discovered by the Chinese mathematician Sun-Tsu in around 100 AD. It is used to solve a set of congruent equations with a single variable but different moduli, which are relatively prime. Let us consider such a set of equations: x = x1 mod m1 x= x2 mod m2 . . . […]