Maximum number of subtrees in cacti and block graphs
For a graph G, we denote by N(G) the number of non-empty subtrees of G. As a topological index based on counting, N(G) has some correlations to other well studied topological indices, including the Wiener index W(G). In this paper we characterize the extremal graphs with the maximum number of subtrees among all cacti of order n with k cycles. Similarly, the extremal graphs with the maximum number of subtrees among all block graphs of order n with k blocks are also determined and shown to have the minimum Wiener index within the same collection of graphs. Analogous results are also obtained for the number of connected subgraphs C(G). Finally, a general question is posed concerning the relation between the number of subtrees and the Wiener index of graphs.
Keywords: Number of subtrees; Cactus graph; Block graph; 05C05; 05C30; 05C35
Introduction
Throughout this paper we only consider undirected, finite and simple graphs. We denote by and the cycle and the complete graph on n vertices, respectively. Similarly, and are the path and the star on n vertices, respectively. Other undefined notations and terminologies can be found in [[5]].
The number of subtrees was first studied for trees in [[18]] in 2005. For any connected graph G, we denote by N(G) the number of non-empty subtrees. The properties of N(T) have been studied for various classes of trees [[1], [7], [11], [17], [19], [26]]. However, there are few results on N(G) for general graphs G. Recently, Andriantiana and Wang [[3]] considered extremal unicyclic graphs with respect to N. Furthermore, the present authors [[24]] characterized extremal graphs with respect to N among all connected graphs of order n with k cut edges. For a subtree T of aconnected graph G, we denote by N(T, G) the number of subtrees of G that contain T as an induced subgraph. In particular, if or , then N(T, G) can also be denoted by N(v, G) or N(uv, G), respectively. More generally, for any subgraph H of a graph G with , we denote by the number of subtrees of H in G that contain v. Similarly, for a set with , is the number of non-empty subtrees of G that contain the vertices .
As one of the most well-studied topological indices in chemical graph theory, the Wiener index [[21]] of a connected graph G is defined as
Graph
where is the distance between two vertices u and v in G. For some recent results on the Wiener index of graphs, see [[4], [6], [9], [22], [25]].
An interesting "negative" correlation has been observed between the number of subtrees and the Wiener index of general graphs. It was shown that in some given collection of connected graphs, the extremal graphs minimizing (maximizing, resp.) the number of subtrees are often identical to the extremal graphs maximizing (minimizing, resp.) the Wiener index. Such collections of graphs include various classes of trees [[18], [23]] and unicyclic graphs [[3], [23]]. Some other results related to this correlation can be found in [[17], [19], [24]].
A block of a graph is a maximal 2-connected subgraph of this graph. A connected graph is a cactus if each block is an edge or a cycle. A connected graph is called block graph if each of its blocks is a clique. Some recent results on extremal problems concerning cacti can be found in [[15]]. A graph is a generalized complete graph [[20]] if it is obtained by the join of an isolated vertex with a disjoint union of one or more complete graphs. If G is a generalized complete graph with of degree such that with , then we write and call u the center of G. If appears times in , then we use in the notation. As an example, can also be denoted by . In particular, the star is simply . A friendship graph of order consists of k triangles which intersect in a single vertex. Denote by and the set of cacti of order n with k cycles and the set of block graphs of order n with k blocks, respectively.
The paper is organized as follows. In Sect. 2, we introduce some preliminary observations, either previously established or proven directly. In Sect. 3, the extremal graphs in that maximize the number of subtrees are determined. Then, in Sect. 4, graphs in with maximum number of subtrees are characterized. As it turns out, our methods work also for the number of connected subgraphs (for trees, this is clearly equal to the number of subtrees, but the two differ for general graphs). The extremal graphs also turn out to be exactly the graphs with minimum Wiener index in and , respectively. This provides further evidence of the aforementioned correlation. We conclude the paper in Sect. 5 and state a general problem related to the negative correlation between the number of subtrees and the Wiener index.
Preliminaries
We start with some simple observations, most of which are trivial. Some of them can also readily be found in the literature.
If G is a disconnected graph with t components , then we have
1
Graph
Also, for any vertex , we have
2
Graph
where is the number of subtrees that do not contain the vertex v in G.
From the definitions of the Wiener index and the number of subtrees, it is easy to see the following result. We skip the proof.
Lemma 2.1
Let G be a connected graph with two non-adjacent vertices . Then
-
;
-
.
For any integer , we denote by the set of graphs of order n with diameter 2. The following result on the Wiener index of graphs in will be needed later.
Lemma 2.2
([[22]]) If G is a graph in with m edges, then .
Lemma 2.3
([[18]]) Let T be a tree of order . Then we have
Graph
where equality holds in the left inequality if and only if and equality holds in the right inequality if and only if .
Lemma 2.4
([[24]]) Let G be a connected graph with a cut vertex and assume that G is the union of two subgraphs and whose only common vertex is v. Then .
Lemma 2.5
Let with be a friendship graph of order where is the vertex of maximum degree. Then and .
Proof
From the structure of and Eq. (1), we have .
Moreover, we have
Graph
since each of the k triangles has six subtrees containing v.
The conclusion then follows from Eq. (2).
Maximum number of subtrees in cacti
In this section we will characterize the cactus in with the maximum number of subtrees. First we establish two technical observations.
Lemma 3.1
Let G be a connected graph with two distinct cut vertices . Let , and be three subgraphs of G such that , and . Let be a graph obtained from G by identifying the vertex u of with the vertex , as shown in Fig. 1, and let be defined similarly. Then
- ([[13]]) or ;
-
or .
Proof
We only need to prove (ii). Applying Lemma 2.4 to the structures of G and , we have
Graph
and
Graph
Graph: Fig. 1 Graphs G, Gu∗ and Gv∗
Note that and for since u, v are two distinct cut vertices in G. Setting , we have
Graph
Note that the last inequality holds because .
Similarly, setting , we get
Graph
If , we have and since and contain at least two distinct vertices each. Otherwise, . Then we have or , which implies that or respectively. This completes the proof.
Lemma 3.2
Let G be a graph obtained by identifying a vertex of a connected graph with a vertex of a cycle ( ) so that . Let be another graph obtained by identifying the vertex v of with the center of so that , as shown in Fig. 2. Then .
Graph: Fig. 2 Graphs G (left) and G′ (right)
Proof
First note that , , and . By Eq. (2), we have . By Lemma 2.4 and the structure of G and , we have
Graph
Here the last inequality holds by induction on . This completes the proof.
Now we are ready to prove the main result in this section.
Theorem 3.3
For any graph with , we have
Graph
with equality if and only if .
Proof
Let be a graph that attains the maximum of N(G). If , then G can be viewed as a graph obtained by identifying the vertex v of maximum degree in with the center of a star . By Lemmas 2.3, 2.4 and 2.5, we have
Graph
Otherwise, suppose . By the extremality of N(G) and Lemma 3.1 (ii), there exists only one cut vertex in G. Since , there must be at least one induced cycle with in G. Then Lemma 3.2 leads to a contradiction, which completes the proof.
Since is just the set of unicyclic graphs of order n, the result below follows immediately from Theorem 3.3.
Corollary 3.4
([[3]]) For any unicyclic graph G of order , we have
Graph
with equality if and only if .
Let C(G) denote the number of connected subgraphs in a graph G. Lemmas 3.1 and 3.2 hold for C(G) instead of N(G) using the same reasoning. Therefore we also get an analogue of Theorem 3.3 whose full proof is omitted.
Theorem 3.5
For any graph with , we have
Graph
with equality if and only if .
Remark 3.6
In [[13]], it is shown that the graph also uniquely attains the minimum Wiener index among all graphs in .
Maximum number of subtrees in block graphs
In this section we focus on the extremal graphs in with maximum number of subtrees and minimum Wiener index, respectively. Identical extremal graphs provide yet another example of the known negative correlation between these two graph invariants.
A sequence is called convex (log-convex, resp.) if ( , resp.) for every integer . If strict inequality holds for all n, then the sequence is called strictly convex (log-convex, resp.). Any positive log-convex sequence is also convex, since we have from , that is, .
We will make use of the Davenport–Pólya Theorem ([[8]], see also [[14], p. 455]), which states that the binomial convolution of two log-convex sequences and is again log-convex. In particular (taking for all n), if is a log-convex sequence, then so is the sequence given by . If is even strictly log-convex, then so is .
We are particularly interested in two sequences related to subtree counting: for a complete graph and any vertex , we set and . Note that , since any complete graph has spanning trees ([[5]]), and ([[24]]) for the same reason.
It is easy to verify that the sequence is strictly log-convex for , for example by considering the second derivative of . So the Davenport–Pólya Theorem yields
Lemma 4.1
The sequence given by is strictly convex.
Lemma 4.2
The sequence given by is strictly -convex.
Given two non-increasing sequences and , we say that is majorized by , denoted by , if the following statements hold:
-
;
-
for .
An n-dimensional function F is called Schur-convex if whenever is majorized by . It is known (see e.g. [[16], p.259, Theorem B]) that is Schur-convex if f is convex. Since every convex sequence can be extended to a convex function by linear interpolation, the following is immediate.
Lemma 4.3
Let and be two non-increasing positive integer sequences such that , and let be a convex (log-convex, resp.) sequence. Then ( , resp.). If the sequence is even strictly convex (log-convex, resp.), then strict inequality holds unless and coincide.
The following statement is easy to prove from the definition of majorization.
Lemma 4.4
Let be a non-increasing sequence of positive integers with . Let the sequence be defined by and for . Then we have .
We are now ready to identify the extremal graph with maximum number of subtrees in .
Theorem 4.5
For any graph , we have
Graph
with equality if and only if .
Proof
Let be a graph that attains the maximum of N(G). By Lemma 3.1 (ii) and Lemma 2.1 (ii), we can assume that G is a generalized complete graph with and . Let v be the center of G. Recall that and for any vertex . We have
Graph
Combining Lemmas 4.1, 4.2, 4.3 and 4.4, we conclude that N(G) attains its maximum uniquely when and with the corresponding maximum
Graph
This completes the proof.
Recall that C(G) is the number of connected subgraphs in a graph G. For a vertex , we denote by C(v, G) and the number of connected subgraphs that contain v and do not contain v, respectively. As we will see, the approach that was used to prove Theorem 4.5 can also be used to prove a corresponding result for C(G). This result will be presented in the following. Let denote the number of connected spanning subgraphs of , that is, the number of connected labeled graphs of order n, and set and for a vertex v of . Note that and .
In order to follow the same approach as for the number of subtrees, we first verify that is a strictly log-convex sequence.
Lemma 4.6
The sequence is strictly log-convex.
Proof
It is known that (see also [[10], Sect. 9.5] for more precise asymptotics)
Graph
The upper bound is trivial, as is simply the number of all labeled graphs of order n. The lower bound follows by noticing that every disconnected graph can be split into a graph of order k and a graph of order for some k. Note that
Graph
Therefore, we have . It follows that
Graph
which is greater than 1 for . Moreover, the strict log-convexity of can be directly verified for smaller values of n. This completes the proof.
Now the following lemmas follow once again from the Davenport–Pólya Theorem in the same way as Lemmas 4.1 and 4.2.
Lemma 4.7
The sequence given by is strictly convex.
Lemma 4.8
The sequence given by is strictly -convex.
We finally obtain the following analogue of Theorem 4.5 with a completely analogous proof.
Theorem 4.9
For any graph , we have with equality if and only if .
We now move on to consider the minimum Wiener index of a graph in . The following result comes from the fact that is a strictly convex sequence.
Lemma 4.10
Let be positive integers with . Then
Graph
with equality if and only if and for .
Theorem 4.11
For any graph , we have
Graph
with equality if and only if .
Proof
Let be a graph that attains the minimum of W(G). By Lemma 2.1 (i) and Lemma 3.1 (i), G must be a generalized complete graph of the form with and . Note that has diameter 2, and that its number of edges is
Graph
Then, by Lemmas 2.2 and 4.10, we have
Graph
with equality holding if and only if , that is, .
As a corollary, we obtain the maximum number of subtrees and connected subgraphs as well as the minimum of the Wiener index over all graphs with n vertices and k blocks. By Lemma 2.1, all blocks of the graphs that attain these must be complete. By Theorems 4.5, 4.9 and 4.11, we have the following more general statement.
Corollary 4.12
Let G be a connected graph of order n with k blocks. Then
-
with equality if and only if ;
-
with equality if and only if ;
-
with equality if and only if .
Concluding remarks
In this paper we characterized the extremal graphs with the maximum number of subtrees or connected subgraphs among cacti and block graphs with a given number of vertices and cycles resp. blocks. It was also shown that the extremal structures among block graphs coincide with those minimizing the Wiener index. Along with previously established observations on the Wiener index [[13]], these extremal results provide more evidence of the negative correlation between the number of subtrees and the Wiener index, as mentioned in Sect. 1. Along this line, it would be interesting to find other parameters, say (e.g., the number of certain substructures), of a connected graph G of order n, such that in the set of connected graphs of order n with given structural parameter , the extremal graphs maximizing (minimizing, resp.) the number of subtrees coincide with the extremal graphs minimizing (maximizing, resp.) the Wiener index.
Acknowledgements
S. Wagner was supported by the Knut and Alice Wallenberg Foundation. The authors are very grateful to PhD student Zuwen Luo for the helpful discussion with him.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
[
References
1
Andriantiana EOD, Wagner S, Wang H. Greedy trees, subtrees and antichains. Electron. J. Comb. 2013; 20: P28. 3104526. 10.37236/3101
2
Andriantiana EOD, Wagner S, Wang H. Extremal problems for trees with given segment sequence. Discrete Appl. Math. 2017; 220: 20-34. 3603613. 10.1016/j.dam.2016.12.009
3
Andriantiana EOD, Wang H. Subtrees and independent subsets in unicyclic graphs and unicyclic graphs with fixed segment sequence. MATCH Commun. Math. Comput. Chem. 2020; 84: 537-566. 1473.92054
4
Bessy S, Dross F, Knor M, Škrekovski R. Graphs with the second and third maximum Wiener indices over the 2-vertex connected graphs. Discrete Appl. Math. 2020; 284: 195-200. 4115468. 10.1016/j.dam.2020.03.032
5
Bondy JA, Murty USR. Graph Theory with Applications. 1976: New York; Macmillan Press. 10.1007/978-1-349-03521-2
6
Cavaleri M, Donno A, Scozzari A. Total distance, Wiener index and opportunity index in wreath products of star graphs. Electron. J. Comb. 2019; 26: P1-21. 3919622. 1409.05073
7
Cambie S, Wagner S, Wang H. On the maximum mean subtree order of trees. Eur. J. Comb. 2021; 97: 103388. 4282633. 10.1016/j.ejc.2021.103388
8
Davenport H, Pólya G. On the product of two power series. Can. J. Math. 1949; 1: 1-5. 27306. 10.4153/CJM-1949-001-1
9
Dobryinin AA. On the Wiener index of the forest induced by contraction of edges in a tree. MATCH Commun. Math. Comput. Chem. 2021; 86: 321-326
Harary F, Palmer EM. Graphical Enumeration. 1973: New York-London; Academic Press. 0266.05108
Kirk R, Wang H. Largest number of subtrees of trees with a given maximum degree. SIAM J. Discrete Math. 2008; 22: 985-995. 2424834. 10.1137/070687736
Li S, Wang S. Further analysis on the total number of subtrees of trees. Electron. J. Comb. 2012; 19; 4: P48. 3007183. 10.37236/2186
Liu H, Lu M. A unified approach to cacti for different indices. MATCH Commun. Math. Comput. Chem. 2007; 58: 193-204. 2335488. 1164.05043
Liu L, Wang Y. On the log-convexity of combinatorial sequences. Adv. Appl. Math. 2007; 39; 4: 453-476. 2356431. 10.1016/j.aam.2006.11.002
Liu M, Yao Y, Das KC. Extremal results for cacti. Bull. Malays. Math. Sci. Soc. 2020; 43: 2783-2798. 4089674. 10.1007/s40840-019-00837-2
Roberts AW, Varberg DE. Convex Functions. 1973: New York-London; Academic Press. 0271.26009
Schmuck N, Wagner S, Wang H. Greedy trees, caterpillars, and Wiener-type graph invariants. MATCH Commun. Math. Comput. Chem. 2012; 68: 273-292. 2986487. 1289.05145
Székely LA, Wang H. On subtrees of trees. Adv. Appl. Math. 2005; 34: 138-155. 2102279. 10.1016/j.aam.2004.07.002
Székely LA, Wang H. Binary trees with the largest number of subtrees. Discrete Appl. Math. 2007; 155: 374-385. 2303160. 10.1016/j.dam.2006.05.008
Tian J, Xu K. The general position number of Cartesian products involving a factor with small diameter. Appl. Math. Comput. 2021; 403: 126206. 4235988. 07423637
Wiener H. Structrual determination of paraffin boiling points. J. Am. Chem. Soc. 1947; 69: 17-20. 10.1021/ja01193a005
Xu K, Das KC, Klavžar S, Li H. Comparison of Wiener index and Zagreb eccentricity indices. MATCH Commun. Math. Comput. Chem. 2020; 84: 595-610. 1473.92107
Xu K, Liu M, Das KC, Gutman I, Furtula B. A survey on graphs extremal with respect to distance-based topological indices. MATCH Commun. Math. Comput. Chem. 2014; 71: 461-508. 3222156. 1464.05140
Xu K, Li J, Wang H. The number of subtrees in graphs with given number of cut edges. Discrete Appl. Math. 2021; 304: 283-296. 4299734. 10.1016/j.dam.2021.08.009
Xu K, Wang M, Tian J. Relations between Merrifield-Simmons and Wiener indices. MATCH Commun. Math. Comput. Chem. 2021; 85: 147-160. 1473.92108
Yan W, Yeh YN. Enumeration of subtrees of trees. Theor. Comput. Sci. 2006; 369: 256-268. 2277574. 10.1016/j.tcs.2006.09.002
Zhang X-M, Zhang X-D, Gray D, Wang H. The number of subtrees of trees with given degree sequence. J. Graph Theory. 2013; 73: 280-295. 3062797. 10.1002/jgt.21674
]
By Jie Li; Kexiang Xu; Tianli Zhang; Hua Wang and Stephan Wagner
Reported by Author; Author; Author; Author; Author