# On Collins Modular Algorithm for Computing Resultant

Document Sample

```					On Collins Modular Algorithm for Computing Resultant

CS874 Course Project

Yuzhen Xie

Instructed by Marc Mareno Maza

April 30, 2003

1
Overview
•   Goals of the project
•   Significance of the resultant
•   Principles of modular computations in Euclidean domains
•   Principles of modular resultant algorithm of Collins
•   Implementation in Aldor
•   Experimentation and results
•   Annex

2
Goals of the Project
• To understand the modular resultant algorithm
• To have an efficient implementation of the resultant of two
bivariate polynomials
• To experiment the advantage of modular techniques in
computer algebra
• To learn generic programming with Aldor

3
Significance of the resultant
m                      n

• Given two polynomials f(v) =  v g(v) =  v , the resultant of f, g is
i                      i
f ,        g     i                     i
i 0                   i 0
defined as the determinant of the Sylvester matrix:

 fm      fm  1    ...       f0                                       
          fm      fm  1     ...           f0                         
                                                                         n
                                                                     
                                                                      
fm        fm  1                ...   f0 
S
 gn      gn  1    ...                     g0                         
                                                                      
          gn      gn  1     ...                 g0                      m
                                                                     
                                                                      

                                           gn   gn  1       ...   g0 

•   det(S) = 0 if and only if f and g have a common divisor of positive degree.
So, if f, g (Z[u])[v] then res(f,g) Z[u] and give the values of u for which f,
g have common roots

4
Principles of modular computations
• To keep under control the size of the coefficients
• φp: Z  Z/pZ is a ring homomorphism.
That is,
φp(ab) = φp(a) φp(b) , and
φp(a + b) = φp(a) + φp(b)
Let A be a square matrix over Z, since det(A) is made from additions
and multiplications of Z, φp(det(A)) = det(φp(A)).
p
if |det(A)| <   , then φp(det(A)) = det(A).
2
Therefore, det(φp(A)) = det(A)

5
Principles of modular computations (cont’d)
• For this to work, we need a bound. We have the Hadamard bound:
n
det( A)  n A
2

•    To use “Small Primes” and machine arithmetic, we can use several
modular reductions, p , …, p and recombine the results with the CRA
1       n
(Chinese Remaindering Algorithm)

6
The Modular Resultant Algorithm of Collins
(in a case of two bivariate polynomials)
f(u)(v), g(u)(v) and prime p = p1, …, pn such that p does not
divide gcd(lc(f), lc(g)), and p1…pn > Coefficient bound C

p(f(u)(v)) and p(g(u)(v))

Degree bound k, and a = a1, …, ak+1 (ai Z/p, and lc(fp), lc(gp)  0 at u = a)
p(f(u=a)(v)) and p(g(u=a)(v))

Compute the resultant r of p(f(u=a)(v)) and p(g(u=a)(v))

r1, …, rk+1 (ri Z/p)
Compute the resultant of p(f(u)(v)) and p(g(u)(v)) by CRA

rp (u), …, rp (u) (rp (u) Z/p1[u], …, rp (u)Z/pn[u] )
1           n        1                 n

Compute the resultant of f(u)(v) and g(u)(v) by CRA

7
The Modular Resultant Algorithm of Collins
(cont’d)
• Coefficient bound:
2(m+n)!dnem, where d = max norm (fi) and e = max norm (gi)

• Degree bound:
degreeu(resv(f.g)) <= degu(f)degv(g) + degu(g)degv(f)

8
Implementation in Aldor (1)

//This package computes bounds and helps choosing primes
// Z = = Integer, M = = MachineInteger
BivariateUtilitiesPackage(U: UnivariatePolynomialCategory(Z), _
V: UnivariatePolynomialCategory(U)): with {

resultantCoefficientBound: (V, V) -> Z;

resultantDegreeBound: (V, V) -> Z;

primeBad?: (V, V, M) -> Boolean;

}

9
Implementation in Aldor (2)
// We compute resultant of biv. poly. over a Z/pZ
ResultantOfBivariatePolynomialsOverSmallPrimeField(
Kp: SmallPrimeFieldCategory,
Up: UnivariatePolynomialCategory(Kp),
Vp: UnivariatePolynomialCategory(Up)): with {

evaluationResultant: (Vp, Vp, Z) -> Up;
// the third argument is the degree bound
// After evaluation, we use the generic algorithm
// for resultants in Z/pZ[v]
// Then we interpolate them with CRA

evaluationReduction: (Vp, Kp) -> Up;

}
10
Implementation in Aldor (3)
ModularResultantOfBivariatePolynomials(
U: UnivariatePolynomialCategory(Z),
V: UnivariatePolynomialCategory(U)): with {

modularResultant: (V, V, algorithm: Z == 1) -> U;
// Top level function

combine: (DUP(Z), Z, DUP(M), M) -> DUP(Z);
// Use the CRA for recovering the coefficients
// the resultant

resultant: (V, V, M, Z, algorithm: Z == 1) -> DUPM;
// Performs the reduction and calls the previous
// package
}
11
Experimentation and results
CRA-CRA: modular resultant algorithm of Collins
Generic: essentially the computation of the determinate of the Sylvester
matrix, without taking into account the properties of coefficient ring.
CRA-Generic: we use modular computations for the coefficients, but the
generic method in Z/pZ[u][v].

* Experimentation on a PC Pentium IV 2 Gig Hz

** Results for polynomials with very large degrees
Degree of u, v Resultant degree   CRA-CRA       CRA-Generic    Generic
(10,30)          600                87          352          492
(20,25)         1000               136          462          635
(20,50)         2000               1444          ?           > 2h
(30,50)         3000               2780          ?            ?

12
Conclusion Remarks
• Now we can compute resultants of polynomials with larger degrees in
libalgebra (Aldor) than before.
• Consequently we should be able to solve larger polynomial systems.
• Our experimentation shows that a mixed method (CRA-Generic) is
interesting for resultants of polynomials with medium degree.

13

```
DOCUMENT INFO
Shared By:
Categories:
Stats:
 views: 6 posted: 4/6/2010 language: English pages: 13