For a graph \(G\) with vertex set \(V\), let N\((G)\) denote the number of nonempty subsets of \(V\) that induce a connected graph in \(G\). In this paper, we focus on determining N\((G)\) for \(G\) in the family \(\mathbb{B}_n\) of \(n\)-vertex bicyclic graphs. We find in \(\mathbb{B}_n\) the structures of those graphs that possess the smallest, the largest, as well as the second-largest values of N\((G)\). Moreover, we compute the extreme values of N\((G)\) over \(\mathbb{B}_n\).
All graphs considered in this paper are undirected, simple (no loop and no parallel edge), and of finite order (i.e. the number of vertices). A connected set in a graph \(G=(V(G), E(G))\) is a nonempty set \(S\subseteq V(G)\) that induces a connected subgraph in \(G\). The edge set of the graph induced by \(S\) consists of those edges of \(G\) whose both endvertices belong to \(S\). In this paper, we are interested in the overall number of connected sets in a connected graph \(G\), henceforth denoted by \(\operatorname{N}(G)\). Subgraphs constitute fundamental components of a graph, offering key insights into its intrinsic structure. For example, they can serve to identify essential building blocks and to uncover the functional characteristics of complex networks [17].
In the past, much work has been devoted to determining the maximum and the minimum numbers of connected sets in different families of \(n\)-vertex graphs (i.e. graphs of order \(n\)), and also to characterising graphs attaining the extreme values. As a trivial example, precisely the complete graph achieves the maximum number of connected sets among all graphs on \(n\) vertices. The literature contains a substantial number of research papers studying the extreme numbers of connected sets in acyclic graphs (i.e. in trees). As far as we know, this line of study on trees goes back to Székely and Wang [19, 18]; trees with given degree sequence were considered in [1, 3, 20, 21]; paper [4] studies trees with given segment sequence; trees with given diameter appeared in [6]; paper [7] focuses on trees with given eccentric sequence; and many more, just to mention a few.
We know that every \(n\)-vertex connected graph possesses \(n-1\) edges or more, with the bound reached by trees only. A natural family of graphs after that of trees is perhaps the family of unicyclic graphs – connected \(n\)-vertex graphs having exactly \(n\) edges. In [9], the structures of \(n\)-vertex unicyclic graphs that reach the extreme numbers of connected sets are completed derived, among other things. One of the questions at the end of paper [9] asks for constructive characterisation of the graphs that extremise the number of connected sets, over all connected graphs with prescribed order and number of cycles. In general, this problem can appear out of reach due to the various ways in which the cycles may intersect. However, special cases of so-called bicyclic graphs are still of interest. A bicyclic graph is a connected graph whose number of edges is exactly one more than its number of vertices. Such a graph necessarily contains two or three different cycles. Unicyclic and bicyclic graphs are among the most popular tree-like structures, and various graph invariants and parameters have been studied in these families.
In this paper, we shall determine closed formulas, as a function of \(n\), for the smallest and largest possible numbers of connected sets in an \(n\)-vertex bicyclic graph, and further derive all extreme graph structures. Some known extremal results on trees and unicyclic graphs will play an important role in our current context of determining the number of connected sets of an \(n\)-vertex bicyclic graph. Our main underlying trick relies on certain graph transformations that modify the number of connected sets, while preserving both the numbers of vertices and edges.
Many of the proofs in the present paper make use of results from works closely related to the topic. We therefore mention some of these works below.
We studied in [10] the two problems of maximising the number of connected sets of a unicyclic graph with prescribed order and girth, or prescribed order, girth, and number of pendant vertices. We determined in [8] the maximum number of connected sets in a connected graph with given order and number of cut vertices, the minimum number among all cut vertex-free connected graphs, and the extreme numbers as a function of both order and number of pendant vertices. However, the result on the maximum, given \(n\) vertices of which \(p\) are pendant, first appeared in [2] as a Nordhaus-Gaddum type. Paper [9] extended [8] to the maximum number of connected sets in unicyclic graphs with given order and number of cut vertices. In [11], we investigated the maximum of \(\operatorname{N}(G)\) where \(G\) is a unicyclic graph with \(n\) vertices of which \(c\) are cut vertices, and found that there are generally two extremal structures. For each of the above mentionned graph families, all extremal graph structures were characterised.
The current paper strictly focuses on \(n\)-vertex bicyclic graphs. We define our first notation and state some initial results in Section 2; our main finding are covered in Sections 3 and 4.
Let \(G=(V(G), E(G))\) be a connected graph. For \(u,v \in V(G)\), we denote by \(\operatorname{N}(G)_v\) and \(\operatorname{N}(G)_{u,v}\) the number of connected sets in \(G\) that involve \(v\), and those that contain both \(u\) and \(v\), respectively. Let \(G-v\) denote the graph that remains upon deleting vertex \(v\) in \(G\); more generally, \(G-S\) represents the graph obtained from \(G\) by deleting all elements of \(S\).
A \(u-v\) path in \(G\) is a path between vertices \(u\) and \(v\), i.e. \((u=)w_0 w_1 \ldots w_{n-1} w_n(=v)\) such that \(w_i w_{i+1} \in E(G)\) for all \(0\leq i \leq n-1\). As usual, the \(n\)-vertex path will be denoted by \(P_n\). A pendant vertex (or a leaf) in \(G\) is a vertex of degree \(1\); an edge incident with a pendant vertex is called a pendant edge.
By \(C_n= v_0v_1v_2\ldots v_{n-1}\) we mean the cycle whose vertices are \(v_0,v_1,v_2,\ldots, v_{n-1}\) in this order, i.e. \(v_{n-1}\) is adjacent to \(v_0\), and \(v_jv_{j+1}\) is an edge for all \(0\leq j \leq n-2\).
We mention some known results that are relevant to us.
Lemma 2.1 ([19]). For the path \(P_n\) and \(u\) a leaf of \(P_n\), we have
Lemma 2.2 ([9, 10]). For the cycle \(C_n\) and \(v\in V(C_n)\), we have
At several occasions, we employ these two lemmas, without further reference.
A graph \(G=(V(G), E(G))\) is said to be bicyclic if \(|E(G)|=|V(G)|+1\) and \(G\) is connected. Every such graph must have at least four vertices. We denote by \(\mathbb{B}_n\) the collection of all bicyclic graphs on \(n\) vertices. Our goal is to determine both the smallest and the largest numbers of connected sets over \(\mathbb{B}_n\), and to also characterise the extremal graphs.
Bicyclic graphs are tree-like structures in the sense that they can be decomposed as a single ‘block’ with trees attached to the vertices of this block.
Lemma 3.1. Let \(G\) be a bicyclic graph. Then there is a unique maximal (w.r.t number of vertices) induced subgraph of \(G\), denoted by \(G^*\), such that \(G^*\) is also bicyclic but contains no pendant vertex.
Proof. If \(G\) does not contain a pendant vertex, then \(G=G^*\). Otherwise, let \(u\) be a pendant vertex of \(G\) and \(H=G-u\). We have \(|V(H)|=|V(G)|-1\) and \(|E(H)|=|E(G)|-1\). Thus \(H\) is also a bicyclic graph. If \(H\) does not contain a pendant vertex, then \(G^*=H\). Otherwise, \(H\) contains a pendant vertex \(v\) and \(H-v\) is also a bicyclic graph. We can repeatedly delete a pendant vertex until we either obtain a bicyclic graph having no pendant vertex, or a bicyclic graph on four vertices. In the latter case, we get the complete graph on four vertices missing a single edge.
In 2018, Malen [16] defined the \(k\)-core of a graph \(G\) as the maximal (with respect to inclusion) subgraph, over all subgraphs of \(G\) which have minimum degree at least \(k\). In this paper, it was proved that the \(k\)-core of \(G\) can be obtained by the process of deleting vertices with degree less than \(k\) from \(G\), along with all incident edges, one at a time until there are no vertices with degree less than \(k\), and that regardless of the order in which vertices are deleted, this process terminates in the unique subgraph \(k\)-core (see also [12]). Thus, for \(k=2\), this gives precisely our graph \(G^*\).
\(\square\)
As a first consequence of Lemma 3.1, we can construct any bicyclic graph \(G\) from its subgraph \(G^*\) by attaching trees rooted at the vertices of \(G^*\). Given a bicyclic graph \(G\), its subgraph \(G^*\) can only be of the following types:
Type I: Two cycles with no common vertex. In this case, \(G^*\) can be obtained from the disjoint union of \(C_p,~P_r,~C_q\) by identifying one endvertex of \(P_r\) with one vertex of \(C_p\), and the other endvertex of \(P_r\) (thus \(r\geq 2\)) with one vertex of \(C_q\) (see Figure 1). We denote this \(G^*\) by \(G[p,q,r]\).
Type II: Two cycles with only one common vertex. In this case, \(G^*\) can be constructed from vertex disjoint cycles \(C_p\) and \(C_q\) by identifying one vertex in \(C_p\) and one vertex in \(C_q\) (see Figure 2).
Type III: Two cycles with at least two common vertices. In this case, \(G^*\) can be derived from vertex disjoint paths \(P_a\), \(P_b\), \(P_c\) by first identifying one endvertex of each of these paths, and then identifying the other endvertices of these paths (see Figure 3).
Let us give a bit of relationship between Lemma 3.1 and some relevant literature.
In their 2008 paper [14], Li, Chang, and Shiu studied the nullity (number of zero eigenvalues in the adjacency spectrum) of bicyclic graphs and characterised the \(n\)-vertex bicyclic graphs attaining the extremal values under consideration. In the course of their arguments, they stated, without proof, the three basic types of bicyclic graphs that are made explicit and systematically treated in Lemma 3.1. Liu et al. [15] established sharp lower bounds for the Kirchhoff index of bicyclic graphs and characterised the extremal graphs attaining these bounds. Their work also considers structural configurations that overlap with one of the principal bicyclic configurations presented in Lemma 3.1. The 2023 paper [13] by Khan et al. uses the basic bicyclic configurations in the study of the metric dimension/resolving sets of bicyclic graphs. The authors state, without a detailed proof, the corresponding base bicyclic graph and note its uniqueness. The recent work [5] considers classes of bicyclic graphs according to their cycle arrangements and provides formulas for their Mostar index. The structural classification used there is closely related to the three types considered in Lemma 3.1.
We continue with some general lemmas that will simplify the computation of the number of connected sets in certain categories of graphs.
Lemma 3.2. Let \(H\) be obtained from the disjoint union of graphs \(H_1\) and \(H_2\) by identifying a vertex \(u_1\) in \(H_1\) and a vertex \(u_2\) in \(H_2\) (similar to Figure 2). We have
Proof. Let \(u\) be the only common vertex of \(H_1\) and \(H_2\) in \(H\). We have
and
From these two identities, we get
which proves the lemma.
\(\square\)
Lemma 3.3. Let \(H\) be a graph, \(v\) a pendant vertex and \(v’\) its neighbour in \(H\). Then
Proof. The graph \(H\) decomposes as in Lemma 3.2, where \(H_1=vv’\) and \(H_2=H-v\). Thus
\(\square\)
We employ Lemma 3.3 with no further reference to it.
For an integer \(m\geq 4\), we define the tadpole graph \(D_m\) to be the unicyclic graph obtained by identifying one vertex of the cycle \(C_3\) with one leaf of the path \(P_{m-2}\). We set \(D_3:=C_3\). Furthermore, we define \(L_n\) to be the graph \(L_n:=G[3,3,n-4]\) when \(n\geq 6\); see Figure 1. We take two disjoint copies of \(C_3\) and merge one vertex of each of them together to obtain the graph \(L_5\) (a type II graph from Figure 2).
Lemma 3.4. We have
for all \(n\geq 5\).
Proof. It is easy to check that \(\operatorname{N}(L_5)=22\). Let \(n>5\), \(v\) be the common vertex of a fixed \(C_3\) and \(P_{n-4}\) in \(L_n\). The graph \(L_n -v\) has \(D_{n-3}\) as a connected component. It is proved in [9] that
for all \(m\geq 3\). Thus
Moreover,
where \(w\) is the unique pendant vertex of \(D_{n-2}\). Since
we deduce that \(\operatorname{N}(L_n)_v=4(n-1)\) and that
as needed.
\(\square\)
Denote by \(A_4\) the unique bicyclic graph on four vertices. For \(n\geq 5\), we identify an endvertex of a \(P_{n-3}\) with one vertex of degree two in \(A_4\) to obtain \(A_n \in \mathbb{B}_n\).
Lemma 3.5. We have
for all \(n\geq 4\). In particular,
Proof. It is easy to check that \(\operatorname{N}(A_4)=14\). For \(n\geq 5\), denote by \(u_1\) in \(P_{n-3}\) and by \(u_2\) in \(A_4\) the two vertices that are identified to obtain \(A_n\). We employ Lemma 3.2 to get
Now Lemma 3.4 gives us
for all \(n\geq 5\), which proves the lemma.
\(\square\)
As a next step, we shall estimate the smallest number of connected sets containing a given vertex in an \(n\)-vertex bicyclic graph.
Proposition 3.6. If \(G\in \mathbb{B}_n\) and \(v\in V(G)\), then
Proof. It is clear that \(\operatorname{N}(A_4)_v=7\) if \(v\) is of degree two, and \(\operatorname{N}(A_4)_v=8\) if \(v\) is of degree three. So the proposition holds (with equality) for \(n=4\). Henceforth, assume \(n\geq 5\). We distinguish between three scenarios:
\(v\) is a pendant vertex of \(G\), and \(v’\) is the neighbour of \(v\).
Since \(G-v\) is also a bicyclic graph, we have
where the inequality follows by induction on \(n\).
\(G\) contains a pendant vertex \(u \neq v\).
Since \(G-u\) is also a bicyclic graph, we have
where the inequality follows by induction on \(n\). The count for \(\operatorname{N}(G)_{u,v}\) includes a shortest path between \(u\) and \(v\), thus \(\operatorname{N}(G)_{u,v} \geq 1\). In particular,
\(G\) does not have a pendant vertex.
All shortest paths starting at \(v\) in \(G\) contribute to the count \(\operatorname{N}(G)_v\). Thus \[\operatorname{N}(G)_v \geq n\,.\] The degree of \(v\) is at most \(1\) in each of these paths.
Vertex \(v\) together with any two of its neighbours also induces a connected graph in which \(v\) is not pendant. We deduce the following:
If \(v\) has at least three neighbours in \(G\), then \(\operatorname{N}(G)_v \geq n +3 +1\), where the final \(1\) accounts for \(G\) itself. Vertex \(v\) is of degree at least \(2\) in each of these subgraphs.
If \(v\) has only two neighbours, say \(v_1,v_2\) in \(G\), then either \(v_1\) or \(v_2\) must have a neighbour, say \(w\) not belonging to \(\{v,v_1,v_2\}\). Thus, each of the graphs induced by \(\{v,v_1,v_2\}\) and \(\{v,v_1,v_2,w\}\) is connected and none of them has \(v\) as a pendant vertex. Hence \(\operatorname{N}(G)_v \geq n +2 +1\), where the final \(1\) accounts for the whole \(G\).
So such subgraphs containing \(v\) and at least two of its neighbours in \(G\) are all distinct and also different from the subpaths counted before.
This completes the proof of the proposition.
\(\square\)
We list in Figure 4 all elements in the collection \(\mathbb{B}_5\), alongside their numbers of connected sets, a well as the maxima of their vertex-contained connected sets (the details are omitted).
A cut vertex in a graph \(G\) is a vertex \(u\) with the property that \(G-u\) has more connected components than \(G\).
Theorem 3.7 ([9, 8]). The graph \(D_n\) uniquely minimises the number of connected sets over the set of all \(n\)-vertex unicyclic graphs.
The cycle \(C_n\) is the unique graph having the smallest number of connected sets among all \(n\)-vertex connected graphs with no cut vertex.
We are now ready to state and prove our first theorem.
Theorem 3.8. Let \(n>4\) and \(G\in \mathbb{B}_n\). It holds that \[\operatorname{N}(G) \geq \operatorname{N}(L_n)=\frac{(n+6)(n-1)}{2} \,.\]
Equality happens in the case where \(n>5\) if and only if \(G\) is isomorphic to \(L_n\).
Proof. The formula for \(\operatorname{N}(L_n)\) is given in Lemma 3.4. If \(n=5\), then \(\operatorname{N}(G) \geq 22\) by Figure 4. Equality holds if and only if \(G=L_5\) or \(G=A_5\). Let \(n>5\), and assume that \(G\) has a pendant vertex, say \(v\). Then \(G-v \in \mathbb{B}_{n-1}\) and the induction hypothesis on \(n\) yields
This implies that
now using Proposition 3.6. Hence
and we are done in this case. If \(G\) does not have a pendant vertex, then \(G=G^*\) is one of the three types in Figures 1, 2, 3. Henceforth, we assume that \(G\in \mathbb{B}_n\) has the smallest number of connected sets.
Claim 1: \(G\) cannot be of type II.
Suppose not. Replace the cycle \(C_q\) (\(q\geq p\)) in \(G=G^*\) with the tadpole graph \(D_q\), as shown in Figure 5, to obtain a graph \(G’\in \mathbb{B}_n\). By \(q\geq p\), we necessarily have \(q\geq 4\).
It follows from Lemma 3.2 that
where \(u_1\) is the unique pendant vertex in \(D_q\). By Theorem 3.7, \(D_m\) is the unique \(m\)-vertex unicyclic graph having the minimum number of connected sets. Therefore,
Since \(\operatorname{N}(D_q)_{u_1}=q+1\), while \(\operatorname{N}(C_q)_{u_2}=1+\binom{q}{2}\), we deduce that \[\operatorname{N}(D_q)_{u_1} – \operatorname{N}(C_q)_{u_2} < 0\,,\] and that \(\operatorname{N}(G’)-\operatorname{N}(G) < 0\). This contradicts the minimality of \(G\) with respect to the number of connected sets, thus proving the claim.
Claim 2: \(G\) cannot be of type III.
Suppose not. By construction (see Figure 3), \(G=G^*\) has no cut vertex (i.e. \(G-u\) is still connected for every \(u\in \operatorname{V}(G)\)). By Theorem 3.7, we then have \(\operatorname{N}(G) > \operatorname{N}(C_n)\). On the other hand,
which is positive for all \(n>5\). Therefore, \(\operatorname{N}(G) > \operatorname{N}(C_n) > \operatorname{N}(L_n)\). In particular, \(G\) cannot reach the smallest number of connected sets over \(\mathbb{B}_n\). This proves Claim 2.
As a consequence of the above two Claims, a graph \(G\in \mathbb{B}_n\) that minimises the number of connected sets must be of type I.
Claim 3: \(G\) is isomorphic to \(L_n\).
Suppose not. Replace the cycle \(C_q\) (\(q\geq p\)) in \(G=G^*\) (see Figure 1) with the tadpole graph \(D_q\) to obtain the same shape \(G’\), as shown in Figure 5. Using Lemma 3.2, we obtain
where \(u_1\) is the unique pendant vertex of \(D_q\). Since \(\operatorname{N}(D_q)_{u_1} – \operatorname{N}(C_q)_{u_2} \leq 0\) and \(D_m\) is the only \(m\)-vertex unicyclic graph with the smallest number of connected sets, we deduce that \(\operatorname{N}(G’)-\operatorname{N}(G) < 0\).
If \(p=3\) then \(G’\) is isomorphic to \(L_n\). Otherwise, we apply the same graph transformation to \(G’\) (replacing \(C_p\) with \(D_p\)) to obtain \(G”\). Hence \(\operatorname{N}(G”) < \operatorname{N}(G’) < \operatorname{N}(G)\). Since \(G”\) is isomorphic to \(L_n\), the proof of the claim (thus also the theorem) is finished.
\(\square\)
In what follows, we shift our focus on the maximisation problem. For our purposes, we shall even determine both the largest and the second-largest numbers of connected sets over \(\mathbb{B}_n\), for all \(n\geq 8\).
Let \(n\geq 6\) be an integer. Starting with two vertex disjoint cycles \(C_3\) and \(C_3\), first identify one vertex in a \(C_3\) and one vertex in the other \(C_3\) by vertex \(w\), and then attach \(n-5\) pendant edges to \(w\). We denote the resulting graph by \(R_n\) and set \(R_5:=L_5\). Clearly, \(R_n \in \mathbb{B}_n\) for all \(n\geq 5\).
Similarly, we define \(B_n\) to be the graph constructed from \(A_4\) by attach \(n-4\) pendant edges to the same vertex \(w\) of degree \(3\) in \(A_4\). Clearly, \(B_n \in \mathbb{B}_n\).
As usual, the \(n\)-vertex star graph is denoted by \(S_n\).
Lemma 3.9. We have
for all \(n\geq 5\).
Proof. We have \(\operatorname{N}(R_5)=\operatorname{N}(L_5)=22\); so the formula is correct for \(n=5\). Now assume \(n>5\). The graph \(R_n-w\) consists of two copies of \(P_2\) and \(n-5\) copies of \(P_1\), while \(w\) is adjacent to all other vertices of \(R_n\). Thus
By Lemma 3.2,
where \(w\) is also the center of the star. Thus
as stated.
\(\square\)
We shall prove that \(B_n\) uniquely maximises the number of connected sets among all \(n\)-vertex bicyclic graphs, provided \(n>7\). Henceforth, we assume \(n\geq 8\).
Lemma 3.10 below is an important tool to proving our second theorem. It already appeared in [11, 10].
Lemma 3.10 ([11, 10]). Let \(L,M,R\) be three non-trivial connected graphs whose vertex sets are pairwise disjoints. Let \(l \in V(L),~ r\in V(R)\) and \(u,v \in V(M)\) be fixed vertices such that \(u \neq v\). Denote by \(G\) the graph obtained from \(L,M,R\) by identifying \(l\) with \(u\), and \(r\) with \(v\). Similarly, let \(G’\) (resp. \(G”\)) be the graph obtained from \(L,M,R\) by identifying both \(l,r\) with \(u\) (resp. both \(l,r\) with \(v\)); see Figure 6 for a diagram of these graphs.
We have
In particular, it holds that
The next proposition is fairly well-known, see for instance [9, 19].
Proposition 3.11. Let \(T\) be a tree on \(n\) vertices whose root is \(v\). Then \(\operatorname{N}(T)_v\leq 2^{n-1}\). Equality holds if and only if \(T\) is the star \(S_n\) and \(v\) is the center of \(T\).
Let \(n>2\) and \(Q_n\) be the graph that results from adding one edge between two leaves of the star \(S_n\). Clearly, \(Q_n\) contains only one cycle, which is \(C_3\).
Theorem 3.12 ([9]). The graph \(Q_n\) uniquely maximises the number of connected sets among all unicyclic graphs of order \(n>5\).
The (unique) largest and a second-largest bicyclic graphs with respect to the number of connected sets are described in the next theorem.
Theorem 3.13. Let \(n\geq 8\) and \(G \in \mathbb{B}_n\). Then \[\operatorname{N}(G) \leq \operatorname{N}(B_n)\,,\] with equality if and only if \(G\) is isomorphic to \(B_n\). Moreover, \[\operatorname{N}(G) \leq \operatorname{N}(R_n),\] holds for all \(G\in \mathbb{B}_n \backslash \{B_n\}\).
Proof. Let \(n\geq 8\) and \(G_0 \in \mathbb{B}_n\). By Lemma 3.1, \(G_0\) can be obtained from its bicyclic subgraph \(G_0^*\) by attaching trees at the vertices of \(G_0^*\). We make the specialisation \(M:=G_0^*\) and repeatedly apply Lemma 3.10, until we get a new graph \(G_1\in \mathbb{B}_n\). More precisely, starting from \(G_0\), we always choose the reattachment in Lemma 3.10 that strictly increases the number of connected sets, until the ‘dangling trees’ in \(G_0\) are all rooted at a single vertex of \(G^*_0\). The resulting graph is \(G_1\) and \(G^*_1=G^*_0\). Therefore, \(G_1\) can be constructed from \(G_1^*=G_0^*\) by attaching (possibly none) a tree \(T_1\) rooted at only one vertex, say \(v\) of \(G_1^*\). Hence \(\operatorname{N}(G_1)\geq \operatorname{N}(G_0)\), with equality if and only if both \(G_1\) is isomorphic to \(G_0\) and \(G_0\) already consisted of \(G^*_0\) with a single tree rooted at one vertex of \(G^*_0\).
Consider the bicyclic graph \(G_1\). As was described in Lemma 3.2, ‘replace’ the tree \(T_1\) with the star \(S_{|V(T_1)|}\) whose center is \(v\), to obtain a graph \(G_2\in \mathbb{B}_n\). This gives us
It is a well known statement (see, as eg. [9, 19]) that \(S_m\) uniquely reaches the maximum number of connected sets among all \(m\)-vertex trees. Together with Proposition 3.11, we deduce that \(\operatorname{N}(G_2) \geq \operatorname{N}(G_1)\), with equality if and only if \(T_1\) is a star and \(v\) its center.
Consider \(G_2\), and let us first focus on its subgraph \(G_2^*=G_1^*=G_0^*\).
Case 1. Assume \(G_2^*\) is of type I or type II (see Figures 1 and 2, with \(q\geq p\)), and let \(H:=G_2^* – (V(C_p) \backslash u)\), where \(u\) is the unique common vertex of \(C_p\) and \(H\) in \(G_2^*\).
As long as \(|V(H)|\geq 5\), ‘replace’ the part \(H\) of \(G_2^*\) with the graph \(Q_{|V(H)|}\) to obtain a graph \(G’_3\in \mathbb{B}_n\), as shown in Figure 7.
Vertex \(u\) is adjacent to all other vertices in \(Q_{|V(H)|}\), thus \(\operatorname{N}(Q_{|V(H)|})_u=2^{|V(H)| -1}\). Hence Lemma 3.2 combined with Theorem 3.12 imply that
Vertex \(u\) cannot be adjacent to all other vertices of \(H\) in \(G^*_2\), unless \(q=3\) and \(G^*_2\) is of type II (in this case \(|V(H)|=q=3 <5\), a contradiction).
Hence, \(u\) is not adjacent to all other vertices of \(H\). Thus
that is \(\operatorname{N}(G’_3) > \operatorname{N}(G^*_2)\) in the case where \(|V(H)| \geq 5\).
Subcase 1. \(p\geq 5\).
Whenever necessary, we can apply this same transformation on the part \(C_p\) of \(G’_3\) to obtain the graph \(R_{|V(G’_3)|}\) and the inequality \(\operatorname{N}(R_{|V(G’_3)|}) > \operatorname{N}(G’_3)\). Hence
Subcase 2. \(|V(H)| \geq 5\) and \(p\leq 4\).
Recall that \(|V(G’_3)|=|V(H)| + p – 1\). If \(p=3\), then \(G’_3\) is isomorphic to \(R_{|V(G’_3)|}\). Otherwise, \(p=4\). In this situation, using Lemma 3.2 we can compare directly \(\operatorname{N}(G’_3)\) with \(\operatorname{N}(R_{|V(G’_3)|})\) in the following manner:
where \(x\) is the unique vertex of degree \(3\) in the tadpole graph \(D_4\), \(y\) is any vertex of \(C_4\), and \(z\) is the unique vertex of degree greater than \(2\) in \(Q_{|V(H)|}\). We obtain
In either Subcase, we get
We are left with the situation where \(3\leq p \leq q \leq |V(H)|\leq 4\) holds in the graph \(G_2^*=G_0^*\). All such graphs \(G_2^*\) are shown in Figure 8.
Recall that \(G_2 \in \mathbb{B}_n\) can be constructed from \(G_2^*=G_0^*\) by attaching (possibly none) a star \(S_r\) rooted at only one vertex, say \(v\) of \(G_2^*\). In view of Lemma 3.9,
In this case where \(G_2^*\) is one of the graph shown in Figure 8, we ‘replace’ \(G_2^*\) directly with \(R_{|V(G_2^*)|}\) in \(G_2\) to obtain the graph \(R_n\). Since vertex \(v\) is adjacent to all other vertices of \(R_n\), Lemma 3.2 combined with
give us \(\operatorname{N}(R_n) > \operatorname{N}(G_2) \geq \operatorname{N}(G_1) \geq \operatorname{N}(G_0)\), and we are done, unless \(G^*_2=R_5\). In this case, \(G_2\) is indeed isomorphic to \(R_n\) and we have \(\operatorname{N}(B_n)> \operatorname{N}(R_n)=\operatorname{N}(G_2)\).
Case 2. Assume \(G_2^*\) is of type III (see Figure 3).
Then \(G_2^*\) can be obtained from vertex disjoint paths \(P_a\), \(P_b\), \(P_c\) by first identifying one endvertex of each of these paths, and then identifying the other endvertices of these paths. Thus \(2\leq a\leq b \leq c\) and \(b\geq 3\). Set \(m:=|V(G^*_2)|\).
Subcase 1. First, assume \(c\geq 5\).
Let \(w\) be a vertex of \(G_2^*\) such that \(v_1′, v_1, w, v_2, v_2’\) are five consecutive vertices on the path \(P_c\). We extract certain categories of vertex subsets of \(G_2^*\), each of which contains \(w\):
Any nonempty subset of \(V(G_2^*)\backslash \{v_1,v_2\}\); there are \(2^{m-3}-1\) of them;
The union of \(\{v_2\}\) and any nonempty subset of \(V(G_2^*)\backslash \{v_1,v’_2\}\); there are \(2^{m-4}-1\) of them;
The union of \(\{v_1\}\) and any nonempty subset of \(V(G_2^*)\backslash \{v_2,v’_1\}\); there are \(2^{m-4}-1\) of them;
The union of \(\{v_1,v_2\}\) and any nonempty subset of \(V(G_2^*)\backslash \{v’_1,v’_2\}\); there are \(2^{m-5}-1\) of them.
Each of the above subset of \(V(G_2^*)\) contains \(w\) and induces a disconnected graph. Moreover, all these subsets of \(V(G^*_2)\) are pairwise distinct. Consequently,
since \(m\geq c+1 >5\). On the other hand, \(\operatorname{N}(G_2^* -w) < \operatorname{N}(Q_{m-1})\), since \(G_2^* -w\) is a unicyclic graph on \(m-1\) vertices, which is isomorphic neither to \(Q_{m-1}\), nor to \(C_5\), nor to the graph obtained from \(C_4\) by attaching one pendant edge to a vertex of \(C_4\).
Fix \(z\), a vertex of degree \(2\), belonging to a \(C_3\) in \(R_m\), and let \(z’\) be the unique neigbhour of \(z\) that lies on the other \(C_3\) (\(z’\) is adjacent to all other vertices of \(R_m\)). Then
Hence
Recall that \(G_2 \in \mathbb{B}_n\) can be derived from \(G_2^*\) by attaching (possibly none) a star \(S_{n-m+1}\) centered at only one vertex, say \(v\) of \(G_2^*\). Now ‘replace’ \(G_2^*\) with \(R_m\) to obtain the graph \(R_n\). We therefore infer from Lemma 3.2 together with
that \(\operatorname{N}(R_n) > \operatorname{N}(G_2) \geq \operatorname{N}(G_1) \geq \operatorname{N}(G_0)\), and we are done with the case where \(c\geq 5\).
Subcase 2. To finish the proof of the theorem, we need to rule out the case where \(c\leq 4\) (thus \(2\leq a \leq b \leq c \leq 4\) and \(b\geq 3\)). In this case \(|V(G_2^*)| \leq 8\), see Figure 9.
We have computed both the number of connected sets and the maximum number of vertex-containing connected sets of each possibility from Figure 9, and found that the upper bounds for the numbers of vertex-containing connected sets are attained precisely by any vertex of degree \(3\) in the corresponding graph (see Appendix 4).
Recall that \(n\geq 8\) and that \(G_2 \in \mathbb{B}_n\) consists of \[G_2^*\in \{A_4,E_{5,2}, E_{5,1}, E_{6,2}, E_{6,1}, E_{7}, E_{8}\},\] and pendant edges, all of which are attached to the same vertex \(v\) of \(G_2^*\). With \(m=|V(G_2^*)|\) and \(u\) the center of \(S_{n-m+1}\), we employ Lemma 3.2 to obtain
Hence, the following hold:
for \(G_2^* \in \{E_{5,2},E_{5,1}\}\), and
for \(G_2^* \in \{E_{6,2},E_{6,1}\}\), and
for \(G_2^* =E_7\), and
for \(G_2^* =E_8\). In all these cases, we get \(\operatorname{N}(G_2) < \operatorname{N}(R_n) =\operatorname{N}(B_n)-1 < \operatorname{N}(B_n)\). Recall that \(B_n\) contains only one universal vertex (a vertex adjacent to all other vertices). Since the case where \(G_2^* =A_4\) defines the graph \(B_n\) when \(v\) is of degree \(3\) in \(A_4\), we are done with the proof of the theorem.
In particular, \(R_n\) is a second-largest \(n\)-vertex bicyclic graph with respect to the number of connected sets.
\(\square\)
It was mentionned here at several occasions that \(\mathbb{B}_4=\{A_4\}\) and \(\operatorname{N}(A_4)=14\). On the other hand, we showed (see Figure 4) that \(E_{5,2}\) is the unique element of \(\mathbb{B}_5\) with the maximum number of connected sets, and that \(\operatorname{N}(E_{5,2})=26\).
In the proof of Theorem 3.13, the only place where it was necessary to invoke the assumption \(n\geq 8\) is the situation where \(G^*_2\) is of type III. In fact, it was shown that if \(n<8\) then \(G^*_2\) cannot be of type I or II. Therefore, any \(n\in \{6,7\}\)-vertex bicyclic graph \(G\) that realises the maximum number of connected sets must consist of its unique subgraph \(G^*\) and a star centered at a single vertex of \(G^*\), and \(G^*\) must only be of type III. We can therefore derive the following graph candidates \(G\) on \(6\) or \(7\) vertices for maximality with respect to the number of connected sets :
Overall, the search for elements of \(\mathbb{B}_6\) or \(\mathbb{B}_7\) with the maximum number of connected sets reduces to only \(6\) or \(10\) possible candidates, respectively. All such potential candidates are enumerated in Figures 10 and 11, and their numbers of connected sets can easily be computed. For example, by decomposing these graphs into smaller ones (as in Appendix 4), or writing a simple computer program for the computations.
We found precisely two graphs, namely \(E_{6,2}\) and \(E_{6,4}\), that maximise the number of connected sets among the graphs in \(\mathbb{B}_6\). In particular, \(\operatorname{N}(E_{6,2})=\operatorname{N}(E_{6,4})=42\).

For \(n=7\), our computations show that \(B_7\) and \(E^*_7\) are the only graphs in \(\mathbb{B}_7\) that attain the maximum number of connected sets. More precisely, \(\operatorname{N}(B_7)=\operatorname{N}(E_7^*)=73\). We omit the details.
The author declare no conflicts of interest.
This research received no external funding.
This study is theoretical and does not involve the generation or analysis of datasets.
In this section, we provide the enumeration of the connected sets and the vertex-containing connected sets for each of the Type III configurations from Figure 9. In particular, we obtain
where \(t\) is any vertex of the corresponding graph. The stated upper bounds for the numbers of vertex-containing connected sets are attained precisely when \(t\) is a vertex of degree \(3\) in the corresponding graph.
We give below a bit of details of these computations.
Denote by \(u_2\) and \(u’_2\) the two vertices of degree \(3\) in \(E_{6,2}\), and fix \(u_1\) as one of their two common vertices. The graph \(E_{6,2}-u’_2\) consists of \(S_4\) centered at \(u_2\) in which one pendant edge is subdivided only once. Thus, by symmetry, \(\operatorname{N}(E_{6,2}-u’_2)_{u_1,u_2}=\operatorname{N}(E_{6,2}-u_2)_{u_1,u’_2}=6\). Furthermore, \(\operatorname{N}(E_{6,2})_{u_1,u_2, u’_2}=2^3\) since every element of \(V(E_{6,2})\backslash \{u_1, u_2, u’_2 \}\) is adjacent to adjacent to at least one element of \(\{u_1, u_2, u’_2 \}\). Hence
Moreover, \(\operatorname{N}(E_{6,2}-u_1)=\operatorname{N}(C_5)=5^2-5+1=21\). Therefore, \(\operatorname{N}(E_{6,2})=\operatorname{N}(E_{6,2})_{u_1}+\operatorname{N}(E_{6,2}-u_1)=21+21=42\).
From the above description of \(E_{6,2}-u_2\), we obtain \(\operatorname{N}(E_{6,2}-u_2)=12+5=17\), depending on whether the connected sets involve \(u’_2\) or not. In particular, \(\operatorname{N}(E_{6,2})_{u_2}=\operatorname{N}(E_{6,2}) – \operatorname{N}(E_{6,2} -{u_2})=42-17=25\).
Denote by \(u_3\) the neighbour of \(u_2\) in \(E_{6,2}\), which is not a neighbour of \(u’_2\). Then \(E_{6,2}-u_3\) consists of \(C_4\) and a leaf, say \(a\) attached at the vertex \(u’_2\) of \(C_4\). We have \(\operatorname{N}(E_{6,2}-u_3)_a=1+\operatorname{N}(C_4)_{u’_2}=1+7=8\), which implies that \(\operatorname{N}(E_{6,2}-u_3)= \operatorname{N}(E_{6,2}-u_3)_a + \operatorname{N}(E_{6,2}- \{u_3,a\})=8+\operatorname{N}(C_4)=8+13=21\) and that \(\operatorname{N}(E_{6,2})_{u_3}=42-21=21\).
Consider the graph \(E_{6,1}\). Fix \(u_1\), a vertex of degree \(3\), and let \(u_2, u’_2, u’_1\) be its neighbours in \(E_{6,1}\) with \(u’_1\) of degree \(3\). Then \(\operatorname{N}(E_{6,1}-\{u_2,u’_2\})_{u_1}=5\) since \(E_{6,1}-\{u_2,u’_2\}\) is the star \(S_4\) in which \(u_1\) is a leaf. Furthermore, \(E_{6,1}- u’_2\) consists of \(C_4\) and a leaf attached at the vertex \(u’_1\) of \(C_4\). Thus, by symmetry, \(\operatorname{N}(E_{6,1}-u’_2)_{u_1,u_2} = \operatorname{N}(E_{6,1}- u_2)_{u_1,u’_2}=6\). It follows that
Since \(E_{6,1} – u_1\) is isomorphic to \(P_5\), we also have both \(\operatorname{N}(E_{6,1} – u_1)=15\) and \(\operatorname{N}(E_{6,1})=15+25=40\). With the vertex labels from \(E_{6,2}\), the graphs \(E_{6,1} – u_2\) and \(E_{6,2} – u_3\) are isomorphic. Thus \(\operatorname{N}(E_{6,1} – u_2)=21\) and \(\operatorname{N}(E_{6,1})_{u_2}=40-21=19\).
Let us now focus on \(E_7\). Denote by \(u_2, u’_2\) the two vertices of degree \(3\) and by \(u_1\) their common neighbour. Then \(E_7-u’_2\) consists of \(S_4\) centered at \(u_2\) with one subdivision of two edges of \(S_4\), while \(u_1u_2\) is a pendant edge in \(E_7-u’_2\). Thus, by symmetry, \(\operatorname{N}(E_7-u’_2)_{u_1,u_2}=\operatorname{N}(E_7-u_2)_{u_1,u’_2}=9\). Consequently,
We note that \(E_7-u_1\) is isomorphic to \(C_6\). Thus \(\operatorname{N}(E_7-u_1)=\operatorname{N}(C_6)=6^2-6+1=31\) and \(\operatorname{N}(E_7)=31+35=66\). By the previous description of \(E_7-u_2\), we obtain \(\operatorname{N}(E_7-u_2)=18+7=25\), depending on whether the connected sets involve \(u’_2\) or not. In particular, \(\operatorname{N}(E_7)_{u_2}=66-25=41\). The graph \(E_7-u_3\) consists of \(C_5\) and a leaf, say \(a\) attached at a vertex of \(C_5\). It follows that \(\operatorname{N}(E_7-u_3)_a=1+\operatorname{N}(C_5)_t=1+11=12\) and that \(\operatorname{N}(E_7-u_3)= \operatorname{N}(E_7-u_3)_a + \operatorname{N}(E_7- \{u_3,a\})=12+\operatorname{N}(C_5)=12+21=33\). In particular, we get \(\operatorname{N}(E_7)_{u_3}=66-33=33\).
Consider the graph \(E_8\). Let \(u_2, u’_2\) denote the two vertices of degree \(3\), and fix a path \(u_2u_1u’_1u’_2\). The graph \(E_8-u_2\) consists of \(S_4\) centered at \(u’_2\) in which every edge is subdivided once. Vertex \(u_1\) is a leaf adjacent to \(u’_1\) in \(E_8-u_2\), and one shows that \(\operatorname{N}(E_8-u_2)_{u_1,u’_1}=1+9=10\). By symmetry, we get \(\operatorname{N}(E_8-u’_2)_{u_1,u’_1,u_2}=9\). Furthermore, \(E_8-u’_1\) is made of \(C_6\) with leaf \(u_1\) attached at vertex \(u_2\) of \(C_6\); this gives us \(\operatorname{N}(E_8-u’_1)_{u_1,u_2} =\operatorname{N}(C_6)_{u_2}=16\). Hence
where \(2^4+9\) is \(\operatorname{N}(E_8)_{u_1,u’_1,u_2}\) split into containing \(u’_2\) or not. Moreover, by symmetry,
Therefore, we obtain \(\operatorname{N}(E_8)=48+52=100\). By the above description of \(E_8-u_2\), we have \(\operatorname{N}(E_8-u_2)=\operatorname{N}(E_8-u_2)_{u’_2} + \operatorname{N}(E_8-\{u_2,u’_2\})=3^3 + (3 \times 3)=36\). It follows that \(\operatorname{N}(E_8)_{u_2}=100-36=64\).
Basic decomposition arguments similar to the above can be used to compute \(\operatorname{N}(E_{5,2})\), \(\operatorname{N}(E_{5,1})\), \(\operatorname{N}(A_4)\) as well as their numbers of vertex-containing connected sets. We can now skip the details.