Overview
The Chinese Remainder Theorem (CRT) states that if you know the remainders of a number when divided by several pairwise coprime integers, you can uniquely determine the remainder of when divided by the product of those integers.
Structurally, CRT establishes a bijection (a perfect one-to-one correspondence) between a number modulo and a tuple of its remainders modulo each . This means that any operation you do on the large modulus can be broken down, computed on the smaller moduli independently, and then stitched back together.
Visualizing the Theorem: The Number Line Alignment
To see why this works, imagine overlapping number lines. Suppose we want to find a number that satisfies:
If we list the valid non-negative numbers for each condition, we are looking for the points where the two sequences "align" or intersect:
| Condition | Valid Solutions for |
|---|---|
| 2, 5, 8, 11, 14, 17, 20, 23, 26, 29 | |
| 3, 8, 13, 18, 23, 28, 33 |
The sequences overlap at 8 and 23. Notice that the distance between these overlapping solutions is exactly , which is . The Chinese Remainder Theorem formalizes this exact phenomenon: the intersection of these periodic sequences will always form a new, perfectly regular sequence modulo the product of their coprime bases!
Key Ideas
- The Core Theorem: If are pairwise coprime positive integers ( for ), the system has a unique solution modulo .
- Constructive Substitution: To solve manually, write the congruence with the largest modulus as an algebraic equation (e.g., ), substitute it into the next congruence, and solve for .
- The Formulaic Approach (Using Inverses): For a system of two congruences and , you can use the Extended Euclidean Algorithm to find such that . The solution is then .
Worked Examples
Example 1: Standard System Reconstruction
Find the smallest positive integer that satisfies:
Solution: First, look for shortcuts. Notice that and . Because 3 and 7 are coprime, we can directly combine these into a single congruence: .
Now we have a two-congruence system:
Convert the first congruence into an equation: for some integer . Substitute this into the second congruence:
Reduce to :
Write as an equation: . Substitute back into :
Thus, . The smallest positive integer is .
Example 2: Finding Last Digits of Massive Powers
What are the last two digits of ?
Solution: Finding the last two digits is equivalent to finding . Computing modulo 100 directly is tedious, but , and . We can compute the remainders modulo 4 and modulo 25 separately.
Modulo 4:
Modulo 25:
We can use Euler's Totient Theorem. . Therefore, . We divide the exponent: .
17^2026 \equiv (17^20)^101 \cdot 17^6 \equiv 1 \cdot 17^6 \pmod25
Calculate $17^6 \pmod{25}$ step-by-step: $17 \equiv -8 \pmod{25}$ $17^2 \equiv 64 \equiv 14 \pmod{25}$ $17^4 \equiv 14^2 = 196 \equiv 21 \equiv -4 \pmod{25}$ $17^6 = 17^4 \cdot 17^2 \equiv (-4) \cdot 14 = -56 \equiv 19 \pmod{25}$ Now we have the system:x \equiv 1 \pmod4 \ x \equiv 19 \pmod25
From the second equation, $x = 25k + 19$. Substitute into the first:25k + 19 \equiv 1 \pmod4 \ (1)k + 3 \equiv 1 \pmod4 \ k \equiv -2 \equiv 2 \pmod4
So, $k = 4j + 2$. Substitute back: $x = 25(4j + 2) + 19 = 100j + 69$. The last two digits are $69$.
Common Pitfalls
- Forgetting the coprimality requirement: CRT only works cleanly if the moduli share no common factors.
- Arithmetic errors in substitution: Reducing negative numbers incorrectly during the substitution steps (e.g., is , not ).
- Losing the final modulus: The solution is unique modulo the product of all the coprime moduli, not just the largest one.
Practice Problems
| Status | Source | Problem Name | Difficulty | Tags | ||
|---|---|---|---|---|---|---|
| Berkeley Math Circle | Hard | Show TagsChinese remainder theorem, Factorization techniques | ||||
| Berkeley Math Circle Monthly Contest 1 | Hard | Show TagsChinese remainder theorem, Greatest common divisors (gcd), Polynomials mod p | ||||
| Berkeley Math Circle: Monthly Contest 6 | Hard | Show TagsChinese remainder theorem, Fermat / Euler / Wilson theorems, Multiplicative order | ||||
| Berkeley Math Circle Monthly Contest 8 | Hard | Show TagsChinese remainder theorem, Greatest common divisors (gcd) | ||||
| MathNet | Hard | Show TagsChinese remainder theorem, Recurrence relations | ||||
| Harvard-MIT Math Tournament | Hard | Show TagsChinese remainder theorem, Factorization techniques | ||||
| Harvard-MIT Math Tournament | Hard | Show TagsChinese remainder theorem, Factorization techniques, Recurrence relations | ||||
| Harvard-MIT Math Tournament | Hard | Show TagsChinese remainder theorem, Prime numbers | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsChinese remainder theorem, Factorization techniques | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsChinese remainder theorem, Fermat / Euler / Wilson theorems, Recurrence relations | ||||
| Team Selection Test | Hard | Show TagsChinese remainder theorem, Divisibility / Factorization, Fermat / Euler / Wilson theorems, Multiplicative order, φ (Euler's totient) | ||||
| USAMO | Hard | Show TagsChinese remainder theorem, Factorization techniques, Greatest common divisors (gcd), Polynomials, Prime numbers, Quadratic residues | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsChinese remainder theorem, Games / greedy algorithms, Integers | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsCartesian coordinates, Chinese remainder theorem, Fermat / Euler / Wilson theorems, Recurrence relations, Trigonometry | ||||
| Team Selection Test | Hard | Show TagsChinese remainder theorem, Determinants, Fermat / Euler / Wilson theorems, Polynomial interpolation: Newton, Lagrange, Polynomials mod p | ||||
| 13th Annual Harvard-MIT Mathematics Tournament | Hard | Show TagsChinese remainder theorem, Fermat / Euler / Wilson theorems, Vieta's formulas | ||||
| Team Selection Test 2010 | Hard | Show TagsChinese remainder theorem, Prime numbers, Recurrence relations, Recursion, bijection | ||||
| USAMO | Hard | Show TagsChinese remainder theorem, Greatest common divisors (gcd), Other, Prime numbers | ||||
| HMMT November 2012 | Hard | Show TagsChinese remainder theorem, Fermat / Euler / Wilson theorems | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsChinese remainder theorem, Complex numbers, Fermat / Euler / Wilson theorems, Recurrence relations | ||||
| TSTST | Hard | Show TagsChinese remainder theorem, Greatest common divisors (gcd), Injectivity / surjectivity, Prime numbers | ||||
| HMMT November 2013 | Hard | Show TagsChinese remainder theorem, Multiplicative order, Sums and products | ||||
| HMMT 2013 | Hard | Show TagsChinese remainder theorem, Inverses mod n, Prime numbers | ||||
| HMMT November 2014 | Hard | Show TagsChinese remainder theorem, Prime numbers, Quadratic residues | ||||
| HMMT November 2014 | Hard | Show TagsChinese remainder theorem, Factorization techniques, Multiplicative order, Recurrence relations | ||||
Module Progress:
Join the Discord Community!
Stuck on a problem, or don't understand a module? Join the Discord and get help with your doubts while making more math friends.
