13.07.2015 Views

Diophantine equations for integers.

Diophantine equations for integers.

Diophantine equations for integers.

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The Euclidean Algorithm and<strong>Diophantine</strong> EquationsMath 149BurgerCali<strong>for</strong>nia State University, Fresno


Greatest Common Divisord is the greatest common divisor of<strong>integers</strong> a and b if d is the largest integerwhich is a common divisor of both a and b.Notation: d gcd(a, b)Example: ±2, ±7, and ±14 are the only<strong>integers</strong> that are common divisors of both42 and 56. Since 14 is the largest,gcd(42, 56) 14.


Use of the gcdReducing fractionsEx.42 143 3 56 144 4However: not all fractions are easily reduced!Ex.80518633


The Division Algorithm(proof on p. 99)For <strong>integers</strong> a and b, with a > 0, thereexist <strong>integers</strong> q and r such thatb qa r and 0 r < a.


Euclidean Algorithm(p. 102)To find gcd(a, b) where b < a:Divide b into a and let r 1 be the remainder.Divide r 1 into b and let r 2 be the remainder.Divide r 2 into r 1 and let r 3 be theremainder.Continue to divide the remainder into thedivisor until you get a remainder of zero.gcd(a, b) the last nonzero remainder.


Ex) Find gcd(8633, 8051)8051 97 83 83 8633 97 8989


Theorem(3.2.2, p.105)For any nonzero <strong>integers</strong> a and b, thereexist <strong>integers</strong> x and y such thatgcd(a, b) ax + by.Here’s how you use the EuclideanAlgorithm to write gcd(8633, 8051) as alinear combination of 8633 and 8051.


• Use the Euclidean Algorithm to findgcd(8633, 8051).1 R.5828051 863313 R.485582 80511485 582R.975 R.097 485


• Solve each division problem, except thelast one, <strong>for</strong> the remainder (r a – bq) .Take note of the quotient in each solution.1 R.5828051 8633 582 8633 1805113 R.485582 8051 4858051135821 R.97485 582 97 582 14855 R.097 485


• Use these <strong>equations</strong>in reverse order to findthe linear combination.1: 582 8633 180512: 4858051135823: 97 582 148597 5821485582 1( 805113582)14 58218051 14 ( 8633 18051) 1805114 8633 ( 15) 8051Eq. 3Eq. 2Simp.Eq. 1Simp.


Ex) Now use the Euclidean Algorithm to writegcd(486, 434) as a linear combination of 486and 434.


A <strong>Diophantine</strong> equation is any equation <strong>for</strong>which you are interested only in theinteger solutions to the equation.A linear <strong>Diophantine</strong> equation is a linearequation ax + by c with integercoefficients <strong>for</strong> which you are interestedonly in finding integer solutions.Math 138/Burger


Theorem 1For any nonzero <strong>integers</strong> a and b, thereexist <strong>integers</strong> x* and y* such thatgcd(a,b) ax* + by*.(Proof <strong>for</strong> Math 133!)When you have a linear <strong>Diophantine</strong> equation to solve,the first question you should ask about that <strong>Diophantine</strong>equation is whether or not the equation admits solutionsin <strong>integers</strong>.The following theorem tells you how to find the answer tothis question.


Theorem 3If gcd(a,b) c, then the linear <strong>Diophantine</strong>equation ax + by c has no solution.Proof: Let d gcd(a,b). Then there are<strong>integers</strong> r and s such that dr a and ds b.By way of contradiction, assume thatax + by c does have a solution x o , y o .Then c ax o + by o drx o + dsy o .But this says that d|c since c d(rx o + sy o ).Since this is a contradiction, the<strong>Diophantine</strong> equation has no solution.


Theorem 4If gcd(a,b)│c, then the linear <strong>Diophantine</strong>equation ax + by c has a solution.Proof: Let d gcd(a,b). Since d|c, dp c<strong>for</strong> some integer p.By Theorem 1, there are <strong>integers</strong> x* and y*such that d ax* + by*.So c dp a(x*p) + b(y*p).Hence ax + by c has a solution, namelyx o x*p and y o y*p.


Q. If a linear <strong>Diophantine</strong>equation ax + by c doesadmit a solution (since gcd(a,b)│c),then how do you find it?


Using Division and Euclidean Algorithms toSolve <strong>Diophantine</strong> EquationsTo solve ax + by c:1. Use the Division Algorithm to find d=gcd(a,b).2. Use the Euclidean Algorithm to find x* and y*such that d ax* + by*.3. Find p such that c dp. (p exists since d │c.)4. Then x o x*p and y o y*p are solutions since c dp a(x*p) + b(y*p).


Find a solution to the <strong>Diophantine</strong> equation172x + 20y 1000.• Use the Division Algorithm to findd gcd(172, 20).


• Use the Euclidean Algorithm to find x* andy* such that d ax* + by*.Solve <strong>for</strong> the remainder.8 R.1220 172 12 172 120 Eq.11 R.812 20 820 112 Eq.21 R.4812 41218Eq.3


Using these<strong>equations</strong> we get:12 172 120 Eq.1820112 Eq.241218 Eq.341218 Eq.34 12 1(20 112) Eq.24212120 Simp.4 2(172 820) 120 Eq.142172( 17)20Simp.So x* 2 and y* -17


Solve 172x + 20y 10004 2 172 (1 7)20• Find p such that c dp.d gcd(172,20) 4c 1000so 1000 4·250.


Solve 172x + 20y 10004 2 172 (1 7)20• Then x o x*p and y o y*p are particularsolutions since c dp a(x*p) + b(y*p).1000 4·250 [ 2 172 ( 17)20]·2501000 172·(500) + 20·(- 4250)So a ‘particular’ solution isx o 500 and y - 4250.


Theorem 4If the linear <strong>Diophantine</strong> equationax + by c does have a solution, thenall such solutions are given byx x o + (b/d)t and y y o –(a/d)twhere d gcd(a,b), x o , y o is aparticular solution to the equation andt ranges over the <strong>integers</strong>.


Solve 172x + 20y 1000• Then all solutions are x x o + (b/d)ty y o –(a/d)t where t is an integer.andFrom the equation 172x + 20y 1000,we see that a 172 and b 20.From our previous work, x o 500,y o - 4250, and d 4.So the solutions, in <strong>integers</strong>, arex 500 + 5t and y - 4250 – 43twhere t ranges over the <strong>integers</strong>.


ExampleFind all positive solutions to the<strong>Diophantine</strong> equation 172x + 20y 1000.we need to find those values of t <strong>for</strong> whichx 500 + 5t > 0 and y - 4250 – 43t > 0.


Find all positive integer solutions to the equation172x + 20y 1000.All solutions are x 500 + 5t and y - 4250 – 43t.x 500 + 5t > 0 t > - 100.y - 4250 – 43t > 0 t < - 98.83…Since t must be an integer, t -99.So - 100 < t - 99.


Find all positive integer solutions to the equation172x + 20y 1000.All solutions are x 500 + 5t and y - 4250 – 43t.We just found that - 100 < t - 99.Since t must be an integer,- 100 < t - 99 t -99. So there isonly one positive solution to the<strong>Diophantine</strong> equation, namelyx 500 + 5t ··· 5 andy - 4250 – 43t ··· 7.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!