1 Introduction

Throughout this paper, all graphs considered are simple and finite graphs. We follow the most common graph-theoretical terminology and for concepts and notations not defined here, see [1].

A 2-factor of a graph G is a spanning subgraph whose components are cycles. In particular, a hamiltonian graph has a 2-factor with exactly one component. There are many results on the existence of 2-factors with a given number of components, mainly on the existence of hamiltonian graphs, see the survey paper [5]. The line graph \(L\!(G)\) of a graph G is the graph with vertex set \(E\!(G)\), in which two vertices are adjacent if, and only if, the corresponding edges have a common end vertex in G. The n-time iterated line graph \(L^n\!(G)\) is defined to be \(L\!(L^{n-1}(G))\), and we assume that \(E\!(L^{n-1}(G))\) is not empty. The hamiltonian index of a graph G is the minimum nonnegative integer n such that \(L^n\!(G)\) is hamiltonian, denoted by \(h\!(G)\), the interested readers can consult [4]. The Hamilton-connected index of a graph G is the minimum nonnegative integer n such that \(L^n\!(G)\) is Hamilton-connected, i.e., any two vertices in \(L^n\!(G)\) are connected by a Hamilton path. We know that the Hamilton problem, i.e., the problem to decide whether a given graph is hamiltonian, is one of the classical NP-complete problems. In [8], the authors have proved that it is NP-hard to determine whether \(L^k\!(G)\) is hamiltonian even for any large integer k. Thus, it is also NP-hard to determine the minimum number of components of a 2-factor in \(L^k\!(G)\) for any large integer k. Wang and Xiong [10] provided an upper bound of minimum number of components of 2-factors in iterated line graph. In present paper, we consider the similar problem and determine the minimum number of components of 2-factors in iterated line graph of some special graphs. Before presenting our main results, we first introduce some additional terminology and notation.

A branch is a nontrivial path whose internal vertices have degree two and end vertices have degree other than two. The number of edges in a branch B is said to be its length, denoted by \(l\!(B)\). We denote by \({\mathcal {B}}\!(G)\) the set of branches of G. Note that a branch of length one has no internal vertex. A branch B of a graph G is called a cut-branch if the subgraph obtained from G by deleting all edges and internal vertices of B has more components than G, and we denote by \({\mathcal {CB}}\!(G)\) the set of all cut-branches of G. Let \({\mathcal {B}}_2\!(G)=\{ B\in {\mathcal {CB}}\!(G): \mathrm{\ both\ end\ vertices\ of\ } B\mathrm{\ have\ degree\ at\ least\ 3 \ in\ } G \}\) and \({\mathcal {B}}_1\!(G)=\{ B\in {\mathcal {CB}}\!(G): \mathrm{\ at\ least\ one\ end\ vertex\ of\ } B\mathrm{\ has\ degree\ 1\ in\ } G \}\), then it is obvious that \({\mathcal {CB}}\!(G)={\mathcal {B}}_1\!(G)\cup {\mathcal {B}}_2\!(G).\)

For \(i\in \{1,2\},\) define

$$\begin{aligned} h_i(G)={\left\{ \begin{array}{ll} max\{l(B){:}B\in {\mathcal {B}}_i(G)\},&{}\quad \text {if }{\mathcal {B}}_i(G) \hbox { is not empty,}\\ 0, &{}\quad \text {otherwise}. \end{array}\right. } \end{aligned}$$

Now we state the main results as follows.

Theorem 1

Let G be a connected graph with \(h_1\!(G)\le h_2\!(G)-1\) and \(h_2\!(G)\ge 2\), such that every nontrivial component of the graph obtained from G by deleting all cut edges and by attaching at least three pendent edges at all vertices of degree at least 3 in G has hamiltonian index at most \(h_2\!(G)-1\). Then

  1. (1)

    \(L^{h_2(G)-2}(G)\) has no 2-factor;

  2. (2)

    if \(h_2\!(G)\ge 3,\) then the minimum number of components of 2-factors in \(L^{h_2(G)-1}(G)\) is

    $$\begin{aligned} \Big |\big \{B\in {\mathcal {B}}_2(G){:}l(B)\in \{h_2(G)-1, h_2(G)\}\big \}\Big |+1; \end{aligned}$$
  3. (3)

    the minimum number of components of 2-factors in \(L^{h_2(G)}(G)\) is

    $$\begin{aligned} \Big |\big \{B\in {\mathcal {B}}_2(G){:}l(B)= h_2(G)\big \}\Big |+1; \end{aligned}$$
  4. (4)

    \(L^{h_2(G)+1}(G)\) is hamiltonian.

Theorem 2

Let G be a connected graph with \(h_1\!(G)\ge h_2\!(G)\ge 1\), such that every nontrivial component of the graph obtained from G by deleting all cut edges and by attaching at least three pendent edges at all vertices of degree at least three in G has hamiltonian index at most \(h_1\!(G)\). Then

  1. (1)

    \(L^{h_1(G)-1}(G)\) and \(L^{h_2(G)-1}(G)\) have no 2-factor;

  2. (2)

    if \(h_1(G)=h_2(G)\ge 2,\) then the minimum number of components of 2-factors in \(L^{h_1(G)}(G)\) is \(|\{B\in {\mathcal {B}}_2(G): l(B)= h_2(G)\}|+1;\)

  3. (3)

    if \(h_1(G)=h_2(G)\ge 1,\) then \(L^{h_1(G)+1}(G)\) is hamiltonian;

  4. (4)

    if \(h_1(G)>h_2(G)\ge 1,\) then \(L^{h_1(G)}(G)\) is hamiltonian.

The proofs of Theorems 1 and 2 will be given in Sect. 3.

The authors in [4] gave a formula of the hamiltonian index \(h\!(T)\) for a tree T. We shall extend the result. Eminjan and Elkin [3] gave a relation between hamiltonian index and Hamilton-connected index of trees.

Since every nontrivial component of the graph obtained from T by deleting all cut edges and by attaching at least three pendent edges at all vertices of degree at least 3 in G has hamiltonian index at most \(h_2\!(T)-1\) under the condition \(h_1\!(T)\le h_2\!(T)-1\) and \(h_2\!(T)\ge 2\), which satisfies the condition of Theorem 1. Let \(l=max\{l(B){:}B\in {\mathcal {B}}_2(T)\},\) and \({\mathcal {B}}_2(T)={\mathcal {B}}(T){\setminus }{\mathcal {B}}_1(T)\), then we consequently have the following conclusion.

Corollary 3

Let \(l\ge 2\) and let T be a tree with \(l(B)\le l-1\) for any \(B\in {\mathcal {B}}_1(T)\). Then

  1. (1)

    \(L^{l-2}(T)\) has no 2-factor;

  2. (2)

    if \(l\ge 3,\) then the minimum number of components of 2-factors in \(L^{l-1}(T)\) is

    $$\begin{aligned} \Big |\big \{B\in {\mathcal {B}}(T)\setminus {\mathcal {B}}_1(T):\big |E(B)\big |\in \{l-1, l\}\big \}\Big |+1; \end{aligned}$$
  3. (3)

    the minimum number of components of 2-factors in \(L^{l}(T)\) is

    $$\begin{aligned} \Big |\big \{B\in {\mathcal {B}}(T)\setminus {\mathcal {B}}_1(T):\big |E(B)\big |= l\big \}\Big |+1; \end{aligned}$$
  4. (4)

    \(L^{l+1}(T)\) is hamiltonian.

By Corollary 3 and Theorem 2, we can obtain the following result:

Corollary 4

(Chartrand and Wall [4]) If T is a tree which is not a path, then

$$\begin{aligned} h(T)= max\{h_2(T)+1, h_1(T)\}. \end{aligned}$$

Proof

By Corollary 3 (4), we have \(h(T)=h_2(T)+1\) if \(h_1(T)\le h_2(T)-1\) and \(h_2(T)\ge 2\). Since any tree T with \(h_1(T)\ge h_2(T)\ge 1\) satisfies the condition of Theorem 2, then we have \(h(T)\le h_2(T)+1\) if \(h_1(T)= h_2(T)\ge 1\), and \(h(T)\le h_1(T)\) if \(h_1(T)> h_2(T)\ge 1\) by (3) and (4) of Theorem 2. Again by Theorem 2 (1), \(h(T)>h_1(T)-1\) and \(h(T)>h_2(T)-1.\) Above all, we can obtain \(h(T)=max\{h_2(T)+1, h_1(T)\}\). \(\square \)

2 Preliminaries and Notations

As noted in the first section, for graph-theoretic notation not explained in this paper, we refer readers to [1]. Let \(G=(V(G),E(G))\) be a graph with vertex set V(G) and edge set E(G). For a nonnegative integer k, we define \(V_k(G)\) by \(V_k(G)=\{x\in V(G):d_G(x)=k\}\), where \(d_G(x)\) is the degree of x in G. Given two subgraphs \(G_1\) and \(G_2\), we define the distance \(d_G(G_1, G_2)\) between \(G_1\) and \(G_2\) by \(d_G(G_1, G_2)=\min \{d_G(x_1, x_2):x_1\in V(G_1), x_2\in V(G_2)\}\). For subgraphs \(G_1\)\(G_2,\dots , G_k\), their union \(G_1\cup G_2\cup \dots \cup G_k\) is the graph whose vertex set and edge set are \(V(G_1)\cup V(G_2)\cup \dots \cup V(G_k)\) and \(E(G_1)\cup E(G_2)\cup \dots \cup E(G_k)\), respectively. For \(S\subseteq V(G)\), we denote by G[S] the subgraph of G induced by S.

A circuit is a connected graph with at least three vertices in which every vertex has even degree. A set of vertices S is said to dominate G if each edge of G has at least one end vertex in S. A circuit of G is called a dominating circuit of G if every edge of G either belongs to the circuit or is adjacent to an edge of the circuit. For a graph G of order at least three, its subgraph H is called a k-system that dominates if it comprises k edge-disjoint stars (\(K(1,s),s\ge 3\)) and circuits, such that each edge of G is either contained in one of the circuits or stars, or is adjacent to one of the circuits. Harary and Nash-Williams [7] showed that for a connected graph G with at least three edges, L(G) has a hamiltonian cycle if and only if G has a dominating circuit. This characterization has been widely employed to study the properties of cycles in line graphs and iterated line graphs, see [2]. In 1999, Gould and Hynds presented a necessary and sufficient condition for the line graph L(G) of a graph G that has a 2-factor with exactly k components.

Lemma 5

(Gould and Hynds [6]) Let G be a graph such that each component of G has at least three edges. Then L(G) has a 2-factor with exactly k components if and only if G has a k-system that dominates.

We let \(EU_n^k(G)\) denote the set of subgraphs H of G satisfying the following five conditions:

  1. (I)

    H is an even graph;

  2. (II)

    \(V_0(H)\subseteq \bigcup \limits _{i\ge 3} V_i(G) \subseteq V(H)\);

  3. (III)

    \(|E(B)|\le n+1\) for any branch B with \(E(B)\cap E(H) =\emptyset \);

  4. (IV)

    \(|E(B)|\le n\) for any branch B in \({\mathcal {B}}_1(G)\);

  5. (V)

    H can be decomposed into at most k pairwise vertex-disjoint subgraphs \(H_1,\dots , H_t\) (\(t\le k\)) such that for every j and for every induced subgraph F of \(H_j\) with \(\emptyset \ne V(F)\subsetneq V(H_j)\), it holds \(d_G(F, H_j-V(F))\le n-1\).

In [11], Xiong and Liu considered iterated line graphs and gave a characterization of the graphs G for which \(L^n(G)\) is hamiltonian for \(n\ge 2\), which has been used to study the hamiltonian index. We state it as follows.

Lemma 6

(Xiong and Liu [11]) Let G be a connected graph with at least three edges. Then for \(n\ge 2\), \(L^n(G)\) is hamiltonian if and only if \(EU_n^1(G)\not =\emptyset .\)

Saito and Xiong in [9] showed that the following result, which extends Lemma 6.

Lemma 7

(Saito and Xiong [9]) Let G be a connected graph with at least three edges and let k be a positive integer. Then for \(n\ge 2\), \(L^n(G)\) has a 2-factor with at most k components if and only if \(EU_n^k(G)\not =\emptyset .\)

Next, we provide the proofs of Theorem 1 and Theorem 2.

3 Proofs of Main Results

Proof of Theorem 1

(1) Let \(B\in {\mathcal {B}}_2(G)\) and \(l(B) = h_2(G).\) Then B becomes a branch \(B^{\prime }\) of length 2 in \(L^{h_2(G)-2}(G),\) whose end vertices belong to two distinct components. Let u be the vertex of degree 2 in \(B^{\prime }\), then u does not belong to any 2-factor component of \(L^{h_2(G)-2}(G).\) Thus, \(L^{h_2(G)-2}(G)\) has no 2-factor. \(\square \)

(2) Assume that the minimum number of components of 2-factors in \(L^{h_2(G)-1}(G)\) is k and let \(\big |\big \{B\in {\mathcal {B}}_2(G): l(B)\in \{h_2(G)-1, h_2(G)\}\big \}\big |=s.\)

Let \(G_1, G_2,\ldots , G_t\) be the components of the graph obtained from G by deleting all edges and inner vertices of any branch in \(\big \{B\in {\mathcal {B}}_2(G): l(B)\in \{h_2(G)-1, h_2(G)\}\big \}.\) It is obvious that \(G_1, G_2,\ldots , G_t\) are pairwise vertex-disjoint and \(l(B)\le h_2(G)-2\) for any branch \(B\in {\mathcal {B}}_2(G_j)\cap {\mathcal {B}}_2(G), 1\le j\le t.\) Contracting \(G_j\) to a vertex, the resulting graph becomes a tree, then \(t=s+1\) since \(|V(T)|=|E(T)|+1\) in a tree T. Since any possible 2-factor has at least one component in every \(L^{h_2(G)-1}(G_j),\) then \(k\ge s+1.\) Now we verify that \(k\le s+1.\) By Lemma 7, we need to prove that \(EU_{h_2(G)-1}^{s+1}(G)\not =\emptyset .\)

Assume that every \(G_j~(1\le j\le s+1)\) is composed of \(i_j\) nontrivial components \(G_{j,1},\;G_{j,2},\ldots ,G_{j,i_{j}}\) of the graph obtained from G by deleting all cut edges and by attaching at least three pendent edges at all vertices of degree at least 3 in G, i.e., \(G_j=\bigcup _{k=1}^{i_j}G_{j,~k}.\) Then \(G_{j,1},G_{j,2},\ldots ,G_{j,i_{j}}\) are pairwise vertex-disjoint and \(h(G_{j,k})\le h_2(G)-1\) for \(1\le k\le i_j, 1\le j\le s+1\) by the hypothesis of Theorem 1. By Lemma 6, \(EU_{h_2(G)-1}^{1}(G_{j,k})\not =\emptyset .\) Suppose \(H_{j,k}\in EU_{h_2(G)-1}^{1}(G_{j,k}),~ 1\le j\le s+1,~1\le k\le i_j.\) Then \(H_{j,k}\) satisfies (I)-(V) in the definition of \(EU_{h_2(G)-1}^{1}(G_{j,k})\), and \(H_{j,1},\; H_{j,2},\; \ldots ,\;H_{j,i_j}\) are pairwise vertex-disjoint. Let \(H_j=\bigcup _{k=1}^{i_j}H_{j,k}, 1\le j\le s+1.\) Next, we verify that \(H_{j}\in EU_{h_2(G)-1}^{1}(G_{j}),~ 1\le j\le s+1.\)

Since \(H_{j,k}\) is even graph and \({H_{j,k}}^{,}s\) are mutually vertex-disjoint subgraphs, then \(H_j\) is even graph, and (I) follows. Since \(V_0(H_{j,k})\subseteq \bigcup _{i\ge 3}V_i(G_{j,k})\subseteq V(H_{j,k})\), \(1\le k\le i_j,\;\bigcup _{k=1}^{i_j}V_0(H_{j,k})\subseteq \bigcup _{k=1}^{i_j}\bigcup _{i\ge 3}V_i(G_{j,k})\subseteq \bigcup _{k=1}^{i_j}V(H_{j,k}),\) then \(V_0(H_j)\subseteq \bigcup _{i\ge 3}V_i(G_j)\subseteq V(H_j),\) and (II) follows. Let \(B^{\prime }\) be any branch with \(E(B^{\prime })\cap E(H_j)=\emptyset .\) Assume that \(|E(B^{\prime })|\ge h_2(G)+1,\) which contradicts that \(H_{j,k}\) satisfies (III) of the definition of \(EU_{h_2(G)-1}^{1}(G_{j,k})\), then \(|E(B^{\prime })|\le h_2(G)\), and (III) follows. By the hypothesis of Theorem 1, we have \(|E(B^{\prime \prime })|\le h_2(G)-1\) for any branch \(B^{\prime \prime }\in {\mathcal {B}}_1(G_j)\), and (IV) follows. For any induced subgraph F of \(H_j\) with \(\emptyset \not = V(F)\subsetneq V(H_{j}).\) If \(F\cap H_{j,k}\not = \emptyset ,\) then \(d_{G_{j}}(F, H_{j}-V(F))= d_{G_{j,k}}(F, H_{j,k}-V(F))\le h_2(G)-2\) by the fact that \(H_{j,k}\) satisfies (V) in the definition of \(EU_{h_2(G)-1}^{1}(G_{j,k}).\) If \(F\cap H_{j,k}= \emptyset ,\) then \(d_{G_{j}}(F, H_{j}-V(F))\le h_2(G)-2\). Thus, \(d_{G_{j}}(F, H_{j}-V(F))\le h_2(G)-2\) for any induced subgraph F of \(H_j\) with \(\emptyset \not = V(F)\subsetneq V(H_{j}),\) and (V) follows. Then \(H_{j}\in EU_{h_2(G)-1}^{1}(G_{j}),\;1\le j \le s+1.\) Then \(H_j\) satisfies (I)-(V) in the definition of \(EU_{h_2(G)-1}^{1}(G_j)\), and \(H_1, H_2, \ldots , H_{s+1}\) are pairwise vertex-disjoint. Let \(H=\bigcup _{j=1}^{s+1}H_j.\) Then we shall prove \(H\in EU_{h_2(G)-1}^{s+1}(G)\), i.e., we shall show that H satisfies the conditions (I)-(V) for \(n=h_2(G)-1\) and \(k=s+1\) in Lemma 7.

Since \(H_j\) is even graph and disjoint union of even graphs is still even graph, H is even graph, and (I) follows. Further, \(V_0(H_j)\subseteq \bigcup _{i\ge 3}V_i(G_j)\subseteq V(H_j)\), \(1\le j\le s+1,\;\bigcup _{j=1}^{s+1}V_0(H_j)\subseteq \bigcup _{j=1}^{s+1}\bigcup _{i\ge 3}V_i(G_j)\subseteq \bigcup _{j=1}^{s+1}V(H_j),\) then \(V_0(H)\subseteq \bigcup _{i\ge 3}V_i(G)\subseteq V(H),\) and (II) follows. Let B be a branch of G with \(E(B)\cap E(H)=\emptyset .\) Assume that \(|E(B)|\ge h_2(G)+1,\) which contradicts \(h_2(G)= max\{l(B): B\in {\mathcal {B}}_2(G)\},\) hence (III) follows. (IV) is obvious by the hypothesis of Theorem 1.

Next, we verify that H satisfies (V). By the construction of H, H can be decomposed into \(s+1\) pairwise vertex-disjoint subgraphs \(H_1, H_2, \ldots , H_{s+1},\) and for every j and for every induced subgraph F of \(H_j\) with \(\emptyset \not = V(F)\subsetneq V(H_j),\) we have \(d_{G_j}(F, H_j-V(F))\le h_2(G)-2\) by the condition (V) of \(EU_{h_2(G)-1}^{1}(G_{j}).\) Furthermore, \(d_G(F, H_j-V(F))=d_{G_j}(F, H_j-V(F))\le h_2(G)-2\) for every j and the same F, then (V) follows. Hence, \(H\in EU_{h_2(G)-1}^{s+1}(G).\) Therefore, \(k=s+1.\) \(\square \)

(3) The proof is similar to the proof of (2). Assume that the minimum number of components of 2-factors in \(L^{h_2(G)}(G)\) is \(k^{\prime }\) and let \(\big |\big \{B\in {\mathcal {B}}_2(G): l(B)= h_2(G)\big \}\big |=s^{\prime }.\)

Let \(G_1^{\prime }, G_2^{\prime }, \ldots , G_t^{\prime }\) be the components of the graph obtained from G by deleting all edges and inner vertices of any branch in \(\big \{B\in {\mathcal {B}}_2(G):l(B)=h_2(G)\big \},\) then \(G_1^{\prime }, G_2^{\prime }, \ldots , G_t^{\prime }\) are pairwise vertex-disjoint and \(l(B)\le h_2(G)-1\) for any branch \(B\in {\mathcal {B}}_2(G_j^{\prime })\cap {\mathcal {B}}_2(G), 1\le j\le t.\) Contracting \(G_j^{\prime }\) to a vertex, the resulting graph becomes a tree, then \(t=s^{\prime }+1.\) Since any possible 2-factor has at least one component in every \(L^{h_2(G)}(G_j^{\prime }),\) then \(k^{\prime }\ge s^{\prime }+1.\) It remains to verify that \(k^{\prime }\le s^{\prime }+1.\) By Lemma 7, we need to prove that \(EU_{h_2(G)}^{s^{\prime }+1}(G)\not =\emptyset .\)

Assume that every \(G_j^{\prime }~(1\le j\le s^{\prime }+1)\) is composed of \(i_j\) nontrivial components \(G_{j,1}^{\prime },\;G_{j,2}^{\prime },\;\ldots ,\;G_{j,i_{j}}^{\prime }\) of the graph obtained from G by deleting all cut edges and by attaching at least three pendent edges at all vertices of degree at least 3 in G, i.e., \(G_j^{\prime }=\bigcup _{q=1}^{i_j}G_{j,~q}^{\prime }.\) Then \(G_{j,1}^{\prime },G_{j,2}^{\prime },\ldots ,G_{j,i_{j}}^{\prime }\) are pairwise vertex-disjoint, and \(h(G_{j,q}^{\prime })\le h_2(G)-1\) for \(1\le q\le i_j, 1\le j\le s^{\prime }+1\) by the hypothesis of Theorem 1. This means that \(L^{h_2(G)-1}(G_{j,q}^{\prime })\) has a hamiltonian cycle. Then \(L^{h_2(G)}(G_{j,q}^{\prime })\) is hamiltonian. By Lemma 6, there exists a subgraph \(H_{j,q}^{\prime }\) of \(G_{j,q}^{\prime }\) such that \(H_{j,q}^{\prime }\in EU_{h_2(G)}^{1}(G_{j,q}^{\prime }),~1\le q\le i_j,~ 1\le j\le s^{\prime }+1.\) Let \(H_j^{\prime }=\bigcup _{q=1}^{i_j}H_{j,q}^{\prime }, 1\le j\le s^{\prime }+1.\) Now, we shall show that \(H_{j}^{\prime }\in EU_{h_2(G)}^{1}(G_{j}^{\prime }),~ 1\le j\le s^{\prime }+1.\)

Since \({H_{j,q}^{\prime }}^{,}s\) (\(1\le j\le s^{\prime }+1,\;1\le q\le i_j\)) are mutually vertex-disjoint even subgraphs, and hence \(H_j^{\prime }\) is also even subgraph, and (I) follows. Since \(V_0(H_{j,q}^{\prime })\subseteq \bigcup _{i\ge 3}V_i(G_{j,q}^{\prime })\subseteq V(H_{j,q}^{\prime })\), \(1\le q\le i_j,\;\bigcup _{q=1}^{i_j}V_0(H_{j,q}^{\prime })\subseteq \bigcup _{q=1}^{i_j}\bigcup _{i\ge 3}V_i(G_{j,q}^{\prime })\subseteq \bigcup _{q=1}^{i_j}V(H_{j,q}^{\prime }),\) then \(V_0(H_j^{\prime })\subseteq \bigcup _{i\ge 3}V_i(G_j^{\prime })\subseteq V(H_j^{\prime }),\) and (II) follows. Let \(B^{\prime }\) be any branch with \(E(B^{\prime })\cap E(H_j^{\prime })=\emptyset .\) Assume that \(|E(B^{\prime })|\ge h_2(G)+2,\) which contradicts the fact that \(H_{j,q}^{\prime }\) satisfies (III) of the definition of \(EU_{h_2(G)}^{1}(G_{j,q}^{\prime })\), then \(|E(B^{\prime })|\le h_2(G)+1\), and hence (III) follows. (IV) is obviously true by the hypothesis of Theorem 1. By the fact that \(H_{j,q}^{\prime }\) satisfies (V) of the definition of \(EU_{h_2(G)}^{1}(G_{j,q}^{\prime })\), we have \(d_{G_{j}^{\prime }}(F, H_{j}^{\prime }-V(F))= d_{G_{j,q}^{\prime }}(F, H_{j,q}^{\prime }-V(F))\le h_2(G)-1\) for any induced subgraph F of \(H_j^{\prime }\) with \(\emptyset \not = V(F)\subsetneq V(H_{j}^{\prime })\) if \(F\cap H_{j,q}^{\prime }\not = \emptyset \), and \(d_{G_{j}^{\prime }}(F, H_{j}^{\prime }-V(F))\le h_2(G)-1\) if \(F\cap H_{j,q}^{\prime }= \emptyset \). Thus, \(d_{G_{j}^{\prime }}(F, H_{j}^{\prime }-V(F))\le h_2(G)-1\) for any induced subgraph F of \(H_j^{\prime }\) with \(\emptyset \not = V(F)\subsetneq V(H_{j}^{\prime }),\) and (V) follows. Then \(H_{j}^{\prime }\in EU_{h_2(G)}^{1}(G_{j}^{\prime }),\;1\le j \le s^{\prime }+1.\) Let \(H^{\prime }=\bigcup _{j=1}^{s^{\prime }+1}H_j^{\prime }.\) Then we shall verify that \(H^{\prime }\) satisfies the conditions (I)-(V) in the definition of \(EU_{h_2(G)}^{s^{\prime }+1}(G).\)

\(H^{\prime }\) is even graph since it is composed of those vertex-disjoint even subgraphs \({H_j^{\prime }}\), and (I) follows. Since \(H_j^{\prime }\) satisfies (II) in the definition of \(EU_{h_2(G)}^{1}(G_j^{\prime }),\) we have \(V_0(H_j^{\prime })\subseteq \bigcup _{i\ge 3}V_i(G_j^{\prime })\subseteq V(H_j^{\prime })\), \(1\le j\le s^{\prime }+1.\) Then \(\bigcup _{j=1}^{s^{\prime }+1}V_0(H_j^{\prime })\subseteq \bigcup _{j=1}^{s^{\prime }+1}\bigcup _{i\ge 3}V_i(G_j^{\prime })\subseteq \bigcup _{j=1}^{s^{\prime }+1}V(H_j^{\prime }),\) that is, \(V_0(H^{\prime })\subseteq \bigcup _{i\ge 3}V_i(G)\subseteq V(H^{\prime }),\) and (II) follows. Let B be any branch of G with \(E(B)\cap E(H^{\prime })=\emptyset .\) Then \(|E(B)|\le h_2(G)\le h_2(G)+1,\) (III) follows. (IV) is obvious by the hypothesis of Theorem 1.

By the construction of \(H^{\prime }\) and \(H_j^{\prime }\) satisfies (V) in the definition of \(EU_{h_2(G)}^{1}(G_j^{\prime }),\;H^{\prime }\) can be decomposed into \(s^{\prime }+1\) pairwise vertex-disjoint subgraphs \(H_1^{\prime }, H_2^{\prime }, \cdots , H_{s^{\prime }+1}^{\prime },\) and for every j and for every induced subgraph F of \(H_j^{\prime }\) with \(\emptyset \not = V(F)\subsetneq V(H_j^{\prime }),\) it holds \(d_{G_j^{\prime }}(F, H_j^{\prime }-V(F))\le h_2(G)-1.\) Since \(d_G(F, H_j^{\prime }-V(F))=d_{G_j^{\prime }}(F, H_j^{\prime }-V(F))\le h_2(G)-1\) for every j and the same F, \(H^{\prime }\) satisfies (V). Hence, \(H^{\prime }\in EU_{h_2(G)}^{s^{\prime }+1}(G).\) \(\square \)

(4) By Theorem 1 (2), we have that \(L^{h_2(G)-1}(G)\) has a 2-factor which has at least \(s+1\) components. Let \(L^{h_2(G)-1}(G)=G^*\), we need to prove that \(EU_{2}^{1}(G^*)\not =\emptyset .\)

Assume that \(H_j\) is a 2-factor component of \(L^{h_2(G)-1}(G),~1\le j\le s+1.\) Let \(H=\bigcup _{j=1}^{s+1}H_j\). Then H is a 2-factor of \(G^*\) since \(\{H_j,~1\le j\le s+1\}\) is pairwise vertex-disjoint. It is obvious that H is an even graph of \(G^*\), and (I) follows. Since \(V_0(H)=\emptyset \) and H is a 2-factor of \(G^*\), \(\emptyset =V_0(H)\subseteq \bigcup _{i\ge 3}V_i(G^*)\subseteq V(H)\), and (II) follows. Let B be a branch with \(E(B)\cap E(H)=\emptyset .\) Then \(|E(B)|=1\le 2+1\) by H is a 2-factor of \(G^*\), hence (III) follows. (IV) holds by the hypothesis of Theorem 1. Now, we prove (V). Assume, by contradiction, that \(d_{G^*}(F, H-V\!(F))\ge 2\) for some induced subgraph F of H with \(\emptyset \not = V\!(F)\subsetneq V\!(H).\) This implies that there exists a branch B of length at least 2 between F and \(H-F\). Let x be the vertex of degree 2 in B, then \(x\in V(B)\setminus V(H)\). This contradicts the fact that H is a 2-factor of \(G^*\), hence H satisfies (V). Therefore, \(H\in EU_{2}^{1}(G^*).\) By Lemma 6, \(L^{2}(G^*)=L^{h_2(G)+1}(G)\) is hamiltonian. \(\square \)

Proof of Theorem 2

(1) Let \(B\in {\mathcal {B}}_1(G)\) and \(l(B) = h_1(G).\) Then B becomes a branch \(B^{\prime }\) with an end vertex of degree 1 in \(L^{h_1(G)-1}(G)\) and \(L^{h_2(G)-1}(G)\), respectively. Therefore, \(L^{h_1(G)-1}(G)\) and \(L^{h_2(G)-1}(G)\) have no 2-factor. \(\square \)

(2) Assume that the minimum number of components of 2-factors in \(L^{h_1(G)}(G)\) is \(k^{\prime \prime }\) and let \(\big |\{B\in {\mathcal {B}}_2(G): l(B)= h_2(G)=h_1(G)\}\big |=s^{\prime \prime }.\)

Let \(G_1^{\prime \prime }, G_2^{\prime \prime }, \ldots , G_t^{\prime \prime }\) be the components of the graph obtained from G by deleting all edges and internal vertices of any branch in \(\big \{B\in {\mathcal {B}}_2(G): l(B)= h_2(G)=h_1(G)\ge 2 \big \}.\) Then \(G_1^{\prime \prime }, G_2^{\prime \prime }, \ldots , G_t^{\prime \prime }\) are pairwise vertex-disjoint, and \(l(B)\le h_1(G)-1\) for any branch \(B\in {\mathcal {B}}_2(G_j^{\prime \prime })\cap {\mathcal {B}}_2(G), 1\le j\le t.\) Contracting \(G_j^{\prime \prime }\) to a vertex, the resulting graph becomes a tree, then \(t=s^{\prime \prime }+1\) since \(|V(T)|=|E(T)|+1\) in a tree T. Since any possible 2-factor has at least one component in every \(L^{h_1(G)}(G_j^{\prime \prime }),\) then \(k^{\prime \prime }\ge s^{\prime \prime }+1.\) Next, we shall prove that \(k^{\prime \prime }\le s^{\prime \prime }+1.\) According to Lemma 7, we shall prove that \(EU_{h_1(G)}^{s^{\prime \prime }+1}(G)\not =\emptyset .\)

Assume that every \(G_j^{\prime \prime }~(1\le j\le s^{\prime \prime }+1)\) comprises \(i_j\) nontrivial components \(G_{j,1}^{\prime \prime },\;G_{j,2}^{\prime \prime },\;\ldots ,\;G_{j,i_{j}}^{\prime \prime }\) of the graph obtained from G by deleting all cut edges and by attaching at least three pendent edges at all vertices of degree at least 3 in G, that is, \(G_j^{\prime \prime }=\bigcup _{q=1}^{i_j}G_{j,q}^{\prime \prime }.\) It is obvious that \(G_{j,1}^{\prime \prime },G_{j,2}^{\prime \prime },\ldots ,G_{j,i_{j}}^{\prime \prime }\) are pairwise vertex-disjoint. By the hypothesis of Theorem 2, \(h(G_{j,q}^{\prime \prime })\le h_1(G)\) for \(1\le q\le i_j, 1\le j\le s^{\prime \prime }+1.\) By Lemma 6, \(EU_{h_1(G)}^{1}(G_{j,q}^{\prime \prime })\not =\emptyset .\) We may take \(H_{j,q}^{\prime \prime }\in EU_{h_1(G)}^{1}(G_{j,q}^{\prime \prime }),\;1\le j\le s^{\prime \prime }+1,~1\le q\le i_j,\) then \(H_{j,q}^{\prime \prime }\) satisfies (I)-(V) in the definition of \(EU_{h_1(G)}^{1}(G_{j,q}^{\prime \prime })\), and \({H_{j,q}^{\prime \prime }}^{,}s\) are mutually vertex-disjoint subgraphs. Let \(H_j^{\prime \prime }=\bigcup _{q=1}^{i_j}H_{j,q}^{\prime \prime }, 1\le j\le s^{\prime \prime }+1.\) Next, we shall show that \(H_{j}^{\prime \prime }\in EU_{h_1(G)}^{1}(G_{j}^{\prime \prime }),\;1\le j\le s^{\prime \prime }+1.\)

Since \({H_{j,q}^{\prime \prime }}^{,}s\) are mutually vertex-disjoint even subgraphs, \(H_j^{\prime \prime }\) is even graph, and (I) follows. Since \(V_0(H_{j,q}^{\prime \prime })\subseteq \bigcup _{i\ge 3}V_i(G_{j,q}^{\prime \prime })\subseteq V(H_{j,q}^{\prime \prime })\), \(1\le q\le i_j,\) and \(\bigcup _{q=1}^{i_j}V_0(H_{j,q}^{\prime \prime })\;\subseteq \; \bigcup _{q=1}^{i_j}\bigcup _{i\ge 3}V_i(G_{j,q}^{\prime \prime })=\bigcup _{i\ge 3}V_i(G_j^{\prime \prime })\;\subseteq \; \bigcup _{q=1}^{i_j}V(H_{j,q}^{\prime \prime }),\) then \(V_0(H_j^{\prime \prime })\subseteq \bigcup _{i\ge 3}V_i(G_j^{\prime \prime })\subseteq V(H_j^{\prime \prime }),\) and (II) follows. Let \(B^{\prime }\) be any branch with \(E(B^{\prime })\cap E(H_j^{\prime \prime })=\emptyset .\) Assume that \(|E(B^{\prime })|\ge h_1(G)+2,\) which contradicts the fact that \(H_{j,q}^{\prime \prime }\) satisfies (III) of \(EU_{h_1(G)}^{1}(G_{j,q}^{\prime \prime })\), then \(|E(B^{\prime })|\le h_1(G)+1\), and (III) follows. (IV) is obvious by the hypothesis of Theorem 2. By the fact that \(H_{j,q}^{\prime \prime }\) satisfies (V) of the definition of \(EU_{h_1(G)}^{1}(G_{j,q}^{\prime \prime })\), we have \(d_{G_{j}^{\prime \prime }}(F, H_{j}^{\prime \prime }-V(F))= d_{G_{j,q}^{\prime \prime }}(F, H_{j,q}^{\prime \prime }-V(F))\le h_1(G)-1\) for any induced subgraph F of \(H_j^{\prime \prime }\) with \(\emptyset \not = V(F)\subsetneq V(H_{j}^{\prime \prime })\) when \(F\cap H_{j,q}^{\prime \prime }\not = \emptyset \), and \(d_{G_{j}^{\prime \prime }}(F, H_{j}^{\prime \prime }-V(F))\le h_1(G)-1\) when \(F\cap H_{j,q}^{\prime \prime }= \emptyset \). Then \(d_{G_{j}^{\prime \prime }}(F, H_{j}^{\prime \prime }-V(F))\le h_1(G)-1\) for any induced subgraph F of \(H_j^{\prime \prime }\) with \(\emptyset \not = V(F)\subsetneq V(H_{j}^{\prime \prime }),\) and hence (V) follows. Then \(H_{j}^{\prime \prime }\in EU_{h_1(G)}^{1}(G_{j}^{\prime \prime }),\;1\le j \le s^{\prime \prime }+1.\) Let \(H^{\prime \prime }=\bigcup _{j=1}^{s^{\prime \prime }+1}H_j^{\prime \prime }.\) Next, we show that \(H^{\prime \prime }\in EU_{h_1(G)}^{s^{\prime \prime }+1}(G)\).

Since \(H_j^{\prime \prime }\) satisfies (I) and (II) of the definition of \(EU_{h_1(G)}^{1}(G_j^{\prime \prime })\), it is easy to deduce \(H^{\prime \prime }\) is even graph and \(V_0(H^{\prime \prime })\subseteq \bigcup _{i\ge 3}V_i(G)\subseteq V(H^{\prime \prime }),\) then (I) (II) follow. Let B be a branch of G with \(E(B)\cap E(H^{\prime \prime })=\emptyset .\) Then \(|E(B)|\le h_2(G)\le h_2(G)+1=h_1(G)+1,\) and (III) follows. It is obvious that \(|E(B)|\le h_1(G)\) for any branch B in \({\mathcal {B}}_1(G)\), (IV) follows.

Now, we verify that (V) holds. By the construction of \(H^{\prime \prime }\), \(H^{\prime \prime }\) can be decomposed into \(s^{\prime \prime }+1\) pairwise vertex-disjoint subgraphs \(H_1^{\prime \prime }, H_2^{\prime \prime }, \cdots , H_{s^{\prime \prime }+1}^{\prime \prime },\) and for every j and for every induced subgraph F of \(H_j^{\prime \prime }\) with \(\emptyset \not = V(F)\subsetneq V(H_j^{\prime \prime }),\) we have \(d_{G_j^{\prime \prime }}(F, H_j^{\prime \prime }-V(F))\le h_1(G)-1\) by the fact that \(H_j^{\prime \prime }\) satisfies (V) of the definition of \(EU_{h_1(G)}^{1}(G_{j}^{\prime \prime }).\) Furthermore, \(d_G(F, H_j^{\prime \prime }-V(F))=d_{G_j^{\prime \prime }}(F, H_j^{\prime \prime }-V(F))\le h_1(G)-1\) for every j and the same F, then (V) follows. Hence, \(H^{\prime \prime }\in EU_{h_1(G)}^{s^{\prime \prime }+1}(G).\) \(\square \)

(3) According to Lemma 6, we need to prove that \(EU_{h_1(G)+1}^{1}(G)\not =\emptyset \) when \(h_1(G)=h_2(G)\ge 1\). Let \(G_1,G_2,\ldots ,G_q\) be those nontrivial components of the graph obtained from G by deleting all cut edges and by attaching at least three pendent edges at all vertices of degree at least 3 in G. Then we have \(h(G_i)\le h_1(G)\) by the hypothesis of Theorem 2. It implies that \(L^{h_1(G)+1}(G_i)\) is hamiltonian. By Lemma 6, there exists a subgraph \(H_i\in EU_{h_1(G)+1}^{1}(G_i)\), \(1\le i \le q\). Then \(H_1,\;H_2\), \(\ldots ,H_q\) (some of these subgraphs maybe isolated vertices because there maybe some vertices \({v_k}^{,}s\) in G such that \(d_G(v_k)\ge 3\) and the edges incident to \(v_k\) are all cut edges) are pairwise vertex-disjoint. Let \(H=\bigcup _{i=1}^{q}H_i.\) Then H is even graph since \({H_{i}}^{,}s\) are mutually vertex-disjoint even subgraphs, and (I) follows. Since \(V_0(H_i)\subseteq \bigcup _{i\ge 3}V_i(G_i)\subseteq V(H_i)\) (\(1\le i \le q\)), \(\bigcup _{i=1}^{q}V_0(H_i)\subseteq \bigcup _{i=1}^{q}\bigcup _{i\ge 3}V_i(G_i)=\bigcup _{i\ge 3}V_i(G)\subseteq \bigcup _{i=1}^{q}V(H_i),\) then \(V_0(H)\subseteq \bigcup _{i\ge 3}V_i(G)\subseteq V(H),\) (II) follows. Since \(|E(B^{\prime })|\le h_1(G)+2\) for any branch \(B^{\prime }\) with \(E(B^{\prime })\cap E(H_i)=\emptyset \) by \(H_i\) satisfies (III) in the definition of \(EU_{h_1(G)+1}^{1}(G_i),\) and \(|E(B^{\prime \prime })|\le h_2(G)=h_1(G)\le h_1(G)+2\) for any branch \(B^{\prime \prime }\in {\mathcal {B}}_2(G)\), then \(|E(B)|\le h_1(G)+2\) for any branch B of G with \(E(B)\cap E(H)=\emptyset ,\) and (III) follows. (IV) follows from the fact that \(|E(B)|\le h_1(G)\le h_1(G)+1\) for any branch B in \({\mathcal {B}}_1(G)\). For any induced subgraph F of H with \(\emptyset \not = V(F)\subsetneq V(H),\) we have \(d_{G}(F, H-V(F))= d_{G_i}(F, H_{i}-V(F))\le h_1(G)\) if \(F\cap H_{i}\not = \emptyset \) by the fact that \(H_{i}\) (Here \(H_i\) is the subgraph which is not an isolated vertex) satisfies (V) of the definition of \(EU_{h_1(G)+1}^{1}(G_{i}).\) If \(F\cap H_{i}= \emptyset ,\) then \(d_{G}(F, H-V(F))\le h_2(G)=h_1(G)\). Thus, \(d_{G}(F, H-V(F))\le h_1(G)\) for any induced subgraph F of H with \(\emptyset \not = V(F)\subsetneq V(H),\) and (V) follows. Then \(H\in EU_{h_1(G)+1}^{1}(G).\) \(\square \)

(4) Similar to the proof of Theorem 2 (3), we shall show that \(EU_{h_1(G)}^{1}(G)\not =\emptyset \) when \(h_1(G)>h_2(G)\ge 1\). We use \(G_i^{\prime }\) (\(1\le i \le q\)) to denote those components of the graph obtained from G by deleting all cut edges and by attaching at least three pendent edges at all vertices of degree at least 3 in G. Then \(h(G_i^{\prime })\le h_1(G)\) by the hypothesis of Theorem 2. This means that \(L^{h_1(G)}(G_i^{\prime })\) is hamiltonian. By Lemma 6, \(EU_{h_1(G)}^{1}(G_i^{\prime }) \not = \emptyset .\) Let \(H_i^{\prime }\in EU_{h_1(G)}^{1}(G_i^{\prime })\), \(1\le i \le q\), then \(H_1^{\prime },\;H_2^{\prime }\), \(\ldots ,H_q^{\prime }\) (some of these subgraphs maybe isolated vertices) are pairwise vertex-disjoint. Let \(H^{\prime }=\bigcup _{i=1}^{q}H_i^{\prime }.\) Then \(H^{\prime }\) is even graph and \(V_0(H^{\prime })\subseteq \bigcup _{i\ge 3}V_i(G)\subseteq V(H^{\prime })\) by the fact that \(H_i^{\prime }\) satisfies the conditions (I) and (II) in the definition of \(EU_{h_1(G)}^{1}(G_i^{\prime })\), and hence (I), (II) follow. Since \(|E(B^{\prime })|\le h_1(G)+1\) for any branch \(B^{\prime }\) with \(E(B^{\prime })\cap E(H_i^{\prime })=\emptyset \) by the fact that \(H_i^{\prime }\) satisfies (III) in the definition of \(EU_{h_1(G)}^{1}(G_i^{\prime }),\) and \(|E(B^{\prime \prime })|\le h_2(G)< h_1(G)+1\) for any branch \(B^{\prime \prime }\in {\mathcal {B}}_2(G)\), then \(|E(B)|\le h_1(G)+1\) for any branch B of G with \(E(B)\cap E(H^{\prime })=\emptyset ,\) and (III) follows. (IV) is obviously true. By the fact that \(H_i^{\prime }\) (Here \(H_i^{\prime }\) is the subgraph which is not an isolated vertex) satisfies the condition (V) in the definition of \(EU_{h_1(G)}^{1}(G_i^{\prime }),\) we have \(d_{G_i^{\prime }}(F, H_i^{\prime }-V(F))\le h_1(G)-1\) for every induced subgraph F of \(H_i^{\prime }\) with \(\emptyset \not = V(F)\subsetneq V(H_i^{\prime })\). Then \(d_{G}(F, H^{\prime }-V(F))= d_{G_i^{\prime }}(F, H_{i}^{\prime }-V(F))\le h_1(G)-1\) for any induced subgraph F of \(H^{\prime }\) if \(F\cap H_{i}^{\prime }\not = \emptyset \). If \(F\cap H_{i}^{\prime }= \emptyset ,\) then \(d_{G}(F, H^{\prime }-V(F))\le h_2(G)\le h_1(G)-1\). Thus, \(d_{G}(F, H^{\prime }-V(F))\le h_1(G)-1\) for any induced subgraph F of \(H^{\prime }\) with \(\emptyset \not = V(F)\subsetneq V(H^{\prime }),\) and hence (V) follows. Therefore, \(H^{\prime }\) \(\in EU_{h_1(G)}^{1}(G)\). \(\square \)

4 Remark

Our results in this paper provide two classes of graphs, such that as long as they satisfy the condition of Theorems 1 or 2, their iterated line graph has a 2-factor, and we determine the minimum number of components of 2-factors. Note that Theorem 1 is best possible in the sense: (1) The condition \(h_2(G)\ge 2\) can not be replaced by \(h_2(G)=1\). Otherwise, we have \(h_1(G)=h_2(G)-1=0\). However, the graphs satisfying the condition “\(h_1(G)=0,~ h_2(G)=1\)” could not reach the condition “every nontrivial component of the graph obtained from G by deleting all cut edges and by attaching at least three pendent edges at all vertices of degree at least 3 in G has hamiltonian index at most \(h_2(G)-1\)”. (2) The condition \(h_2(G)\ge 3\) in Theorem 1 (2) can not be replaced by \(h_2(G)\le 2\). This can be seen from the graph \(G^*\) in Fig. 1 with \(h_2(G^*)=2\), but there is no 2-factor in \(L^{h_2(G^*)-1}(G^*)=L(G^*)\). In addition, Theorem 2 is also best possible in the sense: The condition \(h_1(G)=h_2(G)\ge 2\) in Theorem 2 (2) can not be replaced by \(h_1(G)=h_2(G)=1\). This can be seen from the graph \(G^{**}\) in Fig. 1 with \(h_1(G^{**})=h_2(G^{**})=1\), but there is no 2-factor in \(L(G^{**})\).

Fig. 1
figure 1

Condition (2) in both Theorems 1 and 2 is sharp