This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

The GPGCD Algorithm with the Bézout Matrix
for Multiple Univariate Polynomials

Boming Chi
[email protected]
Graduate School of Pure and Applied Sciences, University of Tsukuba
   Akira Terui
[email protected]
Faculty of Pure and Applied Sciences, University of Tsukuba
Abstract

We propose a modification of the GPGCD algorithm, which has been presented in our previous research, for calculating approximate greatest common divisor (GCD) of more than 2 univariate polynomials with real coefficients and a given degree. In transferring the approximate GCD problem to a constrained minimization problem, different from the original GPGCD algorithm for multiple polynomials which uses the Sylvester subresultant matrix, the proposed algorithm uses the Bézout matrix. Experiments show that the proposed algorithm is more efficient than the original GPGCD algorithm for multiple polynomials with maintaining almost the same accuracy for most of the cases.

1 Introduction

With the progress of algebraic computation with polynomials and matrices, we are paying more attention to approximate algebraic algorithms. Algorithms for calculating approximate GCD, which are approximate algebraic algorithms, consider a pair of given polynomials FF and GG that are relatively prime in general, and find F~\tilde{F} and G~\tilde{G} which are close to FF and GG, respectively, in the sense of polynomial norm, and have the greatest common divisor of a certain degree. These algorithms can be classified into two categories: 1) for a given tolerance (magnitude) of FF~\|F-\tilde{F}\| and GG~\|G-\tilde{G}\|, maximize the degree of approximate GCD, and 2) for a given degree dd, minimize the magnitude of FF~\|F-\tilde{F}\| and GG~\|G-\tilde{G}\|.

In both categories, algorithms based on various methods have been proposed including the Euclidean algorithm ([1], [19], [20]), low-rank approximation of the Sylvester matrix or subresultant matrices ([5], [6], [10], [11], [12], [21], [24], [26], [27], [29]), Padé approximation ([17]), and optimizations ([3], [13], [15], [22], [28]). Among them, the second author of the present paper has proposed the GPGCD algorithm based on low-rank approximation of subresultant matrices by optimization ([24], [25], [26]), which belongs to the second category above. Based on the researches mentioned above, the authors of the present paper have proposed the GPGCD algorithm using the Bézout matrix ([2]), which is the previous research of this paper.

In this paper, we propose the GPGCD algorithm with the Bézout matrix for multiple polynomials, while subresultant matrices have been used in the original GPGCD algorithm for multiple polynomials ([25]). We show that the proposed algorithm is more efficient than the original one with maintaining almost the same accuracy for most of the cases.

The paper is organized as follows. In Section 2, we give a definition of the approximate GCD problem. In Section 3, we give a formulation of the transformation of the approximate GCD problem to the optimization problem using the Bézout matrix. In Section 4, we review the modified Newton method used for optimization. In Section 5, we illustrate the proposed algorithm and give a running time analysis. In Section 6, the results of experiments are shown.

2 Approximate GCD Problem

Let F1(x),,Fn(x)F_{1}(x),\dots,F_{n}(x) be univariate polynomials with real coefficients of degree at most mm:

Fi(x)=fimxm++fi0x0,i=1,,n,f1m0.F_{i}(x)=f_{im}x^{m}+\dots+f_{i0}x^{0},\quad i=1,\dots,n,\quad f_{1m}\neq 0. (1)

In this paper, for a polynomial F(x)=fmxm++f0x0F(x)=f_{m}x^{m}+\dots+f_{0}x^{0}, the norm F\|F\| denotes the 2-norm defined as F2:=(fm2+fm12++f02)12\|F\|_{2}:=(f_{m}^{2}+f_{m-1}^{2}+\dots+f_{0}^{2})^{\frac{1}{2}}. For a vector (a1,,an)n(a_{1},\dots,a_{n})\in\mathbb{R}^{n}, the norm (a1,,an)\|(a_{1},\dots,a_{n})\| denotes the 2-norm defined as (a1,,an)2:=(a12++an2)12\|(a_{1},\dots,a_{n})\|_{2}:=(a_{1}^{2}+\dots+a_{n}^{2})^{\frac{1}{2}}.

Here, we give a definition of an approximate GCD.

Definition 1 (Approximate GCD)

For polynomials F1(x),,Fn(x)F_{1}(x),\dots,F_{n}(x) which are relatively prime in general, a positive integer dd satisfying that d<md<m, and a positive real number ϵ\epsilon, if there exist polynomials F~1(x),,F~n(x)\tilde{F}_{1}(x),\dots,\tilde{F}_{n}(x) such that they have a certain GCD as

F~i(x)=F¯i(x)×H~(x),i=1,,n,\tilde{F}_{i}(x)=\bar{F}_{i}(x)\times\tilde{H}(x),\quad i=1,\dots,n, (2)

where H~(x)\tilde{H}(x) is a polynomial of degree dd, satisfying that (F~1F1,,F~nFn)<ϵ\big{\|}(\|\tilde{F}_{1}-F_{1}\|,\dots,\|\tilde{F}_{n}-F_{n}\|)\big{\|}<\epsilon, we call H~(x)\tilde{H}(x) an approximate GCD of polynomials F1(x),,Fn(x)F_{1}(x),\dots,F_{n}(x) with tolerance ϵ\epsilon.

Algorithms for calculating approximate GCD can be classified into two categories: 1) for a given tolerance ϵ\epsilon, make the degree of approximate GCD as large as possible, and 2) for a given degree dd, minimize the magnitude (F1F~1,,FnF~n)\big{\|}(\|F_{1}-\tilde{F}_{1}\|,\dots,\|F_{n}-\tilde{F}_{n}\|)\big{\|}. In this paper, we focus on the second category of the approximate GCD algorithms, solving the following problem.

Problem 2 (Approximate GCD problem)

For given univariate polynomials F1(x),,Fn(x)F_{1}(x),\dots,F_{n}(x) as shown in (1) and a positive integer d<md<m, find polynomials F~1(x),,F~n(x)\tilde{F}_{1}(x),\dots,\tilde{F}_{n}(x) and H~(x)\tilde{H}(x) satisfying (2), with making the perturbation

Δ:=i=1nFi(x)F~i(x)2\varDelta:=\sqrt{\sum_{i=1}^{n}\|F_{i}(x)-\tilde{F}_{i}(x)\|^{2}} (3)

as small as possible.

3 Transformation of the approximate GCD problem

For solving the approximate GCD problem, we transfer the approximate GCD problem to a constrained minimization problem with the Bézout matrix.

Definition 3 (Bézout Matrix [8])

Let F(x)F(x) and G(x)G(x) be two real polynomials with the degree at most mm. Then, the matrix Bez(F,G)=(bij)i,j=1,,m\operatorname{Bez}(F,G)=(b_{ij})_{i,j=1,\dots,m}, where

F(x)G(y)F(y)G(x)xy=i,j=1mbijxi1yj1,\frac{F(x)G(y)-F(y)G(x)}{x-y}=\sum_{i,j=1}^{m}b_{ij}x^{i-1}y^{j-1},

is called the Bézout matrix associated to F(x)F(x) and G(x)G(x). For polynomials F1(x),,Fn(x)F_{1}(x),\dots,F_{n}(x), the matrix

Bez(F1,,Fn)=(Bez(F1,F2)Bez(F1,F3)Bez(F1,Fn))\operatorname{Bez}(F_{1},\dots,F_{n})=\begin{pmatrix}\operatorname{Bez}(F_{1},F_{2})\\ \operatorname{Bez}(F_{1},F_{3})\\ \vdots\\ \operatorname{Bez}(F_{1},F_{n})\\ \end{pmatrix}

is called the Bézout matrix associated to F1(x),,Fn(x)F_{1}(x),\dots,F_{n}(x).

For the Bézout matrix, we have a following theorem.

Theorem 4 (Barnett’s theorem [8])

Let F1(x),,Fn(x)F_{1}(x),\dots,F_{n}(x) be real polynomials with the degree at most mm. Let d=deg(gcd(F1(x),,Fn(x)))d=\deg(\gcd(F_{1}(x),\dots,F_{n}(x))) and (𝒃1,,𝒃m)=Bez(F1(x),,Fn(x))(\bm{b}_{1},\dots,\bm{b}_{m})=\operatorname{Bez}(F_{1}(x),\dots,F_{n}(x)). Then, the vectors 𝒃1,,𝒃md\bm{b}_{1},\dots,\bm{b}_{m-d} are linearly independent, and there exists coefficients ci,jc_{i,j} such that

𝒃i=j=1mdci,j𝒃j,1id,\bm{b}_{i}=\sum_{j=1}^{m-d}c_{i,j}\bm{b}_{j},\quad 1\leq i\leq d, (4)

Furthermore, the monic form of the GCD of F1(x),,Fn(x)F_{1}(x),\dots,F_{n}(x) is represented as

gcd(F1(x),,Fn(x))=xd+cd,1xd1++c1,1x0.\gcd(F_{1}(x),\dots,F_{n}(x))=x^{d}+c_{d,1}x^{d-1}+\dots+c_{1,1}x^{0}. (5)

For polynomials F~1(x),,F~n(x)\tilde{F}_{1}(x),\dots,\tilde{F}_{n}(x) in Problem 2, let B~=Bez(F~1(x),,F~n(x))=(𝒃1,,𝒃m)\tilde{B}=\operatorname{Bez}(\tilde{F}_{1}(x),\dots,\tilde{F}_{n}(x))=(\bm{b}_{1},\dots,\bm{b}_{m}). In the case that polynomials F~1(x),,F~n(x)\tilde{F}_{1}(x),\dots,\tilde{F}_{n}(x) have an exact GCD of degree dd, Theorem 4 shows that 𝒃1,,𝒃md\bm{b}_{1},\dots,\bm{b}_{m-d} are linearly independent, and 𝒃md+1\bm{b}_{m-d+1} can be represented as a linear combination of 𝒃1,,𝒃md\bm{b}_{1},\dots,\bm{b}_{m-d}. So there exists a vector 𝒚md\bm{y}\in\mathbb{R}^{m-d}, such that (𝒃1,,𝒃md)𝒚=𝒃md+1(\bm{b}_{1},\dots,\bm{b}_{m-d})\bm{y}=\bm{b}_{m-d+1}.

Let 𝒔\bm{s} be the vector of the coefficients of the input polynomials: 𝒔:=(f10,,f1m,,fn0,,fnm)\bm{s}:=(f_{10},\dots,f_{1m},\dots,f_{n0},\dots,f_{nm}). Let the Bézout matrix of the input polynomials represented by 𝒔\bm{s} be B(𝒔)=(𝒃(𝒔)1,,𝒃(𝒔)n)B(\bm{s})=(\bm{b}(\bm{s})_{1},\dots,\bm{b}(\bm{s})_{n}). In the same way, let the Bézout matrix of the polynomials we find (F~1(x),,F~n(x)\tilde{F}_{1}(x),\dots,\tilde{F}_{n}(x)) be B(𝒔+Δ𝒔)B(\bm{s}+\Delta\bm{s}), where Δ𝒔=(f~10f10,,f~1mf1m,,f~n0fn0,,f~nmfnm)\Delta\bm{s}=(\tilde{f}_{10}-f_{10},\dots,\tilde{f}_{1m}-f_{1m},\dots,\tilde{f}_{n0}-f_{n0},\dots,\tilde{f}_{nm}-f_{nm}).

From the above, we can transfer Problem 2 to a constrained minimization problem with the objective function:

Δ𝒔=i=1nj=0m(f~ijfij)2,\|\Delta\bm{s}\|=\sqrt{\sum_{i=1}^{n}\sum_{j=0}^{m}(\tilde{f}_{ij}-f_{ij})^{2}}, (6)

and the constraints:

(𝒃(𝒔+Δ𝒔)1,,𝒃(𝒔+Δ𝒔)md)𝒚=𝒃(𝒔+Δ𝒔)md+1for some𝒚,(\bm{b}(\bm{s}+\Delta\bm{s})_{1},\dots,\bm{b}(\bm{s}+\Delta\bm{s})_{m-d})\bm{y}=\bm{b}(\bm{s}+\Delta\bm{s})_{m-d+1}\quad\text{for some}\quad\bm{y}, (7)

with variables:

(𝒔~,𝒚)=(f~10,,f~1m,,f~n0,,f~nm,y1,,ymd).(\bm{\tilde{s}},\bm{y})=(\tilde{f}_{10},\dots,\tilde{f}_{1m},\dots,\tilde{f}_{n0},\dots,\tilde{f}_{nm},y_{1},\dots,y_{m-d}). (8)

4 The Modified Newton Method

We consider a constrained minimization problem of minimizing an objective function f(𝒙):sf(\bm{x}):\mathbb{R}^{s}\rightarrow\mathbb{R} which is twice continuously differentiable, subject to the constraints 𝒈(𝒙)=(g1(𝒙),,gt(𝒙))T=𝟎\bm{g}(\bm{x})=(g_{1}(\bm{x}),\dots,g_{t}(\bm{x}))^{T}=\bm{0}, where gi(𝒙)g_{i}(\bm{x}) is a function of s\mathbb{R}^{s}\rightarrow\mathbb{R} and is also twice continuously differentiable. For solving the constrained minimization problem, we use the modified Newton method by Tanabe ([23]), which is a generalization of the Gradient Projection method ([18]), as in the original GPGCD algorithm ([26]). For 𝒙k\bm{x}_{k} which satisfies 𝒈(𝒙k)=0\bm{g}(\bm{x}_{k})=0, we calculate the search direction 𝒅k\bm{d}_{k} and the Lagrange multipliers 𝝀k\bm{\lambda}_{k} by solving the following linear system

(I(J𝒈(𝒙k))TJ𝒈(𝒙k)O)(𝒅k𝝀k+1)=(f(𝒙k)𝒈(𝒙k)),\begin{pmatrix}I&-(J_{\bm{g}}(\bm{x}_{k}))^{T}\\ J_{\bm{g}}(\bm{x}_{k})&O\end{pmatrix}\begin{pmatrix}\bm{d}_{k}\\ \bm{\lambda}_{k+1}\end{pmatrix}=-\begin{pmatrix}\nabla f(\bm{x}_{k})\\ \bm{g}(\bm{x}_{k})\end{pmatrix}, (9)

where J𝒈(𝒙)J_{\bm{g}}(\bm{x}) is the Jacobian matrix represented as

J𝒈(𝒙)=gi𝒙j.J_{\bm{g}}(\bm{x})=\frac{\partial g_{i}}{\partial\bm{x}_{j}}. (10)

5 The Algorithm for Calculating Approximate GCD

We give an algorithm for calculating approximate GCD of multiple polynomials using the Bézout matrix in this section.

5.1 Representation of the Jacobian matrix

In the modified Newton method, the Jacobian matrix is represented as follows. From the constraints (7) and the objective function (6), let d(i)=deg(Fi(x)),i=1,,nd(i)=\deg(F_{i}(x)),i=1,\dots,n, then the Jacobian matrix is represented as:

(JL(2)JM(2)OOOJROJL(n)OOJM(n)),\begin{pmatrix}\begin{array}[]{c|cccc|c}JL(2)&JM(2)&O&\dots&O&\\ \vdots&O&\ddots&\ddots&\vdots&JR\\ \vdots&\vdots&\ddots&\ddots&O&\\ JL(n)&O&\dots&O&JM(n)&\\ \end{array}\end{pmatrix}, (11)

where

JL(k)\displaystyle JL(k) =JL1(k)+JL2(k),\displaystyle=JL_{1}(k)+JL_{2}(k),
JL1(k)\displaystyle JL_{1}(k) =(p1kij)i=1..m,j=1..m+1,\displaystyle=(p_{1kij})_{i=1..m,j=1..m+1},
p1kij\displaystyle p_{1kij} ={l=0min(i,mdj+i)fk(l)yji+l1i<jm+1l=0min(mi,mjd)fk(i+l)yj+l1jim,\displaystyle=\begin{cases}\sum_{l=0}^{\min(i,m-d-j+i)}f_{k(l)}y_{j-i+l}&1\leq i<j\leq m+1\\ -\sum_{l=0}^{\min(m-i,m-j-d)}f_{k(i+l)}y_{j+l}&1\leq j\leq i\leq m\\ \end{cases},
JL2(k)\displaystyle JL_{2}(k) =(p2kij)i=1..m,j=1..m+1,\displaystyle=(p_{2kij})_{i=1..m,j=1..m+1},
p2kij\displaystyle p_{2kij} ={fk(m+1d+ij)1jij+d1mfk(m+1d+ij)1j(m+1d)ij1m,\displaystyle=\begin{cases}f_{k(m+1-d+i-j)}&1\leq j\leq i\leq j+d-1\leq m\\ -f_{k(m+1-d+i-j)}&1\leq j-(m+1-d)\leq i\leq j-1\leq m\\ \end{cases},
JM(k)\displaystyle JM(k) =JM1(k)+JM2(k),\displaystyle=JM_{1}(k)+JM_{2}(k),
JM1(k)\displaystyle JM_{1}(k) =(p3kij)i=1..m,j=1..d(k)+1,\displaystyle=(p_{3kij})_{i=1..m,j=1..d(k)+1},
p3kij\displaystyle p_{3kij} ={l=0min(i,min(md,d(k))j+i)f1(l)yji+l1i<jd(k)+1l=0min(mi,min(md,d(k)j)f1(i+l)yj+l1jim,\displaystyle=\begin{cases}-\sum_{l=0}^{\min(i,\min(m-d,d(k))-j+i)}f_{1(l)}y_{j-i+l}&1\leq i<j\leq d(k)+1\\ \sum_{l=0}^{\min(m-i,\min(m-d,d(k)-j)}f_{1(i+l)}y_{j+l}&1\leq j\leq i\leq m\\ \end{cases},
JM2(k)\displaystyle JM_{2}(k) =(p4kij)i=1..m,j=1..d(k)+1,\displaystyle=(p_{4kij})_{i=1..m,j=1..d(k)+1},
p4kij\displaystyle p_{4kij} ={f1(m+1d+ij)1jij+d1mf1(m+1d+ij)1j(m+1d)ij1m,\displaystyle=\begin{cases}f_{1(m+1-d+i-j)}&1\leq j\leq i\leq j+d-1\leq m\\ -f_{1(m+1-d+i-j)}&1\leq j-(m+1-d)\leq i\leq j-1\leq m\\ \end{cases},
JR\displaystyle JR =(𝒃1,,𝒃md).\displaystyle=(\bm{b}_{1},\dots,\bm{b}_{m-d}).

5.2 Setting the Initial Values

We give the initial values for variables in (8) as follows. For the given polynomials (1), we set the initial value for variables 𝒔0\bm{s}_{0} as:

𝒔0=(f10,,f1m,,fn0,,fnm).\bm{s}_{0}=(f_{10},\dots,f_{1m},\dots,f_{n0},\dots,f_{nm}). (12)

For the Bézout matrix B=Bez(F1(x),,Fn(x))=(𝒃1,,𝒃m)B=\operatorname{Bez}(F_{1}(x),\dots,F_{n}(x))=(\bm{b}_{1},\dots,\bm{b}_{m}), we calculate 𝒚=(y01,,y0(md))\bm{y}=(y_{01},\dots,y_{0(m-d)}) by solving the following least squares problem:

min(𝒃1,,𝒃md)𝒚𝒃md+1.\min\|(\bm{b}_{1},\dots,\bm{b}_{m-d})\bm{y}-\bm{b}_{m-d+1}\|. (13)

Then we set the initial value for variables 𝒚0\bm{y}_{0} as:

𝒚0=(y01,,y0(md)).\bm{y}_{0}=(y_{01},\dots,y_{0(m-d)}). (14)

From above, we give the initial value for variables in (8) as

(𝒔0,𝒚0)=(f10,,f1m,,fn0,,fnm,y01,,y0(md)).(\bm{s}_{0},\bm{y}_{0})=(f_{10},\dots,f_{1m},\dots,f_{n0},\dots,f_{nm},y_{01},\dots,y_{0(m-d)}). (15)

5.3 Calculating the Approximate GCD and Finding the Approximate polynomials

Let (𝒔,𝒚)=(f10,,f1m,,fn0,,fnm,y01,,y0(md))(\bm{s}^{*},\bm{y}^{*})=(f_{10}^{*},\dots,f_{1m}^{*},\dots,f_{n0}^{*},\dots,f_{nm}^{*},y_{01}^{*},\dots,y_{0(m-d)}^{*}) be the minimizer of the objective function in (6) calculated by the modified Newton method, corresponding to the coefficients of F1(x),,Fn(x)F_{1}(x),\dots,F_{n}(x). Then, we calculate the approximate GCD from the Bézout matrix B(𝒔)B(\bm{s}^{*}) with Theorem 4.

Finally, we find the approximate polynomials F~i(x)=F¯i(x)H~(x)\tilde{F}_{i}(x)=\bar{F}_{i}(x)\tilde{H}(x), i=1,,ni=1,\dots,n in (LABEL:eq:Apppoly) by solving least squares problems:

minFi(x)F¯i(x)H~(x)i=1,,n.\min\|F_{i}(x)-\bar{F}_{i}(x)\tilde{H}(x)\|\quad i=1,\dots,n. (16)

5.4 The algorithm and running time analysis

Summarizing above, we give the algorithm for calculating approximate GCD for multiple polynomials as Algorithm 1. We give an analysis of the arithmetic running time of Algorithm 1 as follows.

In Step 1, we set the initial values by the construction of the Bézout matrix, calculation of the initial values using the least squares solution, and the construction of the Jacobian matrix. Since the dimension of the Bézout matrix and the Jacobian matrix is mn×mmn\times m and mn×(md+i=1ndeg(Fi)+1)mn\times(m-d+\sum_{i=1}^{n}\deg(F_{i})+1), respectively, we can estimate the running time of the construction of the Bézout matrix, calculation of the initial values using the least squares solution, and the construction of the Jacobian matrix as O(m2n)O(m^{2}n) ([4]), O(m3)O(m^{3}) ([16]), O(m(n(md+n)+i=1ndeg(Fi)))=O(mn(m+nd))O(m(n(m-d+n)+\sum_{i=1}^{n}\deg(F_{i})))=O(mn(m+n-d)), respectively, where the Jacobian matrix is computed by (11).

In Step 3, since the dimension of the Jacobian matrix is mn(md+i=1ndeg(Fi)+1)mn(m-d+\sum_{i=1}^{n}\deg(F_{i})+1), the running time for solving the linear system is O((mn+md+i=1ndeg(Fi)+1)3)=O((mnd)3)O((mn+m-d+\sum_{i=1}^{n}\deg(F_{i})+1)^{3})=O((mn-d)^{3}) ([7]).

In Step 4, the running time of the construction of the Bézout matrix and the Jacobian matrix is O(m2n)O(m^{2}n) and O(m(n(md+n)+i=1ndeg(Fi)))=O(mn(m+nd))O(m(n(m-d+n)+\sum_{i=1}^{n}\deg(F_{i})))=O(mn(m+n-d)), respectively.

In Step 5, the running time for calculating the approximate GCD H~(x)\tilde{H}(x) and calculation of the approximate polynomials F~i(x),i=1,,n\tilde{F}_{i}(x),~{}i=1,\dots,n is O(m2n)O(m^{2}n) and O(n(md)3)O(n(m-d)^{3}).

As a consequence, the running time of Algorithm 1 is the number of iteration times O((mnd)3)O((mn-d)^{3}).

Algorithm 1 The GPGCD algorithm for multiple polynomials with the Bézout matrix

Inputs:

  • -

    F1(x),,Fn(x)(x)F_{1}(x),\dots,F_{n}(x)\in\mathbb{R}(x): the given polynomials with max(deg(Fi(x)),i=1n)=deg(F1(x))>0\max(\deg(F_{i}(x)),i=1\dots n)=\deg(F_{1}(x))>0,

  • -

    dd\in\mathbb{N}: the given degree of approximate GCD with dmin(deg(Fi(x)),i=1n)d\leq\min(\deg(F_{i}(x)),i=1\dots n),

  • -

    ϵ>0\epsilon>0: the stop criterion with the modified Newton method,

  • -

    0<α10<\alpha\leq 1: the step width with the modified Newton method.

Outputs:

  • -

    H~(x)\tilde{H}(x): the approximate GCD, with deg(H~)=d\deg(\tilde{H})=d,

  • -

    F~1(x)\tilde{F}_{1}(x), …F~n(x)\tilde{F}_{n}(x): the polynomials which are close to F1(x),,Fn(x)F_{1}(x),\dots,F_{n}(x), respectively, with the GCD H~\tilde{H}.

  1. Step 1

    Generate the Bézout matrix B=Bez(F1(x)Fn(x))B=\operatorname{Bez}(F_{1}(x)\dots F_{n}(x)), the initial values 𝒚0\bm{y}_{0} (14), and the Jacobian matrix (11).

  2. Step 2

    Set the initial values (𝒔0,𝒚0)(\bm{s}_{0},\bm{y}_{0}) as in (15).

  3. Step 3

    Solve the linear system (9) to find the search direction 𝒅k\bm{d}_{k}.

  4. Step 4

    If 𝒅k<ϵ\|\bm{d}_{k}\|<\epsilon, obtain the (𝒔,𝒚)(\bm{s}^{*},\bm{y}^{*}) as (𝒔k,𝒚k)(\bm{s}_{k},\bm{y}_{k}), generate the Bézout matrix B~=Bez(F~1(x),,F~n(x))\tilde{B}=\operatorname{Bez}(\tilde{F}_{1}(x),\dots,\tilde{F}_{n}(x)) from polynomials F~i(x),i=1,,n\tilde{F}_{i}(x),~{}i=1,\dots,n, then go to Step 5. Otherwise, let (𝒔k+1,𝒚k+1)=(𝒔k,𝒚k)+α𝒅k(\bm{s}_{k+1},\bm{y}_{k+1})=(\bm{s}_{k},\bm{y}_{k})+\alpha\bm{d}_{k} and calculate the Bézout matrix and the Jacobian matrix with (𝒔k+1,𝒚k+1)(\bm{s}_{k+1},\bm{y}_{k+1}), then go to Step 3.

  5. Step 5

    Calculate the approximate GCD H~(x)\tilde{H}(x) with Theorem 4. For i=1,,ni=1,\dots,n, calculate the approximate polynomials F~i(x)\tilde{F}_{i}(x) by solving least squares problems in (16). Return F~1(x),,F~n(x)\tilde{F}_{1}(x),\dots,\tilde{F}_{n}(x) and H~(x)\tilde{H}(x).

6 Experiments

We have implemented our GPGCD algorithm on a computer algebra system Maple 2021. For i=1,,ni=1,\dots,n, the test polynomials Fi(x)F_{i}(x) are generated as

Fi(x)=F~i(x)H(x)+eF^i(x)F^i(x).F_{i}(x)=\tilde{F}_{i}(x)H(x)+\frac{e}{\|\hat{F}_{i}(x)\|}\hat{F}_{i}(x). (17)

Here, F~i(x)\tilde{F}_{i}(x) and H(x)H(x) are polynomials of degrees deg(Fi)d\deg(F_{i})-d and dd, respectively. Note that Fi(x)F_{i}(x) are relatively prime polynomials. They are generated as polynomials that their coefficients are floating-point numbers and their absolute values are not greater than 10.1)1)1)Coefficients are generated with the Mersenne Twister algorithm [14] by built-in function Generate with RandomTools:-MersenneTwister in Maple, which approximates a uniform distribution on [10,10][-10,10]. The noise polynomials F^i(x)\hat{F}_{i}(x) are polynomials of degree deg(Fi)1\deg(F_{i})-1, which are randomly generated with coefficients given as the same as for F~i(x)\tilde{F}_{i}(x) and H(x)H(x).

We have generated 5 test groups of test polynomials, each group comprising 100 tests. We set the degree of the input polynomials for all groups as 10, and the degree of the approximate GCD as 3,4,5,6,73,4,5,6,7, respectively (shown as in Table 1). We set the number of polynomials for each tests as n=10n=10, and set the norm of the noise ee as e=0.01e=0.01 in our tests. The stop criterion ϵ\epsilon and the stop width α\alpha in Algorithm 1 are set as 0.10.1 and 11, respectively.

We have carried out the tests on CPU Intel(R) Xeon(R) Silver 4210 at 2.20GHz with RAM 256GB under Linux 5.4.0 with Maple 2021.

6.1 The experimental results

We have carried out the tests with the GPGCD algorithm with the Bézout matrix for multiple polynomials (abbreviated as GPGCD-Bézout-multiple algorithm). For comparison, we have also carried out the tests with the original GPGCD algorithm with subresultant matrices for multiple polynomials (abbreviated as GPGCD-Sylvester-multiple algorithm) ([25]).

For the results, we have compared the norm of the perturbation of the GPGCD-Bézout-multiple algorithm with that of the GPGCD-Sylvester-multiple algorithm. For i=1,,ni=1,\dots,n, let FBi=fBimxm++fBi0x0F_{\textrm{B}i}=f_{\textrm{B}im}x^{m}+\dots+f_{\textrm{B}i0}x^{0} be the approximate polynomials from the outputs of the GPGCD-Bézout-multiple algorithm, and FSi=fSimxm++fSi0x0F_{\textrm{S}i}=f_{\textrm{S}im}x^{m}+\dots+f_{\textrm{S}i0}x^{0} be the approximate polynomials from the outputs of the GPGCD-Sylvester-multiple algorithm. Then, let ΔB\Delta B be the norm of the perturbation of the GPGCD-Bézout-multiple algorithm:

ΔB=i=1nj=0m(fBijfij)2,\Delta B=\sqrt{\sum_{i=1}^{n}\sum_{j=0}^{m}(f_{\textrm{B}ij}-f_{ij})^{2}},

and let ΔS\Delta S be the norm of the perturbation of the GPGCD-Sylvester-multiple algorithm:

ΔS=i=1nj=0m(fSijfij)2.\Delta S=\sqrt{\sum_{i=1}^{n}\sum_{j=0}^{m}(f_{\textrm{S}ij}-f_{ij})^{2}}.

If we have |ΔBΔS|0.5,|\Delta B-\Delta S|\leq 0.5, then we say that the minimizers of both algorithms are closed to each other.

The number of tests which the minimizers are closed to each other is shown in the left part of Table LABEL:table:number. In ‘All’, we show the number for all tests which the minimizers are closed to each other. In ‘Bézout’, we show the number for tests which the GPGCD-Bézout-multiple algorithm has a smaller perturbation than that of GPGCD-Sylvester-multiple algorithm. In ‘Sylvester’, we show the number for tests which GPGCD-Sylvester-multiple algorithm has a smaller perturbation than that of the GPGCD-Bézout-multiple algorithm. In the same way, the number of tests which the minimizers are not closed to each other is shown in the right part of Table LABEL:table:number.

For the tests in which the minimizers are closed to each other, the average time and the average number of iterations are shown in Table LABEL:table:time. In the left part, we show the average time for two algorithms. In the middle part, we show the average number of iterations. In the right part, we show the average time per iteration.

For the tests in which the minimizers are closed to each other, we have also calculated the norm of the remainders of the GPGCD-Bézout-multiple algorithm (FBR1(x),,FBRn(x))\big{\|}(\|F_{\textrm{BR}1}(x)\|,\dots,\|F_{\textrm{BR}n}(x)\|)\big{\|}, and the norm of the remainders of the GPGCD-Sylvester-multiple algorithm (FSR1(x),,FSRn(x))\big{\|}(\|F_{\textrm{SR}1}(x)\|,\dots,\|F_{\textrm{SR}n}(x)\|)\big{\|}, where

FBi(x)=F¯i(x)H~(x)+FBRi(x),deg(FBRi)<d,i=1,,n,\displaystyle F_{\textrm{B}i}(x)=\bar{F}_{i}(x)\tilde{H}(x)+F_{\textrm{BR}i}(x),\quad\deg(F_{\textrm{BR}i})<d,\quad i=1,\dots,n,
FSi(x)=F¯i(x)H~(x)+FSRi(x),deg(FSRi)<d,i=1,,n.\displaystyle F_{\textrm{S}i}(x)=\bar{F}_{i}(x)\tilde{H}(x)+F_{\textrm{SR}i}(x),\quad\deg(F_{\textrm{SR}i})<d,\quad i=1,\dots,n.

We show the average norm of the remainders in Table 4.

6.2 Comparison with the GPGCD-Sylvester-multiple algorithm

From Table LABEL:table:number, we see that the number of tests in which the minimizers are closed to each other of each group is larger when the degree of the approximate GCD is higher, where the least of them is over half of the total number of tests. For all results, we see that the number of tests in which the perturbation of the GPGCD-Sylvester-multiple algorithm is smaller than that of the GPGCD-Bézout-multiple algorithm is larger than that of the opposite. That means the GPGCD-Sylvester-multiple algorithm shows higher stability than the GPGCD-Bézout-multiple algorithm.

From Table LABEL:table:time, we see that total computing time, number of iterations, average computing time per iteration of the GPGCD-Bézout-multiple algorithm are smaller than those of the GPGCD-Sylvester-multiple algorithm, respectively. By comparing average computing time per iteration in each group, we see that, except for Group 1 in the GPGCD-Bézout-multiple algorithm, when the degree of approximate GCD is higher, the average time per iteration of both algorithms is smaller.

In the previous research, the GPGCD algorithm with the Bézout matrix with 2 polynomials (abbreviated as GPGCD-Bézout algorithm) ([2]), we have shown that the average of the norm of the remainders of the tests in the GPGCD-Bézout algorithm is larger than that of the original GPGCD algorithm (abbreviated as GPGCD-Sylvester algorithm). From Table 4, we see that there are little difference between the GPGCD-Bézout-multiple algorithm and the GPGCD-Sylvester-multiple algorithm in the sense of the average of the norm of the remainders.

Table 1: Degrees of test polynomials (17)
Group m=deg(Fi)m=\deg(F_{i}) d=deg(H)d=\deg(H)
1 10 3
2 10 4
3 10 5
4 10 6
5 10 7
Table 2: The number of tests which the minimizers are closed to / not closed to each other
The number of tests
Group Closed to each other Not closed to each other
All Bézout Sylvester All Bézout Sylvester
1 55 28 27 45 4 41
2 57 21 36 43 9 34
3 72 29 43 28 2 26
4 72 24 48 28 0 28
5 81 19 62 19 2 17
Table 3: Comparison of computing time and the number of iterations (See Remark 1 for detail)
Average time (sec.) Average number of iterations Average time per iteration (sec.)
Group Bézout Sylvester Bézout Sylvester Bézout Sylvester
1 9.804 166.266 14.47 23.47 0.677 7.083
2 11.035 141.235 16.14 21.28 0.684 6.637
3 9.587 112.952 14.375 18.14 0.667 6.227
4 7.296 99.230 11.33 17 0.644 5.837
5 6.272 89.058 9.83 16.09 0.638 5.536
Table 4: Comparison of norm of the remainders
Group Bézout Sylvester
1 2.320×1092.320\times 10^{-9} 1.875×1091.875\times 10^{-9}
2 1.390×1091.390\times 10^{-9} 9.170×1099.170\times 10^{-9}
3 1.150×1091.150\times 10^{-9} 1.059×1091.059\times 10^{-9}
4 9.684×1099.684\times 10^{-9} 8.427×10108.427\times 10^{-10}
5 7.987×10117.987\times 10^{-11} 9.012×10119.012\times 10^{-11}

7 Conclusions

We have proposed an algorithm using the Bézout matrix based on the GPGCD algorithm for multiple polynomials.

The experimental results show that, in most of the cases, the minimizer of the proposed algorithm is closed to the minimizer of the GPGCD-Sylvester-multiple algorithm. For the cases in which the minimizers of both algorithms are closed to each other, total computing time, the number of iterations, average computing time per iteration of the GPGCD-Bézout-multiple algorithm are smaller than those of the GPGCD-Sylvester-multiple algorithm, respectively. Thus, we see that the proposed algorithm is more efficient than the GPGCD-Sylvester-multiple algorithm. By comparing the computing time per iteration, the experimental results show that when the degree of the approximate GCD is higher, the computing time per iteration of the proposed algorithm is smaller. This is consistent with the arithmetic running time analysis shown in Section 5.4.

The previous research has shown that the GPGCD-Bézout algorithm was not so accurate in the sense of the norm of perturbations compared with the GPGCD-Sylvester algorithm. However, new experimental results show that, with the improvement for calculating the approximate polynomials as shown in (16), the GPGCD-Bézout-multiple algorithm calculate approximate GCDs with almost the same accuracy as the GPGCD-Sylvester-multiple algorithm in the sense of the norm of perturbations, for the tests in which the minimizers of both algorithms are closed to each other.

On the other hand, the experimental results show that the number of tests in which the perturbation of the GPGCD-Sylvester-multiple algorithm is smaller than that of the proposed algorithm is larger than that of the opposite. Thus, the GPGCD-Sylvester-multiple algorithm shows higher stability than the proposed algorithm. Improving stability of the proposed algorithm will be one of the topics of further research.

Acknowledgments

This research was partially supported by JSPS KAKENHI Grant Number JP20K11845. The author (Chi) was supported by the research assistant fellowship from Graduate School of Pure and Applied Sciences, University of Tsukuba.

References

  • [1] B. Beckermann and G. Labahn. A fast and numerically stable Euclidean-like algorithm for detecting relatively prime numerical polynomials. J. Symbolic Comput., 26(6):691–714, 1998.
  • [2] Boming Chi and Akira Terui. The GPGCD algorithm with the Bézout matrix. In Computer Algebra in Scientific Computing, pages 170–187. Springer International Publishing, Cham, 2020.
  • [3] P. Chin, R. M. Corless, and G. F. Corliss. Optimization strategies for the approximate GCD problem. In Proceedings of the 1998 International Symposium on Symbolic and Algebraic Computation, pages 228–235. ACM, New York, NY, USA, 1998.
  • [4] Eng Wee Chionh, Ming Zhang, and Ronald N. Goldman. Fast computation of the Bezout and Dixon resultant matrices. Journal of Symbolic Computation, 33(1):13–29, 2002.
  • [5] R. M. Corless, P. M. Gianni, B. M. Trager, and S. M. Watt. The singular value decomposition for polynomial systems. In Proceedings of the 1995 International Symposium on Symbolic and Algebraic Computation, pages 195–207. ACM, New York, NY, USA, 1995.
  • [6] R. M. Corless, S. M. Watt, and L. Zhi. QRQR factoring to compute the GCD of univariate approximate polynomials. IEEE Trans. Signal Process., 52(12):3394–3402, 2004.
  • [7] J. W. Demmel. Applied Numerical Linear Algebra. SIAM, Philadelphia, USA, 1997.
  • [8] Gema M. Diaz-Toca and Laureano Gonzalez-Vega. Barnett’s Theorems About the Greatest Common Divisor of Several Univariate Polynomials Through Bezout-like Matrices. Journal of Symbolic Computation, 34(1):59–81, 2002.
  • [9] Gema M. Diaz-Toca and Laureano Gonzalez-Vega. Computing greatest common divisors and squarefree decompositions through matrix methods: The parametric and approximate cases. Linear Algebra Appl., 412(2–3):222–246, 2006.
  • [10] I. Z. Emiris, A. Galligo, and H. Lombardi. Certified approximate univariate GCDs. J. Pure Appl. Algebra, 117/118:229–251, 1997.
  • [11] E. Kaltofen, Z. Yang, and L. Zhi. Approximate greatest common divisors of several polynomials with linearly constrained coefficients and singular polynomials. In Proceedings of the 2006 International Symposium on Symbolic and Algebraic Computation, pages 169–176. ACM, New York, NY, USA, 2006.
  • [12] E. Kaltofen, Z. Yang, and L. Zhi. Structured low rank approximation of a Sylvester matrix. In Symbolic-Numeric Computation, Trends in Mathematics, pages 69–83. Birkhäuser, Basel, Switzerland, 2007.
  • [13] N. K. Karmarkar and Y. N. Lakshman. On approximate GCDs of univariate polynomials. J. Symbolic Comput., 26(6):653–666, 1998.
  • [14] Makoto Matsumoto and Takuji Nishimura. Mersenne Twister: A 623-dimensionally equidistributed uniform pseudo-random number generator. ACM Transactions on Modeling and Computer Simulation, 8(1):3–30, 1998.
  • [15] Kosaku Nagasaka. Relaxed NewtonSLRA for approximate GCD. In Computer Algebra in Scientific Computing, pages 272–292. Springer International Publishing, Cham, 2021.
  • [16] Jorge Nocedal and Stephen J. Wright. Numerical Optimization. Springer, New York, NY, USA, second edition, 2006.
  • [17] V. Y. Pan. Computation of approximate polynomial GCDs and an extension. Inform. and Comput., 167(2):71–85, 2001.
  • [18] J. B. Rosen. The gradient projection method for nonlinear programming. II. Nonlinear constraints. J. Soc. Indust. Appl. Math., 9:514–532, 1961.
  • [19] T. Sasaki and M-T. Noda. Approximate square-free decomposition and root-finding of ill-conditioned algebraic equations. J. Inform. Process., 12(2):159–168, 1989.
  • [20] A. Schönhage. Quasi-GCD computations. J. Complexity, 1(1):118–137, 1985.
  • [21] Éric Schost and Pierre-Jean Spaenlehauer. A quadratically convergent algorithm for structured low-rank approximation. Found. Comput. Math., 16(2):457–492, 2016.
  • [22] Dongxia Sun and Lihong Zhi. Structured low rank approximation of a bezout matrix. Mathematics in Computer Science, 1(2):427–437, Dec 2007.
  • [23] K. Tanabe. A geometric method in nonlinear programming. Journal of Optimization Theory and Applications, 30(2):181–210, Feb 1980.
  • [24] Akira Terui. An iterative method for calculating approximate GCD of univariate polynomials. In Proceedings of the 2009 International Symposium on Symbolic and Algebraic Computation - ISSAC ’09, pages 351–358. ACM Press, New York, New York, USA, 2009.
  • [25] Akira Terui. GPGCD, an iterative method for calculating approximate GCD, for multiple univariate polynomials. In Computer Algebra in Scientific Computing, pages 238–249. Springer Berlin Heidelberg, Berlin, Heidelberg, 2010.
  • [26] Akira Terui. GPGCD: An iterative method for calculating approximate GCD of univariate polynomials. Theoretical Computer Science, 479:127–149, 2013.
  • [27] C. J. Zarowski, X. Ma, and F. W. Fairman. QR-factorization method for computing the greatest common divisor of polynomials with inexact coefficients. IEEE Trans. Signal Process., 48(11):3042–3051, 2000.
  • [28] Zhonggang Zeng. The numerical greatest common divisor of univariate polynomials. In Randomization, Relaxation, and Complexity in Polynomial Equation Solving, volume 556 of Contemporary Mathematics, pages 187–217. AMS, Providence, RI, USA, 2011.
  • [29] L. Zhi. Displacement structure in computing approximate GCD of univariate polynomials. In Computer mathematics: Proc. Six Asian Symposium on Computer Mathematics (ASCM 2003), volume 10 of Lecture Notes Ser. Comput., pages 288–298. World Sci. Publ., River Edge, NJ, 2003.