5

I'm doing a bit of extra reading on the Extended Euclidean Algorithm and had a side-thought that I couldn't find an answer to in the book.

I understand that the Extended Euclidean Algorithm can express the GCD of two numbers as a linear combination of those two numbers.

My question is, is the linear combination acquired unique? (My gut is telling me that it not, but I'd like some verification as I cannot produce a proof of uniqueness).

If the answer is 'No', then my follow-up question is "What is so special about the specific linear combination acquired by the EEC?"

Trogdor
  • 10,331

3 Answers3

6

Given two integers $a$ and $b$, the Extended Euclidean algorithm calculates the $\gcd$ and the coefficients $x$ and $y$ of Bézout's identity: $ax+by=\gcd(a,b)$. These coefficients are not unique (see linked article).

The specific coefficients created by the algorithm satisfy these conditions: $$|x|<|\frac{b}{\gcd(a,b)}|$$ $$|y|<|\frac{a}{\gcd(a,b)}|$$

user26857
  • 52,094
4

The Extended Euclidean Algorithm finds the solution closest to the origin.

lhf
  • 216,483
  • 1
    See for instance https://www.jstor.org/stable/10.4169/amer.math.monthly.120.06.562 – lhf Nov 13 '18 at 11:00
1

If there is one solution $(x,y)$ of the linear diophantine equation $ax+by=c$ then there are infinitely many, given by $(x-\dfrac b{\rm{gcd}(a,b)}t,y+\dfrac a{\rm{gcd}(a,b)}t)$ for any integer $t$.

There will be a solution at all if and only if $c$ is a multiple of the $\text{gcd}$.