Annals of Discrete Mathematics 20 (1984) 151-159 North-Holland
SPECTRA OF TREES
C.D. GODSIL Institut fur Mathematik und Angewandte Geometrie, Montanuniuersitat Leoben, A -8700, Leoben, Austria
The paper surveys some little-known results and presents some new results concerning the characteristic polynomials and adjacency matrices of trees and forests. The new results include an explicit expression for the entries of the adjoint matrix of X I - A, when A is the adjacency matrix of a forest, and bounds on the value of the smallest positive eigenvalue of such a matrix.
1. Introduction
Let G be a graph with vertex set V(G) = { l , .. . ,n } . The adjacency matrix A ( G )= (a,.) of G is defined by setting aij = 1 when i and j are adjacent, and setting ai,= 0 otherwise. (In particular, = 0.) The Characteristic polynomial q(G,x ) is det(x1- A (G)), where I is the identity matrix. We will sometimes abbreviate q ( G , x )to q(G)and A ( G ) to A. In this paper we consider the relation between the graph-theoretic properties of G and the algebraic properties A ( G ) and q ( G ) , under the additional assumption that G is a forest. The general problem, when G is an arbitrary graph, has been studied extensively (a convenient reference is [ 11). Since forests are a special class of graphs one would hope to find that their adjacency matrices and characteristic polynomials manifest some unusual behaviour. Until now there has been little evidence of this. Here we hope to go some way toward overcoming this shortage by presenting some new results (see Theorem 4, Lemma 2, Corollary 3 and Theorem 7) and by surveying some results which, although ‘known’, do not seem to be common knowledge. (These latter results come from a paper by Heilmann and Lieb [6] on an apparently unrelated topic.)
2. Basic properties
In this section we present some of the basic properties of the characteristic polynomial of a forest. None of these results is new. 151
C.D. Gadsil
152
Definition 1. Let F be a graph on n vertices. A k-matching in G is a set of k vertex disjoint edges. The number of k-matching in F will be written as m(F, k ) and we assume that m(F,O)= 1. A matching M with the property that every vertex in F is incident with an edge in M is called a 1-factor. The matchings polynomial of F (sometimes also called the matching polynomial) is I"/21
p(F, x ) =
k =O
( - l)'m(F, k ) ~ " - ' ~
Our first theorem has a complicated history. It is a special case of Theorem 1.2 in 111. For the proof and the history we refer the reader to that source.
Theorem 1. Let F be a forest. Then cp(F,x ) = p ( F , x).
One immediate consequence of Theorem 1 is that we have an explicit expression for the coefficients in cp(F,x). A second consequence is: Corollary 1. Let F be a forest. Then A ( F ) is invertible if and only if F has a 1-factor.
Proof. By the definition of K ( F , X and ) Theorem 1 we see that Idet(A)] is the number of 1-factors. We will say more about the inverse of A ( F ) (when it exists) in Section 5. We must also point out that the converse of Theorem 1 is true - if cp(F,x)= p ( F , x ) , then F is a forest. This is given as Corollary 4.2 in [ 5 ] . The matchings polynomial of a graph has many interesting properties. For a survey see IS]. The paper by Heilmann and Lieb [6] is also an important source of information. Our next result provides relations between the characteristic polynomial of a forest and the characteristic polynomials of its subforests. We require some preliminary definitions first, however.
Definition 2. If G is a graph and S C V ( G ) ,then G \S is obtained by deleting the vertices in S. If e = [ 1,2] is an edge in G, then G \ e is obtained by deleting e, but nor the vertices 1 or 2, from G. If i, j E V ( G )then we write i j to denote that i and j are adjacent.
-
Lemma 1. Let F be a forest. Then (a) if F is the disjoint union of forests FI and F2, q ( F ) = cp(F~)q(F*), (b) dcp(F)ldx = &L,(F)cp(F\i),
Spectra of trees
153
(c) if e ={1,2] is an edge in F, p(F)=q ( F \ e ) - q(F\{1,2}), (d) if 1 E V ( F ) , q ( F ) = x q ( F \ l ) - C , - I q(F\{li}). Proof. For (a) see Theorem 2.4 in [l] (where ‘disjoint union’ is rendered as ‘direct sum’). For (b) see Theorem 2.14 in [l]. Claim (c) follows from Theorem 2.12 in [1]. Finally (d) can be derived by repeated applications of (c). It is also equivalent to equation (4.1) in [6].
It should be clear from our proof that Lemma 1 is a summary of standard results! We note that (a) and (b) of Lemma 1 are valid for arbitrary graphs, that (c) holds for graphs such that e lies on no circuit, and (d) holds for graphs where 1 lies on no circuit. It is easy to find examples to show that the characteristic polynomial of a forest does not, in general, identify it. (For examples see the tables in [l]). However, a stronger statement is true:
Theorem 2 (Schwenk [8]). Let p. denote the proportion of trees on n vertices which are determined up to isomorphism by their characteristic polynomials. Then p,, +0 as n + m .
3. The zeros of cp(F,x). One interesting problem in algebraic graph theory is to provide bounds on graph-theoretic parameters of a given graph G in terms of the eigenvalues of A ( G ) .In this section we state what is known when F is a forest. We remind the reader that A (G) is symmetric and so the zeros of q ( G )are always real, for any graph G. Definition 3. We use A = A(G) to denote the maximum degree of the graph G and d ( G ) to denote the average degree. We denote the largest eigenvalue of A ( G ) by Ai(G).
Theorem 3. Let F be a forest with A > 1. Then (a) AI(F)>d(F),and (b) < A1(F)< 2
vz
m.
Proof. Part (a) follows from Theorem 3.8 of [l], on observing that since A > 1, F cannot be regular. The lower bound in (b) follows from Exercise 11.14(a) in [7] or from Exercise 2 on p. 112 of [l]. To prove the upper bound in (b) is valid we need a construction. We define the
1.54
C.D. Godsil
roored Bethe free B ( d , n ) as follows. B ( d , 1) is a single vertex, which is simultaneously the root. B ( d , n ) consists of a vertex u, which is joined by edges to the roots of each of d - 1 copies of B ( d , n - 1). The vertex u, is the root of B ( d , n ) . By the comment at the end of Section 3 in [6], A,(B(d,n ) )< 2 a . Our proof is completed by noting that if F has maximal degree A, then F is a subforest of B(A. n ) when n is large enough. So, by Exercise 11.13 of [7], for 0 example, Al(F)SA1(B(A, n)). The lower bounds in Theorem 3 are valid for all graphs. However, for arbitrary graphs G we have only A l ( G ) s A(G), with equality occurring only if G is regular (for a proof see Exercise 11.14(a) in [7] again). The proof of the upper bound in Theorem 3(b) was suggested to the author by Ivan Gutman. The bound itself is due to Heilmann and Lieb (see Theorem 4.3 in [5]). Since a forest is a bipartite graph, its eigenvalues are always symmetric about the origin. This is easy to see using Theorem 1 and the definition of p(G, x ) . Alternatively, w e refer to Exercise 11.19 in [7]. Virtually nothing is known about the eigenvalues of A (F),other than A,(F). Some information is available when A (F)is invertible. We will summarize this in Section 5 . The only remaining information we know of comes from the next result.
Theorem 4. Let G be a graph with minimum vertex degree 6. Then q(G,x ) has a zero 8 with 8 ' s 6. Proof. Since A = A (G) is symmetric it has n = I V(G)I orthogonal eigenvectors t l , .. . , z . . Let 2, be the n X n matrix ziz:. We assume each z, has unit length. It follows from this and their orthogonality that Z , + 2,+ * * * + Z,, is the identity matrix. Let A, be the eigenvalue associated with 2,. Thus, AZi = AZ, and
We may assume that 1 E V(G) has degree 6. Then c, = (Zi),l.Taking rn = 0 and m = 2 in turn in (1) yields:
equals 6. Set
Now, by definition, the diagonal entries of 2, are the squares of the corresponding entries of the vector z,. Thus, ci 2 0 and so, by (2), 6 is a convex combination of the numbers A:. Accordingly, for some index j we must have A : c 6, as required. 0
Spectra of trees
155
Corollary 2. Let f be a forest. Then cp (F, x ) has a zero in the interval [ - 1,1].
If G is connected, then, with more care, it is possible to show that equality holds in Theorem 4 only when 6 = 1 and G is the complete graph on two vertices. 4. Christoffel-Darboux formulae
In Section 6 of [6] Heilmann and Lieb derive a number of identities for the matchings polynomial of a graph. These identities can be viewed as analogues of the Christoffel-Darboux formulae in the theory of orthogonal polynomials (for details of this see any reference book on the subject). Our next result is a summary of the results of Section 6 in [6], insofar as they apply to trees. We use the notation P,, to denote a path in a graph joining vertex i to j . In a tree there is a unique path joining any two vertices, so in this case P,, is determined by i and j. We represent by T\P,j the graph obtained when all vertices in P,j (including i and j ) are deleted from T. Theorem 5 (Heilmann and Lieb [6]). Let T be a tree and suppose V ( T )= {1,2,. . ., n } . Then (a)
cp(T\i,x)cp(T,y)-cp(T\i,y)(O(T,x )
Proof. Equations (a), (b) and (c) are special cases of equations (6.4), (6.5) and (6.6), respectively, in 161. 0 Using a different proof technique we can obtain analogous identities for arbitrary graphs. We will present this in a future paper [4]. It is known that if G is a graph and u E V ( G ) ,then the zeros of cp(G\ u ) interlace those of cp(G).That is, between any two zeros of cp(G) lies a zero of cp(G\ v ) . (See, for example, Theorem 0.10 in [l].)One way of stating this result is by saying that cp(G\u)/cp(G)has only simple poles. For trees this last statement can be strengthened:
Lemma 2. Let P be a path in the tree T. Then cp ( T \ P, x )lcp (T,x ) has only simple poles.
C.D. Godsil
156
Proof. Summing equation (b) of Theorem 5 over all vertices in V ( T )and then applying equation (b) of Lemma 1 we obtain: CF '( T, x )' - cp"(
T, x)cp (T,x ) = C cp ( T \ P,,x)'. I./
(3)
Suppose 8 is a zero of cp(T)with multiplicity rn > 1.Then it is zero of the LHS of (3) with multiplicity at least 2m - 2. Since the RHS is a sum of squares and 8 is real, we conclude that, for any i and j , 8 is a zero with multiplicity 2m -2 of p(T\P,]):. Hence, 8 has multiplicity at least m - 1 in cp(T\ P,,),whence the lemma follows. 0 Lemma 2 is false for arbitrary graphs. For example, take G to be a complete graph with n 3 3 vertices and P a Hamiltonian path in G. Then cp(G\ T) = 1, while p ( G ) has - 1 as a zero with multiplicity n - 1.
5. The adjoint matrix of ( XI A (F)) In this section we present an explicit expression for the adjoint matrix of XI- A , when A = A ( F ) is the adjacency matrix of a forest F. We use this to obtain some information about the eigenvectors of F. Our next result could also be derived from (1) in [ 2 ] , but we give a direct proof. We use B * to denote the adjoint matrix of a given matrix B.
Theorem 6. Let Fbe a forest. Then the ij-entry of (XI- A (F))* is p(F\ Ptj,x).
Proof. Let A = A (F)and let B = ( b , ) be defined by setting bii = cp(F\E,, x ) . To prove the theorem it will suffice to show that ( XI A ) B = cp(F,x ) l . The ith diagonal entry of ( X I - A ) B is
z
x~(F\Pii,x)-
Uzjq((F\Pij,x)-
(4)
Since uy = 0 unless i and j are adjacent, and since Pii is just the edge { i , j } , when i and j are adjacent, it follows from Lemma l(d) that the polynomial in (4) is just cp(F7x).
If i# j , then the ij-entry of (xZ - A ) B is
157
Spectra of trees
Let E denote the vertex adjacent to i in the path Pi,.Note that if k then Pij is a subpath of pkj. Hence we have
- i and k #
k;
By Lemma l(d) the RHS of (6) is just xcp(F\Pi,), whence the RHS of ( 5 ) is zero. Consequently, (XI - A ) B = cp(F,x ) l and so B = ( X -I A ) * , as required. 0
Corollary 3. Let T be a tree with V ( T )= (1,. . ., n } . Let z ~ ( x be ) the vector with ith component equal to cp(T\Pli,x).Then if A is a zero of cp(T,x),z T ( A ) is an eigenvector of T with eigenualue A. Proof. The vector z T ( A ) is just the first column of ( h f - A ( T ) ) * . Since ( X I - A ) ( x Z - A ) * = c p ( T , x ) I ,it follows that when A is a zero of cp(T), ( A 1 -A ) z T ( h= ) 0. Hence, z T ( A )is an eigenvector for A (T) with eigenvalue A.
17 Definition 4. Let T be a tree with n vertices and let z = (zi) be an ndimensional vector. Suppose e = { i , j } is an edge in T. We say there is a sign-change in z on the edge e if zizj < 0. The number of sign-changes in z is the number of edges in T for which a sign-change occurs in z. Theorem 7. Let T be a tree and suppose 8 is a zero of q ( T ) such that no ) Then the number of sign-changes in z is equal to component of z = ~ ~ (is6zero. the number of zeros of cp(T) greater than 8. Proof. We begin by proving that the numbers of sign-changes in zT(8) equals the number of zeros of p(T\ 1) greater than 8. We will prove this by induction on n = V ( T ) .The result can be verified for n = 2 by direct calculation. Assume n > 2 . If G is a graph we denote by v ( G ) the number of zeros of cp(G)greater than 8. Choose a vertex in T adjacent to 1 . We assume this vertex is 2. Let U be the component of T\l containing 2 and set U' = ( T \ l ) \U. Let y be the vector consisting of the components of z corresponding to the vertices in U. It is straightforward to show that y = cp( U',x ) z u ( 8 ) , whence, by our induction hypothesis, the number of sign-changes in y equals the number of zeros of cp(U\2) greater than 8. We next determine whether a sign-change occurs in z on the edge {1,2}. Let zi be the ith component of z. We have p(T\ 1) = cp(U')cp(U)and so:
158
C.D. Godsil
sign(zl)= ( sign(zz)= ( - 1)u(T\1)
1)”‘U’)’”‘U) , = ( - 1)..(u’)+”(u\21 =(-
Hence, the sign of z1z2is ( - l)“(U)-”(U1~’’(U\tl .The zeros of U\2 interlace those of U, therefore v ( U ) - v(U\2)E{O,l}. In other words, z 1 z 2 < 0 if and only if .(U)- v ( U \ 2 ) = 1. Thus, we have that the number of sign-changes in z on edges in U or on {1,2} equals v ( V). Since the component U was chosen arbitrarily and since v( T \ 1) is just the sum of the numbers v ( U ) ,where U is a component of T\1, it follows that the number of sign-changes in z equals v ( T \ l ) , as claimed. To complete the proof we must show that v ( T \ l ) = v ( T ) . We have assumed that no z, = 0. Therefore p ( T \ l , 6 ) # 0, since this is just zl. Accordingly, 6 is not a zero of p ( T \ l ) . Since the zeros of cp(T\l) interlace those of Q ( T ) ,we conclude that v ( T \ 1) = v ( T ) . 0 When T is a path its adjacency matrix A (T)can be assumed to be tridiagonal. In this case it is known that the polynomials cp(T\Pl,,x) form a Sturm sequence and the conclusion of Theorem 7 is a known property of such sequences. The case when 6 is the second largest zero of cp(T,x ) was first studied by A. Neumaier. He verified that Theorem 7 holds in this instance. (His proof was communicated privately to the author.) When 8 is the largest zero of p(T), Theorem 7 is a consequence of the Perron-Frobenius theorem. Finally, we discuss some further consequences of Theorem 6. We mentioned above that A (F)is invertible if and only if F has a 1-factor. Now the subgraph of a graph G formed by taking the union of two distinct 1-factors contains at least one circuit. Hence, a forest has at most a single 1-factor. By Theorem 1 we see then that if A (F) is invertible, then det(A) = & 1. In particular, the inverse of A (F)will be an integral matrix. But applying our observation that det(A)’ = 1 to Theorem 6 yields the conclusion that the entries of A (F)-’ lie in the set {0,1, - 1). This fact was first pointed out in [2]. If we ignore the signs of the elements of A(F)-’, then we may view the resulting non-negative matrix as the adjacency matrix of a graph, which we will denote by F’. It is shown in [2] that F’ contains F as a subgraph. However, we have been able to show that if F is a forest such that A ( F ) is invertible, then there is a diagonal matrix A, with diagonal entries equal to ? 1, such that A-’A(F)-’A is a non-negative matrix. The proof of this will appear in [3]. In other words, the matrices A (F)-’ and A (F’) are similar. Hence, Al(F’) is the reciprocal of the smallest positive zero of p(F). Denote this eigenvalue by 7. Then since F is a subgraph of F’ we have Al(F)S1 / ~or, conversely, T < 1/Al(F).This provides the only known reasonable upper bound on T. We have also been able to show (in [3]) that if P,, is the path on n = I V(F)I vertices
Spectra of trees
159
and A ( F ) is invertible, then T(F)>T(P,,).Again, this is the only known lower bound (better than zero) for T ( F ) .
References [1] D.M. CvetkoviC, M. Doob and H. Sachs, Spectra of Graphs (Academic Press, New York, 1980). [2] D.M. Cvetkovif, I. Gutman and S.K. Simif, On self pseudo-inverse graphs. Univ. Beograd, Publ. Elektrotehn. Fak. Ser. Math. Fiz. 602-633 (1978) 111-117. [3] C.D. Godsil, Inverses of trees, Combinatorica, to appear. [4] C.D. Godsil, Walk generating functions, Christoffel-Darboux identities and the adjacency matrix of a graph (in preparation). [S] C.D. Godsil and I. Gutman, On the theory of the matching polynomial, J. Graph Theory 5 (1981) 137- 144. [6] O.J. Heilmann and E.H. Lieb, Theory of Monomer-Dimer systems, Commun. Math. Phys. 25 (1972) 190-232. [7] L. LovBsz, Combinatorial Problems and Exercises (North-Holland, Amsterdam, 1979). [8]A.J. Schwenk, Almost all trees are cospectral, in: New Directions in the Theory of Graphs, Proc. Third Ann Arbor Conference, Michigan (Academic Press, New York, 1973). Received March 1981