494
w.S.
BROWN
while G*, Hi*, and H2* [see (37)] are the unique polynomials (in ~[Xa , ""
, xv-,])
with eoeffieients (in 9) of degree (in
Xv)
less than n, such that
G* ~
G (i) rood (xv -
bi),
H,* ------ //~) rood (x, -
bi),
(53)
H2*
~
"
(i)
1/12 mod (x, -
b~),
fori=
1,...,n.
Now as soon as e = d, weseefrom (51)and (53) that (38
holds.
When we also achieve
n > , = max (0v (0), o~ (/it,), 0~ (/72) ),
(54)
where 0v denotes the degree in x,, it follows that (40) holds. To obtain the final
results, we then use (41) and (42) as in Algorithm ~[.
Although the preceding discussion is sufficient in principle to define Algorithm P,
the interested reader may find it instructive to compare the following detailed
description with the earlier presentation (Section 4.3) of Algorithm M.
(1)
If v
1, then F,
and F'
=
'
2 are elements of 9 invoke Algorithm U to comput
G' = gcd(F,', F(), and return. Otherwise use Algorithm U to compute 0 = eont(Fl' )
c2 = cont(F2'), c = gcd(o, c2).
(2)
Set F~ =
Fl'/C,, F~ = F2'/c2.
(3)
Set fl = lc(F,), f~ = lc(F2), 0 = gcd(f,, f2).
(4)
Set n = 0, e = min (~(F,), O(F~)).
(5)
Set ~, = 0~(0) +
O~(F,), ~2 = 0~(0) + O~(F2),
~ = max(p,, P2). It follows
that h = 0~ (f,) = 0~ (G) + 0v (/4,), ~2 = 0~ (f~) = 0~ (G) + 0~. (/t2), and v > ,.
(6)
Let b be a new element of Z, such that
(x~ -
b) ~ fir2.
If Zp is exhausted,
then p is too small and the algorithm fails.
(7)
Set 0 = 0 mod(x~ --
b), IP~ = OF,
mod(x, -
b), F2 = 0F2 mod(x~ -- b).
(8)
Invoke Algorithm P reeursively to compute G = g" ged
(F~, F2), lq, = IPl/G,
and tq2 = F2/G, all in
9b[xl, "" ,
X~_l] =
Zp[xi,
... , xv ,]. These relations imply
thatle(G)
= g, andl)(G) > d.
(9)
If it(G) = 0, set G =
1, Hi
=
Fx,
He = F2, and skip to Step (15). If
i} (G) > e, go back to Step (6). If i} (G) < e, set n = 0, e = ~ (G).