New algorithm for solving pentadiagonal CUPL-Toeplitz linear systems
Abstract
In this paper, based on the structure of pentadiagonal CUPL-Toeplitz matrix and Sherman–Morrison–Woodbury formula, we develop a new algorithm for solving nonsingular pentadiagonal CUPL-Toeplitz linear system. Some numerical examples are given in order to illustrate the effectiveness of the proposed algorithms.
Full text
New algorithm for solving pentadiagonal CUPL-Toeplitz linear systems Hcini Fahda,∗, Yulin Zhangb aUniversity of Tunis El Manar, ENIT-LAMSIN, BP 37, 1002, Tunis, Tunisia bCentro de Matematica, Universidade do Minho, 4710-057 Braga, Portugal Abstract In this paper, based on the structure of pentadiagonal CUPL-Toeplitz matrix and Sherman-Morrison- Woodbury formula, we develop a new algorithm for solving nonsingular pentadiagonal CUPL-Toeplitz linear system. Some numerical examples are given in order to illustrate the effectiveness of the proposed algorithms. Keywords: CUPL-Toeplitz matrix, Sherman-Morrison-Woodbury formula, Toeplitz matrix, low rank matrix, LU decomposition. 2022 MSC: 15A23, 35L30 1. Introduction An×nmatrix is called column upper-plus-lower (CUPL) Toeplitz matrix if it is of the following form TCUP L = a0a−1a−2··· a1−n a1a0+a1 ....... . . a2a1+a2 ......a−2 . . .. . .......a−1 an−1an−2+an−1··· a1+a2a0+a1 ,(1) i.e., its entries satisfy aij =(ai−j, j = 1 or j > i ai−j+ai−j+1,2≤j≤i. Obviously, a CUPL-Toeplitz matrix TCUP L can be splitted as the difference of a Toeplitz matrix and a rank one matrix, i.e., TCUP L =T−aeT 1,(2) where T= [ak,j ], k, j = 0,1, ..., n −1 is a Toeplitz matrix, a=a1a2··· an−10Tand e1= 1 0 ··· 0T. Any Toeplitz Matrix perturbed by a lower rank matrix can be viewed as quasi-Toeplitz matrix. Therefore, the CUPL-Toeplitz matrix can be considered as a special class of quasi-Toeplitz matrix.5 Quasi-Toeplitz matrices are widely used in quasi birth-and-death processes, option pricing and signal processing etc. [1,2]. In [3], Du et al presented an efficient method for finding the solution of tridiagonal quasi Toeplitz linear systems. Later on this method was generalised to solve the block quasi tridiagonal Toeplitz [4]. In [5,6], a fast method for solving quasi-pentadiagonal Toeplitz linear systems was presented, which was based on solving pentadiagonal Toeplitz linear systems.10 ∗Corresponding author Email address: [email protected] (Hcini Fahd ) Preprint submitted to Elsevier November 9, 2022
As a special class of quasi-Toeplitz matrix, the CUPL-Toeplitz Matrix brought attention to the researchers in the last decades [7,8,9,10]. For calculating the inverse of CUPL-Toeplitz matrix, an explicit inverses of this matrix were introduced [11]. Recently, based on the decomposition form a CUPL-Toeplitz matrix (2) and the Sherman-Morrison-Woodbury formula, Fu et al [12] presented two algorithms to solve the CUPL-Toeplitz linear system TCUP Lx=f, (3) where TCUP L is nonsingular. In this paper, we propose a new algorithm for finding the solution of the nonsingular pentadiagonal CUPL-Toeplitz linear system Tx =f, (4) where T= a b c d a +d b c e d +e a +d b c ............... ............... e d +e a +d b c e d +e a +d b e d +e a +d . The idea is to decompose the pentadiagonal CUPL-Toeplitz matrix into a product of LU matrices plus a ranks two matrix, then apply the Sherman-Morrison-Woodbury formula to get its inverse. At the and, some numerical examples are given to illustrate the effectiveness of our algorithms. 2. Algorithms for solving pentadiagonal CUPL-Toeplitz linear system15 In this section, we decompose the CUPL-Toeplitz into the quasi-Toeplitz matrix plus a rank two matrix. Let L= 1 s1 e/p s 1 ......... ......... e/p s 1 e/p s 1 e/p s 1 and U= 1t c/p 1t c/p 1t c/p ......... ......... 1t c/p 1t 1 . The pLU = p pt c ps pst +p b c e c0a0b c ............... ............... e c0a0b c e c0a0b e c0a0 , 2
where c0=d+e,a0=a+d. We will choose p,sand tsuch that the following non-linear equations are satisfied. et +ps −c0= 0, p2(st + 1) −a0p+ec = 0, pt +sc −b= 0. (5) Then the matrix Tcan be written as T=pLU +e1e2ec p+pst −d sc et −eec peT 1 eT 2.(6) From (5), we observe that the parameter psatisfy the following equation p6−a0p5+ (bc0−ce)p4+ (2a0ce −b2e−c02c)p3+ (bcc0e−e2c2)p2−a0e2c2p+e3c3= 0.(7) Theorem 1. The analytic solution of Eq. (7) can be written as p2i−1=qi+pq2 i−4ce 2and p2i=qi−pq2 i−4ce 2, i = 1,2,3,(8) where q1=µ1+µ4+µ2 1+µ2 µ4 , q2=µ1−µ4 2−µ2 1+µ2 2µ4 +i√3 2µ4−µ2 1+µ2 µ4, q3=µ1−µ4 2−µ2 1+µ2 2µ4−i√3 2µ4−µ2 1+µ2 µ4, and µ1=a0 3,µ2=4ce−bc0 3,µ3=4a0ce−cc02−b2e 2,µ4=3 rµ3 1+3µ1µ2 2−µ3+qµ3 1+3µ1µ2 2−µ32−(µ2 1+µ2)3. Proof. We divide the both sides of (7) by p3, and define q=p+c e, then the equations (7) can be written as q3−a0q2−(4ce −bc)q+ 4a0ce −c02c−b2e= 0.(9) Using the Cardano’s method, we can deduce the solution of equation (9), then the final solution of (7) is given by p2i−1=qi+pq2 i−4ce 2and p2i=qi−pq2 i−4ce 2, i = 1,2,3, where q1,q2,q3are defined above, and the proof is complete. Assuming p6= 0 and p6=ce, after obtaining p, it is easy to deduce that s=c0p−be p2−ce =(d+e)p−be p2−ce and t=bp −c0c p2−ce =bp −(d+e)c p2−ce . Next, for the convenience of the readers, we transcribe the Sherman-Morrison-Woodbury formula here, which can be found in [13], Sherman-Morrison-Woodbury formula: Let Abe an n×nnonsingular matrix, n×k matrix Uand k×nmatrix Vand let Bbe an n×nmatrix such that B=A+UV . Then, assuming a nonsingular matrix (Ik+V A−1U), we have B−1=A−1−A−1UIk+V A−1U−1V A−1. 3
According to the Sherman-Morrison-Woodbury formula, the inverse of the matrix Tcan be written as T−1=1 p(LU)−1−1 p(LU)−1[e1,e2]ec p+pst −d sc et −eec pN−1eT 1 et 2(LU)−1,(10) where N=I2+1 peT 1 eT 2(LU)−1[e1,e2]ec p+pst −d sc et −eec p.(11) Let y= (y1, y2, . . . , yn)T,z= (z1, z2, . . . , zn)Tand w= (w1, w2, . . . , wn)Tbe the solutions of the following systems: LUy=f/p,LUz=e1and LUw=e2, which will be calculated by Algorithm 1. Algorithm 1 An algorithm for solving LUy=˜ f,˜ f=f/p Input: s,t,p,e,cand ˜ f. 1. (solving L˜z=˜ f) ˜z1=˜ f1, ˜z2=˜ f2−s˜z1, ˜zi=˜ fi−s˜zi−1−e p˜zi−2,i= 3 to n. 2. (solving Uy= ˜z)yn= ˜zn,yn−1= ˜zn−1−tyn,yi= ˜zi−tyi+1 −c pyi+2,i=n−2 to 1. Output: y= [y1, y2...,yn]T. Thus, the matrix Nbecomes20 N=I2+1 peT 1 eT 2[z, w]ec p+pst −d sc et −eec p ="1+(ec p2+st −d p)z1+ (et p−e p)w1sc pz1+ec p2w1 (ec p2+st −d p)z2+ (et p−e p)w21 + sc pz2+ec p2w2# =θ1θ2 θ3θ4. Then, the final solution of (4) is obtained by multiplying equation (10) by fas follows: x=y−[z, w]ec p+pst −d sc et −eec pN−1y1 y2(12) =y−[z, w]ec p+pst −d sc et −eec p1 (θ1θ4−θ2θ3)pθ4−θ2 −θ3θ1 y1 y2(13) =y−αz −βw. (14) where α=1 (θ1θ4−θ2θ3)p(ec p+pst −d)θ4y1−scθ3y1−(ec p+pst −d)θ2y2+scθ1y2,(15) and β=1 (θ1θ4−θ2θ3)p(et −e)θ4y1−ec pθ3y1+ (e−et)θ2y2+ec pθ1y2.(16) The execution algorithm steps are summarized as follows: 4
Algorithm 2 An algorithm for solving Tx =f Input: a,b,c,d,eand f. 1. Choose an arbitrary root pof Eq. (7) which satisfies p2−ce 6= 0. 2. Compute s=(d+e)p−be p2−ce and t=bp−(d+e)c p2−ce . 3. Solving LUy=f/p,LUz=e1and LUw=e2by Algorithm 1. 4. Compute α,β. Output: The solution of system (4), x=y−αz −βw. The study of the stability of our Algorithm 2depends on the Algorithm 1, precisely, the solving the upper and lower triangular linear systems LUy=f/p,LUz=e1and LUw=e2. More precisely, two recursive iterations such as yi=szi−1−e pzi−2and xn+1−i=zn+1−i−txn+2−i−c pxn+3−ifor i= 3,4, ..., n25 corresponding to the forward and backward substitutions as in Algorithm 1are essential for Algorithm 2. Still, if all the roots of their characteristic equations ρ2+sρ +e p= 0 and ρ2+tρ +c p= 0 are all less than unity in magnitude, errors of ziand xn+1−iwill smaller than the errors of previous values zi−1and xn+2−i, respectively, in which case Algorithm 2is stable. 3. Numerical Experiments30 In this section, we give the results of some simple numerical experiments to demonstrate the effectiveness of our algorithms. All tests are implemented in MATLAB R2018a and the computations are done on an Intel PENTIUM computer, (2.2 GHz), 6 GB memory. 3.1. Experiment 1 In this experiment, we used five artificial examples. Values of a,b,c,dand ecorresponding to each35 example are presented in Table 1. We initialized the exact solution x∗= [1,1, ..., 1]T. The right-hand side vector was set to be f=Ax∗. The absolute errors kx−x∗k, residuals kAx −fk, and CPU time will be listed. Here, k.kis the euclidean vector norm. The compared results between our algorithm and algorithme [12], algorithme [14] and MATLAB Solver for all tests examples are presented in Tables 2–6.40 Table 1: Test examples. a b c d e Example 1 7 -1 5 2 -1.5 Example 2 0.80 0.70 0.65 -0.4 -0.2 Example 3 5.5 2.7 2.6 2.25 -5.25 Example 4 10 -2 1 0.54 1 Example 5 6 -1 -1.5 1 -2 5
Table 2: Numerical results of Example 1 n100 1000 10000 100000 Our Algorithm kAx−fk1.1512e−14 1.1512e−14 1.1512e−14 1.1512e−14 kx−x∗k1.2462e−15 1.2462e−15 1.2462e−15 1.2462e−15 CPU(s) 0.0010 0.018 0.081 0.85 Algorithm [12]kAx−fk1.4862e−14 1.4862e−14 1.4862e−14 1.4862e−14 kx−x∗k1.3276e−15 1.3276e−15 1.3276e−15 1.3276e−15 CPU(s) 0.0037 0.021 0.17 1.65 Algorithm [14]kAx−fk1.9860e−14 4.2596e−14 1.2655e−13 Failure kx−x∗k2.3708e−15 5.2733e−15 1.5801e−14 Failure CPU(s) 0.0028 0.024 7.30 Failure MATLAB Solver kAx−fk1.5486e−14 4.0740e−14 1.2593e−13 Failure kx−x∗k1.0934e−15 2.5966e−15 7.8873e−15 Failure CPU(s) 0.0046 0.054 1.06 Failure Table 3: Numerical results of Example 2 n100 1000 10000 100000 Our Algorithm kAx−fk3.6422e−15 1.0987e−14 3.4541e−14 1.0916e−13 kx−x∗k4.9214e−15 1.1958e−14 3.6418e−14 1.1471e−13 CPU(s) 0.0010 0.0083 0.081 0.82 Algorithm [12]kAx−fk3.8751e−15 1.1029e−14 3.4554e−14 1.0917e−13 kx−x∗k5.0120e−15 1.1966e−14 3.6421e−14 1.1471e−13 CPU(s) 0.0026 0.017 0.16 1.65 Algorithm [14]kAx−fk2.4751e−15 7.1534e−15 2.2246e−14 Failure kx−x∗k3.4255e−15 1.2474e−14 3.9506e−14 Failure CPU(s) 0.0021 0.027 7.74 Failure MATLAB Solver kAx−fk2.2093e−15 3.9968e−15 1.1265e−14 Failure kx−x∗k3.1225e−15 5.6512e−15 1.5931e−14 Failure CPU(s) 0.0046 0.049 1.07 Failure Table 4: Numerical results of Example 3 n100 1000 10000 100000 Our Algorithm kAx−fk1.4789e−14 2.1224e−14 2.1224e−14 2.1224e−14 kx−x∗k1.4937e−15 2.1384e−15 2.1384e−15 2.1384e−15 CPU(s) 0.0013 0.0088 0.091 0.99 Algorithm [12]kAx−fk1.6829e−14 2.2399e−14 2.2399e−14 2.2399e−14 kx−x∗k1.5662e−15 2.1614e−15 2.1614e−15 2.1614e−15 CPU(s) 0.0028 0.017 0.30 1.98 Algorithm [14]kAx−fk2.2227e−14 5.8135e−14 1.7827e−13 Failure kx−x∗k2.2343e−15 1.0427e−14 3.4901e−14 Failure CPU(s) 0.0022 0.029 6.94 Failure MATLAB Solver kAx−fk1.6998e−14 4.9182e−14 1.5401e−13 Failure kx−x∗k1.7659e−15 5.0304e−15 1.5722e−14 Failure CPU(s) 0.0058 0.054 1.02 Failure 6
Table 5: Numerical results of Example 4 n100 1000 10000 100000 Our Algorithm kAx−fk1.1783e−14 1.1783e−14 1.1783e−14 1.1783e−14 kx−x∗k7.7716e−16 7.7716e−16 7.7716e−16 7.7716e−16 CPU(s) 0.0016 0.0091 0.092 0.90 Algorithm [12]kAx−fk1.2561e−14 1.2561e−14 1.2561e−14 1.2561e−14 kx−x∗k8.1584e−16 8.1584e−16 8.1584e−16 8.1584e−16 CPU(s) 0.0038 0.020 0.21 1.72 Algorithm [14]kAx−fk1.0358e−14 1.0358e−14 1.0358e−14 Failure kx−x∗k1.1697e−15 2.6296e−15 7.8982e−15 Failure CPU(s) 0.0043 0.024 6.03 Failure MATLAB Solver kAx−fk5.0243e−15 5.0243e−15 5.0243e−15 Failure kx−x∗k7.8439e−16 7.8439e−16 7.8439e−16 Failure CPU(s) 0.0056 0.054 0.98 Failure Table 6: Numerical results of Example 5 n100 1000 10000 100000 Our Algorithm kAx−fk1.2829e−14 1.8539e−14 4.6029e−14 1.4095e−13 kx−x∗k7.0497e−15 9.7099e−15 2.3195e−14 7.0536e−14 CPU(s) 0.0015 0.0095 0.097 0.86 Algorithm [12]kAx−fk1.5414e−14 2.0423e−14 4.6819e−14 1.4121e−13 kx−x∗k7.1702e−15 9.7914e−15 2.3229e−14 7.0547e−14 CPU(s) 0.0033 0.021 0.18 1.75 Algorithm [14]kAx−fk1.0975e−14 2.8832e−14 8.9056e−14 Failure kx−x∗k2.9395e−15 2.0180e−14 6.6339e−14 Failure CPU(s) 0.0030 0.024 7.23 Failure MATLAB Solver kAx−fk7.1158e−15 2.1213e−14 6.6660e−14 Failure kx−x∗k3.3510e−15 1.3738e−14 4.4313e−14 Failure CPU(s) 0.0052 0.049 0.94 Failure For all numerical tests, we can see that our algorithm takes less CPU time and is about twice as fast as other algorithms. 3.2. Experiment 2 In this experiment, we considered the exact solution x∗= [−3,−3, ..., −3]T, and Ta pentadiagonal CUPL-Toeplitz matrix. Then, our pentadiagonal CUPL-Toeplitz linear system is written as follows: 9−1 2 1 10 −1 2 1 2 10 −1 2 ............... ............2 1 2 10 −1 1 2 10 x1 x2 . . . . . . xn−2 xn−1 xn = −3 −3 −3 . . . −3 −3 −3 The compared results, absolute errors kx−x∗k, residuals kAx −fk, and CPU time between our algorithm and algorithme [12], algorithme [14] and MATLAB Solver are presented in Table 7.45 7
Table 7: Numerical results of Experiment 2 n100 1000 10000 100000 Our Algorithm kAx−fk1.7764e−14 1.7764e−14 1.7764e−14 1.7764e−14 kx−x∗k1.9860e−15 1.9860e−15 1.9860e−15 1.9860e−15 CPU(s) 0.0012 0.0096 0.094 0.87 Algorithm [12]kAx−fk2.2748e−14 2.2748e−14 2.2748e−14 2.2748e−14 kx−x∗k2.4726e−15 2.4726e−15 2.4726e−15 2.4726e−15 CPU(s) 0.0030 0.020 0.19 1.75 Algorithm [14]kAx−fk3.9080e−14 3.9080e−14 3.9080e−14 Failure kx−x∗k5.1789e−15 1.0750e−14 3.1671e−14 Failure CPU(s) 0.0027 0.042 8.73 Failure MATLAB Solver kAx−fk1.5888e−14 1.5888e−14 1.5888e−14 Failure kx−x∗k3.4111e−15 1.0019e−14 3.1430e−14 Failure CPU(s) 0.0051 0.050 1.01 Failure Table 8: Time ratio of Experiment 2. n Time ratio Our Algorithm/ Algorithm[12] Our Algorithm/ Algorithm[14] Our Algorithm/MATLAB Solver 100 0.4000 0.444 0.2353 1000 0.4800 0.228 0.1920 10000 0.4947 0.0107 0.0931 100000 0.4971 - - We can see that our proposed algorithm takes less CPU time and is about twice faster than the algorithme [12], algorithme [14] and MATLAB Solver. Remark 1. In step 1 of the algorithm presented in [12], we used fast pentadiagonal Toeplitz solver and MATLAB Solver, is a solver for pentadiagonal linear system from MATLAB. 4. Conclusion50 In this paper we have exploited the special pentadiagonal CUPL-Toeplitz structure to develop a fast algorithm for solving pentadiagonal CUPL-Toeplitz linear systems. We compare our algorithm with the algorithms [12], [14] and MATLAB Solver, the numerical results show that our algorithm is more efficient, in terms of time, almost half that of the other algorithms and in terms of error. Funding55 The last author was partially financed by Portuguese Funds through FCT (Funda¸c˜ao para a Ciˆencia e a Tecnologia) within the Projects UIDB/00013/2020 and UIDP/00013/2020. Declarations Ethical Approval Not Applicable.60 Availability of supporting data Not Applicable. 8
Competing interests The author has no relevant financial or non-financial interests to disclose. Authors’ contributions65 The authors confirm sole responsibility for the following: study conception and design, data collection, analysis and interpretation of results, and manuscript preparation Acknowledgments Not applicable. References70 [1] Marcel F Neuts. Structured stochastic matrices of M/G/1 type and their applications. CRC Press, 2021. [2] Marcel F Neuts. Matrix-geometric solutions in stochastic models: an algorithmic approach. Courier Corporation, 1994. [3] Lei Du, Tomohiro Sogabe, and Shao-Liang Zhang. A fast algorithm for solving tridiagonal quasi-toeplitz linear systems. Applied Mathematics Letters, 75:74–81, 2018. [4] Skander Belhaj, Fahd Hcini, and Yulin Zhang. A fast method for solving a block tridiagonal quasi-toeplitz linear system.75 Portugaliae Mathematica, 76(3):287–299, 2020. [5] Skander Belhaj, Fahd Hcini, Maher Moakher, and Yulin Zhang. A fast algorithm for solving diagonally dominant symmetric quasi-pentadiagonal toeplitz linear systems. Journal of Mathematical Chemistry, 59(3):757–774, 2021. [6] Skander Belhaj, Fahd Hcini, and Maher Moakher. A fast method for solving quasi-pentadiagonal toeplitz linear systems and its application to the lax–wendroff scheme. Mathematics and Computers in Simulation, 188:77–86, 2021.80 [7] Dario A Bini, Stefano Massei, and Beatrice Meini. On functions of quasi-toeplitz matrices. Sbornik: Mathematics, 208(11):1628, 2017. [8] Dario Bini, Stefano Massei, and Beatrice Meini. Semi-infinite quasi-toeplitz matrices with applications to qbd stochastic processes. Mathematics of Computation, 87(314):2811–2830, 2018. [9] Dario A Bini, Stefano Massei, and Leonardo Robol. Quasi-toeplitz matrix arithmetic: a matlab toolbox. Numerical85 Algorithms, 81(2):741–769, 2019. [10] Dario A Bini and Beatrice Meini. On the exponential of semi-infinite quasi-toeplitz matrices. Numerische Mathematik, 141(2):319–351, 2019. [11] Zhao-Lin Jiang, Xiao-Ting Chen, and Jian-Min Wang. The explicit inverses of cupl-toeplitz and cupl-hankel matrices. East Asian Journal on Applied Mathematics, 7(1):38–54, 2017.90 [12] Yaru Fu, Xiaoyu Jiang, Zhaolin Jiang, and Seongtae Jhang. Fast algorithms for finding the solution of cupl-toeplitz linear system from markov chain. Applied Mathematics and Computation, 396:125859, 2021. [13] William W Hager. Updating the inverse of a matrix. SIAM review, 31(2):221–239, 1989. [14] Tomohiro Sogabe. New algorithms for solving periodic tridiagonal and periodic pentadiagonal linear systems. Applied Mathematics and Computation, 202(2):850–856, 2008.95 9