Euclid's Algorithm and Computation of Polynomial GCD's
497
(A3)
In Algorithms C and 5/[, it is assumed that the integer-length (Section
5.2) of an exact quotient of polynomials does not exceed the integer-length of the
dividend. In Algorithm C, it is further assumed that the integer-length of a sum or
difference of polynomials is the maximum of the integer-lengths of the summands,
and that the integer-length of a product does not exceed the sum of the integer-
lengths of the factors.
(A4)
In Algorithm M, it is assumed that the integer-lengths of the given poly-
nomials are small compared to the largest single-word integer fl so that the supply of
single-word primes will not be exhausted. Similarly it is assumed that the number of
terms in the GCD is small compared to ~, so that the required number of primes
can be bounded in a simple and realistic way.
After introducing some basic concepts in Section 5.2, we shall discuss integer
operations in Section 5.3, polynomial operations in Section 5.4, Algorithm C in
Section 5.5, Algorithm P in Section 5.6, and Algorithm M in Section 5.7. Finally we
compare Algorithms C and 5I in Section 5.8.
5.2
BASIC CONCEPTS, Let f and g be real functions defined on a set S. If there
is a positive real number c such that
If(x)l < clg(x)l
for all x ~ S, we write f ,~ g,
and say that f is
dominated
by g. If f ~ g and g ,~ f, we write f ~
g, and say that f
and g are
eodominant.
Finally, if f ~ g but f ~-~ g, we write f < g, and say that. f is
strictly dominated
by g. Clearly codominance is an equivalence relation among the
real functions on S, while strict dominance defines a partial ordering among the
resulting codominance classes. In the author's opinion, this notation and terminology
(from [10]) are significantly superior to the traditional "little-oh" and "big-oh"
notation [11, p. 5].
Since the purpose of the analysis is to provide insight, not detail, we shall con-
sider only a minimum number of independent parameters. Every polynomial F which
is considered in the analysis will be characterized either by its dimension vector
(1, d), defined below, or by its degree in the main variable together with a single
dimension vector for all its coefficients.
First we define the
length
of a nonzero integer to be the logarithm (to some fixed
base such as 2 or 10) of its magnitude. Next we define the
integer-length
of a nonzero
polynomial
F ~ Z[x~, ... , x~]
to be the maximum of the lengths of its nonzero
coefficients; this will be denoted by il(F). Finally, for nonzero
F C Z[Xl, ... , x,]
we define the
dimension vector
(l, d) by the relations 1 = il(F) and d = max (Oi (F)).
For integers it is clear that the length of a product is the sum of the lengths of the
factors. For polynomials, the integer-length of a product may be smaller or larger
than the sum of the integer-lengths of the factors, because of the additive combina-
tion of terms in polynomial multiplication. For example, if A (x) = x -
1, then
A (x)2
=
x 2 _
2x
+ 1, and il(A 2) = log 2 > 2 il (A) = 0. On the other hand, letting
B(x)
= x s+2S+3x
6+4x 5+5x 4+4x 3+3x 2+ 2x+
1, we have A (x )B (x )
=