Toolkit 111
Linear Diophantine Equations
Linear Diophantine Equations
Example:
Since
there is no answer.
1) Divide both sides by gcd(15,10).
2) Try to find one x and y that satisfy the equation.
or
General Solution
In General
1) Check gcd(a,b)|n.
2) Divide both sides by gcd(a,b).
3) Find one answer that satisfies
(If finding one example to satisfy a'x+b'y=n' is easy, skip 3rd step.)
5) General Answers:
(coefficient of k cancel out)
Reducing Coefficients (Scaling Trick)
Solution 1
Solution 2
coefficients of k cancel out.