Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

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

Transcript of Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Page 1: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Calculating approximate GCD of univariate polynomials

with ‘approximate’ syzygies

Akira TeruiFaculty of Pure and Applied Sciences

University of Tsukuba

Computer Algebra―The Algorithms, Implementations and the Next Generation

December 26, 2012

Page 2: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Approximate GCDOne of the most well-known method

in approximate algebraic computations

F (x) = x2 + 0.9x� 6.55

G(x) = x2 � 5.7x + 11.25

F (x) = F (x)� 2.1x� 1.5 = (x� 3.5)(x + 2.3)

G(x) = G(x)� 2.3x + 4.5 = (x� 3.5)(x� 4.5)

Perturbations

F and G can be pairwise

relatively prime

ApproximateGCDof F and G

Page 3: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Approximate GCDOne of the most well-known method

in approximate algebraic computations

F (x) = x2 + 0.9x� 6.55

G(x) = x2 � 5.7x + 11.25

Perturbations ApproximateGCDof F and G

F and G can be pairwise

relatively prime

F (x) = F (x)� 0.476722x� 0.19906 = (x� 2.39486)(x + 2.81814)

G(x) = G(x)� 1.18569x� 0.495096 = (x� 2.39486)(x� 4.49082)

Page 4: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

For the given F(x), G(x) and d,find H(x): an approximate GCD

of F and G of degree d

F (x) = F (x) + �F (x) = H(x) · F (x)

G(x) = G(x) + �G(x) = H(x) · G(x)

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

: degree m, F (x) : degree nG(x) (m � n)

H(x) : degree d (d < n)

Page 5: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

An iterative method based onconstrained minimization

GPGCD: an approximate GCD algorithmGradient Projection

Calculates an approximate GCDwith similar amount of perturbations,

with much more efficiency,compared with optimization-based method

Page 6: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Calculating approximate GCD for multiple polynomial inputs

• A method based on SVD of Sylvester matrix (Rupprecht, 1999)

• STLN-based method (Kaltofen, Yang, Zhi; 2006)

Page 7: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

The GPGCD method for multiple polynomials based on Rupprecht’s

1st method

My previous work (2010)

Nk(P1, . . . , Pn)

=

⇧⇧⇧⇤

Cd1�1�k(P2) Cd2�1�k(P1) 0 · · · 0Cd1�1�k(P3) 0 Cd3�1�k(P1) · · · 0

......

. . ....

Cd1�1�k(Pn) 0 · · · 0 Cdn�1�k(P1)

⌃⌃⌃⌅,

Generalized Sylvester matrix becomes large for many polynomials

Page 8: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

An attempt based on Rupprecht’s 2nd method

with calculating ‘approximate’ syzygies

Today’s talk

Page 9: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Formulation of the problem

Page 10: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Pairwise relatively prime in

general

P1(x), . . . , Pn(x) � R[x]

Inputs

Pi(x) = p(i)di

xdi + · · · p(i)1 x + p(i)

0

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

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

• Polynomials

• Degree d:

Page 11: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

• Perturbations

• Satisfying ...

• Minimizing ...

Find for...

�P1(x), . . . ,�Pn(x) � R[x]

deg(�Pi) � deg(Pi)

Pi(x) = Pi(x) + �Pi(x) = H(x) · Pi(x)

⇥�P1(x)⇥22 + · · · + ⇥�Pn(x)⇥2

2

Approximate GCD of degree d

Pairwise relatively prime

Page 12: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

2Solve the

minimization problem

Solving the problemin two steps

1Transfer the original

problem into anconstrained

minimization problem

Page 13: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

2Solve the

minimization problem

Solving the problemin two steps

1Transfer the original

problem into anconstrained

minimization problem

Set up the objective function

Set up the constraints

Page 14: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Derive the objective function

The given polynomials (known)

The polynomials to be calculated (unknown)

Pi(x) = p(i)di

xdi + · · · p(i)1 x + p(i)

0

Pi(x) = p(i)di

xdi + · · · + p(i)1 x + p(i)

0

Page 15: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

The objective function: f(x)

f(x) = ⇤�P1(x)⇤22 + · · · + ⇤�Pn(x)⇤2

2

=n

i=1

⇤⌥

di

j=0

�p(i)

j � p(i)j

⇥2⌅�

x = (p(1)d1

, . . . , p(1)0 , . . . , p(n)

dn, . . . , p(n)

0 )

Variable Constant

Page 16: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Derive the constraintwith Rupprecht’s

1st method

Page 17: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

‘Convolution’ matrix P (x) = pnxn + · · · + p0x

0

Ck(P ) =

⇧⇧⇧⇧⇧⇧⇤

pn...

. . .p0 pn

. . ....

p0

⌃⌃⌃⌃⌃⌃⌅.

�⌥ ⌦k+1

Page 18: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

For 2 polynomials:Subresulant Matrix

(sub-matrix of the Sylvester matrix)Nk(P1, P2) =

�Cd2�1�k(P1) Cd1�1�k(P2)

=

⌥⌥⌥⌥⌥⌥⌥⇧

p(1)d1

p(2)d2

.... . .

.... . .

p(1)0 p(1)

d1p(2)0 p(2)

d2

. . ....

. . ....

p(1)0 p(2)

0

�������⌃

.

↵ ⌦ �d2�k

↵ ⌦ �d1�k

min{d1, d2} > k � 0

Page 19: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

For n polynomials: Generalized Sylvester Matrix

Nk(P1, . . . , Pn)

=

⇧⇧⇧⇤

Cd1�1�k(P2) Cd2�1�k(P1) 0 · · · 0Cd1�1�k(P3) 0 Cd3�1�k(P1) · · · 0

......

. . ....

Cd1�1�k(Pn) 0 · · · 0 Cdn�1�k(P1)

⌃⌃⌃⌅,

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

Page 20: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

A key proposition

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

has full rankNk(P1, . . . , Pn)

Page 21: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

U1Pi + UiP1 = 0

Derive the constraint

Ui(x)There exist (degree ≤ )satisfying

di � d

Nd�1(P1, . . . , Pn) is rank-deficient

Page 22: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Derive the constraintU1Pi + UiP1 = 0

0

BBB@

Cd1�1�k(P2) Cd2�1�k(P1) 0 · · · 0Cd1�1�k(P3) 0 Cd3�1�k(P1) · · · 0

......

. . ....

Cd1�1�k(Pn) 0 · · · 0 Cdn�1�k(P1)

1

CCCA

0

B@

tu1...

tun

1

CA =

0

[email protected]

1

CA

g(x) = 0 (constraint)

Page 23: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Dimension of the generalized Sylvester matrixNk(P1, . . . , Pn)

=

⇧⇧⇧⇤

Cd1�1�k(P2) Cd2�1�k(P1) 0 · · · 0Cd1�1�k(P3) 0 Cd3�1�k(P1) · · · 0

......

. . ....

Cd1�1�k(Pn) 0 · · · 0 Cdn�1�k(P1)

⌃⌃⌃⌅,

# of Rows: d1 + d2 + · · · + dn � n k + (n� 1)d1

# of columns: d1 + d2 + · · · + dn � n k

inreases in propotion to the sum of degrees of the polynomials

Page 24: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Consider Rupprecht’s 2st method

using ‘approximate’ syzygies

Page 25: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Outline of Rupprecht’s 2nd method (exact case)

(1) Calculate n-1 syzygies       of      satisfyingP1, . . . , Pn

U (j)1 P1 + · · · + U (j)

n Pn = 0

U (j)1 , . . . , U (j)

n

Page 26: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Outline of Rupprecht’s 2nd method(exact case)

(2) Calculate cofactors of        

from calculated syzygies       satisfying

P1, . . . , Pn

U (j)1 , . . . , U (j)

n

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

GCD of P1, . . . , Pn

Page 27: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Outline of Rupprecht’s 2nd method

(approximate case)(1) Calculate n-1 ‘approximate’ syzygies

and perturbations        

by the Singular Value Decomposition (SVD)

U (j)1 , . . . , U (j)

n

�P1, . . . ,�Pn

U (j)1 (P1 + �P1) + · · · + U (j)

n (Pn + �Pn) = 0

Page 28: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Outline of Rupprecht’s 2nd method

(approximate case)

(2) Calculate cofactors of        

from calculated syzygies      

P1, . . . , Pn

U (j)1 , . . . , U (j)

n

Pj + �Pj = H · Pj , gcd(P1, . . . , Pj) = 1

Approximate GCD of P1, . . . , Pn

Page 29: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

GCD calculationin exact case

(review)

Page 30: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

columnsn(r + 1)� (d1 + · · · + dn)

Another generalized Sylvester matrix of degree r

Nr(P1, . . . , Pn)

=�Cr�d1(P1) Cr�d2(P2) · · · Cr�dn(Pn)

=

0

BBBBBBBBBBB@

p(1)d1

p(2)d2

· · · p(n)d1

.... . .

.... . .

.... . .

... p(1)d1

... p(2)d2

· · ·... p(n)

d2

p(1)0

... p(2)0

... · · · p(n)0

.... . .

.... . .

.... . .

...p(1)0 p(2)

0 · · · p(n)0

1

CCCCCCCCCCCA

r + 1 rows

Page 31: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Syzygy of of degree r

then there exists a tuple of polynomials

       satisfying

Syzygy of degree r

If there exists a vector satisfying

Nr(P1, . . . , Pn) · v = 0v 6= 0

R1, . . . , Rn

R1P1 + · · · + RnPn = 0P1, . . . , Pn

Page 32: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Calculate cofactors from n - 1 ‘independent’ syzygies

U =

0

BB@

U (1)1 · · · U (1)

n

......

U (n�1)1 · · · U (n�1)

n

1

CCA

Page 33: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

satisfying

Lemma 5.1(Rupprecht, 1999)

For matrix U, there exists a tuple of polynomials

V1, . . . , Vn

���������

U (1)1 · · · U (1)

n

......

U (n�1)1 · · · U (n�1)

n

V1 · · · Vn

���������

= 1

Page 34: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Lemma 5.2(Rupprecht, 1999)

Then, we have      

�i =

��������

U (1)1 · · · U (i�1)

1 U (i+1)1 · · · U (1)

n

......

......

U (n�1)1 · · · U (i�1)

n U (i+1)1 · · · U (n�1)

n

��������

Let

Pi = H · �i

GCD cofactor

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

Page 35: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Approximate calculation of syzygies: an example

GCDH(x) = x + 1

P1(x) = H(x) · (x� 1) = x2 � 1

P2(x) = H(x) · (x� 1)(x + 2) = x3 + 2x2 � x� 2P3(x) = H(x) · (x + 2)(x� 4)(x + 5)

= x4 + 4x3 � 15x2 � 58x� 40

P4(x) = H(x) · (x� 4)(x3 + x2 + x + 1)

= x5 � 2x4 � 6x3 � 6x2 � 7x� 4

Page 36: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Generalized Sylvester matrix of degree 5

N5(P1, P2, P3, P4)

=

0

BBBBBB@

1 0 0 0 1 0 0 1 0 10 1 0 0 2 1 0 4 1 �2�1 0 1 0 �1 2 1 �15 4 �60 �1 0 1 �2 �1 2 �58 �15 �60 0 �1 0 0 �2 �1 �40 �58 �70 0 0 �1 0 0 �2 0 �40 �4

1

CCCCCCA

Page 37: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Approximate syzygies caluclated by the SVD

U

(1)1 (x) = �0.529832950578389639x

3

� 0.392106355437565890x

2

+ 0.555395351048165176x

� 0.235241591480521151,

U

(1)2 (x) = 0.419758249032335162x

2

� 0.0861045050752664576x

� 0.00560217899865405114,

U

(1)3 (x) = �0.0223458873839458561x

� 0.00560217899865405114,

U

(1)4 (x) = 0.132420588930000

Page 38: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Approximate syzygies caluclated by the SVD

We obtain

as well

(U (2)1 (x), U (2)

2 (x), U (2)3 (x), U (2)

4 (x)),

(U (3)1 (x), U (3)

2 (x), U (3)3 (x), U (3)

4 (x)),

(U (4)1 (x), U (4)

2 (x), U (4)3 (x), U (4)

4 (x)),

(U (5)1 (x), U (5)

2 (x), U (5)3 (x), U (5)

4 (x))

Page 39: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Calculated cofactors do not satisfy degree condition(s)

�1 =

�������

U

(1)2 (x) U

(1)3 (x) U

(1)4 (x))

U

(2)2 (x) U

(2)3 (x) U

(2)4 (x))

U

(3)2 (x) U

(3)3 (x) U

(3)4 (x))

�������

Degree 2

Degree 1

Degree 0

P1(x) = (x + 1)(x� 1)

GCD cofactor

We have to calculate a

polynomial of degree 1 as the

cofactor

Degree 3 in total

Page 40: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Basis of syzygy module of ideal generated by     P1, P2, P3, P4

(Calculated with Singular)

U =

0

@0 x

2 + x� 20 �x + 1 090 47x� 203 �9x + 7 9

x + 2 �1 0 0

1

A

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

Page 41: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Generalized Sylvester matrix of smaller degree will also cause a problem

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

We don’t know apriorideg(gcd(P1, P2)) > deg(gcd(P1, P2, P3, P4))

Page 42: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Applicable case:Proposition

dj = deg(Pj), d = deg(H)

r: degree of generalized Sylvester matrix involving all input polynomials

P1, . . . , Pn

Let

Page 43: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Applicable case:Proposition

and the degrees of syzygies calculatedby the SVD of the generalized Sylvestermatrix do not decrease, then we have

If we have

(n� 1)r + d = d1 + · · · + dn

deg(�i) = deg(Pi)

Page 44: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Applicable case:example

H = x2 + x + 1,

P1 = H · (x2 + 3x + 1)

= x4 + 4x3 + 3x2 + 2x� 1,

P2 = H · (x3 + 2x2 � x + 2)

= x5 + 3x4 + 2x3 + 3x2 + x + 2,

P3 = H · (x5 + 2x4 + x3 � 4x2 + x� 5)

= x7 + 3x6 + 4x5 � x4 � 2x3 � 8x2 � 4x� 5

d = 2

d1 = 4

d2 = 5

d3 = 7

Page 45: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

This example satisfies degree condition

(n� 1)r + d = d1 + · · · + dn

4 + 5 + 7 = 162 · 7 + 2 = 16

r = 7

Page 46: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Approximate syzygiescalculated with the SVD on generalized

Sylvester matrix of degree 7

U

(1)1 = �0.0665708260100711796 x

3 + 0.640458735891240138 x

2 � 0.251464889020164006 x

+ 0.270849661666912989,

U

(1)2 = 0.212695343726665154 x

2 � 0.573887909881168556 x� 0.229886463458029544,

U

(1)3 = �0.146124517716594

U

(2)1 = �0.381649984182229784 x

3 + 0.0328566615969874409 x

2 + 0.0543411474203011752 x

� 0.347529283829036639

U

(2)2 = +0.532035125397169573 x

2 + 0.348793322585241872 x� 0.549727494951867457

U

(2)3 = �0.150385141214940

Page 47: Calculating approximate GCD of univariate polynomials with 'approximate' syzygies

Calculated cofactors (with normalized coefficients)

�1 �! 1.0 x

2 + 2.99999999999998312 x� 0.99999999999999600,

�2 �! 1.0 x

3 + 1.99999999999999334 x

2 � 0.99999999999999656 x

+ 1.99999999999999489,

�3 �! +1.0 x

5 + 2.00000000000000844 x

4 + 0.99999999999999789 x

3

� 4.00000000000001066 x

2 + 1.00000000000000577 x

� 5.00000000000000888