498
w.s. BROWN
For addition and subtraction it is easy to show that
Ti (x3 ~- xl ::i= x2) ~
ll + 12,
(60)
while for classical multiplication
T1 (x3 ~
XlX2 ) ~'~ lll2.
(61)
Turning to division and assuming ll > 12, we find
Ti (x3 ~--
xl/x2
, x4 ~
Xl
mod xe) ~ l: (11 -
le ),
(62)
since this involves essentially the same work as computing the product
xex3.
In studying the computation of x3 = gcd(Xl, x:) by Euclid's algorithm (Section
1.4), we again assume 11 > le, and we view each division step as a sequence of sub-
traction steps. Since the total number of subtraction steps is bounded by 2 (11 -
13),
and the work in each of these steps is dominated by l:, we have
T1 (x3 ~
gcd (Xl,
x~) ) ~
l~(ll -- 13).
(63)
The bound is achieved when the IRS is a Fibonacci sequence.
Finally we consider the Chinese remainder algorithm (CRA) for integers, using
the notation of Section 4.8. Let l~ and le be the lengths of ~n~ and m2, respectively.
By (63), the time to compute c in Step (1) is codominant with
l~le.
Since Steps
(2) and (3) can also be performed within this bound, we have
T, (CRA) ~
l~le.
(64)
5.4
POLYNOMIAL OPERATIONS. Let Tp(op) denote the maximum computing
time for the polynomial operation op, and let Fi denote a polynomial in v variables
with dimension vector (li, di), where l~ > 0. Clearly the number of terms in F~ is at
most (d~ ~
1)~, and this bound is
not
codominant with d~ ".
For addition and subtraction it is easy to show that
Tp (F3 ~- F1 ± F~) ~
ll (d~ +
1 )~ -/- le (d~ +
1 )~,
(65)
while for classical multiplication
Te (F3 ~-- FiFe ) ~
l~le
(dl -~- 1 )v (de +
1 )~.
(66)
Turning to division, if Fel F1, we find
Te (F3 ~
F1/F~ ) ~
lel3
(de +
1 )" (d3 +
1 )*',
(67)
since this involves essentially the same work as computing the product
F2F3.
If Fe ~ F1, division yields to pseudo-division (Section 2.3), which is more expen-
sive because of coefficient growth. In this case, suppose that F1 and Fe have degrees
dl and de, respectively, in the main variable, and that their coefficient polynomials
(in the v -- 1 auxiliary variables) have dimension vectors bounded by (l, d). Let
(l', d') bound the dimension vectors of the polynomial coefficients of the pseudo-
quotient, Q, and note that the degree of Q in the main variable is ~ = d~ -
de.
Since pseudo-division (PDIV) involves essentially the same work as computing
the product
QFe,
we have by (66)
T~(PDIV) ~
(~ + 1)(d2 +
1)U'(d +
1)~-~(d' + 1) ~-~.
(68)
Journal of the Association for Computing Machinery, Vol. 18, No. 4, October 1971