You are on page 1of 2

Back to the worksheet

Why do we care about Diophantine equations? I claim that the triple (a, b, c) works if and
only if ax + by = c has a solution.
To see this, consider a method of solving the Die Hard problems: We ll up one jug repeatedly,
transferring to the second jug when needed. The second jug we empty every time it is full.
So we can represents a solution by saying how many times we ll the rst jug, and how many
times we empty the second.
Do this for the (3, 5, 4) case.
The number of times you ll up the a-gallon jug is x, and the number of times you ll up the
b-gallon jug is y (so y is the number of times you empty it).
So if (a, b, c) works, then there must be a solution to ax + by = c. And we know this happens
i gcd(a, b)|c.

Day 3
Division with remainder
Today we will gure out how to solve these Diophantine equations. The trick will be to realize
that just like both sides of the equation must be divisible by the same numbers, they must
also have the same remainder when divided by the same number.
So we need a way to talk about the remainders when divided by a given number.
What do the numbers 9, 16, 23, 30, 37 all have in common? Well, when you divide them by
7, you get a remainder of 2. In other words, when it comes to dividing by 7, these numbers
are all the same.
We say that the numbers are congruent modulo 7. They all belong to the same remainder
class modulo 7. We write, for example, 9 16 (mod 7).
That is, a b (mod d) means a and b have the same remainder when divided by d.
Do lots of random examples and non-examples. Negative numbers work too.
Some nice facts: if a b (mod d) and e f (mod d) then,
1. a + e b + f (mod d)
2. a e b f (mod d)
3. ae bf (mod d)

These make sense. If 9 and 16 both have remainder 2 when divided by 7, and we add
something with remainder 3 to 9, and something else with remainder 3 to 16, the results will
both have remainder 5 when divided by 7.
If x 3 (mod 8) and y 5 (mod 8), to what is x + y congruent modulo 8? How about x y?
The idea is, we can replace any number in a congruence modulo d with another element of
its remainder class (modulo d).
For example, what is the remainder when 326 is divided by 7?
Solving Linear Congruences
We want to solve congruence problems like 3x 5 (mod 7). So in general, congruences of
the form ax b (mod d). What we need are some rules for the algebra.
We have already seen that we can add or subtract the same thing to both sides. Also multiply.
But can we divide?
Careful, everything must be whole numbers. But what about 6x 42 (mod 8). Here dividing
both sides by 6 does not give any fractions. But it is still not okay:
What if x = 3. Then it is true that 18 42 (mod 8). But 3 7 (mod 8). However, we could
do 3 7 (mod 4).

You might also like