On the Wiener index and Laplacian coefficients of graphs with given diameter or radius
OON THE WIENER INDEX AND LAPLACIAN COEFFICIENTSOF GRAPHS WITH GIVEN DIAMETER OR RADIUS ∗ Aleksandar Ili´c
Faculty of Sciences and Mathematics, University of Niˇs, Serbia e-mail: [email protected]
Andreja Ili´c
Faculty of Sciences and Mathematics, University of Niˇs, Serbia e-mail: ilic [email protected]
Dragan Stevanovi´c
University of Primorska—FAMNIT, Glagoljaˇska 8, 6000 Koper, Slovenia, andMathematical Institute, Serbian Academy of Science and Arts,Knez Mihajlova 36, 11000 Belgrade, Serbia e-mail: [email protected] (Received October 13, 2008)
Abstract
Let G be a simple undirected n -vertex graph with the characteristic polynomial of its Laplacianmatrix L ( G ), det( λI − L ( G )) = (cid:80) nk =0 ( − k c k λ n − k . It is well known that for trees the Laplaciancoefficient c n − is equal to the Wiener index of G . Using a result of Zhou and Gutman on the rela-tion between the Laplacian coefficients and the matching numbers in subdivided bipartite graphs,we characterize first the trees with given diameter and then the connected graphs with given radiuswhich simultaneously minimize all Laplacian coefficients. This approach generalizes recent resultsof Liu and Pan [MATCH Commun. Math. Comput. Chem. 60 (2008), 85–94] and Wang andGuo [MATCH Commun. Math. Comput. Chem. 60 (2008), 609–622] who characterized n -vertextrees with fixed diameter d which minimize the Wiener index. In conclusion, we illustrate on ex-amples with Wiener and modified hyper-Wiener index that the opposite problem of simultaneouslymaximizing all Laplacian coefficients has no solution. ∗ This work was supported by the research program P1-0285 of the Slovenian Agency for Research and the researchgrant 144015G of the Serbian Ministry of Science. a r X i v : . [ m a t h . C O ] M a y Introduction
Let G = ( V, E ) be a simple undirected graph with n = | V | vertices. The Laplacian polynomial P ( G, λ )of G is the characteristic polynomial of its Laplacian matrix L ( G ) = D ( G ) − A ( G ), P ( G, λ ) = det( λI n − L ( G )) = n (cid:88) k =0 ( − k c k λ n − k . The Laplacian matrix L ( G ) has non-negative eigenvalues µ (cid:62) µ (cid:62) . . . (cid:62) µ n − (cid:62) µ n = 0 [2]. FromViette’s formulas, c k = σ k ( µ , µ , . . . , µ n − ) is a symmetric polynomial of order n −
1. In particular, c = 1, c = 2 n , c n = 0 and c n − = nτ ( G ), where τ ( G ) denotes the number of spanning trees of G . If G is a tree, coefficient c n − is equal to its Wiener index, which is a sum of distances between all pairsof vertices.Let m k ( G ) be the number of matchings of G containing exactly k independent edges. The subdi-vision graph S ( G ) of G is obtained by inserting a new vertex of degree two on each edge of G . Zhouand Gutman [17] proved that for every acyclic graph T with n vertices c k ( T ) = m k ( S ( T )) , (cid:54) k (cid:54) n. (1)Let C ( a , . . . , a d − ) be a caterpillar obtained from a path P d with vertices { v , v , . . . , v d } byattaching a i pendent edges to vertex v i , i = 1 , . . . , d −
1. Clearly, C ( a , . . . , a d − ) has diameter d and n = d + 1 + (cid:80) d − i =1 a i . For simplicity, C n,d = C (0 , . . . , , a (cid:98) d/ (cid:99) , , . . . , Caterpillar C n,d . In [12] it is shown that caterpillar C n,d has minimal spectral radius (the greatest eigenvalue ofadjacency matrix) among graphs with fixed diameter.Our goal here is to characterize the trees with given diameter and the connected graphs with givenradius which simultaneously minimize all Laplacian coefficients. We generalize recent results of Liuand Pan [10], and Wang and Guo [15] who proved that the caterpillar C n,d is the unique tree with n vertices and diameter d , that minimizes Wiener index. We also deal with connected n -vertex graphswith fixed diameter, and prove that C n, r − is extremal graph.After a few preliminary results in Section 2, we prove in Section 3 that a caterpillar C n,d minimizesall Laplacian coefficients among n -vertex trees with diameter d . In particular, C n,d minimizes theWiener index and the modified hyper-Wiener index among such trees. Further, in Section 4 we provethat C n, r − minimizes all Laplacian coefficients among connected n -vertex graphs with radius r .Finally, in conclusion we illustrate on examples with Wiener and modified hyper-Wiener index thatthe opposite problem of simultaneously maximizing all Laplacian coefficients has no solution. Preliminaries
The distance d ( u, v ) between two vertices u and v in a connected graph G is the length of a shortestpath between them. The eccentricity ε ( v ) of a vertex v is the maximum distance from v to any othervertex. Definition 2.1
The diameter d ( G ) of a graph G is the maximum eccentricity over all vertices in agraph, and the radius r ( G ) is the minimum eccentricity over all v ∈ V ( G ) . Vertices of minimum eccentricity form the center (see [4]). A tree T has exactly one or two adjacentcenter vertices. For a tree T , d ( T ) = (cid:26) r ( T ) − T is bicentral,2 r ( T ) if T has unique center vertex. (2)The next lemma counts the number of matchings in a path P n . Lemma 2.1
For (cid:54) k (cid:54) (cid:100) n (cid:101) , the number of matchings with k edges for path P n is m k ( P n ) = (cid:18) n − kk (cid:19) . Proof: If v is a pendent vertex of a graph G , adjacent to u , then for the matching number of G therecurrence relation holds m k ( G ) = m k ( G − v ) + m k − ( G − u − v ) . If G is a path, then m k ( P n ) = m k ( P n − ) + m k − ( P n − ). For base cases k = 0 and k = 1 wehave m ( P n ) = 1 and m ( P n ) = n −
1. After substituting formula for m k ( P n ), we get the well-knownidentity for binomial coefficients. (cid:18) n − kk (cid:19) = (cid:18) n − − kk (cid:19) + (cid:18) n − − ( k − k − (cid:19) . Maximum cardinality of a matching in the path P n is (cid:100) n (cid:101) and thus, 0 (cid:54) k (cid:54) (cid:100) n (cid:101) . (cid:3) The union G = G ∪ G of graphs G and G with disjoint vertex sets V and V and edge sets E and E is the graph G = ( V, E ) with V = V ∪ V and E = E ∪ E . If G is a union of two paths oflengths a and b , then G is disconnected and has a + b vertices and a + b − Lemma 2.2
Let m k ( a, b ) be the number of k -matchings in G = P a ∪ P b , where a + b is fixed evennumber. Then, the following inequality holds m k (cid:18)(cid:24) a + b (cid:25) , (cid:22) a + b (cid:23)(cid:19) (cid:54) . . . (cid:54) m k ( a + b − , (cid:54) m k ( a + b,
0) = m k ( P a + b ) . Proof:
Without loss of generality, we can assume that a (cid:62) b . Notice that the number of vertices inevery graph is equal to a + b . The path P a + b contains as a subgraph P a (cid:48) ∪ P b (cid:48) , where a (cid:48) + b (cid:48) = a + b and a (cid:48) (cid:62) b (cid:48) >
0. This means that the number of k -matchings of P a + b is greater than or equal to thenumber of k matchings of P a (cid:48) ∪ P b (cid:48) , and therefore m k ( a + b, (cid:62) m k ( a (cid:48) , b (cid:48) ). In the sequel, we exclude P a + b from consideration.or the case k = 0, by definition we have identity m ( G ) = 1. For k = 1 we have equality, because m ( a (cid:48) , b (cid:48) ) = ( a (cid:48) −
1) + ( b (cid:48) −
1) = a (cid:48) + b (cid:48) − a + b − . We will use mathematical induction on the sum a + b . The base cases a + b = 2 , , a + b is an even number greater than 6and consider graphs G = P a ∪ P b and G (cid:48) = P a (cid:48) ∪ P b (cid:48) , such that a > b and a (cid:48) = a − b (cid:48) = b + 2.We divide the set of k -matchings of G (cid:48) in two disjoint subsets M (cid:48) and M (cid:48) . The set M (cid:48) contains all k -matchings for which the last edge of P a (cid:48) and the first edge of P b (cid:48) are not together in the matching,while M (cid:48) consists of k -matchings that contain both the last edge of P a (cid:48) and the first edge of P b (cid:48) .Analogously for the graph G , we define the partition M ∪ M of the set of k -matchings.Consider an arbitrary matching M (cid:48) from M (cid:48) with k disjoint edges. We can construct correspondingmatching M in the graph G in the following way: join paths P a (cid:48) and P b (cid:48) and form a path P a + b − byidentifying the last vertex on path P a (cid:48) and the first vertex on path P b (cid:48) . This way we get a k -matchingin path P a + b − = v v . . . v a + b − . Next, split graph P a + b − in two parts to get P a = v v . . . v a and P b = v a v a +1 . . . v a + b − . Note that the last edge in P a and the first edge in P b are not both in thematching M . This way we establish a bijection between sets M and M (cid:48) .Now consider a matching M (cid:48) of G (cid:48) such that the last edge of P a (cid:48) and the first edge of P b (cid:48) are in M (cid:48) . The cardinality of the set M (cid:48) equals to m k − ( a (cid:48) − , b (cid:48) − P a (cid:48) and the last two vertices from P b (cid:48) in the matching. Analogously, we concludethat |M | = m k − ( a − , b − a (cid:48) − , b (cid:48) −
2) and ( a − , b − m k − ( a − , b − (cid:62) m k − ( a (cid:48) − , b (cid:48) − { a, b, a (cid:48) , b (cid:48) } becomes equal to 0 using abovetransformation, it must the smallest number b . In that case, we have m k − ( a − , (cid:62) m k − ( a (cid:48) − , b (cid:48) − (cid:3) Lemma 2.3
For every (cid:54) r (cid:54) (cid:98) n (cid:99) , it holds c k ( C n, r ) (cid:62) c k ( C n, r − ) . Proof:
Coefficients c and c n are constant, while trees C n, r and C n, r − have equal number ofvertices and thus, we have equalities c ( C n, r ) = c ( C n, r − ) = 2 n and c n − ( C n, r ) = c n − ( C n, r − ) = n. Assume that 2 (cid:54) k (cid:54) n −
2. Using identity (1), we will establish injection from the set of k -matchings of subdivision graph S ( C n, r − ) to S ( C n, r ). Let v , v , . . . , v r − be the vertices on themain path of caterpillar C n, r − and u , u , . . . , u n − r pendent vertices from central vertex v r . Weobtain graph C n, r by removing the edge v r u n − r and adding the edge v r − u n − r . Assume thatvertices w , w , . . . , w n − r are subdivision vertices of degree 2 on edges v r u , v r u , . . . , v r u n − r .Consider an arbitrary matching M of subdivision graph S ( C n, r − ). If M does not contain theedge v r w n − r then the corresponding set of edges in S ( C n, r ) is also a k -matching. Now assume thatatching M contains the edge v r w n − r . If we exclude this edge from the graph S ( C n, r − ), we getgraph G (cid:48) = S ( C n, r − ) − v r w n − r = P r ∪ P r − ∪ ( n − r − P ∪ P . Therefore, the number of k -matchings that contain an edge v r w n − r in S ( C n, r − ) is equal to the number of matchings with k − G (cid:48) that is union of paths P r and P r − and n − r − u w , u w , . . . ,u n − r − w n − r − S (cid:48) = m k − ( G (cid:48) ) = m k − ( P r ∪ P r − ∪ ( n − r − P ) . On the other side, let G be the graph S ( C n, r ) − v r − w n − r . Since G contains as a subgraph P r − ∪ ( n − r − P , the number of k -matchings that contain the edge v r − w n − r is greater thanor equal to the number of ( k − P r − and n − r − S = m k − ( G ) (cid:62) m k − ( P r − ∪ ( n − r − P ) . Path P r − is obtained by adding an edge that connects the last vertex of P r and the first vertexof P r − , and thus we get inequality m k ( S ( C n, r )) (cid:62) m k ( S ( C n, r − )) . Finally we get that all coefficients of Laplacian polynomial of C n, r are greater than or equal to thoseof C n, r − . (cid:3) Figure 2:
Correspondence between caterpillars C n, r − and C n, r . The Laplacian coefficient c n − of a tree T is equal to the sum of all distances between unorderedpairs of vertices, also known as the Wiener index, c n − ( T ) = W ( T ) = (cid:88) u,v ∈ V d ( u, v ) . The Wiener index s considered as one of the most used topological index with high correlationwith many physical and chemical indices of molecular compounds. For recent surveys on Wiener indexsee [4], [5], [6]. The hyper-Wiener index
W W ( G ) [7] is one of the recently introduced distance basedmolecular descriptors. It was proved in [8] that a modification of the hyper-Wiener index, denoted as W W W ( G ), has certain advantages over the original W W ( G ). The modified hyper-Wiener index isequal to the coefficient c n − of Laplacian characteristic polynomial. roposition 2.4 The Wiener index of caterpillar C n,d equals: W ( C n,d ) = (cid:40) d ( d +1)( d +2)6 + ( n − d − n −
1) + ( n − d − (cid:0) d + 1 (cid:1) d , if d is even, d ( d +1)( d +2)6 + ( n − d − n −
1) + ( n − d − (cid:0) d +12 (cid:1) , if d is odd. Proof:
By summing all distances of vertices on the main path of length d , we get d (cid:88) i =1 i ( d + 1 − i ) = ( d + 1) · d (cid:88) i =1 i − d (cid:88) i =1 i = d ( d + 1)( d + 2)6 . For every pendent vertex attached to v (cid:98) d/ (cid:99) = v c we have the same contribution in summation forthe Wiener index: ( n − d −
2) + (cid:32) d (cid:88) i =0 | i − c | + 1 (cid:33) = ( n −
1) + d (cid:88) i =0 | i − c | . Therefore, based on parity of d we easily get given formula. (cid:3) We need the following definition of σ -transformation, suggested by Mohar in [11]. Definition 3.1
Let u be a vertex of a tree T of degree p + 1 . Suppose that u u , u u , . . . , u u p arependant edges incident with u , and that v is the neighbor of u distinct from u , u , . . . , u p . Thenwe form a tree T (cid:48) = σ ( T, u ) by removing the edges u u , u u , . . . , u u p from T and adding p newpendant edges v v , v v , . . . , v v p incident with v . We say that T (cid:48) is a σ -transform of T . Mohar proved that every tree can be transformed into a star by a sequence of σ -transformations. Theorem 3.1 ([11])
Let T (cid:48) = σ ( T, u ) be a σ -transform of a tree T of order n . For d = 2 , , . . . k ,let n d be the number of vertices in T − u that are at distance d from u in T . Then c k ( T ) (cid:62) c k ( T (cid:48) ) + k (cid:88) d =2 n d · p · (cid:18) n − − dk − d (cid:19) for (cid:54) k (cid:54) n − and c k ( T ) = c k ( T (cid:48) ) for k ∈ { , , n − , n } . Theorem 3.2
Among connected acyclic graphs on n vertices and diameter d , caterpillar C n,d = C (0 , . . . , , a (cid:98) d/ (cid:99) , , . . . , , where a (cid:98) d/ (cid:99) = n − d − , has minimal Laplacian coefficient c k , for every k = 0 , , . . . , n . Proof:
Coefficients c , c , c n − and c n are constant for all trees on n vertices. The star graph S n isthe unique tree with diameter 2 and path P n is unique graph with diameter n −
1. Therefore, we canassume that 2 (cid:54) k (cid:54) n − (cid:54) d (cid:54) n − P = v v v . . . v d be a path in tree T of maximal length. Every vertex v i on the path P is a root of a tree T i with a i + 1 vertices, that does not contain other vertices of P . We apply σ -transformation on trees T , T , . . . , T d − to decrease coefficients c k , as long as we do not get a caterpillar C ( a , a , a , . . . , a d ). By a theorem of Zhou and Gutman, it suffices to see that m k ( S ( C ( a , a , . . . , a d − ))) > m k ( S ( C n,d )) . Assume that v (cid:98) d/ (cid:99) = v c is a central vertex of C n,d . Let u , u , . . . , u n − d − be pendent ver-tices attached to v c in S ( C n,d ), and let w , w , . . . , w n − d − be subdivision vertices on pendent edges v c u , v c u , . . . , v c u n − d − . We also introduce ordering of pendent vertices. Namely, in the graph C n ( a , a , . . . , a d − ) first a vertices in the set { u , u , . . . , u n − d − } are attached to v , next a verticesare attached to v , and so on.Consider an arbitrary matching M (cid:48) with k edges in caterpillar S ( C n,d ). If M does not contain any ofthe edges { v c w , v c w , . . . , v c w n − d − } , then we can a construct matching in S ( C ( a , a , . . . , a d − )), bytaking corresponding edges from M . If the edge v c w i is in the matching M (cid:48) for some 1 (cid:54) i (cid:54) n − d − v j w i is attached to some vertex v j , where 1 (cid:54) j (cid:54) d −
1. Moreover, if we fixthe number l of matching edges in the set { u w , u w , . . . , u i − w i − , u i +1 w i +1 , . . . , u n − d − w n − d − } , we have to choose exactly k − l − S ( C n,d ) isdecomposed into two path of lengths 2 (cid:98) d (cid:99) and 2 (cid:100) d (cid:101) , and caterpillar S ( C ( a , a , . . . , a d − )) is decom-posed in paths of lengths 2 j and 2 d − j . From Lemma 2.2 we can see that m k − l − (2 (cid:22) d (cid:23) , (cid:24) d (cid:25) ) (cid:54) m k − l − (2 j, d − j ) . If we sum this inequality for l = 0 , , . . . , k −
1, we obtain that the number of k -matchings in graph S ( C n,d ) is less than the number of k -matchings in S ( C ( a , a , a , . . . , a d )). Thus, for every tree T on n vertices with diameter d holds: c k ( C n,d ) (cid:54) c k ( T ) , k = 0 , , , . . . n. (cid:3) Theorem 4.1
Among connected graphs on n vertices and radius r , caterpillar C n, r − has minimalcoefficient c k , for every k = 0 , , . . . , n . Proof:
Let v be a center vertex of G and let T be a spanning tree of G with shortest paths from v to all other vertices. Tree T has radius r and can be obtained by performing the breadth first searchalgorithm (see [3]). Laplacian eigenvalues of an edge-deleted graph G − e interlace those of G , µ ( G ) (cid:62) µ ( G − e ) (cid:62) µ ( G ) (cid:62) µ ( G − e ) (cid:62) . . . (cid:62) µ n − ( G ) (cid:62) µ n − ( G − e ) (cid:62) . igure 3: Correspodence between caterpillars C n,d and C ( a , a , . . . , a d ) . Since, c k ( G ) is equal to k -th symmetric polynomial of eigenvalues ( µ ( G ) , µ ( G ) , . . . , µ n − ( G )),we have c k ( G ) (cid:62) c k ( G − e ). Thus, we delete edges of G until we get a tree T with radius r . Thisway we do not increase Laplacian coefficients c k . The diameter of tree T is either 2 r − r . Since c k ( C n, r − ) (cid:54) c k ( C n, r ) from Lemma 2.3 we conclude that extremal graph on n vertices, which hasminimal coefficients c k for fixed radius r , is the caterpillar C n, r − . (cid:3) We can establish analogous result on the Wiener index.
Corollary 4.2
Among connected graphs on n vertices and radius r , caterpillar C n, r − has minimalWiener index. We proved that C n, r − is the unique graph that minimize all Laplacian coefficients simultaneouslyamong graphs on n vertices with given radius r . In the class of n -vertex graphs with fixed diameter, wefound the graph with minimal Laplacian coefficients in case of trees—because it is not always possibleto find a spanning tree of a graph with the same diameter.Naturally, one wants to describe n -vertex graphs with fixed radius or diameter with maximalLaplacian coefficients. We have checked all trees up to 20 vertices and classify them based on diameterand radius. For every triple ( n, d, k ) and ( n, r, k ) we found extremal graphs with n vertices and fixeddiameter d or fixed radius r that maximize coefficient c k . The result is obvious—trees that maximizeWiener index are different from those with the same parameters that maximize modified hyper-Wienerindex.The following two graphs on the Figure 4 are extremal for n = 18 vertices with diameter d = 4;the first graph is a unique tree that maximizes Wiener index c n − = 454 and the second one is also aunique tree that maximizes modified hyper-Wiener index c n − = 4960.The following two graphs on the Figure 5 are extremal for n = 17 vertices with radius r = 5; thefirst graph is a unique tree that maximizes Wiener index c n − = 664 and the second one is also aunique tree that maximizes modified hyper-Wiener index c n − = 9173.igure 4: Graphs with n = 18 and d = 4 that maximize c and c . Figure 5:
Graphs with n = 17 and r = 5 that maximize c and c . References [1] S. Bereg, H. Wang,
Wiener indices of balanced binary trees , Discr. Appl. Math. 155 (2007),457–467.[2] D. Cvetkovi´c, M. Doob, H. Sachs,
Spectra of graphs - Theory and Application , 3rd edition, JohannAmbrosius Barth Verlag, 1995.[3] T. H. Cormen, C. E. Leiserson, R. L. Rivest, C. Stein,
Introduction to Algorithms , Second Edition,MIT Press, Cambridge, MA, 2001.[4] A. Dobrynin, R. Entringer, I. Gutman,
Wiener index of trees: theory and applications , ActaAppl. Math. 66 (2001), 211-249.[5] I. Gutman, O. E. Polansky,
Mathematical concepts in organic chemistry , Springer-Verlag, Berlin1986.[6] I. Gutman, Y. N. Yeh, S. L. Lee, J. C. Chen,
Some recent results in the theory of the Wienernumber , Indian J. Chem. 32A (1993), 651–661.[7] I. Gutman,
Relation between hyper-Wiener and Wiener index , Chem. Phys. Lett. 364 (2002),352–356.[8] I. Gutman,
Hyper-Wiener index and Laplacian spectrum , J. Serb. Chem. Soc. 68 (2003), 949–952.[9] I. Gutman, L. Pavlovi´c,
On the coefficients of the Laplacian characteristic polynomial of trees ,Bull. Acad. Serbe Sci. Arts 127 (2003) 31–40.[10] H. Liu, X.F. Pan,
On the Wiener index of trees with fixed diameter , MATCH Commun. Math.Comput. Chem. 60 (2008), 85–94.11] B. Mohar,
On the Laplacian coefficients of acyclic graphs , Linear Algebra Appl. 722 (2007),736–741.[12] S. K. Simi´c, E. M. L. Marzi, F. Belardo,
On the index of caterpillars , Discrete Math. 308 (2008),324–330.[13] D. Stevanovi´c,
Laplacian-like energy of trees , MATCH Commun. Math. Comput. Chem. 61 (2009),407–417.[14] W. Yan, Y. N. Yeh,
Connections between Wiener index and matchings , J. Math. Chem. 39 (2006),389–399.[15] S. Wang, X. Guo,
Trees with extremal Wiener indices , MATCH Commun. Math. Comput. Chem.60 (2008), 609–622.[16] F. Zhang, H. Li,
On acyclic conjugated molecules with minimal energies , Discr. Appl. Math. 92(1999), 71–84.[17] B. Zhou, I. Gutman,