On the Inverting of a General Heptadiagonal Matrix
Total Page:16
File Type:pdf, Size:1020Kb
On the Inverting of A General Heptadiagonal Matrix A. A. KARAWIA∗ Computer science unit, Deanship of educational services, Qassim University, P.O.Box 6595, Buraidah 51452, Saudi Arabia. E-mail: [email protected] Abstract In this paper, we developed new numeric and symbolic algorithms to find the inverse of any nonsin- gular heptadiagonal matrix. Symbolic algorithm will not break and it is without setting any restrictive conditions. The computational cost of our algorithms is O(n). The algorithms are suitable for imple- mentation using computer algebra system such as MAPLE, MATLAB and MATHEMATICA. Examples are given to illustrate the efficiency of the algorithms. Keywords:Heptadiagonal matrices; LU factorization; Determinants; Computer algebra systems(CAS). AMS Subject Classification:15A15; 15A23; 68W30; 11Y05; 33F10; F.2.1; G.1.0. 1 Introduction Then × n general heptadiagonal matrices take the form: d1 e1 f1 g1 c2 d2 e2 f2 g2 b3 c3 d3 e3 f3 g3 0 a4 b4 c4 d4 e4 f4 g4 . H = .. .. .. .. .. .. .. ,n> 4. (1.1) a 3 b 3 c 3 d 3 e 3 f 3 g 3 n− n− n− n− n− n− n− a −2 b −2 c −2 d −2 e −2 f −2 0 n n n n n n arXiv:1412.4155v2 [math.NA] 18 Dec 2014 a −1 b −1 c −1 d −1 e −1 n n n n n a b c d n n n n where {ai}4≤i≤n, {bi}3≤i≤n, {ci}2≤i≤n, {di}1≤i≤n, {ei}1≤i≤n, {fi}1≤i≤n, and {gi}1≤i≤n are sequences of numbers such that gi 6=0, gn−2 = gn−1 = gn = 1 and fn−1 = fn = en = 0. Heptadiagonal matrices are frequently arise from boundary value problems. So a good technique for compute the inverse of such matrices is required. Also, These kind of matrices appear in many areas of science and engineering[1-9]. To the best of our knowledge, the inversion of a general heptadiagonal matrix of the form (1.1) has not been considered. In [10], Karawia described a reliable symbolic computational algorithm for inverting general cyclic heptadiagonal matrices by using parallel computing along with recursion. An explicit formula for the de- terminant of a heptadiagonal symmetric matrix is given in[6]. Many researchers are studied special cases of heptadiagonal matrix. In [11], the authors presented a symbolic algorithm for finding the inverse of any general nonsingular tridiagonal matrix. A new efficient computational algorithm to find the inverse of a general tridiagonal matrix is presented in [12] based on the Doolittle LU factorization. In [13], the authors introduced a computationally efficient algorithm for obtaining the inverse of a tridiagonal matrix and a pentadiogonal matrix and they assumed a few conditions to avoid failure in their own algorithm. The ∗Home Address: Mathematics Department, Faculty of Science, Mansoura University, Mansoura 35516, Egypt. E- mail:[email protected] 1 motivation of the current paper is to establish efficient algorithms for inverting heptadiagonal matrix. We generalized the algorithm[13] for finding the inverse of a general heptadiagonal matrix and we presented an efficient symbolic algorithm for finding the inverse of such matrices. The development of a symbolic algorithm is considered in order to remove all cases where the numeric algorithm fails. The paper is organized as follows: In Section 2, Main result is presented. New numeric and symbolic algorithms are given in Section 3. In Section 4, Illustrative examples are presented. Conclusions of the work are given in Section 5. 2 Main Result In this section, we present recurrence formulas for the columns of the inverse of a heptadiagonal matrix H. When the matrix H is nonsingular, its inversion is computed as follows. Let −1 H = [Sij ]1≤i,j≤n = [C1, C2, ..., Cn] −1 where Ck is the kth column of the inverse matrix H . −1 By using the fact HH = In, where In is the identity matrix, the first (n − 3) columns can be obtain by relations 1 Cn−3 = (En − dnCn − en−1Cn−1 − fn−2Cn−2), gn−3 1 C E c C d C e C f C , n−4 = ( n−1 − n n − n−1 n−1 − n−2 n−2 − n−3 n−3) gn−4 1 (2.1) Cn−5 = (En−2 − bnCn − cn−1Cn−1 − dn−2Cn−2 − en−3Cn−3 − fn−4Cn−4), gn−5 1 C = (E +3 − a +6C +6 − b +5C +5 − c +4C +4 − d +3C +3 − e +2C +2 − f +1C +1), j g j j j j j j j j j j j j j j j = n − 6,n − 7, ..., 1, where Ek is the kth unit vector. From (2.1), we note that if we knowing the last three columns Cn, Cn−1, and Cn−2 then we can recur- sively compute the remaining (n − 3) columns Cn−3, Cn−4, ..., C1. At this point it is convenient to give recurrence formulas for computing Cn, Cn−1, and Cn−2. Consider the sequence of numbers {Ai}1≤i≤n+3, {Bi}1≤i≤n+3,and {Ci}1≤i≤n+3 characterized by a term recurrence relations A1 =0, A2 =0, A3 =1, d1A1 + e1A2 + f1A3 + g1A4 =0, (2.2) c2A1 + d2A2 + e2A3 + f2A4 + g2A5 =0, b3A1 + c3A2 + d3A3 + e3A4 + f3A5 + g3A6 =0, aiAi−3 + biAi−2 + ciAi−1 + diAi + eiAi+1 + fiAi+2 + giAi+3 =0, i ≥ 4, 2 B1 =0, B2 =1, B3 =0, d1B1 + e1B2 + f1B3 + g1B4 =0, (2.3) c2B1 + d2B2 + e2B3 + f2B4 + g2B5 =0, b3B1 + c3B2 + d3B3 + e3B4 + f3B5 + g3B6 =0, aiBi−3 + biBi−2 + ciBi−1 + diBi + eiBi+1 + fiBi+2 + giBi+3 =0, i ≥ 4, and C1 =1, C2 =0, C3 =0, d1C1 + e1C2 + f1C3 + g1C4 =0, (2.4) c2C1 + d2C2 + e2C3 + f2C4 + g2C5 =0, b3C1 + c3C2 + d3C3 + e3C4 + f3C5 + g3C6 =0, aiCi−3 + biCi−2 + ciCi−1 + diCi + eiCi+1 + fiCi+2 + giCi+3 =0, i ≥ 4. Now, we can give matrix forms for term recurrences (2.2), (2.3) and (2.4) HA = −An+1En−2 − An+2En−1 − An+3En, (2.5) HB = −Bn+1En−2 − Bn+2En−1 − Bn+3En, (2.6) HC = −Cn+1En−2 − Cn+2En−1 − Cn+3En, (2.7) t t t where A = [A1, A2, ..., An] , B = [B1,B2, ..., Bn] , and C = [C1, C2, ..., Cn] . Let’s define the following determinants: Ai An+2 An+3 Xi = Bi Bn+2 Bn+3 , i =1, 2, ..., n +1, (2.8) Ci Cn+2 Cn+3 Ai An+1 An+3 Yi = Bi Bn+1 Bn+3 , i =1, 2, ..., n +2, (2.9) Ci Cn+1 Cn+3 Ai An+1 An+2 Zi = Bi Bn+1 Bn+2 , i =1, 2, ..., n +3. (2.10) Ci Cn+1 Cn+2 By simple calculations, we have HX = −Xn+1En−2, (2.11) HY = −Yn+2En−1, (2.12) HZ = −Zn+3En, (2.13) t t t where X = [X1,X2, ..., Xn] , Y = [Y1, Y2, ..., Yn] , and Z = [Z1,Z2, ..., Zn] . Remark 2.1. Xn+1 = −Yn+2 = Zn+3. Lemma 2.1.(generalization version of Lemma 3.1 in [13]) If Xn+1 = 0, then the matrix H is singu- lar. Proof. The proof is simple. 3 Theorem 2.1.(generalization version of theorem 3.1 in [13]) Suppose that Xn+1 6= 0, then H is invertible and t −Z1 −Z2 −Zn Cn = , , ..., , (2.14) Zn+3 Zn+3 Zn+3 t −Y1 −Y2 −Yn Cn−1 = , , ..., , (2.15) Yn+2 Yn+2 Yn+2 t −X1 −X2 −Xn Cn−2 = , , ..., . (2.16) Xn+1 Xn+1 Xn+1 n−3 Proof. Since det(H) = − i=1 gi Xn+1 6= 0, then H is invertible. From (2.11), (2.12) and (2.13) we obtain Cn, Cn−1, and Cn−2.Q The proof is completed. 3 New numeric and symbolic algorithms for the inverse of hep- tadiagonal matrix In this section, we formulate the result in the previous section . It is a numerical algorithm to compute the inverse of a general heptadiagonal matrix of the form (1.1) when it exists. Algorithm 3.1 To find the inverse of heptadiagonal matrix (1.1). let fn−1 = fn = en =0 and gn−2 = gn−1 = gn. INPUT: Order of the matrix n and the components ai,bj ,ck, dl,el,fl, and gl for i =4, 5, ..., n, j =3, 4, ..., n, k =2, 3, ..., n, and l =1, 2, ..., n, OUTPUT: The inverse of heptadiagonal matrix H−1. Step 1: Compute the sequence of numbers Ai,Bi, and Ci for i =1, 2, ..., n +3 using (2.2), (2.3) and (2.4) respectively. Step 2: Compute Xi, i =1, 2, ..., n +1 using (2.8), Yi, i =1, 2, ..., n +2 using (2.9) and Zi, i =1, 2, ..., n +3 using (2.10). Step 3: Compute the last three columns Cn, Cn−1, and Cn−2 using (2.14), (2.15), and (2.16) respectively. Step 4: Compute the remaining (n-3)-columns Cj , j = n − 3,n − 4, ..., 1 using (2.1). −1 Step 5: Set H = [C1, C2, ..., Cn]. The numeric algorithm 3.1 will be referred to as NINVHEPTA algorithm. The computational cost of NINVHEPTA algorithm is 103n + 69 operations. As can be easily seen, it breaks down unless the conditions gi 6= 0 are satisfied for all i =1, 2, ..., n − 3. So the following symbolic algorithm is developed in order to remove the cases where the numeric algorithm fails. Algorithm 3.2 To find the inverse of heptadiagonal matrix (1.1).