Euclid's Algorithm
Table of Contents
1. Diophantine Equations
Let
We show there exist solutions iff
1.1. Lemma 1
if
Proof:
Suppose for a contradiction there does exist a solution, and let
Factoring (1):
Which shows
1.2. Lemma 2
There exists a solution to (1) if
Proof:
We have
Then a solution exists to (1) iff there exists some
First, note that
If
It's commonly known that since
And hence this x is a solution to:
Rearranging:
And therefore:
Where y is
1.3. Lemma 3
If there exists one solution to
Proof:
Consider solutions to:
Setting
Is also a solution given
Where
2. Euclid's Algorithm
We can express
2.1. Example
Express gcd(1442, 980) as a linear combination of 1442 and 980.
First we obtain gcd(1442, 980) using Euclid's algorithm:
Hence gcd(1442, 980) = 14. Now we take the penultimate equation and rearrange to make 14 the subject:
And thus we arrive at the linear combination.