You are on page 1of 47

Calculating approximate GCD of univariate polynomials with approximate syzygies

Akira Terui Faculty of Pure and Applied Sciences University of Tsukuba Computer AlgebraThe Algorithms, Implementations and the Next Generation December 26, 2012

Approximate GCD
One of the most well-known method in approximate algebraic computations

F (x) = x + 0.9x
2

6.55
1.5 = (x

G(x) = x

5.7x + 11.25
2.1x 2.3x + 4.5 = (x
Perturbations

F and G can be pairwise relatively prime

F (x) = F (x) G(x) = G(x)

3.5)(x + 2.3) 3.5)(x


ApproximateGCD of F and G

4.5)

Approximate GCD
One of the most well-known method in approximate algebraic computations

F (x) = x + 0.9x
2

6.55

G(x) = x
F (x) = F (x) G(x) = G(x)

5.7x + 11.25
0.476722x 1.18569x 0.19906 = (x 0.495096 = (x

F and G can be pairwise relatively prime


2.39486)(x + 2.81814) 2.39486)(x
ApproximateGCD of F and G

4.49082)

Perturbations

For the given F(x), G(x) and d, nd H(x): an approximate GCD of F and G of degree d
F (x): degree m, G(x) : degree n (m H(x) : degree d (d < n)
n)

F (x) = F (x) + G(x) = G(x) +

F (x), G(x) : pairwise relatively prime

F (x) = H(x) F (x) G(x) = H(x) G(x)

Gradient Projection

GPGCD: an approximate GCD algorithm


An iterative method based on constrained minimization

Calculates an approximate GCD with similar amount of perturbations, with much more efciency, compared with optimization-based method

Calculating approximate GCD for multiple polynomial inputs



A method based on SVD of Sylvester matrix (Rupprecht, 1999) STLN-based method (Kaltofen, Yang, Zhi; 2006)

My previous work (2010)


The GPGCD method for multiple polynomials based on Rupprechts 1st method
Nk (P1 , . . . , Pn ) Cd1 Cd1 = Cd1
1 k (P2 ) 1 k (P3 )

Cd2

1 k (P1 )

0 Cd3
1

1 k (Pn )

. . .

0 . . . 0

k (P1 ) .. . 0 Cdn

0 0 . . .
1

, k (P1 )

Generalized Sylvester matrix becomes large for many polynomials

Todays talk

An attempt based on Rupprechts 2nd method with calculating approximate syzygies

Formulation of the problem

Inputs
Polynomials
Pi (x) =
(i) di pdi x

Pairwise relatively prime in general

P1 (x), . . . , Pn (x)
+
(i) p1 x

R[x]

(i) p0

Degree d:

min{d1 , . . . , dn } > 0

min{d1 , . . . , dn } > d > 0

Find for...
Perturbations Satisfying ...

P1 (x), . . . , Pn (x) deg( Pi )

R[x]
Approximate GCD of degree d

deg(Pi )

Pi (x) = Pi (x) +
2 P1 (x)2

Minimizing ...

Pi (x) = H(x) Pi (x)


Pairwise relatively prime

+ +

2 Pn (x)2

Solving the problem in two steps

1
Transfer the original problem into an constrained minimization problem

2
Solve the minimization problem

Solving the problem in two steps

1
Transfer the original problem into an constrained minimization problem

Set up the objective function

Set up the constraints Solve the


minimization problem

Derive the objective function


The given polynomials (known)

Pi (x) =

(i) di pdi x

(i) p1 x

(i) p0

The polynomials to be calculated (unknown)

Pi (x) =

(i) di pdi x

+ +

(i) p1 x

(i) p0

The objective function:


f (x) =
n 2 P1 (x)2

f (x)

=
i=1

+ +
(i) pj (i) pj

2 Pn (x)2

di j=0

Variable

Constant

x=

(1) (1) (n) (n) (d1 , . . . , p0 , . . . , pdn , . . . , p0 ) p

Derive the constraint with Rupprechts 1st method

Convolution matrix
P (x) = pn x + + p0 x
n

pn . . . Ck (P ) = p0

.. ..

. .

k+1

pn . . . . p0

For 2 polynomials: Subresulant Matrix (sub-matrix of the Sylvester matrix)


Nk (P1 , P2 ) = Cd2 1 (1) pd1 . . . (1) p0
k (P1 )

Cd1

.. ..

(2) pd2

.
(1) pd1

. . .

k (P2 ) .. .. .
(2) pd2

. . . .

. . .

(2) p0

(1) p0

d2 k

min{d1 , d2 } > k

(2) p0

d1 k

For n polynomials: Generalized Sylvester Matrix


Nk (P1 , . . . , Pn ) Cd1 Cd1 = Cd1
1 k (P2 ) 1 k (P3 ) 1 k (P1 )

Cd2

0 Cd3
1

1 k (Pn )

. . .

0 . . . 0

k (P1 ) .. . 0 Cdn

0 0 . . .
1

, k (P1 )

min{d1 , . . . , dn } > k

A key proposition
Nk (P1 , . . . , Pn ) has full rank

deg(gcd(P1 , . . . , Pn ))

Derive the constraint


Nd (P1 , . . . , Pn ) is rank-decient 1

There exist Ui (x) (degree di satisfying

d)

U1 Pi + Ui P1 = 0

Derive the constraint


U1 Pi + Ui P1 = 0
0 Cd1 B Cd1 B B @ Cd1
1 k (P2 ) 1 k (P3 )

Cd2

1 k (P1 )

0 Cd3
1

1 k (Pn )

. . .

0 . . .

k (P1 ) .. . 0 Cdn

0 0 . . .
1

0 1 0 C u1 CB . C B.C C@ . A = @.A . A t. 0 un (P1 ) k 0t 1

g(x) = 0

(constraint)

Dimension of the generalized Sylvester matrix


Nk (P1 , . . . , Pn ) Cd1 Cd1 = Cd1
1 k (P2 ) 1 k (P3 )

Cd2

1 k (P1 )

0 Cd3
1

1 k (Pn )

. . .

0 . . . 0

k (P1 ) .. . 0 Cdn

0 0 . . .
1

, k (P1 )

# of Rows: d1 + d2 + + dn n k + (n # of columns: d1 + d2 + + dn n k inreases in propotion to the sum of degrees of the polynomials

1)d1

Consider Rupprechts 2st method using approximate syzygies

Outline of Rupprechts 2nd method (exact case)


(1) Calculate n-1
(j) (j) U1 , . . . , Un syzygies

ofn satisfying P1 , . . . , P
(j) U1 P1

+ +

(j) Un Pn

=0

Outline of Rupprechts 2nd method (exact case)


(2) Calculate cofactors of P1 , . . . , P n from calculated satisfying
(j) (j) syzygiesn U1 , . . . , U

Pj = H P j ,
GCD of P1 , . . . , Pn

gcd(P1 , . . . , Pj ) = 1

Outline of Rupprechts 2nd method (approximate case)


(1) Calculate n-1 approximate syzygies
(j) (j) U1 , . . . , Un

and perturbations P1 , . . . , P n by the Singular Value Decomposition (SVD)


(j) U1 (P1

P1 ) + +

(j) Un (Pn

Pn ) = 0

Outline of Rupprechts 2nd method (approximate case)


(2) Calculate cofactors of P1 , . . . , P n from calculated
(j) (j) U1 , . . . , Un syzygies

Pj +

P j = H Pj ,

gcd(P1 , . . . , Pj ) = 1

Approximate GCD of P1 , . . . , Pn

GCD calculation in exact case (review)

Another generalized Sylvester matrix of degree r


Nr (P1 , . . . , Pn ) = Cr d1 (P1 ) Cr d2 (P2 ) Cr 0 (1) (2) pd2 pd1 B . . .. .. B . . . . . B . B . . B . (1) (2) . pd1 . pd2 B . =B . . B (1) (2) . . B p0 . . p0 B . . B .. .. . . . . @ . . (1) (2) p0 p0
dn (Pn )

r + 1 rows
. . . . . . 1
(n) pd2

(n) pd1

..

. . . . . . .

(n) p0

..

(n) p0

n(r + 1)

(d1 + + dn ) columns

C C C C C C C C C C C A

Syzygy of degree r
If there exists a vector v 6= 0 satisfying then there exists a tuple of polynomials

Nr (P1 , . . . , Pn ) v = 0
R1 , . . . , R n satisfying

R 1 P1 + + R n Pn = 0

Syzygy of P1 , . . . , Pn of degree r

Calculate cofactors from n - 1 independent syzygies


0
(1) U1

B . B . U =@ . (n U1

(1) Un

. . .

1 C C A

1)

(n 1) Un

Lemma 5.1 (Rupprecht, 1999)


For matrix U, there exists a tuple of polynomials

V1 , . . . , Vn satisfying
(1) U1

. . .

(1) Un

. . .

(n 1) U1

(n 1) Un

=1

V1

Vn

Lemma 5.2 (Rupprecht, 1999)


Let
(1) U1 i

A minor of U obtained by eliminating the i-th column


(i 1) U1

. . .

. . .

(i+1) U1

. . .

(1) Un

. . .

(n 1) U1

(i 1) Un

(i+1) U1

(n 1) Un

Then, we have i Pi = H
GCD cofactor

Approximate calculation of syzygies: an example


GCD
H(x) = x + 1 P1 (x) = H(x) (x P2 (x) = H(x) (x = x4 + 4x3 =x
5

1) = x

1 x 2

1)(x + 2) = x3 + 2x2 4)(x + 5) 58x


2

P3 (x) = H(x) (x + 2)(x 15x2 6x


3

40 7x 4

P4 (x) = H(x) (x 2x
4

4)(x + x + x + 1)
3

6x

Generalized Sylvester matrix of degree 5


N5 (P1 , P2 , P3 , P4 ) 0 1 0 0 B 0 1 0 B B 1 0 1 B =B 1 0 B 0 @ 0 0 1 0 0 0 0 0 0 1 0 1 1 2 1 2 0 0 0 1 2 1 2 0 0 0 1 2 1 2 1 4 15 58 40 0 0 1 4 15 58 40 1 2 6 6 7 4 1 C C C C C C A

Approximate syzygies caluclated by the SVD


(1) U1 (x)

0.529832950578389639x3 0.392106355437565890x2 + 0.555395351048165176x 0.235241591480521151,

(1) U2 (x)

= 0.419758249032335162x2 0.0861045050752664576x 0.00560217899865405114,

(1) U3 (x)

0.0223458873839458561x 0.00560217899865405114,

(1) U4 (x)

= 0.132420588930000

Approximate syzygies caluclated by the SVD


We obtain
(2) (2) (2) (2) (U1 (x), U2 (x), U3 (x), U4 (x)), (3) (3) (3) (3) (U1 (x), U2 (x), U3 (x), U4 (x)), (4) (4) (4) (4) (U1 (x), U2 (x), U3 (x), U4 (x)), (5) (5) (5) (5) (U1 (x), U2 (x), U3 (x), U4 (x))

as well

Calculated cofactors do not satisfy degree condition(s)


Degree 2 Degree 1 Degree 0 Degree 3 in total

(1) U2 (x) (2) U2 (x) (3) U2 (x)

(1) U3 (x) (2) U3 (x) (3) U3 (x)

(1) U4 (x)) (2) U4 (x)) (3) U4 (x))

We have to calculate a polynomial of degree 1 as the cofactor

P1 (x) = (x + 1)(x
GCD

1)

cofactor

Basis of syzygy module of ideal generated by1 , P2 , P3 , P4 P


(Calculated with Singular)
0 U = @ 90 x+2 0 x2 + x 20 47x 203 1 x+1 9x + 7 0 0 9A 0 1

We have to obtain reduced form of syzygies in some sense by somehow

Generalized Sylvester matrix of smaller degree will also cause a problem


P1 (x) = H(x) (x P2 (x) = H(x) (x 1) 1)(x + 2)

We dont know apriori deg(gcd(P1 , P2 )) > deg(gcd(P1 , P2 , P3 , P4 ))

Applicable case: Proposition


Let

dj = deg(Pj ),

d = deg(H)

r: degree of generalized Sylvester matrix involving all input polynomials P1 , . . . , P n

Applicable case: Proposition


If we have

(n

1)r + d = d1 + + dn

and the degrees of syzygies calculated by the SVD of the generalized Sylvester matrix do not decrease, then we have

deg(

) = deg(Pi ) i

Applicable case: example


H = x2 + x + 1,
2

d=2

P1 = H (x + 3x + 1) P2 = H (x + 2x
3 5 4 5 2 3

= x4 + 4x3 + 3x2 + 2x x + 2)
2 3

1,

d1 = 4 d2 = 5

= x + 3x + 2x + 3x + x + 2,
4

P3 = H (x + 2x + x = x + 3x + 4x
7 6 5

4x + x
2 4

5) 8x
2

2x

4x

d3 = 7

This example satises degree condition


r=7
(n 1)r + d = d1 + + dn
4 + 5 + 7 = 16

2 7 + 2 = 16

Approximate syzygies calculated with the SVD on generalized Sylvester matrix of degree 7

U1 U2 U3

(1)

0.0665708260100711796 x3 + 0.640458735891240138 x2 + 0.270849661666912989, 0.573887909881168556 x

0.251464889020164006 x

(1) (1)

= 0.212695343726665154 x2 = 0.146124517716594

0.229886463458029544,

U1

(2)

0.381649984182229784 x3 + 0.0328566615969874409 x2 + 0.0543411474203011752 x 0.347529283829036639 0.549727494951867457

U2 U3

(2) (2)

= +0.532035125397169573 x2 + 0.348793322585241872 x = 0.150385141214940

Calculated cofactors (with normalized coecients)


1 2

! 1.0 x2 + 2.99999999999998312 x ! 1.0 x + 1.99999999999999334 x


3

0.99999999999999600, 0.99999999999999656 x

+ 1.99999999999999489,

! +1.0 x5 + 2.00000000000000844 x4 + 0.99999999999999789 x3 4.00000000000001066 x2 + 1.00000000000000577 x 5.00000000000000888

You might also like