An Algorithm for Approximate Factorization of Bivariate Polynomials 1)

Similar documents
Computing Approximate GCD of Univariate Polynomials by Structure Total Least Norm 1)

Displacement Structure in Computing Approximate GCD of Univariate Polynomials

Numerical Irreducible Decomposition

Solving Approximate GCD of Multivariate Polynomials By Maple/Matlab/C Combination

The Mathematica Journal Symbolic-Numeric Algebra for Polynomials

Ruppert matrix as subresultant mapping

Fast Estimates of Hankel Matrix Condition Numbers and Numeric Sparse Interpolation*

Deterministic distinct-degree factorisation of polynomials over finite fields*

Structured Matrix Methods Computing the Greatest Common Divisor of Polynomials

On Factorization of Multivariate Polynomials over Algebraic Number and Function Fields

Algebraic Factorization and GCD Computation

Decomposing Solution Sets of Polynomial Systems: A New Parallel Monodromy Breakup Algorithm

Solving Polynomial Systems via Symbolic-Numeric Reduction to Geometric Involutive Form

IRREDUCIBILITY OF POLYNOMIALS MODULO p VIA NEWTON POLYTOPES. 1. Introduction

Fast algorithms for factoring polynomials A selection. Erich Kaltofen North Carolina State University google->kaltofen google->han lu

Approximate Gröbner Bases and Overdetermined Algebraic Systems

Real Root Isolation of Regular Chains.

Equivalence of Polynomial Identity Testing and Deterministic Multivariate Polynomial Factorization

On Approximate Linearized Triangular Decompositions

Computer Algebra: General Principles

Computations with Differential Rational Parametric Equations 1)

Math 312/ AMS 351 (Fall 17) Sample Questions for Final

Approximate GCDs of polynomials and sparse SOS relaxations

On the BMS Algorithm

An Efficient Algorithm for Computing Parametric Multivariate Polynomial GCD

MATH 425-Spring 2010 HOMEWORK ASSIGNMENTS

The Numerical Factorization of Polynomials

Approximate Computation of Pseudovafieties

A geometrical approach to finding multivariate approximate LCMs and GCDs

Black Box Linear Algebra with the LinBox Library. William J. Turner North Carolina State University wjturner

Change of Ordering for Regular Chains in Positive Dimension

The Seven Dwarfs of Symbolic Computation and the Discovery of Reduced Symbolic Models. Erich Kaltofen North Carolina State University google->kaltofen

Linear Algebra III Lecture 11

Determinant Formulas for Inhomogeneous Linear Differential, Difference and q-difference Equations

On the Berlekamp/Massey Algorithm and Counting Singular Hankel Matrices over a Finite Field

Rational Univariate Reduction via Toric Resultants

Towards High Performance Multivariate Factorization. Michael Monagan. This is joint work with Baris Tuncer.

ACM 106a: Lecture 1 Agenda

Fault Tolerance & Reliability CDA Chapter 2 Cyclic Polynomial Codes

Zero Decomposition Algorithms for System of Polynomial Equations 1)

Chapter 4. Greatest common divisors of polynomials. 4.1 Polynomial remainder sequences

Modular Methods for Solving Nonlinear Polynomial Systems

City Research Online. Permanent City Research Online URL:

COMPUTER ARITHMETIC. 13/05/2010 cryptography - math background pp. 1 / 162

Towards High Performance Multivariate Factorization. Michael Monagan. This is joint work with Baris Tuncer.

Local properties of plane algebraic curves

Contents Regularization and Matrix Computation in Numerical Polynomial Algebra

Polynomial factorization and curve decomposition algorithms

Fast algorithms for polynomials and matrices Part 6: Polynomial factorization

On Exact and Approximate Interpolation of Sparse Rational Functions*

Security Level of Cryptography Integer Factoring Problem (Factoring N = p 2 q) December Summary 2

Black Box Linear Algebra with the LinBox Library. William J. Turner North Carolina State University wjturner

Exact Arithmetic on a Computer

A Fraction Free Matrix Berlekamp/Massey Algorithm*

Overview of Computer Algebra

PART II: Research Proposal Algorithms for the Simplification of Algebraic Formulae

arxiv: v2 [cs.sc] 22 Jun 2017

Outline. MSRI-UP 2009 Coding Theory Seminar, Week 2. The definition. Link to polynomials

Computing multiple roots of inexact polynomials

Primary Decomposition

Lecture 7: Polynomial rings

Numerical Algorithms. IE 496 Lecture 20

Factoring. there exists some 1 i < j l such that x i x j (mod p). (1) p gcd(x i x j, n).

: Error Correcting Codes. October 2017 Lecture 1

ROOTS MULTIPLICITY WITHOUT COMPANION MATRICES

Numerical Computations in Algebraic Geometry. Jan Verschelde

COMMUTATIVE SEMIFIELDS OF ORDER 243 AND 3125

COMPUTING RATIONAL POINTS IN CONVEX SEMI-ALGEBRAIC SETS AND SOS DECOMPOSITIONS

Symbolic-Numeric Tools for Multivariate Asymptotics

Math123 Lecture 1. Dr. Robert C. Busby. Lecturer: Office: Korman 266 Phone :

6.S897 Algebra and Computation February 27, Lecture 6

Factoring univariate polynomials over the rationals

A New Method for Real Root Isolation of Univariate

Computing Characteristic Polynomials of Matrices of Structured Polynomials

Math 120 HW 9 Solutions

THE VECTOR RATIONAL FUNCTION RECONSTRUCTION PROBLEM

IRREDUCIBILITY TESTS IN F p [T ]

Journal of Symbolic Computation. On the Berlekamp/Massey algorithm and counting singular Hankel matrices over a finite field

New algebraic decoding method for the (41, 21,9) quadratic residue code

Register machines L2 18

The Numerical Solution of Polynomial Systems Arising in Engineering and Science

Key words. Macaulay matrix, multivariate polynomials, multiple roots, elimination, principal angles, radical ideal

How might we evaluate this? Suppose that, by some good luck, we knew that. x 2 5. x 2 dx 5

A Blackbox Polynomial System Solver on Parallel Shared Memory Computers

Revision Problems for Examination 1 in Algebra 1

The following can also be obtained from this WWW address: the papers [8, 9], more examples, comments on the implementation and a short description of

The Berlekamp algorithm

WORKING WITH MULTIVARIATE POLYNOMIALS IN MAPLE

Structured Matrices and Solving Multivariate Polynomial Equations

Section IV.23. Factorizations of Polynomials over a Field

Lattice reduction of polynomial matrices

Math 109 HW 9 Solutions

Lecture 10: Deterministic Factorization Over Finite Fields

Computational Formal Resolution of Surfaces in P 3 C

Polynomials. Chapter 4

A Maple Package for Parametric Matrix Computations

Solving Polynomial Systems Symbolically and in Parallel

Probabilistic Aspects of the Integer-Polynomial Analogy

Resolution of Singularities in Algebraic Varieties

Lecture 7: Schwartz-Zippel Lemma, Perfect Matching. 1.1 Polynomial Identity Testing and Schwartz-Zippel Lemma

Transcription:

MM Research Preprints, 402 408 MMRC, AMSS, Academia Sinica No. 22, December 2003 An Algorithm for Approximate Factorization of Bivariate Polynomials 1) Zhengfeng Yang and Lihong Zhi 2) Abstract. In this paper, we propose a new numerical method for factoring approximate bivariate polynomials over C. The method relies on Ruppert matrix and singular value decomposition. We also design a new reliable way to compute the approximate GCD of bivariate polynomials with floating-point coefficients. The algorithm has been implemented in Maple 9. The experiments show that the algorithms are very efficient and stable for approximate polynomials with medium degrees. 1. Introduction We consider the problem of the absolutely irreducible factorization of a bivariate polynomial in C[x, y]. Due to the introduction of floating-point arithmetic or through a physical measurement, the coefficients of the input polynomial may only known to a fixed precision. If the approximate polynomial is not far from a factorizable polynomial, one may generally assume that the polynomial has a factorizable structure. Inspired by the recent work of Ruppert[8], Gao[4], and Kaltofen and May[3], we compute the irreducible factorization of a bivariate polynomial by solving a system of linear equations and computing approximate GCD of bivariate polynomials. In Section 2, we will briefly introduce Ruppert and Gao s method to factorize exact bivariate polynomials over C[x, y]. In Section 3, we show that their method can be modified to be applied to polynomials with inexact coefficients. We present a new way for computing approximate GCD of bivariate polynomials. In the last Section, we describe the main steps of our algorithms and illustrate them on a simple example. Some experimental results are reported. 2. Ruppert Matrix We consider the problem of the absolutely irreducible factorization of a bivariate polynomial f in C[x, y]. The coefficients of f may be only known to a fixed precision. Inspired by the recent work [8, 4, 3], we compute the irreducible factorization of a bivariate polynomial by solving a system of linear equations and computing approximate GCD of bivariate polynomials. We assume that f is nonconstant and gcd(f, f x ) = 1. If this is not the case, then we can reduce f to f/gcd(f, f x ) which is squarefree. Here f x = f x. Suppose f = f 1 f 2 f r, (1) 1) This work was supported in part by the NSF Grant. This report is part of the join work with Erich Kaltofen and John May of North Carolina State University, USA. 2) Institute of Systems Science, AMSS, Academia Sinica Beijing 100080, email: {zyang,lzhi}@mmrc.iss.ac.cn

An Algorithm for Approximate Factorization of Bivariate Polynomials 403 where f i C[x, y] are distinct and irreducible over C. Define then E i = f f i f i x C[x, y], 1 i r, (2) f x = E 1 + E 2 + + E r and E i E j = 0 mod f for all i j. Factoring f is equivalent to computing E i, 1 i r, and using g = λ i E i to split f, where λ i C. Theorem 2.1 (Ruppert 1999) Let a squarefree polynomial f C[x, y] have bidegree (m, n), i.e., deg x f = m, deg y f = n. Then f is absolute irreducible if and only if the following equation ( ) g = ( ) h, (3) y f x f has no nonzero solutions g, h C[x, y] with deg g (m 1, n), deg h (m, n 1). (4) Since differentiation is linear over C, the equation (3) can be written as a Ruppert matrix for the unknown coefficients of g and h. Define G = {g C[x, y] : (3) and (4) hold for some h C[x, y]} (5) Theorem 2.2 (Gao 2000) Let a squarefree polynomial f C[x, y] have bidegree (m, n). Suppose f has the irreducible factorization as in (1), then dim(g) = r and each g G is of the form g = λ i E i. f. The following theorem by Gao presents a way to compute λ i that give a proper factor of Theorem 2.3 (Gao 2000) Suppose that g 1,..., g r form a basis for G over C. Pick a i C uniform randomly and independently, 1 i r, and let g = r i=1 a ig i. There is a unique r r matrix A = (a ij ) over C such that gg i a ij g j f x mod f. (6) Furthermore, let E g (x) = det(ix A), the characteristic polynomial of A. Then the probability that f = λ C gcd(f, g λf x ) (7) gives a complete factorization of f over C is at least 1 r(r 1)/(2 S ).

404 Zhengfeng Yang and Lihong Zhi 3. Approximate Factorization of Bivariate Polynomials The above theory about absolutely irreducible factorization of bivariate polynomial with exact coefficients can be extended to the polynomials with approximate coefficients. Three main problems arise when we try to factor approximate polynomials: 1. Define the numerical dimension of G. 2. Compute the E g which has only simple roots. 3. Compute the approximate GCDs: gcd(f, g λ i f x ). For the first problem, we can turn to the singular value decomposition of the Ruppert matrix [5]. Suppose the computed singular values of a matrix have a tolerance ɛ > 0 and a convention that the matrix has numerical rank r if the singular values σ i satisfy σ 1 σ r > ɛ σ r+1 σ n. The tolerance ɛ should be consistent with the machine precision. However, if the general level of relative error in the data is larger, then ɛ should be correspondingly bigger. If σ r ɛ, then the numerical rank is unambiguously. On the other hand, σ 1,..., σ n might not clearly split into subsets of small and large singular values, making the determination of r somewhat arbitrary. In our algorithm, we look for the biggest gap in the singular values rather than just look for a gap of a given size. Determining the rank r based on the biggest gap is proven to be more reliable than the one depended on a given tolerance ɛ. Especially in those cases, where input polynomials have big relative errors. Now let us consider the second problem. Suppose we have computed the numerical dimension of G(i.e., rank deficiency r of the Ruppert matrix), the coefficients of g 1,..., g r can be read from the singular vectors corresponding to the last r small singular values. By theorem 2.3, we choose a 1,..., a r C uniform randomly and let g = r i=1 a ig i. As pointed in [4], we can substitute a value of α C for y such that f(x, α) is still squarefree. The matrix A can be formed by the divisions of the approximate univariate polynomials [12]. Let E g (x) = det(ix A), the characteristic polynomial of A. We compute all the numerical roots λ i, 1 i r of the univariate polynomial E g over C, and check the smallest distance between these roots: distance = min{ λ i λ j, 1 i < j r.} If the distance is small, i.e., E g has a cluster of roots, then we should choose another set of a i and try to find a separable E g. Finally, let us explain how to compute the approximate GCD of two bivariate polynomials. We have already considered the problem in [11]. But the algorithm available does not work well when the polynomials have large error. In the following, we extend the method in [10] to compute the approximate GCD of bivariate polynomials. There are three main steps: 1. Estimate the degree k of the approximate GCD. 2. Compute the last singular vector for the k th bivariate Sylvester matrix. The coefficients of the cofactors of the approximate gcd(f, g λf x ) w.r.t. f and g λf x can be read from the singular vectors.

An Algorithm for Approximate Factorization of Bivariate Polynomials 405 3. Compute the approximate GCD by polynomial divisions. We can estimate the degree of the approximate GCD by testing the degree of the approximate GCD of univariate polynomials. We reduce the bivariate polynomials to univariate polynomials by choosing random linear transformations: x a 1 u b 1, y a 2 u b 2 here a 1, a 2, b 1, b 2 C. We compute the singular value decomposition of the Sylvester matrix of ˆf(u) and ĝ(u) λ ˆf x (u). The numerical rank of the Sylvester matrix tells us the degree of the approximate GCD of the univariate polynomials ˆf(u) and ĝ(u) λ ˆf x (u). The reduction should be repeated several times to obtain a roughly correct estimation of the degree of the approximate GCD of the bivariate polynomials. Suppose we have an estimated degree k of the approximate GCD, we check the rank deficiency of the k th bivariate Sylvester matrix S k by computing the last several small singular values[10]. We shall update the k according to rank deficiency of S k. If the rank deficiency is 1 then we compute the last singular vector, otherwise k = k 1 if S k is of full rank and k = k + 1 if the rank deficiency is larger than 1. Once we have computed correct degree of the approximate GCD of bivariate polynomials, it is easy to compute the GCD by the last two steps above. Suppose we have obtained a proper approximate factorization of f over C: f r gcd(f, g λ i f x ), we can check the backward error of the approximate factorization: f i=1 r gcd(f, g λ i f x ) 2. i=1 If the backward error is reasonable small compared with the relative error in the coefficients of f, we have found a valid factorization of f. Otherwise, we can form a minimization problem as in [6], and try to improve the approximate factors. 4. Algorithm and Experiments AFBP: Approximate Factoring Bivariate Polynomials. Input: A normalized polynomial f C[x, y] with gcd(f, f x ) = 1, deg(f) = (m, n), mn 1, and a subset S C with S mn. Output: The list of all absolutely irreducible approximate factors of f. Step 1. [Ruppert matrix] 1.1 Form the Ruppert matrix from the linear equations (3) and (4).

406 Zhengfeng Yang and Lihong Zhi 1.2 Compute the singular value decomposition of the Ruppert matrix, and find the singular values σ. 1.3 Find the biggest gap in the singular values max i {σ i /σ i+1 } and decide the numerical rank deficiency r of the Ruppert matrix, suppose r 2. 1.4 Form a basis g 1,..., g r from the last r right singular vector v 1,..., v r. Step 2. [ Separable E g ] 2.1 Pick a i S, uniform randomly and independently, and set g = r i=1 a ig i. 2.2 Select randomly a proper value for variable y = α which does not change the degree and squarefree property of f. 2.3 For y = α, compute a ij that minimize the univariate remainder of gg i r j=1 a ijg j f x mod f. 2.4 Let E g (x) = det(ix A), A = (a ij ), compute the numerical roots λ i, 1 i r of E g and distance = min 1 i<j r { λ i λ j }. 2.5 If the distance is small then go to step 2.1. Step 3. [Approximate GCD] Compute f i = gcd(f, g λ i f x ) over C[x, y] for 1 i r. Step 4. [Backward error and correction] 4.1 Compute f r i=1 gcd(f, g λ if x ) 2. 4.2 Improve the approximate factors if it is necessary. Step 5. Output the approximate factors f 1,..., f r. Example 4.1 (Nagasaka2002) We illustrate our algorithm by factoring the following polynomial: f = (x 2 + yx + 2y 1)(x 3 + y 2 x y + 7) + 0.2x. Since deg f = (5, 3), the Ruppert matrix is a 37 26 matrix. The last several singular values of the matrix are:, 0.173234, 0.137482,.0475177, 0.0180165, 0.00168900, 0.203908 10 10. Starting from the last second smallest singular value, the biggest gap is 0.0180165/0.00168900 = 10.6669. So r = 2 and f is supposed to be close to a polynomial having two irreducible factors. A basis for G computed from the last two right singular vectors is: g 1 = 0.222225 x 4 0.249186 yx 3 0.00669638 x 3 0.0402726 y 2 x 2 0.541602 yx 2 + 0.265256 x 2 0.0670575 y 3 x 0.00117838 y 2 x 0.0515876 yx + 0.341504 x 0.179952 y 3 + 0.0653902 y 2 +0.157991 y + 0.0120672, g 2 = 0.186723 x 4 + 0.149379 yx 3 0.000000000146533 x 3 + 0.112034 y 2 x 2 +0.224068 yx 2 0.112034 x 2 + 0.0746893 y 3 x 0.0746893 yx + 0.522825 x +0.0746893 y 3 0.0746893 y 2 + 0.261412 y + 0.00746893.

An Algorithm for Approximate Factorization of Bivariate Polynomials 407 Take a random linear combination of g = 49 50 g 1 + 29 40 g 2 and set y = 1, then A = (a ij ) can be computed as [ ] 0.757129 1.166496. 0.726481 0.537448 Two eigenvalues of the matrix A are λ 1 = 1.23519, λ 2 = 1.01551. Computing f i = gcd(f, g λ i f x ), i = 1, 2, we obtain two factors of f: f 1 = x 3 0.0439831 x 2 0.00187356 yx 2 + 0.0379250 yx 0.0317799 x +6.92684 + 0.999303 y 2 x 0.0299366 y 2 0.991303 y 0.00160526 y 3 f 2 = x 2 + 1.01014 yx + 0.0271868 x 1.00236 + 2.00412 y + 0.00121241 y 2. The backward error of the factorization is: The factorization can be corrected once to f f 1 f 2 2 / f 2 = 0.0127385. f 1 = 1.00128 x 3 0.0203379 x 2 0.00854539 yx 2 0.0057040 yx + 0.0137666 x +0.994041 y 2 x 0.977989 y + 6.93638 0.0034838 y 2 0.00042572 y 3, f 2 = 1.00621 x 2 + 0.0304998 x + 1.00869 yx 1.00922 0.00373265 y 2 + 2.02024 y, and the backward error f f 1 f 2 2 / f 2 = 0.00102763, which is a little bigger than the backward error 0.000753084 of the factorization given in [7]. We have implemented AFBP algorithm in Maple 9. In the following table, we show the performance for some well known or randomly generated examples on Pentium 4 at 2.0 Ghz for Digits = 10 in Maple 9. Here σ r and σ r+1 are singular values around the biggest gap; coeff. error indicates the relative error in the coefficients of the input polynomials; T 1 indicates the timing for obtaining the number of factors; T shows the timing for entire factorization. Examples 1, 2, 3, 4, 5 come from [7, 9, 1, 2] respectively. Ex. deg(f i ) σ r σ r+1 σ r+1 coeff. error backward errors T 1 T 1 2, 3 10 10 3 10 1 2.6 10 2 0.016 1.671 2 5, 5 10 6 10 7 10 5 1.1 10 5 0.531 4.154 3 10, 10 10 6 10 7 10 5 8.5 10 6 20.7 77.62 4 7, 8 10 8 10 9 10 5 5.9 10 8 4.7 18.65 5 3, 3, 3 10 9 10 10 0 3.2 10 8 0.265 7.615 6 5, 5, 5 10 5 10 6 10 3 1.8 10 4 4.69 102.7 7 7, 5, 10 10 7 10 9 10 4 1.6 10 6 41.3 327.4 8 10, 10, 10 10 7 10 9 10 4 4.6 10 6 241.2 6713

408 Zhengfeng Yang and Lihong Zhi References [1] Corless, R. M., Giesbrecht, M. W., van Hoeij, M., Kotsireas, I. S., Watt, S. M., 2001. Towards factoring bivariate approximate polynomials. In: Mourrain, B. Ed., Internat. Symp. Symbolic Algebraic Comput. ISSAC 2001 Proc. 2001 Internat. Symp. Symbolic Algebraic Comput. ACM Press, New York, N. Y., pp. 85 92. [2] Corless, R. M., Galligo, A., Kotsireas, I. S., Watt, S. M., 2002. A geometric-numeric algorithm for absolute factorization of multivariate polynomials. In: Mora, T. Ed., Internat. Symp. Symbolic Algebraic Comput. ISSAC 2002 Proc. 2002 Internat. Symp. Symbolic Algebraic Comput. ACM Press, New York, N. Y., pp. 37 45. [3] Kaltofen, E., May, J., 2003. On approximate irreducibility of polynomials in several variables. In: Sendra, J.R. Ed., Internat. Symp. Symbolic Algebraic Comput. ISSAC 2003 Proc. 2003 Internat. Symp. Symbolic Algebraic Comput. ACM Press, New York, N. Y., pp. 161 168. [4] Gao, S., 2003. Factoring multivariate polynomials via partial differential equations. Math. Comput. 72 (242), 801 822. [5] Golub, G. H. and Van Loan, C. F., 1996. Matrix computations. Johns Hopkins University Press, Baltimore, Maryland, third ed., 1996. [6] Huang, Y., Stetter, H. J., Wu, W., Zhi, L., 2000. Pseudofactors of multivariate polynomials. In: Traverso, C. (Ed.), Internat. Symp. Symbolic Algebraic Comput. ISSAC 2000 Proc. 2000 Internat. Symp. Symbolic Algebraic Comput. ACM Press, New York, N. Y., pp. 161 168. [7] Nagasaka, K., 2002. Towards certified irreducibility testing of bivariate approximate polynomials. In: Mora, T. Ed., Internat. Symp. Symbolic Algebraic Comput. ISSAC 2002 Proc. 2002 Internat. Symp. Symbolic Algebraic Comput. ACM Press, New York, N. Y., pp. 192 199. [8] Ruppert, W. M., 1999. Reducibility of polynomials f(x,y) modulo p. J. Number Theory 77, 62 70. [9] Sasaki, T., 2001. Approximate multivariate polynomial factorization based on zero-sum relations. In: Mourrain, B. Ed., Internat. Symp. Symbolic Algebraic Comput. ISSAC 2001 Proc. 2001 Internat. Symp. Symbolic Algebraic Comput. ACM Press, New York, N. Y., pp. 284 291. [10] Zeng, Z., 2003. A method computing multiple roots of inexact polynomials. In: In: Sendra, J.R. Ed., Internat. Symp. Symbolic Algebraic Comput. ISSAC 2003 Proc. 2003 Internat. Symp. Symbolic Algebraic Comput. ACM Press, New York, N. Y., pp. 266 272. [11] Zhi, L., Noda, M.-T., 2000. Approximate GCD of multivariate polynomials. In Proc. Fourth Asian Symposium on Computer Mathematics (ASCM 2000), Xiaoshan Gao and Dongming Wang, eds., vol. 8 of Lecture Notes Series on Computing, Singapore, 2000, World Scientific, pp. 9 18. [12] Zhi, L., 2003. Displacement structure in computing approximate GCD of univariate polynomials. In: Li, Z., Sit, W. (Eds.), Proc. Sixth Asian Symposium on Computer Mathematics (ASCM 2003). Vol. 10 of Lecture Notes Series on Computing. World Scientific, Singapore, pp. 288 298.