Chinese Remainder Theorem

Chinese Remainder Theorem (CRT)

Theorem

For all integers and , and positive integers and , if , then the simultaneous linear congruences:

Have a unique solution modulo .

Thus, if is one particular solution, then the solutions are given by the set of all integers such that

(See GCD)

Generalized Chinese Remainder Theorem (GCRT)

Theorem

For all positive integers and , and integers , if for all , then the simultaneous congruences

have a unique solution modulo .
Thus, if is one particular solution, then the solutions are given by the set of all integers such that

Examples

Example

Solve the simultaneous congruences

Since , we can use the Chinese remainder theorem, which says that the solution to these simultaneous congruences is the set of all integers such that , where is one particular solution.

Note that are the choices of integers between and that are congruent to
Now observe that , , and , so is a solution to both congruences simultaneously.

We conclude that the set of solutions to the simultaneous congruences consists of all integers such that