Euclidean Algorithm

Theorem (Euclidean Algorithm)

Given a,bZ,b0a,b\in\mathbb{Z},b\not=0, then we can divide aa by bb such that q,r\exists q,r, the quotient and remainder, such that a=bq+ra=bq+r with 0r<b0\le r<|b|. If r=0r=0, bb, is said to be a divisor of aa.

Remark

This algorithm leads to the notion of the Greatest Common Divisor, where d=gcd(a,b)d=gcd(a,b) is the largest number that divided both aa and bb.

Algorithm

The Euclidean (division) algorithm, allows us to find the gcd of any two numbers, a,bZa,b\in\mathbb{Z}. Noting that (a,b)=(b,r)(a,b)=(b,r) then we can recursively repeat the process until we reach a dead end (i.e. ri=0r_{i}=0 for some iteration ii). Suppose the process terminates after k+1k+1 steps then a=qb+rb=q1r+r1rk2=qkrk1+rkrk=(a,b)\begin{align*} a&=qb+r\\ b&=q_{1}r+r_{1}\\ \vdots\\ r_{k-2}&=q_{k}r_{k-1}+r_{k}&r_{k}=(a,b) \end{align*} This implies that x,yZ\exists x,y\in\mathbb{Z} such that rk=ax+byr_{k}=ax+by.

Theorem (1.1)

For any two integers a,ba,b with b0b\not=0 x0,y0Z\exists x_{0},y_{0}\in\mathbb{Z} such that for d=(a,b)d=(a,b) we have ax0+by0=dax_{0}+by_{0}=dIt is clear that there are infinitely many such integers because given one pair x0,y0x_{0},y_{0} we also have a(x0+tb)+b(y0ta)=da(x_{0}+tb)+b(y_{0}-ta)=d tZ\forall t\in\mathbb{Z}.

Theorem (1.6)

For any two integers a,bZa,b\in\mathbb{Z} with b0b\not=0, x0,y0Z\exists x_{0},y_{0}\in\mathbb{Z} such that for d=(a,b)d=(a,b), we have by Theorem 1.1 ax0+by0=dax_{0}+by_{0}=dGiven this information we have that all integer solutions of ax+by=dax+by=d are given by the parameterization x=x0+tbdy=y0tad\begin{align*} x&=x_{0}+\frac{tb}{d}\\\\ y&=y_{0}-\frac{ta}{d} \end{align*} for tZt\in\mathbb{Z}.

Linked from