Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
TG 1181
OCTOBER 1971
Copy No. •
STechnical Memorandum
SEIG E N V A L U E S O F S Y M M E T R ICFIVE-DIAGONAL MATRICES
by L. W. EHRLICH
"""NAINA ECHNICAL J, L, JIN foRATON SERVICE CUL
THE JOHNS HOPKINS UNIVERSITY a APPLIED PHYSICS LABORATORY
Approved for public relegse, distribution unlimited
UNCLASSIFIED
DOCUMENT CON'TRUL DATA R & D
. . ~A , A&.(.r'.. "It, ,,,ihg I
The Johns Hopkins University Applied Physics Lab. Unclassified
8621 Georgia Ave.
Silver Spring, Md. 20910
Eigenvalues of Symmetric Five-Diagcnal Matrices
4 1 W : [ CTE (5 Type ofrep itt ,• ricrurs,, d~ iis
Technical MemorandumS z" • ,rs name, -iddle -tl-lil, I-st io.Oi
L. XV. Ehrlich
• .,, ; •. - - • t•. 7at. TO'AL '.Q OP; * - ! .<-.
October 1971
18 1
-" .f¶F 0.O GRANT NO 9a..OIIAO' -I0'0 I'
N00017-72-C-4401P, i-,•7T 0o TG 1181
'Task X81 01E tIpo. A"this report,
S T•TIR_,TON STArEtENT
Approved for public release; distribution unlimited.
S L -N A R NO TE.S SPONSO:.I0', 4.4', , ,
Navai Ordnance Systems CommandSDeparti-ent of the Nav,,-
Several methods for finding eigenvalues of symmetric five-diagonal
i matrices are compared experimentally. The results indicate that if relativelvfew eigenvalues are desired a modified Sturm sequence and interpolation scheme
is fastest.
I
DD, .473 u NC4ASSII1.:)Set imlul ( s-, fi, .. t,,n
UNCLASSIFIED'Securitv Classification
14.KEY WORDS
Mat ricesFive-diagonal matricesSturnm sequencesQfR methodLR methodBisection
UNCLASSIFIED
Security Classification
Ii
I TG 1181
OCTOBER 1971
I
Technical Memorandum
EIGENVALUES OF SYMMETRICFIVE-DIAGONAL MATRICESby L. W. EHRLICH
THE JOHNS HOPKINS UNIVERSITY a APPLIED PHYSICS LABORATORY8621 Georgia Avenue, Silver Spring. Maryland 20Q10
Operatnq under Contraci N0001 7 72 C.4401 wth thv LD).i, m ,.l rt t Iht- N-* V
Approved for puhhc reiensep, dcihbution t•llimited
TNt J041111 ýOVINRStl UNIV61T491TY
APPLIED PHYSICS LABORATORY
ABSTRACT
I
I Several methods for finding eigenvalues of sym-metric five-diagonal matrices are compared experi-mentally. The results indicate that if relatively feweigenvalues are desired a modified Sturm sequence andinterpolation scheme is fastest.I
IIiIIAISI
- i
TNW JONNS H4OeNNS UNIVERSITY
APPLIED PHYSICS LABORATORY
CONTENTS
1 Introduction 1
2 LR Transformation of Rutishauser (LR) 2
3 Sturm Sequence and Tjisection (SS) 3
4 Sturm Sequence and Interpolation (SSI) 5
5 Band Decomposition and Interpolation (BD) 6
6 Modified Sturm Sequence (MSS) 7
1 7 Jacobi RGtotions to Tridiagonal Matrix (RJ) 10
8 Results 11
9 Conclusions 1 6
I References .17
I
I
- iii -
TW%9 J0S *•l)oNS UNIhIRSITY
APPLIED PHYSICS LABORATORY
1. INTRODUCTION
We are concerned here with finding the lower (orhigher) eigenvslues of symmetric, five-diagonai matrices.Several numerical techniques are experimentally com-pared, including one that uses a Sturm sequence-type ap-proach directly on the five-diagonal matrix. The resultsindicate that if relatively few eigenvalues are desired amodified Sturm sequence and interpolation scheme isfastest.
APPLIED PHYSICS LABORATORY
2. LR TRANSFORMATION OF RUTISHAUSER (LR)
This method uses Cholesky decomposition withappropriate origin shift (Refs. 1 and 2, and Ref. 3, pp.544-556). Each iteration requires 6n additions, 9n multi-plications, 2n divisions, and n square roots. The methodalso requires a judicious choice of origin shift to be effec-tive. A poor choice could invalidate the techniqcc. Theimplementation used here was that of Ref. 2, which pro-
duces a cubically convergent technique. Since only a feweigenvalues are needed, we have O(n) operations. Althoughthe Cholesky decomposition is used, the origin shift allowsone to find eigenvalues of matrices that are not necessarilypositive definite.
-2-
THE JOHNS HOPKINS UNIVEfSITY
APPLIED PHYSICS LABORATORY
3. STURM SEQUENCE AND BISECTION (SS)
By the separation theorem, it is known that theeigenvalues of the (k-l)th leading principal min,)r, sayAk-1, of a symmetric matrix separate the eigenvalues of
I the kth leading principal minor, Ak, for each k • n (see,e.g., Ref. 3, p. 103). Thus, if we evaluate the leadingprincipal minors of (A-XI), the number of variations in
sign is the number of eigenvalues of A greater than X.
Let
a1 b 2 c 3b2 a2 b3 0
c 3 b 3 a3
A= cn
0 b
c b an n n
In Ref. 4, Kuttler presented the following recurrence re-lation, wh -e mi is the ith principal minor:
Smk-1 qk = 0' k !9 0
m
qk-2 b bk-i mk-3-Ck-1 qk-3
2 2 2 ink_2) + (c)mk a am1-bink_-ck(ak mk_-Ck_ in ~ kkk k k-l k k-2 k k-1 k-3 k-1 k-4 kb c k- 2 ()
k ,3..-., n
-3 -
TWIL 10 NS "OPZIs UN•VENSITY
APPLIED PHYSICS LABORATORY
A count of the number ot operations shows that we have
roughly l On multiplications and 5n additions, or 15n opera-tions per iteration. It is necessary, however, to con-stantly scale the process to prevent underflow or overflow(see also comments at end of Section 6).
In Ref. 5 Sweet presents another set of recurrencerelations to evaluate successive minor. However, sim-plifying his equations for a symmetric matrix, it turns outthat one needs roughly 14n multiplications, 8n additions,and n divisions, or 23r. operations per iteration, which isnot competitive with the above.
-4-
TME JOMNt 40PKIN UNIVERI$TY
APPLIED PHYSICS LABORATORY
4. STURM SEQUENCE AND INTERPOLATION (SSI)
In Ref. 6, a scheme is described whereby the num-ber of bisections (and functional evaluations) may be re-duced. Once bisection has isolated a single eigenvalue insome interval, an interpolation procedure is initiated.The procedure is attributed to Wyngaarden, Zonneveld,Dykstra, and Dekker, and its implementation is describedin Ref. 6. Since the scheme requires a single eigenvalueto be isolated, one cannot find multiple eigenvalues by thismethod.
-5-
THE JOHI H'O•KIPI UN£vetEITry
APPLIED PHYSICS LABORATORY5,.vtb[I SI.IN MaRLA&ND
5. BAND DECOMPOSITION AND INTERPOLATION (BD)
In Ref. 7, a scheme is given whereby a band matrixis decomposed into its LU product with pivoting. If thematrix is symmetric and if (A-XI) is decomposed, one candetermine the variations in the signs of the principalminors and thus use the approach of Section 4. Since thedecomposition requires 7n additions, 7n multiplications,and 2n divisions or 1 6 n operations for a five-diagonalmatrix, the method appears to be competitive with that ofSection 3. We have not, however, taken into account thebookkeeping necessary for pivot determination, interchang-ing, etc.
-6-
IT111 -1O0NS "00K11" UN,1INSITI
APPLJED P.YSICS LABORATORY
6. MODIFIED STURM SEQUENCE (MSS)
I
J In an effort to avoid the constant scaling of theSturm sequence relation, we consider the approach usedin Ref. 8. Let
M mk Q qk-2k m k-=k2k- m kk_
Then Eq. (1) becomes
M, =a a1
2b2
M 2a2 - M 1
Q b 2Q1 1
1 M IM2M12
b2 c2aM a3 + + 2b c Q (2)
3 3 M2 M1 M 2 3 c 3 1
bk-l k-3
k-2 Mk-1 M k-i Mk-1
Mk a k bM Ok.Ikl -Mkk~-k-il k-l k2 k- -2/
k = 4,5,.....n
-7-
THE JO.N MOPKIkS UNIVCRSITV
APPLIED PHYSICS LABORATORY
SSILVE* *IN .RVLANO
However, it was pointed out to the author that this could begreatly simplified as follows:
M,
P 2 b 2
M =a P 2I/M (3)2 2 2 1
P =b-cP /*k k Ck Pk-i k-2
Mk ak -c2/M 2P/k k-2 k/Mk1 k 3, n
where we identify
Qk- 1 = Pk/(M k Mk-1
This is equivalent to decomposing the matrix into its LUproduct, without pivoting. We need only count the num-ber of Mi < 0. A count of the number of operations in-volved leads to 2n multiplications, 3n additions, and 3ndivisions, or about Bn operations with no scaling. Un-questionably, this is the fastest method, but the lack ofpivoting introduces a question of accuracy.
If the interpolation method of Section 4 is to ben
used (SSI), we must compute ff M. for the functionali=i I
values. It is somewhat simpler to scale this runningproduc than to scale the recurrence process (Eq. (1)).
"P'±e implementation of Eq. (3) was done in a man-ner similar to that described in Ref. 8. A test was madeto determin! if Mi vanished and, if so, to replace thezero with a relatively small number. This never occurred
8-
IAPPL ED PHYSICS LABORATORY
S.,R.~ ILS*,o U*PVLtNO*
Iin any of the matrices tested. Also, unlike the Sturmsequence technique for tridiagonal matrices, it is noteasy to see the conditions under which two successive Mi(or mi in Eq. (1)) vanish. A check was made to deter-mine if this happened and, if so, to perturb X and tryagain. However, the situation never arose.
iIii
4
-I
ITil JOHNS H"OKINS UNIVCtSlTv
APPLIED PHYSICS LABORATORYSiyIftl tfl*NG MaRYLIAND
IB
7. JACOBI ROTATIONS TO TRIDIAGONAL MATRIX (0J)
A
& If all eigenvalues are desired, we can, of course,use any of the above methods. However, there is an ap-proach available in this case that is not competitive if
t only a few eigenvalues are desired. This is the methodof Jacobi rotations to reduce the bandwidth of a matrix butpreserve the band nature of the matrix, as suggested byRutishauser (Ref. 9) (see alho Ref. 10), followed by find-ing the eigenvalues of the resulting tridiagonal matrix bythe QR method (Ref. 11).
aI
- 10 -
INC JONN. MOPKI*• LJNVCUITV
A.PPLIED O-.YSICS LABORATORY
8. RESULTS
j For test matrices we consider the following:
p-r 2q r
2q p 2q r
r 2q p 2q rJr
p 2q
r 2q p n-r
nx n
The eigenvalues of this matrix are1 22
Xk = (p-2r) - (q 2-(q-2r cos k) 2)
2 rT
= p - 2r - 4(q cos k - r cos2A), e =
= p - 4q cos ke + 2r cos 2 k, k=1,2,..... n
(see, e. g., Ref. 12). In particular we chose four matrices,as follows:
Matrix 1: p = 7 , q = 1.75 , r = 0.4
Matrix 2: p = 6 , q = 1.75 , r = 0.5-15
Matrix 3: p = 11, q = 10 , r = 5
Matrix 4: p = 10, q = 10"15, r = 5.
For matrices 1 and 2, the eigenvalues are distinct
but of the smaller ones, many are near I for matrix 1, and
- 11 -
HIE 1ONNO NOPKINF4 UNIV9C3ITV
APPLIED PHYSICS LABORATORYStll.ie IPlI,. MAfty.AND
near 0 for matrix 2. For matrices 3 and 4 each root isat least a double root (for even n) to within the precisionof the arithmetic used, with distributions similar tomatrices 1 and 2, respectively.
For computing only a few eigenvalues we used themethods of Sections 2, 5, and 6. For computing alleigenvalues, we compare the best of the above methodswith the method of Section 7.
Each of these methods was applied in double pre-cision in Fortran IV (H compiler) on the IBM 360/91 atThe Johns Hopkins University Applied Physics Laboratory.Tables 1 and 2 contain the central processing unit (CDU)time in seconds for each run. Because of the time-si.iringcapabilities of the machine, it is possible that two identi-cal runs could show slightly different times. However,the relative magnitudes of the numbers are consistent,and it is these in which we are interested.
In Table 1, the time is given iin which the tensmallest eigenvalues were found. As noted above, methodsBD and MSSI are identical except that the Sturm sequenceprocess is determined by LU decomposition with pivotingin one case (BD), and without pivoting in the other (MSSI).Operation count indicates that BD should take about twice
I as long as MSSI, but the actual figure was between sixand seven times as long. This was probably because ofthe work needed to determine and execute the pivoting.Also examination of the eigenvalues of the matrices up toorder 2000 showed no difference in the accuracy of thetwo methods.
In Table 2, we have the time in seconds to computeall eigenvalues. For a given tridiagonal matrix, the QRmethod is fastest. We have included the QD method (Ref.13) for comparison. It would seem that the Ql methodcould be used even when only a few eigenvalues arc needed.
* Unfortunately, "the order in which the eigenvalues are
-12 -
IThi J40.415 HOPKINS UNIVRITI0V
APPLIED PHYSICS LABORATORY
$* Time in Seconds to Compute Ten
K Smallest Eigenvalues
Mu-irix I1 2 3 4
IV) 6. 772 6. 823 3~ 25 9j. 5f95N 50 2. 877 2. 337 1. 94c 1. 469
%ISS 2.502 2. 590 1. 374 1. 3B4I Mssf 1.134 1. 195 1. 364 1. 383
141) 1 3. 655 13. 760 17.11155 18. 402ýN -10(00 1.H 5. 887 4. 6211 4. 196 3. 013
MSS 4.851 4.113 2. 61l0 2. 760MSSI 2. 230 2. 252 2. 675 2. 750
1H 112. 458 9. 673 8. 491 5. 78,,N '2000 MSS !).223 J 9. 519 5. 139 5. 29 8
M1SSt 4.380O 4.412 4. 131 5. 071
N 50 SI(10. 751 10. 81< 11. 773 12. 087_1
-i3
T51JOP4S "OPiIlNS UNIVERSITYAPPLIED PHYSICS LABORATORYg SLV** R•G iMAYUAN.
i
I
Table 2
CPU Time in Seconds to Compute all ELgenvalues
Matrix 1 Matrix 4
N i00 200 500 I 00 200 500
LR 1.969 7.278 1.311 4.935
MSSI 1.835 7. 277 .81 11.108
RJ only 0.156 I 0.627 3.969 0.156 0. 636 4.081
RJ + QD 0. 629 2. 673 1.7. 097 i.259 5.086 31. 603
RJ +Q 0.445 1.693 10.2.4 0.381 1.523 9.348
-14
TWE .10-N 1OP1 N$ UNV~ (IS"TY
APPLIED PHYSICS LABORATORYSt~l* S*h I M• ARVANO
found is to some extent arbitrary" (Ref. 11). The QDmethod, however, has the advantage of producing theeigenvalues in strictly ascending order. A comparisonof Tables 1 and 2 shows that the QD method might be com-petitive if more than a few, but not all, eigenvalues aredesired.
-15-
&THE J.OMHs HOPKINS UNIVERITY
APPLIED PHYSICS LABORATORYSIUVU. 3.51kG M*SVLANO
9. CONCLUSIONS
I
If only a few eigenvalues of a large five-diagonalsymmetric matrix are wanted, the modified Sturm sequenceand interpolation technique (MSSI) appears optimal. If alleigenvalues are desired, Jacobi rotations, followed by theQR method, appear difficult to beat. Between these ex-tremes on•• might consider the LR or QD methods.
01
I
i
-16 -
IT"I JO"NS HMPKINS UtNIV1ZRSITV
APPLIED PHYSICS LABORATORYSILVIR Sp-1 MA.Y•NO
IREFERENCESi
1. H. Rutishauser, "Solution of Eigenvalue Problemswith the LR-Transformation, " National Bureau ofStandards, AMS, Vol. 49, 1958, pp. 47-81.
2. H. Rutishauser and H. R. Schwarz, "The LRTransformation Method for Symmetric Matrices,"Numerische Mathematik, Vol. 5, 1963, pp. 273-289.
3. J. H. Wilkinson, The Algebraic Eigenvalue Prob-lem, Clarendon Press, Oxford, 1965.
4. J. R. Kuttler, "Upper and Lower Bounds forEigenvalues of Torsion and Bending Problems byFinite Difference Methods," ZAMP, Vol. 21, 1970,pp. 326-342.
5. R. A. Sweet, "A Recursive Relation for the Deter-minant of a Pentadiagonal Matrix, " Comm. of theACM, Vol. 12, 1962, pp. 330-332.
6. G. Peters and J. H. Wilkinson, "Eigenvalues ofAx = X Bx with Band Symmetric A and B," Comp.Jr., Vol. 12, 1969, pp. 398-404.
7. R. S. Martin and J. H. Wilkinson, "Solution ofSymmetric and Unsy:nmetric Band Equations andthe Calculation of Eigenvectors of Band Matrices,"Numerische Mathematik, Vol. 9, 1967, pp. 279-301.
8. W. Barth, R. S. Martin, and J. H. Wilkinson,
"Calculation of the Eigenvalues of a SymmetricTridiagonal Matrix by the Method of Bisection, "
Numerische Mathematik, Vol. 9, 1967, pp. 386-393.
-17-
THE JOHNS4 •OPKINS UNIVtRSITY
APPLIED PHYSICS LABORATORYSILVER SinN41 MAVRYND
b 9. H. Rutishauser, "On Jacobi Rotation Patterns,
Proceedings AMS Symposium in Applied Mathe-* matics, Vol. 15, 1963, pp. 219-239.
10. H. R. Schwarz, "Tridiagonalization of a Sym-h metric Band Matrix, " Numerische Mathematik,
Vol. 12, 1968, pp. 231-241.
1 11. H. Bowdler, R. S. Martin, C. Reinsch, and J. H.Wilkinson, "The QR and QL Algorithms for Sym-metric Matrices, " Numerische Mathematik, Vol.11, 1968, pp. 293-306.
12. I. Galligani, A Comparison of Methods for Com-puting the Eigenvalues and Eigenvectors of aMatrix, Joint Nuclear Research Center, IspraL Establishment, Italy, 1968.
13. C. Reinsch and F. L. Bauer, "Rational QR Trans-formation with Newton Shift for Symmetric Tri-diagonal Matrices," Numerische Mathematik,Vol. 11, 1968, pp. 264-272.
IiI
I
I
g -18-