Next: Multiplicative Functions
Up: Lecture 6: Congruences, Part
Previous: Wilson's Theorem
Sun Tsu Suan-Ching (4th century AD):
There are certain things whose number is unknown. Repeatedly divided
by 3, the remainder is 2; by 5 the remainder is 3; and by 7 the
remainder is 2. What will be the number?
In modern notation, Sun is asking us to solve the following system of
equations:
The Chinese Remainder Theorem asserts that a solution to Sun's
question exists, and the proof gives a method to find a solution.
Theorem 2.1 (The Chinese Remainder Theorem)
Let
![$ a, b\in\mathbb{Z}$](img36.png)
and
![$ n,m\in\mathbb{N}$](img37.png)
such that
![$ \gcd(n,m)=1$](img38.png)
. Then there exists
![$ x\in\mathbb{Z}$](img39.png)
such that
Proof.
The equation
has a solution
![$ t$](img43.png)
since
![$ \gcd(m,n)=1$](img44.png)
.
Set
![$ x=a+tm$](img45.png)
. We next verify that
![$ x$](img46.png)
is a solution to the two equations.
Then
and
Now we can solve Sun's problem:
First, we use the theorem to find a solution to the pair
of equations
Set
,
,
,
.
Step 1 is to find a solution to
.
A solution is
. Then
.
Since any
with
is also a solution to
those two equations, we can solve all three equations by
finding a solution to the pair of equations
Again, we find a solution to
.
A solution is
, so
Note that there are other solutions. Any
is also a solution; e.g.,
.
We can also solve Sun's problem in PARI:
? chinese(Mod(2,3),Mod(3,5))
%13 = Mod(8, 15)
? chinese(Mod(8,15),Mod(2,7))
%14 = Mod(23, 105)
Next: Multiplicative Functions
Up: Lecture 6: Congruences, Part
Previous: Wilson's Theorem
William A Stein
2001-09-23