1 on collins modular algorithm for computing resultant cs874 course project yuzhen xie instructed by...

13
1 On Collins Modular Algorithm for Computing Resultant CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003

Upload: ella-greer

Post on 21-Jan-2016

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 On Collins Modular Algorithm for Computing Resultant CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003

1

On Collins Modular Algorithm for Computing Resultant

CS874 Course Project

Yuzhen Xie

Instructed by Marc Mareno Maza

April 30, 2003

Page 2: 1 On Collins Modular Algorithm for Computing Resultant CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003

2

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

Page 3: 1 On Collins Modular Algorithm for Computing Resultant CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003

3

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

Page 4: 1 On Collins Modular Algorithm for Computing Resultant CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003

4

Significance of the resultant

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

• 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

m

i

vfi

i

0

n

i

vgi

i

0

01nn

01nn

01nn

01mm

01mm

01mm

ggg

ggg

ggg

fff

fff

fff

S

...

...

...

...

...

...

n

m

Page 5: 1 On Collins Modular Algorithm for Computing Resultant CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003

5

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)).

if |det(A)| < , then φp(det(A)) = det(A).

Therefore, det(φp(A)) = det(A)

2

p

Page 6: 1 On Collins Modular Algorithm for Computing Resultant CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003

6

Principles of modular computations (cont’d)

• For this to work, we need a bound. We have the Hadamard bound:

• To use “Small Primes” and machine arithmetic, we can use several modular reductions, p

1, …, p

n and recombine the results with the CRA

(Chinese Remaindering Algorithm)

AnAn

2)det(

Page 7: 1 On Collins Modular Algorithm for Computing Resultant CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003

7

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)

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

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

rp1(u), …, rp

n(u) (rp

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

n(u)Z/pn[u] )

Page 8: 1 On Collins Modular Algorithm for Computing Resultant CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003

8

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)

Page 9: 1 On Collins Modular Algorithm for Computing Resultant CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003

9

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;

}

Page 10: 1 On Collins Modular Algorithm for Computing Resultant CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003

10

Implementation in Aldor (2)

// We compute resultant of biv. poly. over a Z/pZResultantOfBivariatePolynomialsOverSmallPrimeField(

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;

}

Page 11: 1 On Collins Modular Algorithm for Computing Resultant CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003

11

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

}

Page 12: 1 On Collins Modular Algorithm for Computing Resultant CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003

12

Experimentation and results

CRA-CRA: modular resultant algorithm of CollinsGeneric: 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 degreesDegree 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 ? ?

Page 13: 1 On Collins Modular Algorithm for Computing Resultant CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003

13

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.