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

akira-terui
• Category

## Documents

• view

362

0

### Transcript of 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

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

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)

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)

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

Calculating approximate GCD for multiple polynomial inputs

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

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

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

An attempt based on Rupprecht’s 2nd method

with calculating ‘approximate’ syzygies

Today’s talk

Formulation of the problem

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:

• 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

2Solve the

minimization problem

Solving the problemin two steps

1Transfer the original

problem into anconstrained

minimization problem

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

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

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

Derive the constraintwith Rupprecht’s

1st method

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

0

Ck(P ) =

⇧⇧⇧⇧⇧⇧⇤

pn...

. . .p0 pn

. . ....

p0

⌃⌃⌃⌃⌃⌃⌅.

�⌥ ⌦k+1

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

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

A key proposition

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

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

U1Pi + UiP1 = 0

Derive the constraint

Ui(x)There exist (degree ≤ )satisfying

di � d

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

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)

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

Consider Rupprecht’s 2st method

using ‘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

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

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

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

GCD calculationin exact case

(review)

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

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

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

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

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

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

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

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

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

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

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

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

Applicable case:Proposition

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

r: degree of generalized Sylvester matrix involving all input polynomials

P1, . . . , Pn

Let

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)

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

This example satisfies degree condition

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

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

r = 7

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

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