1 Introduction

In this paper, we only consider finite simple graphs. Let G be a graph with vertex set V(G) and edge set E(G). For any vertex \(v\in V(G)\), we use \(N_G(v)\) and \(\deg _G(v)\) to denote the set of neighbors of v and the degree of v in G, respectively. For any \(X\subseteq V(G)\), we denote by |X| the cardinality of X. We define \(G-uv\) to be the graph obtained from G by deleting the edge \(uv\in E(G)\), and \(G+uv\) to be the graph obtained from G by adding an edge uv between two non-adjacent vertices u and v of G. For two vertices u and v of G, the distance between u and v in G is denoted by \(d_{G}(u, v)\).

For an integer \(m\geqslant 2,\) let \(\alpha ^{m}(G)\) denote the number defined by

$$\begin{aligned} \alpha ^{m}(G)=\max \{ |S|:S\subseteq V(G),d_{G}(x,y)\geqslant m\,\ \text {for all distinct vertices }\,x,y\in S\}. \end{aligned}$$

For an integer \(p\geqslant 2\), we define

$$\begin{aligned} \sigma _p^{m}(G)= & {} \min \left\{ \sum _{a\in S}\deg _{G}(a):S\subseteq V(G),|S|=p, \right. \\&\left. d_{G}(x,y)\geqslant m\ \text {for all distinct vertices}\;x,y\in S\right\} . \end{aligned}$$

For convenience, we define \(\sigma ^{m}_{p}(G)=+\infty \) if \(\alpha ^{m}(G)<p\). We note that \(\alpha ^{2}(G)\) is often written \(\alpha (G)\), which is the independence number of G,  and \(\sigma _p^{2}(G)\) is often written \(\sigma _{p}(G)\), which is the minimum degree sum of p independent vertices.

Let T be a tree, a vertex of degree one is called a leaf. The set of leaves of T is denoted by \({\mathrm{Leaf}}(T)\). The subtree \(T-{\mathrm{Leaf}}(T)\) of T is called the \({\mathrm{stem}}\) of T and is denoted by \({\mathrm{Stem}}(T)\). A tree having at most l leaves is called an l-ended tree and a stem having at most l leaves is called an l-ended stem. There are several well-known conditions (such as the independence number conditions and the degree sum conditions) ensuring that a graph G contains a spanning tree with a bounded number of leaves or branch vertices (see the survey paper [5] and the references cited therein for details). Win [7] obtained a sufficient condition related to the independence number for k-connected graphs, which confirms a conjecture of Las Vergnas [4]. Broersma and Tuinstra [1] gave a degree sum condition for a connected graph to contain a spanning tree with at most l leaves.

Theorem 1.1

(Win [7]) Let \(k\ge 1\) and \(l\ge 2\) be integers and let G be a k-connected graph. If \(\alpha (G)\le k+l-1\), then G has a spanning l-ended tree.

Theorem 1.2

(Broerma and Tuinstra [1]) Let G be a connected graph and let \(l\ge 2\) be an integer. If \(\sigma _2(G)\ge |G|-l+1\), then G has a spanning l-ended tree.

Recently, many researches are studied on spanning trees in connected graphs whose stems have a bounded number of leaves or branch vertices (see [2, 3, 6, 8] for more details). We introduce here some results on spanning trees whose stems have a few leaves.

Theorem 1.3

(Tsugaki and Zhang [6]) Let G be a connected graph and let \(l\geqslant 2\) be an integer. If \(\sigma _{3}(G)\geqslant |G|-2l+1\), then G has a spanning tree with l-ended stem.

Theorem 1.4

(Kano and Yan [2]) Let G be a connected graph and let \(l\geqslant 2\) be an integer. If \(\sigma _{l+1}(G)\geqslant |G|-l-1\), then G has a spanning tree with l-ended stem.

Moreover, for a positive integer \(t \ge 3\), a graph G is said to be \(K_{1,t}\)- free graph if it contains no \(K_{1,t}\) as an induced subgraph. If \(t=3,\) the \(K_{1,3}\)- free graph is also called the claw-free graph. Kano and Yan also gave the following result.

Theorem 1.5

(Kano and Yan [2]) Let G be a connected claw-free graph and let \(l\geqslant 2\) be an integer. If \(\sigma _{l+1}(G)\geqslant |G|-2l-1\), then G has a spanning tree with l-ended stem.

On the other hand, if the maximum degree of a graph G is denoted by \(\Delta (G)\), then G is nothing but a \(K_{1,t}\)-free graph for all \(t\ge \Delta (G)+1.\) Then, we may generalize the above theorems by studying the \(K_{1,t}\)-free graph. In this paper, we would like to study on the spanning tree of a \(K_{1,t}\)-free graph whose stem has a bounded number of leaves. Firstly, we want to prove the following result.

Theorem 1.6

For a positive integer \(t \ge 3,\) let G be a connected \(K_{1,t}\)-free graph and let \(l\ge 2\ (l\not = t-2)\) be an integer. If

$$\begin{aligned} \sigma ^{4}_{l+1}(G)\geqslant |G|-\left\lfloor \dfrac{l(t-1)}{t-2}\right\rfloor -1, \end{aligned}$$
(1.1)

then G has a spanning tree with l-ended stem. Here, the notation \(\lfloor r\rfloor \) stands for the biggest integer not exceed the real number r.

We also note that the reason why we consider \(\sigma ^{4}_{l+1}(G)\) is based on the following theorem of Kano and Yan. They proved that if a connected graph G satisfies that \(|S|\le l\) for every \(S\subseteq V(G)\) such that \(d_{G}(x,y)\geqslant 4\ \text {for all distinct vertices}\;x,y\in S\), then G has a spanning tree with l-ended stem.

Theorem 1.7

(Kano and Yan [2]) Let G be a connected graph and let \(l\geqslant 2\) be an integer. If \(\alpha ^{4}(G)\le l\), then G has a spanning tree with l-ended stem.

By using Theorem 1.6 when \(t=3,\) we have Theorem 1.5. Moreover, Theorem 1.6 is an improvement of Theorem 1.4 when we consider the positive integer t big enough.

We now construct two examples to show that the conditions of Theorem 1.6 are sharp.

Let tkm be integers such that \(t\ge 3, k\ge 2, m \ge 1\) and let \(l=k(t-2)\). Let D be a complete graph with \(k+1\) vertices \(u_1, u_2, \ldots , u_{k+1}\). Let \(D_1, D_2, \ldots , D_{k(t-2)+1}\) be copies of the graph \(K_m\). Let \(v_1, v_2, \ldots , v_{k(t-2)+1}\) be vertices which are not in \(V(D)\cup V(D_1)\cup V(D_2)\cup \cdots \cup V(D_{k(t-2)+1})\). For each \(i\in \{1,2,\ldots ,k\},\) join \(u_i\) to all vertices of the graphs \(D_{(i-1)(t-2)+1}, D_{(i-1)(t-2)+2}, \ldots , D_{i(t-2)} \) and join \(u_{k+1}\) to all vertices of the graph \(D_{k(t-2)+1}\). Join \(v_j\) to all vertices of \(D_j\) for all \(j\in \{1,2,\ldots , k(t-2)+1\}\). Then, the resulting graph G is a \(K_{1,t}\)-free graph (see Fig. 1).

Fig. 1
figure 1

Graph G

Moreover, we have \(|G|=k+1+(k(t-2)+1)(m+1)\) and

$$\begin{aligned} \sigma ^4_{l+1}(G)&=\sigma ^4_{k(t-2)+1}(G)=\sum \limits _{i=1}^{k(t-2)+1}\deg _G(v_i)\\&=(k(t-2)+1)m=|G|-k(t-1)-2=|G|-\left\lfloor \dfrac{l(t-1)}{t-2}\right\rfloor -2. \end{aligned}$$

But G has no spanning tree with l-ended stem. Hence, the condition (1.1) is sharp.

On the other hand, when \(l=t-2,\) let \(E_i(1\le i \le l+1)\) be connected graphs. For each \(i \in \{1, 2, \ldots ,l+1\}\), denote by \(K_i\) the set of vertex v in \(V(E_i)\) such that \(N_{E_i}(v)=V(E_i)-\{v\}\). Suppose that \(K_i\not = \emptyset \) for all indices \(1\le i \le l+1.\) Let u be a vertex which is not in \(V(E_1)\cup V(E_2)\cup \cdots \cup V(E_{l+1}).\) For each \(i\in \{1,2,\ldots ,l+1\},\) join u to all vertices in \(V(E_i)-K_i\) and some vertices in \(K_i\) excepting at least one vertex in \(K_i\). The resulting graph is denoted by M. We only consider the case M is a \(K_{1,t}\)-free graph. By the definition of M, we may obtain that each subset \(S\subseteq V(M)\) such that \(|S|=l+1\) and \(d_{M}(x,y)\geqslant 4\) must contain one and only one vertex in \(K_i\) for all \(1\le i \le l+1.\) Hence,

$$\begin{aligned} \sigma ^4_{l+1}(M)&=\sum \limits _{i=1}^{l+1}\deg _{M}(\text {one vertex}\ v_i \in K_i\ \text {such that}\ v_iu \not \in E(M))=\sum \limits _{i=1}^{l+1}(|E_i|-1)\\&=|M|-(l+2)=|M|-\left\lfloor \dfrac{l(t-1)}{t-2}\right\rfloor -1. \end{aligned}$$

But M has no spanning tree with l-ended stem.

A natural question is whether we can find all graphs so that the claim of Theorem 1.6 is not correct in the case \(l=t-2\). We will give an answer for this question. In particular, we state the following theorem which is an improvement of Theorem 1.6.

Theorem 1.8

For a positive integer \(t \ge 3,\) let G be a connected \(K_{1,t}\)-free graph and let \(l\ge 2\) be an integer. If

$$\begin{aligned} \sigma ^{4}_{l+1}(G)\geqslant |G|-\left\lfloor \dfrac{l(t-1)}{t-2}\right\rfloor -1, \end{aligned}$$

then G has a spanning tree with l-ended stem except for the case \(l=t-2\) and G is isomorphic to a graph M.

Remark 1.9

Since \(\sigma ^{4}_{l+1}(M)=|M|-\lfloor \dfrac{l(t-1)}{t-2}\rfloor -1\), it follows from Theorem 1.8 that if G is a connected \(K_{1,t}\)-free graph such that \(\sigma ^{4}_{l+1}(G)\geqslant |G|-\lfloor \dfrac{l(t-1)}{t-2}\rfloor \), then G has a spanning tree with l-ended stem.

2 Proof of Theorem 1.8

We prove the theorem by contradiction. Suppose to the contrary that G contains no spanning tree with l-ended stem. Let T be a tree such that \(|{\mathrm{Leaf}}({\mathrm{Stem}}(T))| \le l.\) Choose a tree T so that

  1. (T1)

    |T| is as large as possible, and

  2. (T2)

    \(|{\mathrm{Leaf}}(T)|\) is as large as possible, subject to (T1).

By the maximality of T, we have the following three claims. We note that their proofs are written in [2, 8], but for the convenience of readers, we reintroduce them here.

Claim 2.1

For every \(v\in V(G)-V(T), N_{G}(v)\subseteq {\mathrm{Leaf}}(T)\cup (V(G)-V(T))\).

Because G is connected and T is not a spanning tree of G and by Claim 2.1, there exist two vertices \(v_1\in V(G)-V(T)\) and \(v_2\in {\mathrm{Leaf}}(T)\) such that \(v_1v_2\in E(G)\). We may obtain that \({\mathrm{Stem}}(T)\) has exactly l leaves. Indeed, otherwise we consider the tree \(T'=T+v_1v_2.\) Then, \(T'\) has l-ended stem and \(|T'|>|T|\), this implies a contradiction with the maximality of T. Let \(\{x_1, x_2, \ldots , x_l\}\) be the leaf set of \({\mathrm{Stem}}(T)\).

Claim 2.2

For every \(x_{i}(1 \leqslant i \leqslant l)\), there exists a vertex \(y_{i}\in {\mathrm{Leaf}}(T)\) such that \(y_{i}\) is adjacent to \(x_{i}\) and \(N_{G}(y_{i})\subseteq {\mathrm{Leaf}}(T)\cup \left\{ x_{i}\right\} \).

Proof

By the definition of \({\mathrm{Stem}}(T),\) it is easy to see that for each leaf \(x\in {\mathrm{Leaf}}({\mathrm{Stem}}(T)),\) there exists at least a vertex y in \({\mathrm{Leaf}}(T)\) such that y is adjacent to x. Suppose that for some \(1\leqslant i\leqslant l\), each leave \(y_{i_j}\) of T adjacent to \(x_{i},\) is also adjacent to a vertex \(z_{i_j}\in (V({\mathrm{Stem}}(T))-\left\{ x_{i}\right\} )\). Then, we consider \(T'\) to be the tree obtained from T by removing the edge \(y_{i_j}x_{i}\) and adding the edge \(y_{i_{j}}z_{i_{j}}\). Hence, \(T'\) is a tree with l-end stem such that \(|T'|=|T|\) and \({\mathrm{Leaf}}(T')={\mathrm{Leaf}}(T)\cup \{x_i\}\), which contradicts the condition (T2). Therefore, for each \(x_i\), there exists a leaf \(y_i\in N_G(x_i)\) such that \(N_G(y_i)\cap (V({\mathrm{Stem}}(T))-\{x_i\})=\emptyset \). By the maximality of T we also see that \(N_{G}(y_i)\cap (V(G)-V(T))=\emptyset .\) The claim holds. \(\square \)

Claim 2.3

For any two distinct vertices \(y,z\in \left\{ v_1,y_{1},y_{2},\dots ,y_{l}\right\} ,d_{G}\left( y,z\right) \geqslant 4\).

Proof

First, we show that \(d_{G}\left( v_1,y_{i}\right) \geqslant 4\) for every \(1\leqslant i\leqslant l\). Let \(P_i\) be the shortest path connecting \(v_1\) and \(y_{i}\) in G. If all the vertices of \(P_i\) between \(v_1\) and \(y_{i}\) are contained in \({\mathrm{Leaf}}(T)\cup (V(G)-V(T))\cup \left\{ x_{i}\right\} ,\) add \(P_{i}\) to T (if \(P_{i}\) passes through \(x_{i}\), we just add the segment of \(P_{i}\) between \(v_1\) and \(x_{i})\) and remove the edges of T joining \(V(P_{i})\cap {\mathrm{Leaf}}(T)\) to \(V({\mathrm{Stem}}(T))\) except the edge \(y_{i}x_{i}.\) The resulting tree is denoted by \(T'.\) Then, \(T'\) is a tree in G with l-ended stem and \(|T'|>|T|\), which contradicts to the maximality of T. So we conclude that for each \(1\le j \le l,\) if P is a shortest path connecting \(v_{1}\) and \(y_{j}\) in G, then \(V(P)\cap (V({\mathrm{Stem}}(T))-\{x_j\})\not = \emptyset \).

Hence, we may choose the vertex s in \(V({\mathrm{Stem}}(T))\cap V(P_i)\) such that it is nearest to \(v_1\) in \(P_i\). If \(s=x_j\) for some \(1\le j\le l\), then we add the segment of \(P_{i}\) between \(v_1\) and \(x_j\) (which is denoted by Q) to T and remove the edges of T joining \(V(Q)\cap {\mathrm{Leaf}}(T)\) to \(V({\mathrm{Stem}}(T))\) except \(x_jy_j\). Hence, the resulting tree has l-ended stem and its order is greater then |T|, contradicting the maximality of T. Thus, \(s\in V({\mathrm{Stem}}(T))-\{x_1,\ldots ,x_l\}\). By Claims 2.1 and 2.2, we have \(d_G(v_1,s)\ge 2\), \(d_G(s,y_i)\ge 2.\) Therefore, we conclude that \(d_G(v_1,y_i)=|P_i|-1 \ge d_G(v_1,s)+d_G(s,y_i)\ge 4\).

Next, we show that \(d_{G}(y_{i},y_{j})\geqslant 4\) for all \(1\leqslant i<j\leqslant l\). Let \(P_{{\textit{ij}}}\) be the shortest path connecting \(y_{i}\) and \(y_{j}\) in G. We note that if \(P_{{\textit{ij}}}\) passes through \(x_{i}\) (or \(x_{j}\)), then \(y_{i}x_{i}\in E(P_{{\textit{ij}}})\) (or \(y_{j}x_{j}\in E(P_{{\textit{ij}}})\)), respectively. We consider the following two cases.

Case 1. All vertices of \(P_{{\textit{ij}}}\) between \(y_{i}\) and \(y_{j}\) are contained in \({\mathrm{Leaf}}(T)\cup (V(G)-V(T))\cup \left\{ x_{i},x_{j}\right\} \). Then, we add \(P_{{\textit{ij}}}\) to T and remove the edges of T joining \(V(P_{ij })\cap {\mathrm{Leaf}}(T)\) to \(V({\mathrm{Stem}}(T))\) except the edges \(y_{i}x_{i}\) and \(y_{j}x_{j}\). Hence, the resulting graph has exactly a cycle, which contains an edge e of \({\mathrm{Stem}}(T)\) incident with a branch vertex in \({\mathrm{Stem}}(T)\). By removing the edge e and by adding an edge \(v_1v_2\), we have a resulting tree \(T'\) with l-ended stem of order greater than |T|, which contradicts the maximality of T. So we conclude that for every \(1\le i < j \le l,\) if P is a shortest path connecting \(y_{i}\) and \(y_{j}\) in G, then \(V(P)\cap (V({\mathrm{Stem}}(T))-\{x_i, x_j\})\not = \emptyset .\)

Case 2. There exists a vertex \(s \in V(P_{{\textit{ij}}})\cap (V({\mathrm{Stem}}(T))-\{x_i,x_j\}).\) Then, \(d_G(y_i,s)\ge 2, d_G(s,y_j)\ge 2\) by Claim 2.2. This concludes that \(d_G(y_i,y_j)=|P_{{\textit{ij}}}| -1\ge d_G(y_i,s)+d_G(s,y_j)\ge 4\).

So the assertion of the claim holds. \(\square \)

Denote \(Y=\left\{ y_{1},y_2,\ldots ,y_{l}\right\} \). By Claims 2.12.3, we have

$$\begin{aligned} N_{G}(v_1)&\subseteq (V(G)-V(T)-\left\{ v_1\right\} )\cup (N_{G}(v_1)\cap ({\mathrm{Leaf}}(T)-Y)),\\ \displaystyle \bigcup _{i=1}^{l}N_{G}(y_{i})&\subseteq ({\mathrm{Leaf}}(T)-Y-N_{G}(v_1))\cup \left\{ x_{1},\dots ,x_{l}\right\} . \end{aligned}$$

Hence by setting \(q=|N_{G}(v_1)\cap ({\mathrm{Leaf}}(T)-Y)|\), we obtain

$$\begin{aligned} \begin{aligned} \deg _{G}(v_1)+\displaystyle \sum \limits _{i=1}^{l}\deg _{G}(y_{i})&\leqslant (|G|-|T|-1+q)+(|{\mathrm{Leaf}}(T)|-l-q)+l\\&=|G|-|{\mathrm{Stem}}(T)|-1. \end{aligned} \end{aligned}$$

On the other hand, by the assumption of Theorem 1.8, and by Claim 2.3, we have

$$\begin{aligned} |G|-\left\lfloor \dfrac{l(t-1)}{t-2}\right\rfloor -1\le \sigma ^4_{l+1}(G)\le \deg _{G}(v_1)+\displaystyle \sum \limits _{i=1}^{l}\deg _{G}(y_{i}). \end{aligned}$$

Therefore, we obtain \(|{\mathrm{Stem}}(T)|\le \lfloor \dfrac{l(t-1)}{t-2}\rfloor \). By combining with \(|{\mathrm{Leaf}}({\mathrm{Stem}}(T))|=l\), we conclude that

$$\begin{aligned} |{\mathrm{Stem}}({\mathrm{Stem}}(T))|\le \left\lfloor \dfrac{l}{t-2}\right\rfloor . \end{aligned}$$
(2.1)

Claim 2.4

\(N_G(v_2)\cap \{x_1,x_2,\ldots ,x_l\}=\emptyset \).

Proof

Suppose the assertion of the claim is false. Then, there exists some \(i \in \{1,\ldots ,l\}\) such that \(v_2x_i \in E(G).\) Combining with the fact that \(v_2v_1 \in E(G)\) and \(x_iy_i \in E(G)\) (by Claim 2.2), we obtain that \(d_G(v_1, y_i) \le 3.\) This contradicts Claim 2.3. Claim 2.4 is proved. \(\square \)

Now, we complete the Proof of Theorem 1.8 by considering the following two steps.

Step 1. \(|{\mathrm{Stem}}({\mathrm{Stem}}(T))|=1\).

We assume that \({\mathrm{Stem}}({\mathrm{Stem}}(T))=\{u\}\). By \(t\ge 3\) and \(|{\mathrm{Stem}}({\mathrm{Stem}}(T))|\le \lfloor \dfrac{l}{t-2}\rfloor \), we obtain \(l\ge t-2.\) We consider the following two cases.

Case 1. \(l \ge t- 1.\)

By combining with Claims 2.3 and 2.4, G induced a \(K_{1,t}\) subgraph with the vertex set \(\{u, x_1, x_2,\ldots ,x_{t-1},v_2\}\), this gives a contradiction.

Case 2.\(l= t-2\). In this case, we will show that G is isomorphic to a graph M.

For each \(X\subseteq V(G),\) we denoted by G[X] the subgraph of G induced by X. For each \(j \in \{1, 2,\ldots , l\}\), we set \(E_j = G[(N_G(x_j) - \{u\})\cup N_G(y_j)]\) and \(E_{l+1}=G[(V(G)-\cup _{i=1}^lV(E_{i}))- \{u\}]\). For each \(1\le j \le l,\) by the maximality of T, we obtain that \(N_G(x_j) \subseteq V(T)\). Moreover, since \(d_G(y_i, y_j) \ge 4\) for all \(1\le i \not =j \le l\), we obtain \(x_ix_j\not \in E(G).\) Hence, \(N_G(x_j) \subseteq V(T)-\{x_1,x_2,\ldots ,x_l\}.\) Then, combining with Claim 2.2 and the definition of \(E_j\), we conclude \(V(E_j)\subseteq {\mathrm{Leaf}}(T)\cup \{x_j\}\) for each \(j\in \{1,2,\ldots ,l\}.\) Hence, \(V(G)-V(T) \subseteq V(E_{l+1}).\) On the other hand, since \(d_G(v_1, y_j) \ge 4\), it implies that \(v_2\not \in V(E_j)\) for all \(1\le j \le l.\) Hence \(v_2 \in V(E_{l+1})\) (see Fig. 2).

Fig. 2
figure 2

\(E_j\) (\(1\le j \le l+1\))

By using the same arguments in the proofs of Claim 2.3, we conclude again the following fact.

Fact 1

For each \(1\le j \le l,\) if P is a shortest path connecting \(v_{1}\) and \(y_{j}\) in G, then \(V(P)\cap (V({\mathrm{Stem}}(T))-\{x_j\})\not = \emptyset ,\) and for every \(1\le i < j \le l,\) if P is a shortest path connecting \(y_{i}\) and \(y_{j}\) in G, then \(V(P)\cap (V({\mathrm{Stem}}(T))-\{x_i, x_j\})\not = \emptyset .\)

We now give the following facts:

Fact 2

For every \(1\le i < j \le l+1,\) then \(V(E_i) \cap V(E_j) =\emptyset \).

Proof

By the definition of \(E_{l+1}\) we obtain that \(V(E_i) \cap V(E_{l+1}) =\emptyset \) for all \(1\le i \le l\).

Now, assume that there exists a vertex \(x\in V(E_i)\cap V(E_j)\) for some \(1\le i < j \le l.\) If \(x\in N_G(x_i)\cap N_G(x_j)\), then \(x\in {\mathrm{Leaf}}(T).\) Consider the path P in G with its vertex set \(\{y_i, x_i, x, x_j, y_j\}.\) By combining with \(d_G(y_i, y_j) \ge 4\), we obtain that P is a shortest path connecting \(y_i\) and \(y_j\) in G. But \(V(P)\cap (V({\mathrm{Stem}}(T))-\{x_i, x_j\})= \emptyset ,\) which contradicts Fact 1. Otherwise, without loss of generality, we may assume that \(x\in N_G(y_i)\cap N_G(x_j)\) (or \(x\in N_G(y_i)\cap N_G(y_j)\)). Then, \(d_G(y_i,y_j)\le 3\) (or \(d_G(y_i,y_j)\le 2\) respectively), this contradicts Claim 2.3. Fact 2 is proved. \(\square \)

Fact 3

For each \(1\le i < j \le l+1,\) if \(x\in V(E_i), y\in V(E_j)\), then \(xy\not \in E(G)\).

Proof

Suppose to the contrary that there exist two vertices \(x\in V(E_i), y\in V(E_j) (1\le i < j \le l+1)\) such that \(xy\in E(G).\)

Subcase 1. \(1\le i < j \le l.\)

If \(x \in N_G(y_i)\) and \(y\in N_G(y_j)\), then \(d_G(y_i, y_j) \le 3.\) This contradicts Claim 2.3.

If \(x \in N_G(y_i)\) and \(y\in N_G(x_j),\) we consider the path P in G with its vertex set \(\{y_i, x, y, x_j, y_j\}.\) By combining with \(d_G(y_i, y_j) \ge 4\), we obtain \(y\not =y_j\), and then P is a shortest path connecting \(y_i\) and \(y_j\) in G. But \(V(P)\cap (V({\mathrm{Stem}}(T))-\{x_i, x_j\})= \emptyset ,\) which contradicts Fact 1. By the same arguments, we also give a contradiction if \(x \in N_G(x_i)\) and \(y\in N_G(y_j)\).

If \(x \in N_G(x_i)\) and \(y\in N_G(x_j),\) remove the edges connecting x and y to \(V({\mathrm{Stem}}(T))\) in T. After that add the edges \(x_ix, xy, yx_j\) and \(v_1v_2\) and remove the edge \(x_ju.\) Then, the resulting tree \(T'\) has l-ended stem and \(|T'|>|T|\), this contradicts the maximality of T.

The subcase 1 is proved.

Subcase 2.\(1\le i < j=l+1\).

Firstly, we show that \(N_G(v_1)\cap V(E_a)=\emptyset \) for all \(1\le a \le l.\) Indeed, suppose to the contrary that there exists a vertex \(z\in N_G(v_1)\cap V(E_a).\) If \(z\in N_G(x_a)\), then we consider the path P in G with its vertex set \(\{v_1, z, x_a, y_a\}.\) This is a contradiction with \(d_G(v_1, y_a) \ge 4.\) Otherwise, \(z\in N_G(y_a)\), then \(d_G(v_1, y_a) \le 2.\) This also gives a contradiction with \(d_G(v_1, y_a)\ge 4.\) Therefore, we conclude that \(N_G(v_1)\cap V(E_a)=\emptyset \) for all \(1\le a \le l\). In particular, we obtain \(N_G(v_1)\subseteq V(E_{l+1})-\{v_1\}\).

Secondly, we prove that \(\deg _G(y_a)=|E_{a}|-1\) for all \(1\le a \le l\) and \(\deg _G(v_1)=|E_{l+1}|-1.\) Indeed, for each \(1\le a \le l,\) by Claim 2.2 and the definition of \(E_a\), we obtain \(N_G(y_a)\subseteq V(E_a)-\{y_a\}.\) By combining the assumptions of Theorem 1.8, Claim 2.3, Fact 2 and \(N_G(v_{1})\subseteq V(E_{l+1})-\{v_1\}\), we have

$$\begin{aligned} |G|-\left\lfloor \dfrac{l(t-1)}{t-2}\right\rfloor -1&\le \sigma ^4_{l+1}(G) \le \sum \limits _{a=1}^{l}\deg _{G}(y_a)+\deg _G(v_1)\\&\le \sum \limits _{a=1}^{l+1}(|E_a|-1)=|G|-l-2 =|G|-\left\lfloor \dfrac{l(t-1)}{t-2}\right\rfloor -1. \end{aligned}$$

Therefore, the equalities happen. Hence, \(\deg _{G}(y_a)=|E_a|-1\) for every \(1\le a \le l\) and \(\deg _G(v_1)=|E_{l+1}|-1,\) in particular we obtain \(N_G(v_1)=V(E_{l+1})-\{v_1\}\).

Finally, since \(x\in V(E_i)\) and \(y\in V(E_{l+1})\) such that \(xy \in E(G),\) then \(y\not =v_1\) (by \(N_G(v_1)\cap V(E_i)=\emptyset \)) and \(yv_1 \in E(G)\) (by \(N_G(v_1)=V(E_{l+1})-\{v_1\}\)). If \(x\in N_G(x_i)\), then we consider the path P in G with its vertex set \(\{v_1, y, x, x_i, y_i\}.\) Since \(d_G(v_1, y_i) \ge 4\), this implies that P is a shortest path connecting \(v_1\) and \(y_i\) in G. This is a contradiction with Fact 1. Otherwise, \(x\in N_G(y_i)\), then \(d_G(v_1, y_i) \le 3\). This also gives a contradiction with \(d_G(v_1, y_i)\ge 4\). Therefore, we obtain that \(xy\not \in E(G)\) for all \(x\in V(E_i), y\in V(E_{l+1})\). This completes the proof of the subcase 2.

Therefore, Fact 3 holds. \(\square \)

Fact 4

For each \(j\in \{1, 2, \ldots , l+1\},\)\(E_j\) is connected. Moreover, for every \(w\in V(E_j)\) such that \(uw \not \in E(G),\) then \(N_G(w)= V(E_j) - \{w\}\) and \(\deg _G(w)=|E_j|-1\).

Proof

Set \(y_{l+1}= v_1\). In the proof of subclaim 2 of Fact 3, we conclude that \(\deg _{G}(y_j)=|E_j|-1\). This implies that \(N_G(y_j)=V(E_j)-\{y_j\}\). Hence, \(E_j\) is connected.

Now, by Fact 2, Fact 3, the definition of \(E_a\) and \(E_a\) is connected for all \(a\in \{1, 2, \ldots ,l+1\}\), the graph \(G[V(G)-\{u\}]\) is disconnected and has \(l+1\) components \(E_1,\ldots , E_{l+1}\). Then, for every \(1\le a < b\le l+1,\) if P is a path connecting two vertices \(x\in E_a\) and \(y\in E_{b}\), then P must pass through u. So for every \(x\in E_a, y\in E_b\) such that \(xu\not \in E(G)\) and \(yu\not \in E(G)\), then \(d_G(x,y) \ge 4.\) In particular, \(d_G(w,y_a) \ge 4\) for all \(1\le a\le l+1, a \not = j.\) Moreover, by Fact 3 and \(wu\not \in E(G)\), we have \(N_G(w)\subseteq V(E_j)-\{w\}.\) Hence, by Facts 2 and 3 and the assumptions of Theorem 1.8, we obtain

$$\begin{aligned} |G|-\left\lfloor \dfrac{l(t-1)}{t-2}\right\rfloor -1&\le \sigma ^4_{l+1}(G) \le \deg _{G}(w)+\sum \limits _{a=1,a\not =j}^{l+1}\deg _{G}(y_a) \\&\le \sum \limits _{a=1}^{l+1}(|E_a|-1)=|G|-l-2 =|G|-\left\lfloor \dfrac{l(t-1)}{t-2}\right\rfloor -1. \end{aligned}$$

Therefore, the equalities happen. So \(\deg _G(w)=|E_j|-1\), and we thus also obtain \(N_G(w)= V(E_j) - \{w\}\). These complete the proof of Fact 4. \(\square \)

For each \(1\le i \le l+1,\) denote by \(K_i\) the set of vertex w in \(V(E_i)\) such that \(N_{E_i}(w)=V(E_i)-\{w\}\). Then, for every \(1\le i \le l+1,\)\(y_i \in K_i\) and in particular \(K_i\not = \emptyset .\) On the other hand, by Facts 3 and 4, we can see that if \(w\in V(E_i)\) such that \(uw \not \in E(G),\) then \(N_{E_i}(w)=N_G(w)=V(E_i)-\{w\}.\) Hence, \(w \in K_i\) and u joins to all vertices in \(V(E_i)-K_i\) for all \(1\le i \le l+1.\) Therefore, using the definitions of \(E_j\ (1\le j\le l+1)\) and Facts 14, we obtain that G is isomorphic to a graph M.

Hence, we conclude that if \(l=t-2\), then G is isomorphic to a graph M.

Step 2. \(|{\mathrm{Stem}}({\mathrm{Stem}}(T))|\ge 2\).

By Claim 2.4, there exists a vertex \(v_3\in N_G(v_2)\cap V({\mathrm{Stem}}({\mathrm{Stem}}(T)))\).

Now, we conclude that \(|N_T(v_3)\cap \{x_1,x_2,\ldots ,x_l\}|<t-2\). Indeed, otherwise, without loss of generality, we may assume \(x_1,x_2,\ldots ,x_{t-2}\in N_T(v_3)\). Since \(|{\mathrm{Stem}}({\mathrm{Stem}}(T))| \ge 2,\) there exists \(s\in V({\mathrm{Stem}}({\mathrm{Stem}}(T)))\cap N_T(v_3)\). We consider the subgraph with the vertex set \(\{v_3, v_2, s, x_1, x_2,\ldots ,x_{t-2}\}\) in G. By combining with Claim 2.4, the fact that G is \(K_{1,t}\)-free and since \(\{x_1,\ldots ,x_{t-2}\}\) is an independent set by Claim 2.3, we have the following two cases.

Case 1.\(sv_2\in E(G)\). This implies that the tree \(T'=T+sv_2+v_2v_1-sv_3\) has l-ended stem and \(|T'|>|T|\), this contradicts to the maximality of T.

Case 2.\(x_js \in E(G)\) for some \(j \in \{1, \ldots , t-2\}.\) Then, we consider the tree \(T'=T+x_js+v_2v_1-sv_3.\) Hence, \(T'\) has l-ended stem and \(|T'|>|T|\), this also contradicts to the maximality of T.

Therefore, \(|N_T(v_3)\cap \{x_1,x_2,\ldots ,x_l\}|<t-2\).

Now, if \(|N_T(u)\cap \{x_1,x_2,\ldots ,x_l\}|\le t-2\) for all \(u\in V({\mathrm{Stem}}({\mathrm{Stem}}(T)))-\{v_3\},\) then combining with \(|N_T(v_3)\cap \{x_1,x_2,\ldots ,x_l\}|<t-2\), we have

$$\begin{aligned} l&=|{\mathrm{Leaf}}({\mathrm{Stem}}(T))|< (t-2)|{\mathrm{Stem}}({\mathrm{Stem}}(T))-\{v_3\}|+ t-2\\&=(t-2)|{\mathrm{Stem}}({\mathrm{Stem}}(T))|\\&\le (t-2)\left\lfloor \dfrac{l}{t-2}\right\rfloor \le l\ (\text {by }(2.1)). \end{aligned}$$

This is a contradiction. Hence, there exists a vertex \(u\in V({\mathrm{Stem}}({\mathrm{Stem}}(T)))\) such that \(|N_T(u)\cap \{x_1,x_2,\ldots ,x_l\}|\ge t-1\). Without loss of generality, we may assume \(x_1,x_2,\ldots ,x_{t-1}\in N_T(u)\). Set \(s\in V({\mathrm{Stem}}({\mathrm{Stem}}(T)))\cap N_T(u)\). Now, if \(x_js \in E(G)\) for some \(j \in \{1, \ldots , t-1\}\), then we consider the tree \(T'=T+x_js+v_2v_1-su.\) Hence, \(T'\) has l-ended stem and \(|T'|>|T|\), this also contradicts to the maximality of T. Hence, we obtain \(x_js \not \in E(G)\) for all \(j \in \{1, \ldots , t-1\}.\) Then, G induces a \(K_{1,t}\) subgraph with vertex set \(\{u, s, x_1,x_2,\ldots ,x_{t-1}\}\). This gives a contradiction with the assumption of Theorem 1.8.

Therefore, we complete the Proof of Theorem 1.8.