Академический Документы
Профессиональный Документы
Культура Документы
so
1 = 5 − 2(2)
= 5 − 2[7 − 5]
= 3(5) − 2(7)
This gives x0 = 3 and y0 = 2 (but you might have already guessed those solutions
by trial and error). So the complete solution is
x = 3 + 7t
y = 2 + 5t
But all we really need is x = 3 + 7t, which can be written as x ≡ 3 (mod 7).
Example. The congruence 15x ≡ 9 (mod 24) is more interesting. This becomes
15x − 24y = 9, which becomes 5x − 8y = 3 if we divide by gcd(15, 24) = 3. Since
gcd(5, 8) = 1, this has solutions. The equation 5x − 8y = 3 is simple enough that
we can just guess solutions: x0 = −1 and y0 = −1. This leads to x = −1 + 8t
or x ≡ −1 (mod 8). By adding 8 to both sides, we may write x ≡ 7 (mod 8).
What is interesting here is that the modulus has changed. Now the set of all x
that satisfy x ≡ 7 (mod 8) is the following:
{. . . , −17, −9, −1, 7, 15, 23, 31, 39, 47, 55, 63, 71, . . .},
but this can be written as
{. . . , −17, 7, 31, 55, . . .} ∪ {. . . , −9, 15, 39, 63, . . .} ∪ {. . . , −1, 23, 47, 71, . . .}.
Notes for Monday, July 13 2
(Here, I’ve taken every third number to write these three sets.) In the original
set, the numbers differ by 8 but in these three sets, the numbers differ by 24. We
realize that x is in the first of these sets if x ≡ 7 (mod 24), x is in the second set
if x ≡ 15 (mod 24), and x is in the third set if x ≡ 23 (mod 24). That is, we can
express the solution of the original congruence 15x ≡ 9 (mod 24) by saying that
x ≡ 7 or 15 or 23 (mod 24). So the congruence has three solutions modulo 24.
In the last example above, we can write the solution as x ≡ 7 + 8k (mod 24),
where 0 ≤ k < 3.
The gist of the proof is to follow the solution method of the last example above.
The congruence ax ≡ b (mod n) leads to the Diophantine equation ax − ny = b,
which simplifies to da x − nd y = db (where eachof the fractions is an integer).
Find a particular solution x0, so that x = x0 + nd t or x = x0 + ct where c = nd .
This is x ≡ x0 (mod c), but if we revert to the original modulus, we get d many
solutions x ≡ x0 + ck (mod n) (0 ≤ k < d). To complete the proof, one must
verify that for 0 ≤ k < d that the numbers x0 + ck are incongruent modulo n,
and that all numbers of the form x0 + cj are congruent modulo n to one of the
numbers x0 + ck (0 ≤ k < d). (See Burton for details.)
One particular case of this theorem is worth singling out: If gcd(a, n) = 1 then
ax ≡ b (mod n) has a single solution modulo n.
x ≡ c1 (mod n1 )
x ≡ c2 (mod n2 )
..
.
x ≡ cr (mod nr )
Our problem is to find x that satisfies all of these congruences. It turns out
that that solution is unique modulo n1 n2 · · · nr provided the modulii are pairwise
relatively prime. (That is, if i 6= j then gcd(ni , nj ) = 1.)
Notes for Monday, July 13 3
Example.
x ≡ 4 (mod 7)
x ≡ 3 (mod 9)
x ≡ 5 (mod 11)
Put this into the second congruence to get 4 + 7t ≡ 3 (mod 9) which we can solve
for t as usual to obtain t ≡ 5 (mod 9).
Put that into the last congruence. We get 39 + 63u ≡ 5 (mod 11). We solve
this by simplifying, 63u ≡ 10 (mod 11) or 8u ≡ 10 (mod 11), which leads to
u ≡ 4 (mod 11). So u = 4 + 11w.
The proof given in Burton is interesting, because it indicates another way of solving
the system. Let N = n1 n2 · · · nr . The trick is to solve the congruence Ni x ≡
1 (mod ni ) for each 1 ≤ i ≤ r, where Ni = N/ni . Call the solution xi . (So we
find the “multiplicative inverse” xi of Ni modulo ni .) Then the solution can be
written
x ≡ a1x1 N1 + a2 x2N2 + · · · ar xr Nr (mod N).
Notes for Monday, July 13 4
Example. We will solve the system using the technique of the proof.
x ≡ 4 (mod 7)
x ≡ 3 (mod 9)
x ≡ 5 (mod 11)
So we solve:
Example. The “Egg Problem” says: One egg remains from a basket if eggs are
removed from the basket 2, 3, 4, 5 or 6 at a time, but no eggs remain if they are
removed 7 at a time. What is the smallest possible number of eggs? This is the
Notes for Monday, July 13 5
problem
x≡1 (mod 2)
x≡1 (mod 3)
x≡1 (mod 4)
x≡1 (mod 5)
x≡1 (mod 6)
x≡0 (mod 7)
This problem is interesting in that the modulii are not pairwise relatively prime.
But if x ≡ 1 (mod 4) then x ≡ 1 (mod 2), so we can drop the first congruence.
Also, the congruence x ≡ 1 (mod 6) is equivalent to the two congruences x ≡
1 (mod 2) and x ≡ 1 (mod 3). [In general: if gcd(m, n) = 1 then a ≡ b (mod m)
and a ≡ b (mod n) if and only if a ≡ b (mod mn).] So our system is equivalent to
x≡1 (mod 3)
x≡1 (mod 4)
x≡1 (mod 5)
x≡0 (mod 7)
Now we solve using the technique of the proof of the Chinese Remainder Theorem.
We have
N = 3 · 4 · 5 · 7 = 420
N1 = 4 · 5 · 7 = 140
N2 = 3 · 5 · 7 = 105
N3 = 3 · 4 · 7 = 84
N4 = 3 · 4 · 5 = 60
So
x ≡ a1x1 N1 + a2x2N2 + a3 x3N3 + a4x4 N4 (mod N)
≡ 1 · 2 · 140 + 1 · 1 · 105 + 1 · 4 · 84 + 0 · 2 · 60 (mod 420)
≡ 301 (mod 420).
This theorem says that if p is prime, a > 1 and p does not divide a, then
ap−1 ≡ 1 (mod p).
For example, 210 ≡ 1 (mod 11). (In fact, 210 = 1024 and 1024 = 93 · 11 + 1.)
Here is the proof of the theorem: Since p does not divide a, it follows that the
numbers
1, 2, 3, 4, . . . , p − 1
are congruent to the numbers
a, 2a, 3a, 4a, . . . , (p − 1)a
in some order.
Here’s an example: Let a = 5 and p = 7. The assertion is that 5, 10, 15, 20, 25, 30
are congruent to 1, 2, 3, 4, 5, 6 in some order modulo 7. In fact, 5 ≡ 5, 10 ≡ 3,
15 ≡ 1, 20 ≡ 6, 25 ≡ 4 and 30 ≡ 2 modulo 7.
To show that this works in general, first note that none of the numbers
a, 2a, 3a, 4a, . . . , (p − 1)a
are congruent to 0 modulo p. (Otherwise, aj is divisible by p, but p does not
divide j nor a.) Then if we can show that none of these numbers is congruent
to any other of these numbers, we will have p − 1 many numbers that are not
congruent to each other or to zero modulo p. The only way this can happen is if
they are congruent modulo p in some order to the numbers 1, 2, 3, . . . , p − 1. So to
show that these are not congruent to each other, consider 0 ≤ i < j < p − 1 and
Notes for Monday, July 13 7
Therefore, the product of the numbers a, 2a, 3a, 4a, . . . , (p − 1)a will be congruent
to the product of the numbers 1, 2, 3, . . . , p − 1
1 · 2 · 3 · 4 · · · (p − 1) ≡ a · 2a · 3a · 4a · · · (p − 1)a (mod p)
or
(p − 1)! ≡ ap−1(p − 1)! (mod p)
and since p does not divide (p − 1)!, we can cancel to get
1 ≡ ap−1 (mod p)
as claimed.
Example. Show a30 ≡ 1 (mod 77) if gcd(a, 77) = 1. The catch here is that
77 is not prime. But 77 = 7 · 11, and by FLT we have a6 ≡ 1 (mod 7) and
a10 ≡ 1 (mod 11). Then we have (a6)5 ≡ 15 (mod 7) or a30 ≡ 1 (mod 7); and we
have (a10)3 ≡ 13 (mod 11) or a30 ≡ 1 (mod 11). Together these are equivalent to
a30 ≡ 1 (mod 77).