PERGAMON Computers and Mathematics with Applications 42 (2001) 1379-1391 ... symmetric nonnegative matrix which realizes the spectrum. The algorithm is ...
( ~
AnIntemational Joumal computers & mathematics
withapplications PERGAMON Computers and Mathematics with Applications 42 (2001) 1379-1391
www.elsevier.nl/locate/camwa
Fast C o n s t r u c t i o n of a S y m m e t r i c N o n n e g a t i v e Matrix with a Prescribed Spectrum O. RoJo AND R. SOTO t Department of M a t h e m a t i c s Universidad Catdlica del Norte Antofagasta, Chile H. RoJo Department of M a t h e m a t i c s Universidad de Antofagasta Antofagasta, Chile
(Received and accepted December 2000) Abstract--In this paper, for a prescribed real spectrum, using properties of the circulant matrices and of the symmetric persymmetric matrices, we derive a fast and stable algorithm to construct a symmetric nonnegative matrix which realizes the spectrum. The algorithm is based on the fast Fourier transform. @ 2001 Elsevier Science Ltd. All rights reserved.
K e y w o r d s - - I n v e r s e eigenvalue problem, Nonnegative matrix, Circulant matrix, Fast Fourier transform, Persymmetric matrix.
1.
INTRODUCTION
T h e r e are m a n y a p p l i c a t i o n s involving n o n n e g a t i v e matrices. We m e n t i o n a r e a s like g a m e theory, M a r k o v chains ( s t o c h a s t i c m a t r i c e s ) , t h e o r y of p r o b a b i l i t y , p r o b a b i l i s t i c a l g o r i t h m s , n u m e r i c a l analysis, d i s c r e t e d i s t r i b u t i o n , g r o u p theory, m a t r i x scaling, t h e o r y of s m a l l oscillations of elastic s y s t e m s (oscillation m a t r i c e s ) , a n d economics. M a n y references c o n c e r n i n g p r o p e r t i e s of n o n n e g a t i v e m a t r i c e s are available. S o m e f u n d a m e n t a l results are collected into t h e following m a i n t h e o r e m of P e r r o n a n d F r o b e n i u s [1]. THEOREM 1. Let A be a nonnegative irreducible n x 'n matrix. Then,
1. 2. 3. 4.
A has a positive real eigenvalue r ( A ) equal to its spectral radius p ( A ) , to r ( A ) there corresponds a positive eigenvector, r ( A ) increases when a n y e n t r y o f A increases, r ( A ) is a simple eig~nvalue o f A .
T h e eigenvalue r ( A ) is called t h e P e r r o n r o o t of A a n d t h e c o r r e s p o n d i n g p o s i t i v e e i g e n v e e t o r is called t h e P e r r o n v e c t o r of A . Work supported by Fondecyt 1990363, Chile. tPart of this research was conducted while these authors were visitors at IME, Universidade de Sac Paulo, Brazil.
0898-1221/01/$ - see front matter @ 2001 Elsevier Science Ltd. All rights reserved. PII: S0898-1221(01)00247-4
Typeset by AA~-TEX
1380
O. R o J o et al.
The general inverse eigenvalue problem for nonnegative matrices is the following. PROBLEM 1. Given a set ~ = {~1, ~2, ~ 3 , - . - , An} of complex numbers, find necessary and sufficient conditions for ~ to be the spectrum of a nonnegative matrix. An important particular case of Problem 1 follows. PROBLEM 2. Given a set cr - {kl, ~2, X a , . . . , k,~} of real numbers, find necessary and sufficient conditions for ~ to be the spectrum of a nonnegative matrix. These problems have been studied by many authors and very important results have been obtained by Suleinmnova [2], Perfect [3], Salzman [4], Ciarlet [5], Kellogg [6], Fiedler [7], Soules [8], Borobia [9], Radwan [10], and Wumen [11]. However, "very few of these results are ready for implementation to actually compute this matrix" [12, p. 18]. \Ve recall the first and perhaps the most important sufficient condition, due to Suleimanow~ [2], fl)r the existence of a symmetric nonnegative matrix with a prescribed real spectrum. TItEOREM 2. L e t a = {A1, A2,..., An} be a real set satisfying "~1 -]- -'~2 q- " ' ' @ -'~n ~ 0,
Aj < O,
j = 2,3,...n.
(1)
T h e n there exists a n o n n e g a ti v e n × n m a t r i x w i t h s p e c t r u m ~.
Perfect [3] proved this theorem showing that the companion matrix of the polynomial p(A) = [[~'=~ (~ - Aj) is nonnegative. The construction of the companion matrix of the polynomial p requires to evMuate the elementary symmetric flmctions at kl, A 2 , . . . , k~. T h a t is,
C2 = /~1/~2 -{- .,~i/~ 3 -~- . . . q- / ~ n _ l , ~ n , c3 = /~a/~2)~3 q-/~1,~2/~4 ~- " ' " q- - ~ n - 2 - ~ r z - l / ~ n ,
c~ = k l A 2 k a . . . A ~ . This computation requires a number of arithmetic operations which increases exponentially with ,t. In addition, it is well known that the zeros of a polynomial are very sensitive to changes in its coefficients. Tile most constructive result is the sufficient condition studied by Soules. The construction of the matrix depends on the specification of the Perron vector; in particular, the components of the Perron vector need to satisfy' some inequalities in order for the construction to work. In this paper, we relax the sufficient, condition of Suleimanova and we obtain a fast and stable procedure based on the fast Fourier transform [la] to construct a symmetric nonnegative matrix with a prescribed real sI)ectrum. The procedure does not require to know the Perron vector. The fast Fonrier transform is a very fast and a very stable algorithm to compute the discrete Fourier transform. In particular, this algorithm can be used to compute very efficiently the eigenvalues of a circulant matrix. Thus, for the purpose of this paper, we begin considering tile case of the inverse eigenvalue problem for a cireulant nonnegative matrix. This is done in Scction 2. In Section 3, we consider a prescribed real spectrum. This spectrum is used to define an inverse eigenvalue problem tbr a real circutant (2n) × (2n) matrix. We arrive to a real symmetric persymmetric nonnegatiw ~, matrix. Then, using properties of this class of matrices, a real symmetric nonnegative n x n matrix which realizes the prescribed real spectrum is easily obtained. In Section 4, some experimental results are included.
Symmetric Nonnegative Matrix
2. C I R C U L A N T
NONNEGATIVE
1381
MATRICES
In this section, we recall basic facts of the circulant matrices and we study the inverse eigenvalue problem for circulant nonnegative matrices. An n x n matrix C = (cij) is a circulant matrix if c~j = ci+l,j+t and the subscripts are taken modulo n, that is,
C----
CO
C1
C2
Cn- 1
CO
C1
Cn--2
Cn--1
Cn-2
Cn-1 Cn- 2
(2) C2
C2 C1
C1 C2
Cn- 2
Cn -- 1
CO
The circulant matrix given in (2) is denoted by C = circ ( c 0 , c l , . . . , c n - 1 ) . T h e circulant matrices have very nice properties. We recall some of them. 1. If a = exp (27ri/n), i 2 = - 1 , then the vectors in = [ 1 , 1 , . . . , 1 ] T, Vj = [1,wJ_I,w2(j_I)
. . . ,w(n-1)(j-1) IT,
(3)
j = 2, 3 , . . . , n, form an orthogonal basis of eigenvectors of any complex circulant n x n matrix. 2. Moreover,
where Vj denotes the vector whose components are the complex conjugates of the components of vj and [(n + 1)/2] is the greatest integer not exceeding (n + 1)/2. 3. If C is the circulant n x n matrix given in (2) then its eigenvalues are /~1 = CO -4- C1 -~- C2 + "'" + Cn-1, )~j = C0 JF Cl~d j - 1 JF C2~d2 ( j - l ) -F "'" -b Cn-1 w ( n - 1 ) ( j - 1 ) ,
(5)
j ----2 , . . . , n, with eigenvectors ln, V2, V 3 , . . . , Vn, respectively. If, in addition, C is a real matrix, then
1 4. Let
(7)
F = (ft.j) = [ l n , v 2 , v 3 , . . . , v ~ ] . Then,
fkj = w (k-1)(j-1),
l 0. Then, It >_ 0. Let
Ao=max{#,
max2 c + - -
1l
Iz
>0,
for j = O, 1, 2, . . . , 'lz - 1 .
Therefore, Ao - A,% is a circulant nonnegative matrix. in both cases, or(A0) = {Ao, A2,A3,...,A,,} and r(Ao) = Ao. Clearly, if A > Xo, then Aa is a circulant, positive matrix and, ~7(A),) = {A, A2, A3. . . . . An} and r(A,x) = A. I EXAMPLE 2. L e t A . , = 5 + 3 i , A 3 = - 2 - 1 1 i , A 4 = 7 + 8 i , A 5 = 7 - 8 i , A 6 = - 2 + l l i , For these given numbers, the use of Theoreni 5 gives Ao = 50.0214 and
Ao-
circ (10.0031, 7.7640, 8.1776, 0.0000, 11.11,50, 9.0021, 4.9596),
to four decimal places.
AT=5-3i.
Symmetric Nonnegative Matrix
1385
COROLLARY 6. /fo- = {A1, A2,...,An} is such t h a t (A2, Aa,...,A~) E S ( n - l ) and A1 = Ao, (respectively, As > Ao), w h e r e Ao is as in T h e o r e m 5, then there e x i s t s a cireulant nonnegative, (respectively, p o s i t i v e ) n x n m a t r i x w i t h s p e c t r u m {A1, A2,..., k,~)}. EXAMPLE 3. Consider Aj, j = 2, 3, 4, 5, 6, 7, of Example 2, and let A1 = 51. Since As > Ao, there exists a circulant positive matrix A with spectrum 7 A=A0+---
51
A0
1717T 7 = c i r c (10.1429, 7.9038, 8.3174, 0.1398, 10.2548, 9.1419, 5.0994).
COROLLARY 7. //co- = {A1, A 2 , . . . , An} C ]~ is such that (A2, A3,..., A,z) C S ( n - l ) and
( r e s p e c t i v e ~ > 0),
A 1 -[- A 2 -~- "'" -[- A n = O,
j=2,3,...n.
Aj < O,
T h e n there exists a circulant nonnegative, (respectively, p o s i t i v e ) n x n m a t r i x w i t h s p e c t r u m O-.
n PROOF. Since ImAj = 0 for all j, it follows that # = - ~ j = 2 Aj. From the proof of Theorem 5 there exists a circulant matrix C = circ (co, Cl,. •., Cn) such that
Now, from the formulas given in Remark 3 and from the hypothesis l j < 0, j = 2, 3 , . . . n, we have that Co = 0 and ck > 0 for k = 1 , . . . , n - 1. Then, c >_0 and thus, A0 = max {#, max2 #, then the matrix is positive. The proof is complete.
II
EXAMPLE 4. Let A1 = 13, A2 = -1,A3 = - 2 , A4 = - 3 , A5 = -3,/k6 = -2,/~7 = - 1 . This prescribed spectrum satisfies the hypothesis of the previous lemma and it is realized by the circulant positive matrix A = circ(0.1429, 2.5784, 1.9011, 1.9490, 1.9490, 1.9011, 0.5784). COROLLARY 8. frO" = {A1, A 2 , . . . ,An} C C is such that (Az, A3,... ,An) E S ( n - l ) a n d if
AI+~ Aj--~ IImAjl _>0, j=2 j=2 Re (Aj) _< 0,
j :9,3,...n,
then t h e r e e x i s t s a circulant n o n n e g a t i v e n x n m a t r i x w i t h s p e c t r u m O-.
PROOF. We have
n
n
j=2
j=2
From the proof of Theorem 5 there exists a circulant matrix C = circ (co, e l , . . . , c,~) such that
O-(c) : b , A2, A3,..., A.}.
1386
O. RoJo et al.
W i t h o u t loss of generality, we m a y suppose I m 5j _< 0 for j = 2, 3 , . . . , [(n + 1)/2]. We assume n = 2m + 2. T h e proof for n = 2m + 1 is similar. From the formulas given in R e m a r k 3, we have
i
ch'= n
/
)
7n7-~
j:2
m+' ( k(j-l)Tr + 2 ,=~ ~ sin ~ 7 ~
)
"
1 hnSj
Now, using the hypothesis R e S j < 0, j = 2, 3 , . . . n , we have t h a t ck _> 0 for k = 1 , . . . , n Then, c >_ 0, and thus, 50 = max{#, max2 _ b + - - '/l -0. Therefore, the matrix A = B + ((A1 - t~)/n) l n 1 ~ is nonnegative and it has the prescribed spectrum. I n
n
Since - 2 ~ j = 2 Aj - bn < - 2 ~ j = 2 Aj, the condition in (21) strictly improves the condition in (19). 5
EXAMPLE 6. Let A2 = - 1 , A3 = - 1 . 5 , )~4 = --3, /~5 = --3.8. Then, # = - 2 ~ j = 2 = 18.6. For these eigenvalues the matrix B of Theorem 10 is 2.4058 4.6972 3.7357 3.8028 3.9585
4.6972 1.4442 4.7643 3.8915 3.8028
3.7357 4.7643 1.6000 4.7643 3.7357
3.8028 3.8915 4.7643 1.4442 4.6972
3.9585~ 3.8028| 3.7357| , 4.6972| 2.4058J
rounded the entries to four decimal places, and its smallest entry is b = 1.4442. From Corollary 11, for A1 _> 18.6 there exists a symmetric positive matrix with spectrum {AJ}j=I. 5 For A~ = 19, the matrix is -2.4858 4.7772 3.8157 3.8828 4.0385] 4.7772 1.5242 4.8443 3.9715 3.8828| 3.8157 4.8443 1.6800 4.8443 3.8157| . 3.8828 3.9715 4.8443 1.5242 4.77721 4.0385 3.8828 3.8157 4.7772 2.4858J Now, fi'om Corollary 12, for "~1 ~ It - - 5 5 = 11.3788 there exists a symmetric nonnegative matrix which realizes the spectrum. For A1 = 11.3788, the matrix with spectrum { 1 1 . 3 7 8 8 , - 1 , - 1 . 5 , - 3 , - 3 . 8 } is -0.9615 3.2530 2.2915 2.3585 2.5148 3.2530 0 3.3201 2.4472 2.3585 2.2915 3.3201 0.1558 3.3201 2.2915 2.3585 2.4472 3.3201 0 3.2530 2.5143 2.3585 2.2915 3.2530 0.9615
4. C O M P U T A T I O N A L
RESULTS
All the computations were performed on a personal computer equipped with Intel Pentimn chips. Because of memory limitations we took ~ _< 450 in all the experiments. We used MATLAB for Windows, Version 4.2e.1. Table 1 shows the average CPU time in seconds required to construct the symmetric nonnegative n x n matrix A of Corollary 12, with randomly generated prescribed eigenvalues A2, A 3 , . . . , k,~ from the range I - a , 0), a = 10 - s , 10 -6, 10 -4, 10 -2, 1, 10 2, 10 4, 10 6, 10 8. These eigenvalues were generated using the function rand of MATLAB. The other MATLAB functions that we used were
Symmetric Nonnegative Matrix
1391
m
lift toeplitz fliplr cputime
to c o m p u t e c = ( 1 / 2 n ) F q , to c o n s t r u c t t h e m a t r i x U a n d t h e l n a t r i x V J , to o b t a i n t h e m a t r i x V , to see t h e C P U t i m e in seconds required in each c o n s t r u c t i o n of t h e m a t r i x A . Table 1. C P U t i m e in seconds. a
64
100
128
200
256
300
10 - s
0.06
0.11
0.20
0.48
0.82
1.16
10 - 6
0.06
0.12
0.21
0.49
0.88
1.16
10 - 4
0.06
0.13
0.21
(/.51
0.85
1.18
10 - 2
0.05
0.13
0.20
0.50
0.87
1
0.06
0.13
0.20
0.49
0.86
102
0.06
0.12
0.2]
0.51
104
0.06
0.12
0.19
10 (~
0.06
0.15
10 s
0.06
0.14
-
350
400
450
1.53
1.97
2.63
1.55
2.02
2.61
1.56
2.04
2.65
1.18
1.46
2.01
2.67
1.20
1.52
2.02
2.68
0.86
1.18
1.55
2.02
2.69
0.49
0.86
1.18
1.49
2.09
2.62
0.22
0.49
0.86
1.19
1.18
2.01
2.63
0.22
0.50
0.88
1.20
1.51
2.01
2.69
T/
For each n a n d for each a, we r a n our M A T L A B p r o g r a m t e n t i m e s for a s a m e p r e s c r i b e d s p e c t r u n l a n d t h e n we c a l c u l a t e d t h e c o r r e s p o n d i n g average of t h e C P U times. T h e s e averages a r e shown in T a b l e 1. T h e s e e x p e r i m e n t a l results confirm t h a t t h e a l g o r i t h m t h a t we p r o p o s e to c o n s t r u c t a s y m m e t r i c n o n n e g a t i v e m a t r i x A w i t h a p r e s c r i b e d s p e c t r u m is a v e r y fast p r o c e d u r e . In a d d i t i o n , as we m e n t i o n e d in R e m a r k 2, t h e p r o c e d u r e is very stable.
REFERENCES 1. R.S. Varga, Matrix Iterative Analysis, Prentice HM1, (1962). 2. It.R. Suleimanova, Stochastic m a t r i c e s with reM characteristic values, (in R u s s i a n ) , Dokl. Akad. Nauk 66, 343 345, (1949). 3. H. Perfect, O n positive s t o c h a s t i c m a t r i c e s with real characteristic roots, Proc. Cambridge Philos. Soc. 48, 271 276, (19521. 4. F.L. S a l z m a n n , A n o t e on eigenvMues of n o i m e g a t i v e matrices, Linear Algebra Appl. 5, 329 338, (19721. 5. P.G. Ciarlet, S o m e r e s u l t s in t h e t h e o r y of n o n n e g a t i v e matrices, Linear Algebra Appl. 1, 139 152, (1968). 6. R.B. Kellogg, M a t r i c e s similar to a positive or essentially positive m a t r i x , Linear Algebra Appl. 4, 191 204 (1971). 7. M. Fiedler, Eigenvalues of n o n n e g a t i v e s y m m e t r i c matrices, Linear Algebra Appl. 9, 119 142, (1974). 8. G.~V. Soules, C o n s t r u c t i n g s y m m e t r i c n o n n e g a t i v e matrices, Linear and l~,lultilinear Algebra 13, 241-251
(19831. 9. A. Borobia, Eigenvalues of nommgative symmetric matrices, Linear Algebra Appl. 9, l ] 9 -142, (1974). I0. N. Radwan, An inverse eigenvalue problem for symmetric and normal matrices, Linear Algebra Appl. 248, 101 109, (1996). I i. (I. Wumen, Eigenvalues of nonnegative matrices, Linear Algebra Appl. 266, 261-270, (1997). 12. M.T. Chu, Inverse eigenvalue problems, SIAM Rev. 40 (1), 1 39, (March 1998). 13. J.W. Cooley and J.W. Tukey, An algorithm for the calculation of complex Fourier series, Math. Comp. 19, 297-301, (19651. 14. A. Cantoni and P. Butler, Eigenvalues and eigenvectors of symmetric centrosymmetric matrices, Linear Algebra Appl. 13, 275-288, (1976).