Computation of the LCM of several polynomials using the
6.4 The Hybrid LCM method and its computa- computa-tional properties
6.4.1 The numerical computation of an approximate LCM using the Hybrid LCM method
b′i
σi
, if σi 6= 0
t = arbitrary, if σi = 0
(6.50)
Once y is computed, the solution can be recovered from
x = V · y (6.51)
The numerical algorithm for solving least-squares problems with the SVD method, using the Golub-Kahan-Reinsch (GKR) algorithm, is described in [27].
A numerical analysis of this algorithm is also presented in [18]. The algorithm requires about 2mn2+ 4n3 floating-point operations to solve the least-squares problem when A is m× n and m ≥ n. Furthermore, there is no need to compute the whole vector b′ and only the columns of U that correspond to the non-zero singular values are needed in computation.
6.4.1 The numerical computation of an approximate LCM using the Hybrid LCM method
The system (6.46) is a full-rank overdetermined linear system and, instead of solving the equations exactly, we seek only to minimize the sum of the squares of the residuals
u= bFP · ˆa + fr+1
According to the previous theoretical results, the linear system FbP· ˆa ≈ −fr+1
has a unique least-squares solution, which can be represented as ˆ
a = bFP† · (−fr+1) (6.52)
where bFP† is the pseudo-inverse of bFP.
REMARK 6.3. The residual norm kuk2 characterises the proximity of the com-puted solution to the exact solution of the LCM problem and we may consider it as a measure of quality of the approximate εt-LCM.
The main result from the preceding analysis can be summarized in the following theorem.
Theorem 6.10. Let P =
pi(s) ∈ R[s], i = 1, 2, . . . , h
a set of real monic polynomials. The matrix FP ∈ Rd×(d+1) is associated with the remainder sequence (ri(s)), which derives from the application of the ERES Division algorithm on the pairs (l(s), pi(s)) for all i = 1, 2, . . . , h. If r denotes the numerical εt-rank of FP, then an approximate εt-LCM of P is given by the solution of the least-squares problem :
L
FbP,−fr+1
, min
ˆ a
bFP · ˆa + fr+1
2 (6.53)
where the matrix bFP is constructed from the first r columns of FP, ˆa = [a0, ..., ar−1]t is the vector of the first r coefficients of the LCM and fr+1 is the r + 1 column of FP, which corresponds to the leading coefficient of the LCM, ar = 1 .
Corollary 6.1. The residual from the solution of the linear least-squares problem (6.53) characterises the numerical quality of the given approximate LCM of the
original set of polynomials P.
If the residual from the obtained least-squares solution is close enough to zero (according to the Euclidean norm), then it can be considered as a “good”
approximation of the LCM of the original set of polynomials. The unique solution of the least-squares problem (6.53), which gives the coefficients of the εt-LCM, can be acquired by using either a QR or SVD least-squares method. In fact, mathematical software packages, such as Matlab and Maple, contain efficient built-in routines for the linear least-squares problem where QR decomposition or SVD algorithms are used.
◮ The implementation of the Hybrid LCM algorithm
Having made the necessary preparation, we are now ready to form the Hybrid LCM algorithm for computing the approximate LCM of a set of several real polynomials.
ALGORITHM 6.2. The Hybrid LCM algorithm Input : P =
pi(s)∈ R[s], i = 1, 2, . . . , h . Set a small numerical accuracy εt> 0.
Step 1 : Compute the degrees of the polynomials pi(s) : di := deg{pi}, i = 1, 2, . . . , h.
d := d1 + d2+ . . . + dh.
Step 2 : Form the arbitrary polynomial l(s) = adsd+ . . . + a1s + a0.
For i = 1, 2, . . . , h do
Step 3 : Apply the ERES Division algorithm to (l(s), pi(s)) : P := ERESDiv(l(s), pi(s))
Step 4 : Take the first row of P and form the matrix Fi. end for
Step 5 : Form the d× (d + 1) matrix FP = [F1, . . . , Fh]t. Step 6 : Normalize the rows of FP using norm-2.
Step 7 : Compute the singular values of FP and specify r such that σ1 > . . . > σr > εt≥ σr+1 > . . . > σd. Step 8 : Form the matrix bFP from the first r columns of FP. Step 9 : Form the vector fr+1 from the r + 1 column of FP. Step 10 : Compute the solution of the least-squares problem :
L( bFP,−fr+1} = min k bFP· ˆa + fr+1k2
Output : ˆa= [a0, a1, . . . , ar−1]t,
l(s) = sr+ ar−1sr−1+ . . . + a1s + a0
◮ Computational complexity
Assuming that all the polynomials pi(s) ∈ P have the same degree ¯d, that is di = ¯d for all i = 1, 2, . . . , h, then d = ¯d h. The required number of operations for
the ERES Division algorithm is
f lED(h, ¯d ) = h( ¯d + 2)(d− ¯d + 1)
= d¯2 + 2 ¯d
h2− ¯d2+ ¯d− 2
h (6.54)
Since we have h polynomials, the number of data that the algorithm produces is d h. Thus, the algorithm is considered to be efficient [18] if¯
f lED(h, ¯d )≤ ( ¯d h)3 that is:
d¯3h3− ¯d2+ 2 ¯d
h2+ ¯d2+ ¯d− 2 h≥ 0
It can be easily proved that the above inequality holds for every ¯d, h≥ 2 and therefore, the ERES Division algorithm is efficient in handling sets of many polynomials.
The computation of the singular values of the d× (d + 1) matrix FP requires [27] :
f lSV(d) = 4
3d3+ 2 d2 (6.55)
operations, using the GKR-SVD algorithm. Alternatively, we could use the Chan-SVD algorithm [13], but it requires 2 d3 + d2 operations, which is greater than f lSV(d). Furthermore, it has been observed that any SVD algorithm gives more accurate results when it is applied to a normalized matrix. Thus, if we normalize the rows of the matrix FP by using the Euclidean norm, the additional arithmetic operations required are:
f lN(d) = 2 d2+ 4 d + 2 (6.56) When solving the least-squares problem through the SVD, only Σ and V have to be computed. According to the algorithm that is used, the required numerical operations for the d× r least-squares problem are [27] :
GKR− SVD : 2 d r2+ 4 r3 Chan− SVD : d r2+ 17
3 r3
If r < 35d it is more efficient to use the GKR-SVD algorithm, otherwise we should use the Chan-SVD algorithm. Therefore, the required operations for the least-squares problem (6.53) are:
f lLS(d, r) =
( 2 d r2+ 4 r3, r < 35d
d r2+ 173 r3, r ≥ 35d (6.57) Alternatively, we can obtain the least-squares solution by using the QR method.
Then the computational cost of the algorithm is dominated by the QR decom-position of bFP. The overall cost for the full-rank least-squares solution using the Golub-Householder method [27] is :
f lQR(d, r) = r2 d− r
3
(6.58)
Conclusively, given a set P of h real polynomials with average degree ¯d≥ 2 and the rank of FP is r (which is equal to the degree of its LCM), then, considering the equations (6.54)-(6.58), the total amount of operations for the Hybrid LCM algorithm is:
O
4
3( ¯d h)3+3
2( ¯d h)r2+ 5 r3
(6.59) In the worst case, where the LCM has the maximum degree d = ¯d h, the algorithm performs less than 8 d3 operations for the final result, which is computationally acceptable for large sets of polynomials.