Linear Diophantine Equations
Theorem (recall). If d = (a, b), then d is the least positive integer such that the
equation ax + by = d has an integral solution.
Theorem (recall). If (a, b) = 1 and a|bc, then a|c.
Theorem. Let a and b be positive integers with d = (a, b). The equation ax+by =
c has no integral solutions if d - c. If d|c, then there are infinitely many integral
solutions. Moreover, if x = x0 and y = y0 is a particular solution, then all solutions
are of the form
x = x0 + (b/d)n, y = y0 − (a/d)n.
Proof: Consider the equation ax + by = c. Suppose that d|a and d|b. Then
(1) . Thus if (2) , there are no integral solutions.
Now assume that d|c, or (3) . Then from the theorem above, the
equation ax + by = d has an integral solution. Let us call these x = s and y = t.
Thus, (4) so (5) . Hence, one solution to the
equation ax + by = c is x0 = (6) and y0 = (7) .
We will now show there are infinitely many solutions. If x = x0 and y = y0
is a solution, then so is x = x0 +(b/d)t and y = y0 −(a/d)t are also integer solutions,
for any integer t.
Finally, we show that there are no other solutions other than these.
Suppose that x and y are integers such that ax + by = c. Since ax0 + by0 = c then
(8) .
Equivalently,
(9) .
Dividing both sides by d, we obtain
(10) .
But (a/d, b/d) = 1. Thus, (a/d)|(y0 − y) or (11) . This means that
(12) . Put this value of y into the equation a(x − x0 ) = b(y0 − y),
then (13) .
Problems
1. Which of the following linear Diophantine equations have no solution? For
those with a solution, find all of them.
(a) 2x + 5y = 11 (d) 60x + 18y = 97
(b) 17x + 13y = 100 (e) 1402x + 1969y = 1
(c) 21x + 14y = 147
2. Abby has a lot of plates to buy. She wants to spend exactly P10000 buying
P49 and P53 plates. List all the ways that this can be done.
3. A family orders several packs of red pepper and tomatoes at a total cost of
P839. If red pepper costs P25 per pack and tomatoes cost P18 per pack, how
many packs of each type of vegetable did the family order?
4. A shopper spends a total of P549 for yogurt, which cost P18 each, and veggie
juice, which cost P33 each. What is the minimum number of pieces of grocery
items the shopper could have bought?
5. A store has only P14 and P21 kinds of special paper to sell. What combinations
of these can be used to mail a package requiring exactly
(a) P350 (b) P400 (c) P777
6. At a party, the total cost of a chicken dinner is P110 and of a vegetable dinner
is P80. What can you conclude if the bill is
(a) P7770 (b) P960 (c) P690
7. Find all integer solutions to the following Diophantine equations:
(a) 4389x + 2919y = 21 (b) 212x − 37y = 1 (c) 12x + 57y = 423
(d) Can 1000 be expressed as a sum of two integers, one of which is divisible
by 9 and the other by 12? If so, determine one way.
(e) Can 1000 be expressed as a sum of two integers, one of which is divisible
by 11 and the other by 17? If so, determine one way.
Problems
1. Which of the following linear Diophantine equations have no solution? For
those with a solution, find all of them.
(a) 2x + 5y = 11 (d) 60x + 18y = 97
(b) 17x + 13y = 100 (e) 1402x + 1969y = 1
(c) 21x + 14y = 147
2. Abby has a lot of plates to buy. She wants to spend exactly P10000 buying
P49 and P53 plates. List all the ways that this can be done.
3. A family orders several packs of red pepper and tomatoes at a total cost of
P839. If red pepper costs P25 per pack and tomatoes cost P18 per pack, how
many packs of each type of vegetable did the family order?
4. A shopper spends a total of P549 for yogurt, which cost P18 each, and veggie
juice, which cost P33 each. What is the minimum number of pieces of grocery
items the shopper could have bought?
5. A store has only P14 and P21 kinds of special paper to sell. What combinations
of these can be used to mail a package requiring exactly
(a) P350 (b) P400 (c) P777
6. At a party, the total cost of a chicken dinner is P110 and of a vegetable dinner
is P80. What can you conclude if the bill is
(a) P7770 (b) P960 (c) P690
7. Find all integer solutions to the following Diophantine equations:
(a) 4389x + 2919y = 21 (b) 212x − 37y = 1 (c) 12x + 57y = 423
(d) Can 1000 be expressed as a sum of two integers, one of which is divisible
by 9 and the other by 12? If so, determine one way.
(e) Can 1000 be expressed as a sum of two integers, one of which is divisible
by 11 and the other by 17? If so, determine one way.