130 likes | 348 Views
On Collins Modular Algorithm for Computing Resultant. CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003. Overview. Goals of the project Significance of the resultant Principles of modular computations in Euclidean domains
E N D
On Collins Modular Algorithm for Computing Resultant CS874 Course Project Yuzhen Xie Instructed by Marc Mareno Maza April 30, 2003
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
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
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 n m
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)
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, p1, …, pn and recombine the results with the CRA (Chinese Remaindering Algorithm)
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 thatp does not divide gcd(lc(f), lc(g)), andp1…pn > Coefficient bound C p(f(u)(v)) and p(g(u)(v)) Degree bound k, and a = a1, …, ak+1 (aiZ/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 (riZ/p) Compute the resultant of p(f(u)(v)) and p(g(u)(v)) by CRA rp1(u), …, rpn(u)(rp1(u) Z/p1[u], …, rpn(u)Z/pn[u] ) Compute the resultant of f(u)(v) and g(u)(v) by CRA
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)
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; }
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; }
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 }
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 ? ?
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.