A New Computational Algorithm For Solving Periodic Tri-Diagonal Linear Systems
A New Computational Algorithm For Solving Periodic Tri-Diagonal Linear Systems
www.elsevier.com/locate/amc
Abstract
In this article we present a new efficient computational algorithm for solving periodic
tri-diagonal linear systems. The implementation of the algorithm using Computer
Algebra Systems (CAS) such as MAPLE, MACSYMA, MATHEMATICA and
MATLAB is straightforward. An example is given in order to illustrate the algorithm.
2004 Elsevier Inc. All rights reserved.
Keywords: Periodic tri-diagonal matrices; Linear systems; Computer algebra systems (CAS)
1. Introduction
Ax ¼ k; ð1:1Þ
0096-3003/$ - see front matter 2004 Elsevier Inc. All rights reserved.
doi:10.1016/j.amc.2003.12.114
692 M.E.A. El-Mikkawy / Appl. Math. Comput. 161 (2005) 691–696
where
2 3
d1 a1 0 0 t
6 .. 7
6 b2 d2 a2 . 7 0
6 .. 7 ..
6 7
60 b3 d3 . 0 7 .
A¼6 . .. .. .. .. 7: ð1:2Þ
6 . 7
6 . . . . . 0 7
6 .. .. 7
40 0 . . an1 5
s 0 0 bn dn
Note that the matrix B in (2.1) is related to the matrix A in (1.2) by:
A ¼ B wzT : ð2:2Þ
The Sherman–Morrison algorithm is as follows [1]:
T T
Step 0: Set z ¼ ðs; 0; 0; . . . ; 0; tÞ , w ¼ ð1; 0; 0; . . . ; 0; 1Þ .
Step 1: Form the tri-diagonal matrix B in (2.1).
Step 2: Solve for y1 and y2 the two tri-diagonal linear systems:
By1 ¼ k; By2 ¼ w:
Step 3: Compute
a1
a1 ¼ z T y1 ; a2 ¼ z T y2 ; b¼ :
1 a2
Step 4: Compute the solution
x ¼ y1 þ by2 :
For the validity of the algorithm, the conditions [1] are that B1 exists and
a2 6¼ 1. At this point it should be mentioned that a very reliable computational
algorithm to check the existence of B1 is developed by this author in [2].
3. A new computational algorithm
Algorithm 3.1. To solve the periodic tri-diagonal linear system (1.1), we may
proceed as follows:
bi
ci ¼ di ai1 ; i ¼ 2ð1Þn 1;
ci1
bi ai1
mi ¼ mi1 ; i ¼ 2ð1Þn 2; hi ¼ hi1 ; i ¼ 2ð1Þn 2;
ci1 ci
bn1 1
mn1 ¼ an1 mn2 ; hn1 ¼ ðbn hn2 an2 Þ;
cn2 cn1
X
n1
cn ¼ dn hi m i :
i¼1
bi X
n1
ri ¼ ki ri1 ; i ¼ 2ð1Þn 1; rn ¼ k n hi r i :
ci1 i¼1
M.E.A. El-Mikkawy / Appl. Math. Comput. 161 (2005) 691–696 695
4. An illustrative example
Example 4.1. Solve the periodic tri-diagonal linear system of size 12 given by
2 3 2 3
2 1 0 0 1 2
6 1 2 1 0 0 7 607
6 0 1 2 1 0 7 607
6 .. .. 7 6 7
6 0 7 x ¼ 6 .. 7 ð4:1Þ
6 . 0 1 2 . . 7 6.7
4 . .. .. .. 5 405
. . . . 1
1 0 0 1 2 2
by using the PERTRI algorithm.
Solution
We have s ¼ t ¼ 1, ai ¼ biþ1 ¼ 1, i ¼ 1ð1Þ11, di ¼ 2, i ¼ 1ð1Þ12, ki ¼ 0,
i ¼ 2ð1Þ11 and k1 ¼ k12 ¼ 2. The application of the PERTRI algorithm gives:
• c1 ¼ 2, m1 ¼ 1, h1 ¼ 12 (Step 0).
• ðc ; c ; c ; c ; c ; c ; c ; c ; c ; c Þ ¼ 3 4 5 6 7 8 9 10 11 12
2 3 4 5 6 7 8 9 10 11 ; ; ; ; ; ; ; ; ;
2 3 4 5 6 7 8 9 10 11
1 1 1 1 1 1 1 1 1
ðm2 ; m3 ; m4 ; m5 ; m6 ; m7 ; m8 ; m9 ; m10 Þ ¼ ; ; ; ; ; ; ; ;
2 3 4 5 6 7 8 9 10
1 1 1 1 1 1 1 1 1
ðh2 ; h3 ; h4 ; h5 ; h6 ; h7 ; h8 ; h9 ; h10 Þ ¼ ; ; ; ; ; ; ; ;
3 4 5 6 7 8 9 10 11
10 5 1
m11 ¼ ; h11 ¼ ; c12 ¼ ðStep 1Þ:
11 6 3
696 M.E.A. El-Mikkawy / Appl. Math. Comput. 161 (2005) 691–696
References
[1] M.M. Chawla, R.R. Khazal, A parallel elimination method for periodic tri-diagonal systems,
Int. J. Comput. Math. 79 (4) (2002) 473–484.
[2] M.E.A. El-Mikkawy, A fast algorithm for evaluating nth order tri-diagonal determinants, J.
Comput. Appl. Math. 166 (2004) 581–584.
[3] M.B. Allen III, E.L. Isaacson, Numerical Analysis for Applied Science, Wiley-Interscience,
John Wiley & Sons, 1997.