Cyclic Triadiagonal Matrix
Cyclic Triadiagonal Matrix
In this paper we consider several algorithms for the solution of the system
Ax = b, where A is an n x n “cyclic tridiagonal” matrix of the form
6, cl a1
a2 6, ~2
a3 b, ~3
A= . . .
. . .
. . .
an-1 bn-1 cn-1
-G a, b, _
We describe four algorithms for the symmetric circulant casein the form
1:
-#A 1 1’ -Yl
1 A 1 X2
1 h 1 x3
. . . (0
. .
. . .
1 x 1 X,-l
1 1 h 1. X?l
Three of them have appeared in the literature before, while the fourth seemsto be
new.
(a) Matrix factorization. Evans [3] has proposed a neat algorithm based on
the factorization A = pQQr, where t.~= X/(1 + CX~)
and (Y,Q are given by
a = (--h $. (A2 - 4)li”)/2, (2)
- 1 --Cd
--13( 1
Q= -“-f, 1 1.
. .
. .
. .
-a 1/
The solution vector x is thus found by first solving for an auxiliary vector y
given by
Qy = p-lb
and then solving Qrx = y.
The first stage of the algorithm is given by
Using a nesting technique to compute the right-hand sides of (3) and (4), the
only coefficients which need to be precalculated are CL,01,and (1 - o?), and the
whole algorithm requires 4n additions and 5n multiplications for each right-hand
side. In some applications it would be possible to save one multiplication by
incorporating the constant multiplier p-l during the computation of the right-hand
side. Numerical stability is guaranteed by choosing the positive sign in Eq. (2) for
h > 2 and the negative sign for X < -2, so that we always have 1011< 1.
(b) CycZic reduction. In the direct method due to Hackney [5] for solving
Poisson’s equation on a rectangular mesh, extensive use is made of a cyclic reduc-
tion technique for solving systems of the form (1). In the following it is assumed
that n is a power of 2, say n = 2m; the algorithm can quite easily be extended to
the case n = 3 x 2”.
Consider any three consecutive equations from the system (1):
with the indices interpreted cyclically, i.e., x,+~ = xi . Multiplying the second
equation by --X and adding, we obtain
- b(l)
x.- I 2 + X(‘)x. i + x. a+2 - i 9
5Wr9/3-6
320 CLIVE TEMPERTON
f=
1
0
I-I
0
0
1
jiz x1
x2
X3
&-I
x2
x3
:l =
*4
,
X,-l
XVI
.J
SOLUTION OF CYCLIC TRIDIAGONAL SYSTEMS 321
Xl = f zibi 3 (8)
i=l
or
the range 0.0 < xi ,< 10.0, corresponding vectors b = Ax were computed, and
the four algorithms were used to compute an approximate solution from b. The
largest error in each computed solution vector was found, and these were averaged
over the 100 random vectors. The results are summarized in Table II.
TABLE I
Execution Times in Microseconds for Solution of a Cyclic Tridiagonal System of Order n
16 36 36 31 28
32 64 60 55 48
64 119 105 103 88
128 231 194 199 167
TABLE II
Mean Maximum Errors in the Solution of a Cyclic Tridiagonai System of Order n
(Unit: 1O--B)
(b) A = $4.0
It will be seen that matrix factorization gives the most accurate answers, and
cyclic reduction the least, with the other two algorithms intermediate and very
similar. However, all four algorithms are stable with respect to rounding errors,
and for practical purposes there is little to choose between them from this point
of view.
SOLUTION OF CYCLIC TRIDIAGONAL SYSTEMS 323
REFERENCES
1. H. H. AHLBERG, E. N. NILMN, AND J. L. WALSH, “The Theory of Splines and Their Applica-
tions,” Academic Press, New York, 1967.
2. A. BENSON AND D. J. EVANS, J. Inst. Math. Its Appl. 9 (1972), 68.
3. D. J. EVANS, The Numerical Solution of Elliptic and Parabolic Equations Occurring in Com-
putational Physics, in “Computational Physics Conference Digest,” pp. 46-56, Institute of
Physics and the Physical Society, London, 1970.
4. D. J. EVANS AND L. V. ATKINSON, Comput. J. 13 (1970), 323.
5. R. W. HOCKNEY, J. Assoc. Comput. Mach. 12 (1965), 95.
6. R. W. HOCKNEY, The Potential Calculation and Some Applications, in “Methods in Com-
putational Physics,” Vol. 9, pp. 135-211, Academic Press, New York, 1970.
7. R. S. VARGA, “Matrix Iterative Analysis,” Prentice-Hall, Englewood Cliffs, NJ., 1962.
8. W. L. WOOD, SIAM J. Numer. Anal. 8 (1971). 439.
CLIVE TEMPERT~N
Meteorological Ofice
Bracknell, Berkshire
England