Euclid's Algorithm and Computation of Polynomial GCD's
479
not exactly representable in a computer, and any use of finite precision approxima-
tions can make it impossible to test whether one polynomial divides another, or
even to determine the degree of a polynomial. Although there may be special
situations in which these obstacles can usefully be attacked, it is clear that they
cannot be overcome in any general way.
1.2
APPLICATIONS. The problem of computing GCD's has recently received
considerable attention because of the need to simplify rational numbers (quotients
of integers) and rational functions
(quotients of polynomials) in systems for
mechanized algebra [2, 12]. However, Euclid's algorithm is also intimately connected
with continued fractions [1, pp. 316-320], Diophantine equations [1, p. 303],
bigradients [3, 4], Sturm sequences [5, Ch. 7], and elimination theory [5, Ch. 12]
(including resultants and discriminants).
1.3
BASIC CONCEPTS. Before proceeding further, let us review some basic con-
cepts [6, Ch. 3]. In an integral domain, divisors of unity are called
units,
and ele-
ments which divide each other are called
associates;
clearly, the ratio of two asso-
ciates is a unit. In a field, all nonzero elements are units; in the domain of integers,
however, the only units are 1 and -1.
An element of an integral domain is said to be
irreducible
if its only divisors are
units and associates. An integral domain in which every element can be represented
uniquely (up to associativity) as a product of irreducibles is called a
unique fac-
torization domain.
The relation of ass0ciativity is an equivalence relation, and can therefore be used
to decompose an integral domain into
associate classes.
It is often convenient to
single out one element of each associate class as a canonical representative, and
define it to be
unit normal.
In the domain of integers, all nonnegative integers are
unit normal. In a field, since all nonzero elements are units, only 0 and 1 are unit
normal. In a domain of polynomials, those with unit-normal leading coefficients
are unit normal.
Let al, • • • , an be given nonzero elements of an integral domain. Then g is called
the
greatest common divisor
(GCD) of al, • • • , an if and only if
(a)
g divides al, " • , as,
(b)
every divisor of al, • • • , as divides g, and
(c)
g is unit normal.
In a unique factorization domain, there is always a unique GCD g = gcd (al, • • • ,
an). Ifg = 1, we say that al,
"
"
•
,
an are
relatively prime.
1.4
THE ALGORITHM FOR INTEGERS. Let a~ and a2 be positive integers with
al _> a2, and let gcd (al, as) denote their (positive) greatest common divisor. To
compute this GCD,
Euclid's algorithm
constructs the
integer remainder sequence
(IRS) al, a~, • .. , ak, where ai is the positive remainder from the division of ai-~
by a~_~, for i = 3, • • • , k, and where ak divides ak_~ exactly. That is,
ai = al-2 -- qiai-1,
0 < ai
~ a~-l,
i = 3, ... , k,
(1)
and ak I ak-1. From this it is easy to see that gcd (al, a~) =gcd (as, a3)
.....