



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Linear Diophantine equations, a type of equation where the solutions are required to be integers. the theorem that determines the existence of solutions based on the greatest common divisor of the coefficients and the constant term. Various examples are provided to illustrate the concepts, including a three-variable equation. The document also discusses how to find particular solutions using the Extended Euclidean algorithm.
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!




A Diophantine problem is one in which the solutions are required to be integers. Abusing terminology, I’ll refer to Diophantine equations, meaning equations which are to be solved over the integers. For example, the equation x^3 + y^3 = z^3 has many solutions over the reals. Here’s a solution:
x = 1, , y = 1, z = 3
However, this equation has no nonzero integer solutions. This is a special case of Fermat’s Last Theorem. On the other hand, the following equation has infinitely many integer solutions:
9 x + 100y = 1.
(− 11 , 1) and (89, −8) are examples of solutions. In this section, I’ll look at equations like the last one. They’re called linear Diophantine equations.
Theorem. Let a, b, c ∈ Z. Consider the Diophantine equation
ax + by = c.
(a) If (a, b) 6 | c, there are no solutions.
(b) If (a, b) = d | c, there are infinitely many solutions of the form
x = x 0 +
b d
t, y = y 0 −
a d
t.
Here (x 0 , y 0 ) is a particular solution, and t ∈ Z.
If you’ve had a course in differential equations, you may have seen something like this. x =
b d
t and
y = −
a d
t give a general solution to the homogeneous equation
ax + by = 0.
(x 0 , y 0 ) is a particular solution to ax + by = c. Their sum gives a general solution to the given (nonho- mogeneous) equation. Before I give the proof, I’ll give some examples, and also discuss the three variable equation ax+by+cz = d.
Example. Solve 6x + 9y = 21.
Since (6, 9) = 3 | 21, there are infinitely many solutions. Divide the equation by 3 to get
2 x + 3y = 7.
By inspection, x = 2 and y = 1 is a particular solution. Hence, the general solution is
x = 2 + 3t, y = 1 − 2 t.
For example, setting t = 5 produces the solution x = 17, y = −9.
In general, you may not be able to see a particular solution by inspection. In that case, you can use the Extended Euclidean algorithm to generate one. We’ll see how to do this in examples that follow.
Example. Solve 6x + 9y = 5.
Since (6, 9) = 3 6 | 5, the equation has no solutions.
Example. Find all the solutions (x, y) to the following Diophantine equation for which x and y are both positive. 11 x + 13y = 369.
(11, 13) = 1 | 369, so there are solutions. It is too hard to guess a particular solution, so I’ll use the Extended Euclidean algorithm:
13 - 6 11 1 5 2 5 1 1 2 0
Matching this with the given equation 11x + 13y = 369, I see that (x, y) = (2214, −1845) is a particular solution. The general solution is
x = 2214 + 13t, y = − 1845 − 11 t.
I want solutions for which x and y are both positive. So
2214 + 13t > 0 , so t > −
− 1845 − 11 t > 0 , so t < −
The integers which satisfy both of these inequalities are t = − 170 , − 169 , −168. Here are the values of x and y:
t x y − 171 − 9 36 − 170 4 25 − 169 17 14 − 168 20 3 − 167 43 − 8
The solutions are (x, y) = (4, 25), (17, 14), and (20, 3).
The requirement that the solutions be positive can come up in real-world problems.
Example. Phoebe buys large shirts for $18 each and small shirts for $11 each. The shirts cost a total of $1188. What is the smallest total number of shirts she could have bought?
2(4x + 7y) + 5z = 11. Let w = 4x + 7y. 2 w + 5z = 11. w = −22 and z = 11 is a particular solution. So
w = −22 + 5s and z = 11 − 2 s.
Then 4 x + 7y = w = −22 + 5s. x = −44 + 10s and y = 22 − 5 s is a particular solution. The general solution is
x = −44 + 10s + 7t y = 22 − 5 s − 4 t z = 11 − 2 s
A general linear Diophantine equation has the form
a 1 x 1 + · · · anxn = c.
There are solutions if (a 1 ,... an) | c. If there is a solution, it will in general have n − 1 parameters — exactly as you’d expect from linear algebra.
Here’s the proof of the theorem for the two-variable case.
Proof. (two variable case) Consider the linear Diophantine equation
ax + by = c.
Case 1. Suppose (a, b) 6 | c. If x and y are solutions to the equation, then
(a, b) | ax + by = c.
This contradiction shows that there cannot be a solution.
Case 2. Suppose (a, b) | c. Write c = k(a, b) for k ∈ Z. There are integers m and n such that
am + bn = (a, b).
Then amk + bnk = (a, b)k = c. Hence, x = km, y = kn, is a solution. Suppose x = x 0 , y = y 0 , is a particular solution. Then
a
x 0 +
b d
t
y 0 −
a d
t
ab d
t −
ab d
t + (ax 0 + by 0 ) = 0 + c = c.
This proves that x = x 0 +
b d
t, y = y 0 −
a d
t is a solution for every t ∈ Z. Finally, I want to show that every solution has this form. Suppose then that (x, y) is a solution. Then ax + by = c and ax 0 + by 0 = c imply
a(x − x 0 ) + b(y − y 0 ) = c − c = 0.
Therefore, a (a, b) (x − x 0 ) +
b (a, b) (y − y 0 ) = 0,
b (a, b) (y − y 0 ) = −
a (a, b) (x − x 0 ).
Now b (a, b)
divides the left side, so it divides the right side. However,
a (a, b)
b (a, b)
= 1. Therefore,
b (a, b)
∣ (^) x − x 0 , or x − x 0 = t · b (a, b)
for some t ∈ Z.
Thus, x = x 0 + t ·
b (a, b)
Substitute x − x 0 = t ·
b (a, b)
back into the last x-y equation above:
b (a, b)
(y − y 0 ) = −
a (a, b)
(x − x 0 )
b (a, b)
(y − y 0 ) = −
a (a, b)
t ·
b (a, b) y − y 0 = t · a (a, b) y = y 0 − t ·
a (a, b)
Thus, x = x 0 + t · b (a, b)
and y = y 0 − t · a (a, b)
©^ c2019 by Bruce Ikenaga 5