<<

Definitions and Properties

We show in this tutorial some examples of linear Diophantine . Recall that a Diophantine is a equation with coefficients and variables taking values in the . Our universe here is formed by the integers, Z. It is good to compare with we you have studied in Programming within Operational Research. Claim (Solving Linear Diophantine Equations in two Variables). Let a and b integers, not both 0, and let d = gcd(a, b). The Diophantine equation ax + by = c has solution if and only if d | c.

A particular solution: Since c = qd and d = x0a + y0b by Bezout’s Equality. (p) (p) Then c = qd = qx0a + qy0b, so a solution is x = qx0, y = qy0. Finally to find homogeneous part of the solutions we must find the solution x (h), y (h) of the homogenous equation ax + by = 0, or ax = −by, then (h) b (h) a x = − d n and y = d n, for some integer n. Therefore b a x = x (p) + x (h) = qx − n, y = y (p) + y (h) = qy + n, n ∈ 0 d 0 d Z .

Milagros Izquierdo Barrios Examples on : Diophantine Equations Example 1 For which values of c with 30 ≤ c ≤ 40 has the diophantine equation 18x + 24y = c solution? Calculate the solutions for those values of c.

First of all as gcd(18, 24) = 6, c is a multiple of 6. Then c = 30 or c = 36. (i) Solve 18x + 24y = 30. We have the 30 = 5 × 6 and (h) 24 6 = (−1)18 + (1)24, then q = 5, x0 = −1 and y0 = 1, x = − 6 n = −4n and (h) 18 y = 6 n = 3n. So

(p) (h) (p) (h) x = x +x = 5(−1)−4n = −5−4n, y = y +y = 5(1)+3n, = 5+3n, n ∈ Z

(ii) Solve 18x + 24y = 36. We have the data 36 = 6 × 6 and (h) 24 6 = (−1)18 + (1)24, then q = 6, x0 = −1 and y0 = 1, x = − 6 n = −4n and (h) 18 y = 6 n = 3n. So

(p) (h) (p) (h) x = x +x = (−1)6−4n = −6−4n, y = y +y = (1)6+3n = 6+3n, n ∈ Z

Milagros Izquierdo Barrios Examples on Arithmetic: Diophantine Equations Example 2. Association AMA buys theatre and cinema tickets for its members. Each theatre ticket costs 125 SEK, and each cinema ticket 385 SEK. How many tickets of each kind does AMA buy if AMA pays a total of 8370 SEK. We must solve, if posible, the Diophantine equation 125x + 385y = 8370 First of all as gcd(125, 385) = 5, the equation has solution since 5 | 8370. We have the data 8370 = 1674 × 5 and 5 = (37)125 + (−12)385, then (h) 385 q = 1674, x0 = 37 and y0 = −12, x = − 5 n = −77n and (h) 125 y = 5 n = 25n. So

(p) (h) x = x + x = (1674)5 − 77n = 61938 − 77n, n ∈ Z

(p) (h) y = y + y = (1674)(−12) + 25n = −20088 + 25n, n ∈ Z Since x and y are non-negative, we have  x = 61938 − 77n ≥ 0 y = −20088 + 25n ≥ 0 Then n ≤ 804 and n ≥ 804 and  x = 61938 − 77(804) = 30 y = −20088 + 25(804) = 12

Milagros Izquierdo Barrios Examples on Arithmetic: Diophantine Equations Example 3. Three positive integers t1, t2 and t3 are multiples of 10 and they satisfy the equations t1 + t2 + t3 = 60 and 6t1 + 5t2 + 3t3 = 60. Determine t1, t2 and t3.

Letting t1 = 10x, t2 = 10y and t3 = 10z, we solve the system of Diophantine equations  (1) 10x +10y +10z = 60 (2) 60x +50y +30z = 250 From (1) z = 6 − x − y, setting it in (2) we get the solvable Diophantine equation 30x + 20y = 70 since gcd(30, 20) = 10 and 70 = 7 × 10.

We have the data 70 = 7 × 10 and 10 = (1)30 + (−1)20, then q = 7, x0 = 1 (h) 20 (h) 30 and y0 = −1, x = − 10 n = −2n and y = 10 n = 3n. So (p) (h) x = x + x = 7 − 2n, n ∈ Z (p) (h) y = y + y = −7 + 3n, n ∈ Z z = 6 − x − y = 6 − n, n ∈ Z Since x, y and z are positive, we have   x = 7 − 2n > 0 y = −7 + 3n > 0  z = 6 − n > 0 Then n > 2 and n < 4, thus x = 1, t1 = 10, y = 2, t2 = 20, z = 3, t3 = 30

Milagros Izquierdo Barrios Examples on Arithmetic: Diophantine Equations Example 4. Solve the Diophantine equation 8x + 9y + 10z = 100 As gcd(8, 9, 10) = 1 the equation has solutions. The general solution will depend on two parameters. We set the auxiliary variable w = 8x + 9y. The equation becomes w + 10z = 100, with gcd(1, 10) = 1 and 1 = 1(1) + 0(10). At the same time 100 = 100 × 1. Then the data are q = 100, w0 = 1 and (h) 10 (h) 1 z0 = 0, w = − 1 n = −10n and z = 1 n = n. So

(p) (h) w = w + w = 100 − 10n, n ∈ Z

(p) (h) z = z + z = n, n ∈ Z Setting 8x + 9y = 100 − 10n we get another solvable Diophantine equation since gcd(8, 9) = 1 and 1 divides 100 − 10n for all n ∈ Z. Again 1 = (−1)8 + (1)9 and 100 − 10n = (100 − 10n) × 1 so

(p) (h) x = x + x = −100 + 10n − 9m, n, m ∈ Z

(p) (h) y = y + y = 100 − 10n + 8m, n, m ∈ Z z = n, n ∈ Z It is convenient to control that the solution satisfies the equation:

8(−100+10n−9m)+9(100−10n+8m)+10n = −800+80n−72m+900−90n+72m+10n = 100.

Milagros Izquierdo Barrios Examples on Arithmetic: Diophantine Equations 2 2 Example 5. Solve in Z the equation x − 5xy + 6y = 5 This is equivalent to solve (x − 2y)(x − 3y) = 5. As the only divisors of 5 are ±1 and ±5. The equation is equivalent to the four cases of systems of linear Diophantine equations  x −2y = −5 1. Case 1 With solution x = −13, y = −4 x −3y = −1  x −2y = −1 2. Case 2 With solution x = 7, y = −4 x −3y = −5  x −2y = 1 3. Case 3 With solution x = −7, y = −4 x −3y = 5  x −2y = 5 4. Case 4 With solution x = 13, y = 4 x −3y = 1

Milagros Izquierdo Barrios Examples on Arithmetic: Diophantine Equations