On the Inverting of a General Heptadiagonal Matrix
Total Page:16
File Type:pdf, Size:1020Kb
British Journal of Applied Science & Technology 18(5): 1-12, 2016; Article no.BJAST.31213 ISSN: 2231-0843, NLM ID: 101664541 SCIENCEDOMAIN international www.sciencedomain.org On the Inverting of a General Heptadiagonal Matrix ∗ A. A. Karawia1;2 1Mathematics Department, Faculty of Science, Mansoura University, Mansoura 35516, Egypt. 2Computer Science Unit, Deanship of Educational Services, Qassim University, P.O.Box 6595, Buraidah 51452, Saudi Arabia. Author’s contribution The sole author designed, analyzed and interpreted and prepared the manuscript. Article Information DOI: 10.9734/BJAST/2016/31213 Editor(s): (1) Orlando Manuel da Costa Gomes, Professor of Economics, Lisbon Accounting and Business School (ISCAL), Lisbon Polytechnic Institute, Portugal. Reviewers: (1) Jia Liu, University of West Florida, USA. (2) Hammad Khalil, University of Education (Attock Campus), Lahore, Pakistan. (3) Gerald Bourgeois, University of French Polynesia and University of Aix-Marseille, France. Complete Peer review History: http://www.sciencedomain.org/review-history/17657 Received: 26th December 2016 Accepted: 21st January 2017 Original Research Article Published: 28th January 2017 ABSTRACT In this paper, the author presents a new algorithm computing the inverse of any nonsingular heptadiagonal matrix. The computational cost of our algorithms is O(n2) operations in C. The algorithms are suitable for implementation 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). 2010 Mathematics Subject Classification: 15A15, 15A23, 68W30, 11Y05, 33F10, F.2.1, G.1.0. *Corresponding author: E-mail: [email protected]; Karawia; BJAST, 18(5), 1-12, 2016; Article no.BJAST.31213 1 INTRODUCTION The n × n general heptadiagonal matrices take the form: 0 1 d1 e1 f1 g1 B C B c2 d2 e2 f2 g2 C B C B b3 c3 d3 e3 f3 g3 0 C B C B a4 b4 c4 d4 e4 f4 g4 C B C B C B C B . C H = B .. .. .. .. .. .. .. C ; n > 4: (1.1) B C B C B C B a − b − c − d − e − f − g − C B n 3 n 3 n 3 n 3 n 3 n 3 n 3 C B 0 a − b − c − d − e − f − C @ n 2 n 2 n 2 n 2 n 2 n 2 A an−1 bn−1 cn−1 dn−1 en−1 an bn cn dn where faig4≤i≤n, fbig3≤i≤n, fcig2≤i≤n, pentadiagonal matrix and they assumed few fdig1≤i≤n, feig1≤i≤n, ffig1≤i≤n, and fgig1≤i≤n conditions to avoid failure in their own algorithm. are sequences of numbers such that gi =6 The motivation of the current paper is to establish 0; gn−2 = gn−1 = gn = 1 and fn−1 = fn = efficient algorithms for inverting heptadiagonal en = 0. matrix. I generalized the algorithm[13] to find the inverse of a general invertible heptadiagonal Heptadiagonal matrices frequently arise from matrix and we presented an efficient symbolic boundary value problems. The heptadiagonal algorithm to find the inverse of such matrices. systems emanate in many numerical models, The development of a symbolic algorithm is for example the traditional discretization of the considered in order to remove all cases where implicit method to resolve partial differential the numeric algorithm fails when at least one of equations on 3-D problems with regular grids. gi at least equals to 0, i = 1; 2; :::; n − 3. If, for Also, these kinds of matrices appear in many every i such that gi = 0, then I put gi = t for a areas of science and engineering[[1]-[9]]. So small t =6 0. The current work will be in the field a good technique for computing the inverse of complex numbers C. of such matrices is required. To the best of our knowledge, the inversion of a general The paper is organized as follows: In Section 2, heptadiagonal matrix of the form (1.1) has not the main result is presented. New numeric and been considered. symbolic algorithms are given in Section 3. In Section 4, illustrative examples are presented. In [10], Karawia described a reliable symbolic Conclusions of the work are given in Section 5. computational algorithm for inverting general cyclic heptadiagonal matrices by using parallel computing along with recursion. An 2 MAIN RESULTS explicit formula for the determinant of a heptadiagonal symmetric matrix is given in[6]. In this section, we present recurrence formulas Many researchers studied special cases of for the columns of the inverse of a heptadiagonal heptadiagonal matrix. In [11], the authors matrix H. presented a symbolic algorithm for finding the When the matrix H is nonsingular, its inversion is inverse of any general nonsingular tridiagonal computed as follows. matrix. A new efficient computational algorithm Let to find the inverse of a general tridiagonal matrix −1 is presented in [12] based on the Doolittle LU H = [Sij ]1≤i;j≤n = [Col1; Col2; :::; Coln] factorization. In [13], the authors introduced a computationally efficient algorithm to obtain where Colk is the kth column of the inverse the inverse of a tridiagonal matrix and a matrix H−1. 2 Karawia; BJAST, 18(5), 1-12, 2016; Article no.BJAST.31213 −1 By using the fact HH = In, where In is the identity matrix, the first (n−3) columns can be obtained by relations where Ek is the kth unit vector. From (2.1), we note that if we know the last three columns Coln; Coln−1; and Coln−2 then we can recursively compute the remaining (n − 3) columns Coln−3; Coln−4; :::; Col1. At this point it is convenient to give recurrence formulas for computing Coln; Coln−1; and Coln−2. Consider the sequence of numbers fAig1≤i≤n+3, fBig1≤i≤n+3,and fCig1≤i≤n+3 characterized by a term recurrence relations 9 A1 = 0; > > A = 0; > 2 > > A3 = 1; => d1A1 + e1A2 + f1A3 + g1A4 = 0; (2.1) > > 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; 9 B1 = 0; > > B = 1; > 2 > > B3 = 0; => d1B1 + e1B2 + f1B3 + g1B4 = 0; (2.2) > > 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 9 C1 = 1; > > C = 0; > 2 > > C3 = 0; => d1C1 + e1C2 + f1C3 + g1C4 = 0; (2.3) > > 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: 3 Karawia; BJAST, 18(5), 1-12, 2016; Article no.BJAST.31213 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.4) HB = −Bn+1En−2 − Bn+2En−1 − Bn+3En; (2.5) HC = −Cn+1En−2 − Cn+2En−1 − Cn+3En; (2.6) 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.7) Ci Cn+2 Cn+3 Ai An+1 An+3 Yi = Bi Bn+1 Bn+3 ; i = 1; 2; :::; n + 2; (2.8) Ci Cn+1 Cn+3 Ai An+1 An+2 Zi = Bi Bn+1 Bn+2 ; i = 1; 2; :::; n + 3: (2.9) Ci Cn+1 Cn+2 By simple calculations, we have HX = −Xn+1En−2; (2.10) HY = −Yn+2En−1; (2.11) HZ = −Zn+3En; (2.12) 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. Theorem 2.1.(generalization version of theorem 3.1 in [13]) H is invertible iff Xn+1 =6 0 and , for 6 every i; gi = 0. Moreover [ ] t −Z1 −Z2 −Zn Coln = ; ; :::; ; (2.13) Xn+1 Xn+1 Xn+1 [ ] t Y1 Y2 Yn Coln−1 = ; ; :::; ] ; (2.14) Xn+1 Xn+1 Xn+1 [ ] t −X1 −X2 −Xn Coln−2 = ; ; :::; : (2.15) Xn+1 Xn+1 Xn+1 (Q ) − n−3 6 6 Proof. Since det(H) = i=1 gi Xn+1. So if H is invertible then Xn+1 = 0 and if Xn+1 = 0 and gi =6 0 for every i then det(H) =6 0 and H is invertible.From (2.11), (2.12) and (2.13) we obtain Coln, Coln−1, and Coln−2. The proof is completed. 2 6 Remark 2.2. If, for every i such that gi = 0, we put gi = t for a small t = 0, and if Hjt=0 is invertible, then Xn+1(t) =6 0.then H is invertible. 4 Karawia; BJAST, 18(5), 1-12, 2016; Article no.BJAST.31213 3 NEW NUMERIC AND SYMBOLIC ALGORITHMS FOR THE INVERSE OF HEPTADIAGONAL 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 = 1. 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.