Advances in Computer Science Research, volume 58 Modeling, Simulation and Optimization Technologies and Applications (MSOTA 2016)

A Computational Algorithm for the Inverse of a Sevendiagonal

Yanling Lin and Xiaolin Lin* School of Arts and Sciences, Shaanxi University of Science and Technology, Xi’an 710021, P.R. China *Corresponding author

Abstract—In this article, we investigate the inverse of the Without loss of generality, a sevendiagonal matrix with sevendiagonal matrix. Under certain conditions, the efficient order n can be given as algorithm which is suitable for implementation using computer algebra systems, is proposed. Also, the inverse of an anti- sevendiagonal matrix is obtained based on the special relation  dcba 0  0  between the sevendiagonal matrix and the anti-sevendiagonal  1111   dcba  matrix. A numerical example is provided to further illustrate the  22222    dcba   validity of the corresponding algorithm.  333333    a4444  0  T    Keywords-a sevendiagonal matrix; inverse matrix; determinant; 0  dn3    computer algebra system  cn2     bn1  0  0  a  I. INTRODUCTION  nnnn  (1) A large number of banded matrices are appeared in the where dcba  ,,,,,  and    ni ),,2,1( are finite process of and numerical calculation, such iiiiii i as tridiagonal, pentadiagonal and sevendiagonal matrices. sequences of numbers such that i   nid  )3,,2,1(0 , They play an important role in theory, and they are applied in   ddd 1,     0 ,       0 , spline approximation, parallel computing, partial differential  12 nnn 211 321 equations(PDE) and boundary value problems(BVP). For a and  nn  1  ccb n  0 . long time, the inverses of tridiagonal and pentadiagonal matrices have been researched[1-11]. Recently, the inverses of Suppose that the sevendiagonal matrix T is non-singular Toeplitz tridiagonal and pentadiagonal matrices are also and the inverse is investigated[12]. And the inverses of sevendiagonal and generalized sevendiagonal matrices have been studied[13-15]. 1 , Many of them gave algorithms to obtain the inverse matrices T  21  CCC n ),,,( by LU factorization[3-5,9,10,13-15]. A few by dividing blocks of diagonal matrices[6,12]. And Ran Rui-sheng[7] used the where C denote the jth column of T1 ,  ,,2,1 nj . Here Doolittle factorization to get the inverse matrix of a general j also can be written as . C j In this paper, based on the numerical algorithms given in [1,13], we present a fast algorithm for computing the inverse j  21  ),,,( ECCCC jn of the sevendiagonal matrix. Moreover, the inverse of anti- , sevendiagonal matrix is also investigated. where E    ),,,( t ,  ,,2,1 nj , and  is the The rest of this paper is organized as follows. In Section 2, 21 jjj nj ij we present an efficient algorithm for the inverse of an n-by-n Kronecker symbol. sevendiagonal matrix, and the inverse of the anti- Through the relation 1TT  I ( here is the  nn sevendiagonal matrix is also given. One numerical example is n I n provided to illustrate the proposed algorithm in Section 3. ), we get the relations as Finally, some conclusions of the work are given.

 3 (  1122  /) dCaCbCcEC nnnnnnnnn 3 II. INVERSE OF A SEVENDIAGONAL MATRIX   (  11223314   /) dCCaCbCcEC nnnnnnnnnnn 4 In this section, we mainly focus on giving some recurrence  formulas for the inverse of an n-by-n sevendiagonal matrix in  (  1122334425   /) dCCCaCbCcEC nnnnnnnnnnnnn 5  (   /) dCCCCaCbCcEC terms of their columns.  3  1122 jjjjjjjjjjjjjjj  3332211   3-nj4 (2)

Copyright © 2016, the Authors. Published by Atlantis Press. This is an open access article under the CC BY-NC license (http://creativecommons.org/licenses/by-nc/4.0/). 298 Advances in Computer Science Research, volume 58

t  DdDcDbDa 31211101  0 where E  21 jjj   nj ),,,,( ,  ,,2,1 nj , and ij is the  DdDcDbDaD  0 Kronecker symbol.  4232221202   DdDcDbDaDD 534333231303  0 It follows from (2) that if we get the last three columns     11121314151 DdDcDbDaDDD iiiiiiiiiiiiii  11  0 ,CC andC , then we can recursively determine all other  nn 1 n2   ni  2,,6,5 columns ,, CC . Now we shall give the recurrence  D D   DDcDbDaD n3 1  nnnnnnnnnnnn  122232425262 n    nnnnnnnnnn  1121314151  DDbDaDDD n1 formulas for computing ,CC nn 1 andCn2 .    DDaDDD  4 3 2 nnnnnnnn 1 n2 (8) Consider the three finite sequences of numbers , BA ii From the recurrence equations (6), (7) and (8), we can give and i  niD  )2,,1,0( with the initial conditions of a matrix form as  DDBBAA 212010  0 and   DBA 012 1 , which satisfy TA     EAEAEA  2112 nnnnnn , (9) A    n1  TT nnn  3    0n1 A13 TB  EBEBEB   , (3)  2112 nnnnnn , (10)

B  TD     EDEDED TT   n1   0 nn 2 11  2 nnnn . (11) nnn  3 B  n1  13  , (4) Multiply (9),(10),(11) by ,, QQQ 131211 respectively to get the following equations D    n1  TT nnn  3    0n1 D13  TA     EQAEQAEQAQ , (5) 11 nnn  nn  1121111211 n , (12)

t t where   n I0T  333)3( , A  10  AAA n1],,,[ , TB     EQBEQBEQBQ t t t 12 nnn  nn  1221121212 n , (13) B  10  BBB n1],,,[ , D  10  DDD n1],,,[ , A  ,, AAA nnn  21 , t t B  ,, BBB nnn  21 , D  ,, DDD nnn  21 . Here I 33 is the 33 identify matrix. TD    EQDEQDEQDQ 13 nn 213 n 1131 nn  132 n , (14) On the basis of (3), (4) and (5) ,we can get the Eqs

multiply (9),(10),(11) by ,, QQQ 232221 respectively to get the

 AdAcAbAa 31211101  0 following equations  AdAcAbAaA  0  4232221202

  AdAcAbAaAA 534333231303  0  TA 21    nnn   nn  2121211221 EQAEQAEQAQ n    11121314151 AdAcAbAaAAA iiiiiiiiiiiiii  11  0 , (15)    ni  2,,6,5    AAcAbAaAAA  nn  62  52 nnnnnnnnnn  12223242 n   AAbAaAAA TB     EQBEQBEQBQ   nnnn  nnnnnn  1121314151 n1 22 nnn  nn  2221221222 n , (16)    AAaAAA  nn 4 3 2 nnnnnn 1 n2 (6)

TD     EQDEQDEQDQ 23 nn 223 n 1231 nn  232 n , (17)  BdBcBbBa 31211101  0  BdBcBbBaB  0  4232221202 multiply (9),(10),(11) by ,, QQQ 333231 respectively to get the   BdBcBbBaBB  0  534333231303 following equations    11121314151 BdBcBbBaBBB iiiiiiiiiiiiii  11  0    ni  2,,6,5    BBcBbBaBBB TA     EQAEQAEQAQ  nnnnnnnnnnnn  122232425262 n 31 nnn  nn  3121311231 n , (18)    nnnnnnnnnn  1121314151  BBbBaBBB n1    BBaBBB  4 3 2 nnnnnnnn 1 n2 (7) TB     EQBEQBEQBQ 32 nnn  nn  3221321232 n , (19)

299 Advances in Computer Science Research, volume 58

TD    EQDEQDEQDQ 33 nn 233 n 1331 nn  332 n , (20) If n1  BA n  0,0 and An  0 , then Z is non-null and TZ  0 . where If n  BA n2  0,0 and An2  0 , then Y is non-null  nnnn  ,  nnnn  ,   BABAQDADAQDBDBQ nnnn  211213122112211211 , and TY  0 .  ,  ,   BABAQDADAQDBDBQ 221 nnnn  222  22 nnnn 223 nnnn 2 , If n2  1  AAA nn  ,0 then A is non-null and TA  0 .  ,  ,   BABAQDADAQDBDBQ The proof is completed. 131 nnnn  321  nnnn 13311 nnnn 1 . Theorem 2.2. Suppose that , then T is invertible Let (12)+(13)+(14), (15)+(16)+(17)and(18)+(19)+(20), X n  0 thus and

t TX  EX n n  n2120   ZZZZZZC nn  21 ]/,,/,/[ nn 2 , (21) t n1 n  n1110   YYYYYYC nn  11 ]/,,/,/[    XXXXXXC ]/,,/,/[ t n2 0 n 1 n 1 nn (27) TY  EY nn  11 , (22) Proof. According to the determinant of tridiagonal and pentadiagonal matrix (see [1]), we can get n TZ  2 EZ nn n , so T is invertible. From the (21), , (23) T   k Xd n  0)()1()det( k1 t t (22), (23) and (27), we have T  EC nn , T n  EC n11 and where X  10 ,,, XXX n1 , Y  10 ,,, YYY n1 , t T n2  EC n2 . The proof is completed. Z  10 ,,, ZZZ n1 , and for   ni  20 Algorithm 2.3. To find the  nn inverse matrix of the  AAA  sevendiagonal matrix in (1) by using the relations (2)-(27).  n2 1 in  X det BBB i   n2 1 in  INPUT: Order of the matrix n and the components a , b ,   i i  n2 1 DDD in  , (24) ci , di , i , i ,  i ,  ,,2,1 ni , where

n  12  ddd nn 1 , .  AAA  1   bcc nnn           321211  0  n2 in  1 Yi  det n2 BBB in  OUTPUT: inverse matrix T .    n2 DDD in  , (25) Step 1: If dk  0 for any   nk  3,,2,1 , then set

k  td (t is just a symbolic name).  AAA  Step 2: Set  AA  0 , A 1, then for   ni  2,,3 ,  n1 in  10 2 compute the components by using (6). Zi  det n1 BBB in  Ai    n1 DDD in  . (26) Step 3: Set  BB 20  0 , B1 1, then for   ni  2,,3 ,

compute the components Bi by using (7). We can easily get nn 1  ZYX n2 by (24), (25) and (26).

Step 4: Set D0 1,  DD 21  0 , then for   ni  2,,3 , Lemma 2.1. If X n  0 , then the matrix T is singular. compute the components Di by using (8). Proof. We have Step 5: For   ni  20 , compute the components

,YX ii and Zi by using (24), (25) and (26).  nnnn  ,  2021120  nnnn  ,  102  BABAZBABAYBABAX nnnn 1 Step 6: Substitute the actual value t  0 , and compute If BA  0,0 and A  0 , then X is non-null n n2 n1 n1 T  n )()1()det( Xd . If the matrix T is singular , then and TX  0 .  k n k 1 OUTPUT (‘Singular Matrix’); Stop.

300 Advances in Computer Science Research, volume 58

Step 7: Compute the components ,CC nn  12 andCn by using Example 3.1. Consider the 66 matrices T and H (27). given by

Step 8: Compute the components ,CC nn  43 and Cn5 by using the first three equations in (2). 1  21 1 0 0    Step 9: For nj  4:1:3 , compute the components 1  111 1 0  C by using the last equation in (2). 2 0  111 1  j3 T     11 1 2 1 1  Remark 2.4. Here the algorithm complexity of algorithm   2.3 will be computed.  10 1 2 1 4    The algorithm complexity in step 1 is n  3 , in each step 0 0 1 11 1  2-4 is n  3 , in step 5 is n  93 , in the step 6-8 are 3,3, nnn 2 respectively, and in the last step is  6nn . So the algorithm 0 0  21 1 1  complexity of algorithm 2.3 is 2 nn  158 .   0  111 1 1  Here we will discuss the inverse of  nn anti-   111 1 0 2  H    sevendiagonal matrix, the anti-sevendiagonal matrix of T is 1 1 2 11 1  denoted by H , take the form   4 1 2 11 0   11 1 1 0 0  0  0 abcd     1111   abcd   22222  By applying the algorithm 2.3, we get   abcd    333333  0  a  4444  H    t t d  0    n3  A  ]4,3,2,1,0,0[ and A  ]4,24,12[ , (step c    n2  2) bn1   a  0  0   nnnn  (28) B  ]3,2,1,0,1,0[ t B  ]2,17,8[ t To do this we take into account the fact that for the  nn  and , (step 3) matrix R  rij )( given by

t t 0  10   D  ]5,2,1,0,0,1[ D  ]4,24,8[   and , (step   01  4) R      Rt   0   t X  ,20,20,20,0,20[ 6 ,80and]20 7 ,0 XXX 8  0     01 0 (29) t Y  6 7 ,80,0and]24,0,8,16,16,8[ YYY 8  0  t From [1] we can get Z  and]4,0,28,56,96,12[ 6 ,0 7 ZZZ 8  80,0 ,

H  TR . (30) (step 5) Moreover, if the matrix T is invertible and its inverse is 1 T , then we obtain 6 6 T   k Xd 6  080)()1()det( k 1  111 1  , (step H R  RTT . (31) 6)

III. ONE ILLUSTRATIVE EXAMPLE In this section we are going to give one illustrative example.

301 Advances in Computer Science Research, volume 58

t REFERENCES C6  ,15.0[ ,2.1 ,7.0 ,35.0 ,0  ]05.0 t [1] A. D. A. Hadj, M. Elouafi, A fast numerical algorithm for the inverse of C5 [ ,1.0 ,2.0 ,2.0  ,1.0 ,0 ]3.0 a tridiagonal and pentadiagonal matrix, Appl. Math. Comput. 202 (2008)  C  [ ,25.0 ,0 ,25.0 ,25.0 ,25.0  ]25.0 t 441-445. 4 , [2] M. E. Kanal, N. A. Baykara, M. Demiralp, Theory and algorithm of the inversion method for pentadiagonal matrices, J. Math. Chem. 50 (2012) 289-299. (step 7) [3] E.Kilic, Explicit formula for the inverse of a tridiagonal matrix by backward continued fractions, Appl. Math. Comput. 197 (2008) 345-357. [4] M. El-Mikkawy, E.-D. Rahmo, A new recursive algorithm for inverting general periodic pentadiagonal and anti-pentadiagonal matrices, Appl. t Math. Comput. 207 (2009) 164-170. C3 [ ,3.0 ,4.0 ,0.15 ,0.2  ,0.25 ].10 t [5] A. A. Karawia, A computational algorithm for solving periodic penta- C2  [ ,0 ,1 ,.50 ,0 ,5.0 ]0 diagonal linear systems, Appl. Math. Comput. 174 (2006) 613-618. t [6] C.Y. Yu, Y. H. Chen, A new algorithm for computing the inverse of a C1 ,15.0[ ,0.2  ,0.45 ,.150  ,25.0 ].050  . (step 8) periodic tridiagonal matrix, Math. Prac. Theo. 40 (2010) 192-198. [7] R. S. Ran, T. Z. Huang, X.P.Liu, T. X. Gu, Algorithm for the inverse of So, a general tridiagonal matrix, Appl. Math. Mech. 30 (2009) 238-244. [8] D. Tang, Fast inversion of periodic tridiagonal matrices, J. SHH. DJ. Univ. 16 (2013) 300-304.   325603  [9] M.EI-Mikkawy, E.-D. Rahmo, Symbolic algorithm for inverting cyclic     24408204  . pentadiagonal matrices recursively-Derivation and implementation, Comput. Math. Appl. 59 (2010) 1386-1396. 1   14453109  T1    [10] R. S. Ran, T. Z. Huang, Inverses of block tridiagonal matrices, J. Univ. 20   725403  Elect. Scie. Tech. Chn. 36 (2007) 341-342.     0055105  [11] F. Chen, Q. Lu, Z. J. Yuan, Fast algorithm for inverting a block     165201  pentadiagonal matrix, J. HF. Univ. Tech. 31 (2008) 1904-1907. [12] G. Liu, T. Z. Huang, An algorithm for the inverse of tri-diagonal and Hence, using (31) gives five-diagonal Toeplitz matrices, Pure. Appl. Math. 26 (2010) 292-299. [13] X. L. Lin, P. P. Huo, J. T. Jia, A new recursive algorithm for inverting general periodic sevendiagonal and anti-sevendiagonal matrices, F.E.J.   165201  Appl. Math. 86 (2014) 41-55.   [14] J. T. Jia, X.L.Lin, A new computational algorithm for inverting general  0055105   . periodic seven-diagonal matrices, Pure. Appl. Math. 26 (2010) 1040- 1   725403  1046. H1    20   14453109  [15] A. A. Karawia, Inversion of general cyclic heptadiagonal matrices,   Mathe. Prob. Engin. (2013) 1-9.   24408204      325603 

IV. CONCLUSION In this paper, we mainly give a fast algorithm for the inverse of a sevendiagonal matrix, and the fast algorithm is appropriate for implementation using computer algebra systems. What’s more, in the light of algorithm 2.3, then we can obtain that the algorithm complexity is 2 nn  158 . Base on the illustrative example of section 3 which confirm the validity of this algorithm. The recent algorithm presented in [1] for inverting a tridiagonal and pentadiagonal matrix is a special case of this new algorithm.

ACKNOWLEDGMENT This work was supported by Research Project Funding Academic Team of Shaanxi University of Science and Technology (2013XSD39) and Research Projects of Provincial Key Laboratory of Science and Technology Department of Shaanxi Province (2011HBSZS014).

302