Professional Documents
Culture Documents
give us a way to express 1 as a linear combination How to nd the rest of the solutions. There of 7 and 4. Since is a standard technique in mathematics to nd all the solutions to an equationwhether it be a 7 = 14+3 Diophantine equation or a dierential equation or whatever kind of equationrst nd one solution 4 = 13+1 to an equation, which we can call a particular solutherefore tion, then nd the rest of the solutions in terms of the particular solution. 1 = 4 3 = 4 (7 4) = 2 4 1 7. Suppose we want to nd all the solutions to the Diophantine equation We can scale that up by a factor of 100 to get a solution of 100 = 7x + 4y, namely ax + by = c and weve already found one solution x = x0 , y = y0 using the Euclidean algorithm. Then we know that Thus, x = 100 and y = 200 is a solution to the ax + by = c. Subtract the equation ax + by = c 0 0 0 0 equation 100 = 7x + 4y. Since z = 100 x from the equation ax + by = c to get the equation y, therefore z = 0. Unfortunately, that doesnt directly help us with the hundred fowls problem, a(x x0 ) b(y y0 ) = 0. since x cant be negative there. Nonetheless, what weve done generalizes to give us the rst step to Introduce new variables X and Y , and let X = x x0 and Y = y y0 so that the equation reads solving a linear Diophantine equation. How to nd one solution. We already know aX + bY = 0. how to nd a solution to the equation This is a simpler equation because the constant c ax + by = d doesnt appear in it. In fact, its a homogeneous equation. A homogeneous equation is one in which when d = (a, b), the greatest common divisor of all the terms have the same degree, in this case, a and b. That solution we can nd using the Eu- theyre all degree 1. In general, homogeneous equaclidean algorithm. So, if we want to nd a solution tions are easier to work with than nonhomogeneous to ax + by = c, and d|c, just take the solution we equations. In this case, we can easily solve the Dioknow for ax + by = d and scale it up by a factor of phantine equation aX + bY = 0 Let d = (a, b), and d/c. divide by d to get the equation a X + b Y = 0. Let d For example, back in an earlier section, the Eu- a = a/d and b = b/d, so that we needdto solve the clidean algorithm gave us the greatest common equation a X + b Y = 0 where a and b are reladivisor (54, 21) = 3, and the process gave us tively prime. The solutions are (X, Y ) = (b t, a t) 3 as a linear combination of 54 and 21, namely where t is an any integer. Well call t a parameter 2 54 + (5) 21 = 3. So, if we need to solve in the solution. Then our nal solution is the equation 54x + 21y = 51, since 51/3 = 17, just scale up the solution x = 2, y = 5 by a factor (x, y) = (X + x0 , Y + y0 ) of 17 to get x = 34, y = 85 as a solution to the = (b t + x0 , a t + b0 ) equation 54x + 21y = 51. b = ( d t + x0 , a t + y0 ). d Thus, we can nd one solution to the linear Diophantine equation ax + by = c if the GCD (a, b) For an example, consider the equation divides c. On the other hand, if the GCD (a, b) 54x + 21y = 51. doesnt divide c, then there is no solution. 2 100 = 200 4 100 7.
Weve already found one particular solution In order that 100 + 4t be nonnegative, t needs (x0 , y0 ) = (34, 85). Now, since (a, b) = (54, 21) = to be greater than or equal to 25. In order that 3 = d, therefore, the general solution is 200 7t be nonnegative, t needs to be less than 28. And in order that 3t be nonnegative, t needs to be b (x, y) = ( d t + x0 , a t + y0 ) greater than or equal to 0. Thus, t has to be in the d 21 54 = ( 3 t + 34, 3 t + 85) range 25 t 28. = (7t + 34, 18t + 85) That gives us the four solutions to the hundred where t is any integer. fowls problem. We can summarize this investigation as a theorem. t x y z 25 0 25 75 Theorem. Let a and b be nonzero integers with 26 4 18 78 greatest common divisor d = (a, b). Then the Dio27 8 11 81 phantine equation 28 12 4 84 ax + by = c has a solution if and only if d|c. In that case, if (x, y) = (x0 , y0 ) is one solution, then all the other solutions are of the form
b (x, y) = (x0 + d t, y0 a t) d
where t is any integer. Back to the hundred fowls. We found one solution to the Diophantine equation 100 = 7x+4y, namely, the particular solution x = x0 = 100 and y = y0 = 200. We need to nd the rest so that we can nd one where x, y, and z are all positive. According to the theorem we just proved, the rest of the solutions are of the form
b (x, y) = (x0 + d t, y0 a t) d
where d = (a, b) = (7, 4) = 1 and t is any integer, so (x, y) = (100 + 4t, 200 7t) And since z = 100 x y, therefore z = 100 (100 + 4t) (200 7t) = 3t. Now, since the problem requires that each of x, y, and z be nonnegative (and positive would be even better), we need to nd t so that each of 100 + 4t, 200 7t, and 3t is nonnegative. 3