1 Introduction

A signed graph \(\Gamma = (G, \sigma )\) is a graph \(G = (V(G), E(G))\) together with a function \(\sigma \) assigning \(+\,1\) or \(-\,1\) to each edge. The graph G is the underlying graph of \(\Gamma \) and is always considered to be simple and undirected throughout this paper. For a family \(\mathcal {F}\) of signed graphs, a signed graph \(\Gamma \) is said to be \(\mathcal {F}\)-free if \(\Gamma \) contains no member in \(\mathcal {F}\) as its subgraph. The family consisting of all \(\mathcal {F}\)-free graphs on n vertices is denoted by \(\mathbb {G}(n,\mathcal {F})\).

For a signed graph \(\Gamma =(G,\sigma )\) with vertex set \(V(G)=\{v_1,\ldots ,v_n\}\) and edge set E(G), the adjacency matrix of \(\Gamma \), denoted by \(A(\Gamma )=(a_{ij})_{n\times n}\), is defined to be an \(n\times n\) symmetric matrix satisfying that

$$\begin{aligned} a_{ij}=\left\{ \begin{aligned} +\,1,\ \ {}&\text {if}\quad \sigma (v_iv_j)=+\,1;\\ -\,1,\ \ {}&\text {if}\quad \sigma (v_iv_j)=-\,1;\\ 0, \ \ {}&\text {otherwise}. \end{aligned} \right. \end{aligned}$$

The spectrum of the signed graph \(\Gamma \), denoted by \(\text {Sp}(\Gamma )\), consists of all eigenvalues of \(A(\Gamma )\). The largest eigenvalue of \(A(\Gamma )\) is called the index of \(\Gamma \) and denoted by \(\lambda (\Gamma )\).

Signed graphs were initially studied in the context of social psychology by Cart-wright and Harary [6, 9]. Since then, the index of the signed graph has attracted much attention of scholars and been studied widely in the literature. For graphs with certain structures, Akbari et al. [3] determined signed graphs achieving the minimal or the maximal index in the class of unbalanced unicyclic graphs of order \(n\ge 3\). In addition, Yuan et al. [23] completely characterized the maximal signed graphs with signed cycles \(C_3\) or \(C_5\) as a star complement for (adjacency) eigenvalue \(-\,2\). Considering some classic graph parameters, Koledin and Stanić [12] studied connected signed graphs of fixed number of vertices, positive edges and negative edges that maximize the index of their adjacency matrices. Ghorbani and Majidi [8] determined the maximum index of complete signed graphs with n vertices and \(m\,(m\le n^2/4)\) negative edges and characterized the signed graphs achieving the maximum index, which settles (the corrected version of) a conjecture proposed by Koledin and Stanić [12]. Moreover, another conjecture on signed complete graphs was proposed in [12], which was also confirmed to be true for signed complete graphs whose negative edges form a tree by Akbari [1]. Recently, Stanić considered the perturbations in a signed graph and its index [20] and derived certain upper bounds for the index of a signed graph in terms of graph parameters [21]. More results on the adjacency spectra of signed graphs can be found in [2, 4].

For unsigned graphs, it is well known that spectral Turán-type problem is one of the most classical problems in spectral graph theory. In 2010, Nikiforov [16] proposed a spectral version of extremal graph theory problem, which is also known as Brualdi–Solheid–Turán-type problem, i.e.,

Problem 1

What is the maximal index of an H-free (unsigned) graph of order n?

Since then, much attention has been paid to the spectral Turán problem for various unsigned graphs in the past decades, such as \(K_r\)-free graphs [15, 22], \(K_{s,t}\)-free graphs [5, 15], \(C_4\)-free graphs [15, 17, 26], \(C_6\)-free graphs [24] and \(C_{2k+1}\)-free graphs [18]. For more excellent results, we refer the reader to [13, 14, 19, 25, 27] and references therein.

Let \(\Gamma =(G,\sigma )\) and \(U\subseteq V(G)\). Suppose that \(\Gamma ^*\) is obtained from \(\Gamma \) by reversing the sign of each edge between a vertex in U and a vertex in \(V(G)\backslash U\). Note that \(A(\Gamma ^*)=P^{-\,1}A(\Gamma )P\) for a diagonal matrix \(P=(p_{ij})\) with \(p_{ii}=-\,1\) if \(v_i\in U\) and \(p_{ii}=1\) if \(v_i\in V(G)\backslash U\). Then, \(\Gamma ^*\) is said to be switching equivalent to \(\Gamma \). Clearly, \(\text {Sp(}\Gamma ^*)=\text {Sp}(\Gamma )\).

For an unsigned graph H, we denote by \(H^+\) (resp., \(H^-\)) the signed graph obtained from H by assigning \(+\,1\) (resp., \(-\,1\)) to each edge of H, that is, \(H^+=(H,\sigma )\) such that \(\sigma (v_iv_j)=+1\) (resp., \(\sigma (v_iv_j)=-\,1\)) for each edge \(v_iv_j\in E(H)\). From Lemma 2.3 in an excellent paper by Huang [11], it can be seen that \(\lambda (\Gamma )\le \Delta (\Gamma )\le n-1\) for any signed graph \(\Gamma \), where \(\Delta (\Gamma )\) is the maximum degree of \(\Gamma \).

Note that \(\lambda (K_n^+)=n-1\). Hence, \(K_n^+\) always attains the maximum index among all \((H,\sigma )\)-free signed graphs of order n, where \((H,\sigma )\) is a signed graph containing at least one edge assigning \(-\,1\). Together with this property, motivated by Problem 1 and these works related to unsigned graphs mentioned above, we naturally consider the signed version of the spectral Turán-type problem.

Problem 2

What is the maximal index of an \(H^+\)-free signed graph of order n?

In this paper, as an answer to Problem 2, we, respectively, investigate the characterization of extremal graphs possessing the maximum index among all signed graphs with forbidden subgraphs in which all edges are positive, including signed complete subgraphs, signed cycles and signed even cycles. The rest of the paper is organized as follows. In Sect. 2, we give some essential notations and lemmas used further. In Sect. 3, for \(\mathbb {G}(n,K_s^+)\) with \(s\ge 2\), \(\mathbb {G}(n,\mathcal {C})\) with \(\mathcal {C}=\{C^+_l:3\le l\le n\}\) and \(\mathbb {G}(n,\mathcal {C}_{2k})\) with \(\mathcal {C}_{2k}=\{C^+_{2k}:2\le k\le \lfloor \frac{n}{2}\rfloor \}\) and \(n\ge 5\), we, respectively, characterize the extremal graphs possessing the maximum index among these three classes of graphs.

2 Preliminary

In this section, we shall give some notations and preliminaries that will be used in our proofs. For notations not given here and basic results on graph spectra, the reader is referred to [7].

For two disjoint and unsigned graphs \(G_1\) and \(G_2\), let \(G_1\oplus G_2\) be the join of \(G_1\) and \(G_2\) obtained from \(G_1\cup G_2\) by connecting all possible edges between \(V(G_1)\) and \(V(G_2)\). For two disjoint and signed graphs \(\Gamma _1\) and \(\Gamma _2\), let \(\Gamma _1\oplus \Gamma _2\) (resp., \(\Gamma _1\ominus \Gamma _2\)) be the join of \(\Gamma _1\) and \(\Gamma _2\) obtained from \(\Gamma _1\cup \Gamma _2\) by connecting all possible edges between \(V(\Gamma _1)\) and \(V(\Gamma _2)\) and assigning \(+\,1\) (resp., \(-\,1\)).

Let \(\Gamma =(G,\sigma )\) be a signed graph with vertex set \(V(\Gamma )\) and U be a subset of \(V(\Gamma )\). Let \(\Gamma [U]=(G[U],\sigma _{U})\) be the subgraph of \(\Gamma \) induced by U; that is, G[U] is an induced subgraph of G and \(\sigma _{U}(v_iv_j)=\sigma (v_iv_j)\) for each \(v_iv_j\in E(G[U])\). For two disjoint subsets \(U_1\) and \(U_2\) of \(V(\Gamma )\), denote by \(E(U_1,U_2)\) the set of edges with one endpoint in \(U_1\) and another one in \(U_2\).

Let us write \(T_{n,r}\) for the r-partite Turán graph of order n. That is, \(T_{n,r}\) is a complete r-partite graph of order n, whose partition sets are of size \(\lfloor n/r\rfloor \) or \(\lceil n/r\rceil \). Particularly, \(T_{n,1}\) denotes an empty graph of order n. Let \(S_n\) be the star of order n. A friendship graph \(F_k\) consists of k triangles which intersect in exactly one common vertex. Let \(F'_k\) be obtained from \(F_k\) by identifying a vertex of \(P_2\) with the vertex of degree 2k of \(F_k\).

Let \({\textbf {x }}\) be a unit eigenvector associated with the index \(\lambda (\Gamma )\) of a signed graph \(\Gamma \). It follows by the definition of an eigenvalue that \(\lambda (\Gamma )={\textbf {x}} ^\textrm{T}A(\Gamma ){\textbf {x}} \). Together with the well-known Courant–Fischer theorem [10], we have

$$\begin{aligned} \lambda (\Gamma )=\max _{{\textbf {y}} \in \mathbb {R}^n,\Vert {\textbf {y}} \Vert _2=1}{} {\textbf {y}} ^\textrm{T}A(\Gamma ){\textbf {y}} ={\textbf {x}} ^\textrm{T}A(\Gamma ){\textbf {x}}&=2\sum _{v_iv_j\in E(\Gamma )}\sigma (v_iv_j)x_{v_i}x_{v_j}\nonumber \\&=2\sum _{\sigma (v_iv_j)=+1}x_{v_i}x_{v_j}-2\sum _{\sigma (v_iv_j)=-1}x_{v_i}x_{v_j}. \end{aligned}$$
(1)

Moreover, for any \(u\in V(\Gamma )\),

$$\begin{aligned} \lambda (\Gamma )x_u=\sum _{v\in N_G(u)}\sigma (uv)x_v=\sum _{v\in N_G(u),\,\sigma (uv)=+1}x_v-\sum _{v\in N_G(u),\,\sigma (uv)=-1}x_v. \end{aligned}$$
(2)

In [15], Nikiforov proved the following result on unsigned graphs.

Lemma 1

[15] Let G be an unsigned graph of order n. If G is a \(K_{s+1}\)-free graph, then \(\lambda (G)< \lambda (T_{n,s})\) unless \(G =T_{n,s}\).

From Lemma 1, we can easily get the result below.

Lemma 2

[15] Let \(\Gamma ^+\) be a \(K_{s+1}^+\)-free graph of order n. Then,

$$\begin{aligned} \lambda (\Gamma ^+)\le \lambda (T_{n,s}^+). \end{aligned}$$

The equality holds if and only if \(\Gamma ^+=T_{n,s}^+\).

Next we will give a crucial lemma that will be used in our proofs.

Lemma 3

Suppose that \(\Gamma =(G,\sigma )\) is a graph attaining the maximum index among \(\mathbb {G}(n,H^{+})\). Let \( {{\textbf {x}}}=(x_1,x_2,\ldots ,x_n)^\textrm{T}\) be a unit eigenvector of \(A(\Gamma )\) corresponding to \(\lambda (\Gamma )\). Set \(V^+=\{v\in V(\Gamma ):x_v>0\}\), \(V^-=\{v\in V(\Gamma ):x_v<0\}\) and \(V^0=V(\Gamma )\backslash (V^+\cup V^-)\). Then, we have the following statements.

(1) For any two vertices \(u\in V^+\) and \(v\in V^-\), \(uv\in E(G)\) and \(\sigma (uv)=-1\).

(2) For each edge \(uv\in E(\Gamma [V^+])\cup E(\Gamma [V^-])\), \(\sigma (uv)=+1\).

(3) \(V^0=\varnothing \).

(4) Both \(\Gamma [V^+])\) and \(\Gamma [V^-]\) are \(H^+\)-free.

Proof of Lemma 3

Suppose that \(\Gamma =(G,\sigma )\) has the maximum index among all \(H^+\)-free graphs on n vertices. Let \({\textbf {x}} =(x_1,x_2,\ldots ,x_n)^\textrm{T}\) be a unit eigenvector of \(A(\Gamma )\) corresponding to \(\lambda (\Gamma )\). Set

$$\begin{aligned} V^+= & {} \{v\in V(\Gamma ):x_v>0\}, \\ V^-= & {} \{v\in V(\Gamma ):x_v<0\}, \\ V^0= & {} \{v\in V(\Gamma ):x_v=0\}. \end{aligned}$$

(1) Assume that there are two vertices \(u\in V^+\) and \(v\in V^-\) such that \(uv\notin E(G)\). Let \(\Gamma '=\Gamma +\{uv\}\) and \(\sigma _{\Gamma '}(uv)=-1\). Clearly, \(\Gamma '\) is \(H^+\)-free. By (1), we obtain that

$$\begin{aligned} \lambda (\Gamma ')-\lambda (\Gamma )&\ge {\textbf {x}} ^\textrm{T}A(\Gamma '){\textbf {x}} -{\textbf {x}} ^\textrm{T}A(\Gamma ){\textbf {x}} \\&=2\sigma _{\Gamma '}(uv)x_ux_v\\&=-2x_ux_v>0, \end{aligned}$$

since \(x_u>0\) and \(x_v<0\). This implies that \(\lambda (\Gamma ')>\lambda (\Gamma )\), which contradicts the maximality of \(\lambda (\Gamma )\).

Assume that there exists an edge \(uv\in E(V^+,V^-)\) with \(\sigma _\Gamma (uv)=+1\). Let \(\Gamma ''\) be the graph obtained from \(\Gamma \) by reversing the sign of uv. Clearly, \(\Gamma '\) is \(H^+\)-free. By (1), we obtain that

$$\begin{aligned} \lambda (\Gamma '')-\lambda (\Gamma )&\ge {\textbf {x}} ^\textrm{T}A(\Gamma ''){\textbf {x}} -{\textbf {x}} ^\textrm{T}A(\Gamma ){\textbf {x}} \\&=2\big (-\sigma _{\Gamma }(uv)\big )x_ux_v-2\sigma _{\Gamma }(uv)x_ux_v\\&=-4x_ux_v>0, \end{aligned}$$

since \(x_u>0\) and \(x_v<0\). This implies that \(\lambda (\Gamma '')>\lambda (\Gamma )\), which contradicts the maximality of \(\lambda (\Gamma )\). Hence, for any two vertices \(u\in V^+\) and \(v\in V^-\), we have \(uv\in E(G)\) and \(\sigma (uv)=-1\).

(2) Suppose, on the contrary, that there exists an edge \(uv\in E(\Gamma [V^+])\) with \(\sigma _\Gamma (uv)=-1\). Let \(\Gamma '=\Gamma -\{uv\}\), then \(\Gamma '\) is \(H^+\)-free. By (1), we obtain that

$$\begin{aligned} \lambda (\Gamma ')-\lambda (\Gamma )&\ge {\textbf {x}} ^\textrm{T}A(\Gamma '){\textbf {x}} -{\textbf {x}} ^\textrm{T}A(\Gamma ){\textbf {x}} \\&=-2\sigma _{\Gamma }(uv)x_ux_v\\&=2x_ux_v>0, \end{aligned}$$

since \(x_u>0\) and \(x_v>0\). This implies that \(\lambda (\Gamma ')>\lambda (\Gamma )\), which contradicts the maximality of \(\lambda (\Gamma )\). Hence, for each edge \(uv\in E(\Gamma [V^+])\), \(\sigma (uv)=+1\).

By a similar proof as above, we can show that for each edge \(uv\in E(\Gamma [V^-])\), \(\sigma (uv)=+1\).

(3) Suppose on the contrary that \(V^0\not =\varnothing \). Let \(w\in V^0\). Note that \(V^+\cup V^-\not =\varnothing \) (otherwise, \({\textbf {x}} \) is a zero vector). Without loss of generality, let \(V^+\not =\varnothing \) and u be a vertex in \(V^+\). If \(N_G(w)=\{u\}\), then by (2) we have \(\lambda (\Gamma )x_w=\sigma _{\Gamma }(wu)x_u\), implying \(x_u=0\), a contradiction. If \(N_G(w)\not =\{u\}\), we suppose \(\Gamma '=\Gamma -\{w'w:w'\in N_G(w)\}+\{uw\}\) and \(\sigma _{\Gamma '}(uw)=-1\). Clearly, \(\Gamma '\) is \(H^+\)-free. By (1), we obtain that

$$\begin{aligned} \lambda (\Gamma ')-\lambda (\Gamma )&\ge {\textbf {x}} ^\textrm{T}A(\Gamma '){\textbf {x}} -{\textbf {x}} ^\textrm{T}A(\Gamma ){\textbf {x}} \\&=2\sigma _{\Gamma '}(uw)x_wx_u-2\sum _{w'\in N_G(w)}\sigma _\Gamma (ww')x_wx_{w'}\\&=0, \end{aligned}$$

since \(x_w=0\). If \(\lambda (\Gamma ')=\lambda (\Gamma )\), then \({\textbf {x}} \) is an eigenvector of \(\Gamma '\) corresponding to \(\lambda (\Gamma ')\). By (2), it has \(\lambda (\Gamma ')x_w=\sigma _{\Gamma '}(wu)x_u=-x_u\). Then, \(x_u=0\), a contradiction. Hence, \(\lambda (\Gamma ')>\lambda (\Gamma )\), which contradicts the maximality of \(\lambda (\Gamma )\).

(4) Obviously. \(\square \)

Remark 2.1

In Lemma 3, we have proved \(V^0\) is an empty set. We may assert both the sets \(V^+\) and \(V^-\) are not empty. Suppose on the contrary that \(V^-=\varnothing \). (It is similar for \(V^+=\varnothing \).) By Lemma 3, we note G is not a complete graph. Let u be a vertex of degree less than \(n-1\) in \(V^+\), and \(\Gamma '\) the signed graph from \(\Gamma \) by reversing first the sign of each edge between u and a vertex in \(N_G(u)\) and then adding edges between u and \(V^+\backslash (\{u\}\cup N_G(u))\) with sign \(-\,1\). Clearly, \(\Gamma '\in \mathbb {G}(n,H^+)\). Define by \({\varvec{y}}\) the vector \({\varvec{x}}\) by replacing \(y_u\) with \(-x_u\). By (1), we have \(\lambda (\Gamma ')>\lambda (\Gamma )\), which contradicts the maximality of \(\Gamma \). Therefore, \(V^+\not =\varnothing \) and \(V^-\not =\varnothing \).

3 Main Results

In this section, we give our main results.

Theorem 1

If \(\Gamma =(G,\sigma )\in \mathbb {G}(n,K_s^+)\) with \(s\ge 2\), then

$$\begin{aligned} \lambda (\Gamma )\le \lambda (T_{n,2s-2}^+). \end{aligned}$$

The equality holds if and only if \(\Gamma =H_1^+\ominus H_2^+\), where \(H_i^+=T_{n_i,s-1}^+\) for \(i\in \{1,2\}\) such that \(n_1+n_2=n\) and \(H_1^+\oplus H_2^+=T_{n,2s-2}^+\).

Proof of Theorem 1

For \(s\ge 2\), suppose that \(\Gamma =(G,\sigma )\) has the maximum index among all \(K_s^+\)-free graphs with n vertices. Let \({\textbf {x}} =(x_1,x_2,\ldots ,x_n)^\textrm{T}\) be a unit eigenvector of \(A(\Gamma )\) corresponding to \(\lambda (\Gamma )\). Set

$$\begin{aligned} V^+= & {} \{v\in V(\Gamma ):x_v>0\}, \\ V^-= & {} \{v\in V(\Gamma ):x_v<0\}, \\ V^0= & {} \{v\in V(\Gamma ):x_v=0\}. \end{aligned}$$

From statements (1)–(4) in Lemma 3 together with the fact that \(\Gamma \) are \(K_s^+\)-free, we have \(\Gamma =\Gamma [V^+]\ominus \Gamma [V^-]\) such that \(\sigma (uv)=+1\) for each edge \(uv\in E(G[V^+])\cup E(G[V^-])\) and both \(\Gamma [V^+]\) and \(\Gamma [V^-]\) are \(K_s^+\)-free.

Let

$$\begin{aligned} \mathcal {T}=\{H_1^+\ominus H_2^+: H_i^+\ \text {is}\ K_s^+\text {-free}, i\in \{1,2\}\} \end{aligned}$$

and

$$\begin{aligned} \mathcal {T}^*=\{H_1^+\oplus H_2^+: H_i^+\ \text {is}\ K_s^+\text {-free}, i\in \{1,2\}\}. \end{aligned}$$

Since \(H_1^+\ominus H_2^+\) is switching equivalent to \(H_1^+\oplus H_2^+\). For any member \(H_1^+\ominus H_2^+\) in \(\mathcal {T}\), there exists a member \(H_1^+\oplus H_2^+\) in \(\mathcal {T}^*\) such that \(\text {Sp}(H_1^+\ominus H_2^+)=\text {Sp}(H_1^+\oplus H_2^+)\).

For any graph \(\Gamma ^*=(G^*,\sigma _{\Gamma ^*})=H_1^+\oplus H_2^+\) in \(\mathcal {T}^*\) and \(uv\in E(G^*)\), we know \(\sigma _{\Gamma ^*}(uv)=+1\). Since \(H_1^+\) and \(H_2^+\) are \(K_s^+\)-free. Then, \(\Gamma ^*\) is \(K_{2s-1}^+\)-free. Hence, from Lemma 2, we obtain that

$$\begin{aligned} \lambda (\Gamma ^*)\le \lambda (T_{n,2s-2}^+) \end{aligned}$$

with equality if and only if \(\Gamma ^*=T_{n,2s-2}^+\). Furthermore, we conclude that \(H_i^+=T_{n_i,s-1}^+\) for \(i\in \{1,2\}\), \(n_1+n_2=n\) and \(\mid n_1-n_2\mid \le s-1\).

Note that \(\Gamma =\Gamma [V^+]\ominus \Gamma [V^-]\in \mathcal {T}\) and \(\Gamma [V^+]\oplus \Gamma [V^-]\in \mathcal {T^*}\). Therefore, from the above, we have

$$\begin{aligned} \lambda (\Gamma )=\lambda (\Gamma [V^+]\oplus \Gamma [V^-])\le \lambda (T_{n,2s-2}^+). \end{aligned}$$

The equality holds if and only if \(\Gamma \) is \(H_1^+\ominus H_2^+\), where \(H_i^+=T_{n_i,s-1}^+\) for \(i\in \{1,2\}\) such that \(n_1+n_2=n\) and \(H_1^+\oplus H_2^+=T_{n,2s-2}^+\).

This completes the proof. \(\square \)

Recall that \(\mathcal {C}=\{C^+_l:3\le l\le n\}\). We give the following theorem.

Theorem 2

If \(\Gamma =(G,\sigma )\in \mathbb {G}(n,\mathcal {C})\), then

$$\begin{aligned} \lambda (\Gamma )\le \lambda (S_{n_1}^+\ominus S_{n_2}^+), \end{aligned}$$

where \(n_1+n_2=n\) and \(|n_1-n_2|\le 1\). The equality holds if and only if \(\Gamma =S_{n_1}^+\ominus S_{n_2}^+\).

Proof of Theorem 2

Suppose that \(\Gamma =(G,\sigma )\) has the maximum index among all graphs in \(\mathbb {G}(n,\mathcal {C})\). Let \({\textbf {x}} =(x_1,x_2,\ldots ,x_n)^\textrm{T}\) be a unit eigenvector of \(A(\Gamma )\) corresponding to \(\lambda (\Gamma )\). Set

$$\begin{aligned} V^+= & {} \{v\in V(\Gamma ):x_v>0\}, \\ V^-= & {} \{v\in V(\Gamma ):x_v<0\}, \\ V^0= & {} \{v\in V(\Gamma ):x_v=0\}. \end{aligned}$$

From statements (1)–(4) in Lemma 3 together with the fact that \(\Gamma \) are \(\mathcal {C}\)-free, we have that \(\Gamma =\Gamma [V^+]\ominus \Gamma [V^-]\) such that \(\sigma (uv)=+1\) for each edge \(uv\in E(G[V^+])\cup E(G[V^-])\), and both \(\Gamma [V^+]\) and \(\Gamma [V^-]\) are \(\mathcal {C}\)-free. Furthermore, since \(\Gamma \) has the maximal index, from (1) it follows that both \(G[V^+]\) and \(G[V^-]\) are trees.

Let \(u_1\in V^+\) and \(u_2\in V^-\) be two vertices with

$$\begin{aligned} x_{u_1}=\max \{x_v:v\in V^+\}\ \ \hbox {and}\ \ x_{u_2}=\min \{x_v:v\in V^-\}. \end{aligned}$$

We claim that \(uu_1\in E(G[V^+])\) for each vertex \(u\in V^+\backslash \{u_1\}\) and \(uu_2\in E(G[V^-])\) for each vertex \(u\in V^-\backslash \{u_2\}\). By symmetry, we just prove the former statement. On the contrary, if there exists a vertex \(u\in V^+\backslash \{u_1\}\) and \(uu_1\notin E(G[V^+])\), then let \(\Gamma ^*=(G^*,\sigma ^*)\) such that

$$\begin{aligned} G^*=G-uu'+uu_1\ \ \hbox {and}\ \ \sigma ^*(ww')=\left\{ \begin{aligned}&\sigma (ww'),{} & {} \text {if}\ ww'\in E(G^*)\ \text {and}\ ww'\not =uu_1;\\&+1,{} & {} \text {if}\ ww'\in E(G^*)\ \text {and}\ ww'=uu_1, \end{aligned} \right. \end{aligned}$$

where \(u'\in N_{G[V^+]}(u)\) is a vertex on the unique path connecting \(u_1\) and u in \(G[V^+]\). By (1), we obtain that

$$\begin{aligned} \lambda (\Gamma ^*)-\lambda (\Gamma )&\ge {\textbf {x}} ^\textrm{T}A(\Gamma ^*){\textbf {x}} -{\textbf {x}} ^\textrm{T}A(\Gamma ){\textbf {x}} \\&=2\sigma ^*(uu_1)x_ux_{u_1}-2\sigma (uu')x_ux_{u'}\\&=2x_u(x_{u_1}-x_{u'})\ge 0. \end{aligned}$$

If \(\lambda (\Gamma ^*)=\lambda (\Gamma )\), then \({\textbf {x}} \) is also an eigenvector of \(A(\Gamma ^*)\) corresponding to \(\lambda (\Gamma ^*)\). Based on the following eigenequations

$$\begin{aligned} \lambda (\Gamma )x_{u_1}=\sum _{w\in N_{G}(u_1)}\sigma (wu_1)x_w\ \ \hbox {and}\ \ \lambda (\Gamma ^*)x_{u_1}=\sum _{w\in N_{G}(u_1)}\sigma ^*(wu_1)x_w+x_{u}, \end{aligned}$$

we obtain \(x_u=0\), contradicting \(x_u>0\). Therefore, \(\lambda (\Gamma ^*)>\lambda (\Gamma )\), which contradicts the maximality of \(\lambda (\Gamma )\). Hence, both \(G[V^+]\) and \(G[V^-]\) are stars.

Let \(G[V^+]=S_{n_1}\), \(G[V^-]=S_{n_2}\) and \(n_1\le n_2\) without loss of generality. Let

$$\begin{aligned} \mathcal {T}=\{S_{n_1}^+\ominus S_{n_2}^+: n_1+n_2=n, n_1\le n_2\} \end{aligned}$$

and

$$\begin{aligned} \mathcal {T}^*=\{S_{n_1}^+\oplus S_{n_2}^+: n_1+n_2=n, n_1\le n_2\}. \end{aligned}$$

Note that \(\mathcal {T}\subseteq \mathbb {G}(n,\mathcal {C})\), \(\Gamma =S_{n_1}^+\ominus S_{n_2}^+\in \mathcal {T}\) and \(S_{n_1}^+\oplus S_{n_2}^+\in \mathcal {T^*}\). We only need to show that \(n_1\ge n_2-1\). On the contrary, assume that \(n_1\le n_2-2\). Given a suitable partition of \(V(S_{n_1}^+\oplus S_{n_2}^+)\) based on the symmetry of vertices, by applying the quotient matrix of \(A(S_{n_1}^+\oplus S_{n_2}^+)\), we obtain that \(\lambda (S_{n_1}^+\oplus S_{n_2}^+)\) is the largest root of \(\Phi _1(\lambda )\), where

$$\begin{aligned}{} & {} \Phi _1(\lambda )=\lambda ^4-(n_1n_2+n_1+n_2-2)\lambda ^2\\ {}{} & {} -(4n_1n_2-2n_1-2n_2)\lambda -3n_1n_2+3n_1+3n_2-3. \end{aligned}$$

Similarly, \(\lambda (S_{n_1+1}^+\oplus S_{n_2-1}^+)\) is the largest root of \(\Phi _2(\lambda )\), where

$$\begin{aligned} \Phi _2(\lambda )=\lambda ^4-(n_1n_2+2n_2-3)\lambda ^2-(4n_1n_2-6n_1+2n_2-4)\lambda -3n_1n_2+6n_1. \end{aligned}$$

Then,

$$\begin{aligned} \Phi _1(\lambda )-\Phi _2(\lambda )=(\lambda +1)(\lambda +3)(n_2-n_1-1)>0, \end{aligned}$$

which implies that

$$\begin{aligned} \lambda (S_{n_1}^+\oplus S_{n_2}^+)<\lambda (S_{n_1+1}^+\oplus S_{n_2-1}^+). \end{aligned}$$

Since

$$\begin{aligned} \text {Sp}(S_{n_1}^+\ominus S_{n_2}^+)=\text {Sp}(S_{n_1}^+\oplus S_{n_2}^+) \end{aligned}$$

and

$$\begin{aligned} \text {Sp}(S_{n_1+1}^+\ominus S_{n_2-1}^+)=\text {Sp}(S_{n_1+1}^+\oplus S_{n_2-1}^+), \end{aligned}$$

we have

$$\begin{aligned} \lambda (S_{n_1}^+\ominus S_{n_2}^+)=\lambda (S_{n_1}^+\oplus S_{n_2}^+)<\lambda (S_{n_1+1}^+\oplus S_{n_2-1}^+)=\lambda (S_{n_1+1}^+\ominus S_{n_2-1}^+), \end{aligned}$$

a contradiction.

This completes the proof. \(\square \)

Recall that \(\mathcal {C}_{2k}=\{C^+_{2k}:2\le k\le \lfloor \frac{n}{2}\rfloor \}\). We present the following theorem.

Theorem 3

If \(\Gamma =(G,\sigma )\in \mathbb {G}(n,\mathcal {C}_{2k})\) with \(n\ge 5\), then the following statements hold.

  1. (i)

    If n is even, then

    $$\begin{aligned} \lambda (\Gamma )\le \lambda (F_{k_1}^+\ominus F_{k_2}^+), \end{aligned}$$

    where \(n=2(k_1+k_2)+2\) and \(|k_1-k_2|\le 1\). The equality holds if and only if \(\Gamma =F_{k_1}^+\ominus F_{k_2}^+\).

  2. (ii)

    If n is odd, then

    $$\begin{aligned} \lambda (\Gamma )\le \lambda (F_{k_1}^{+}\ominus {F'_{k_2}}^+), \end{aligned}$$

    where \(n=2(k_1+k_2)+3\) and \(0\le k_1-k_2\le 1\). The equality holds if and only if \(\Gamma =F_{k_1}^{+}\ominus {F'_{k_2}}^+\).

Proof of Theorem 3

Suppose that \(\Gamma =(G,\sigma )\) has the maximum index among all graphs in \(\mathbb {G}(n,\mathcal {C}_{2k})\) and \(n\ge 5\). Let \({\textbf {x}} =(x_1,x_2,\ldots ,x_n)^\textrm{T}\) be a unit eigenvector of \(A(\Gamma )\) corresponding to \(\lambda (\Gamma )\). Set

$$\begin{aligned} V^+= & {} \{v\in V(\Gamma ):x_v>0\}, \\ V^-= & {} \{v\in V(\Gamma ):x_v<0\}, \\ V^0= & {} \{v\in V(\Gamma ):x_v=0\}. \end{aligned}$$

From statements (1)–(4) in Lemma 3 together with the fact that \(\Gamma \) are \(\mathcal {C}_{2k}\)-free, we have that \(\Gamma =\Gamma [V^+]\ominus \Gamma [V^-]\) such that \(\sigma (uv)=+1\) for each edge \(uv\in E(G[V^+])\cup E(G[V^-])\), and both \(\Gamma [V^+]\) and \(\Gamma [V^-]\) are \(\mathcal {C}_{2k}\)-free.

Since \(\Gamma [V^+]\) (resp., \(\Gamma [V^-]\)) is \(\mathcal {C}_{2k}\)-free, any two cycles of \(\Gamma (V^+)\) (resp., \(\Gamma [V^-]\)) share no edge(s).

This, together with the maximality of \(\lambda (\Gamma )\), indicates that \(G[V^+]\) (resp., \(G[V^-]\)) is connected and each block of \(G(V^+)\) (resp., \(G(V^-)\)) is a cycle or a \(P_2\).

Claim

All blocks of \(G(V^+)\) (resp., \(G(V^-)\)) intersect in exactly a common vertex, and each block of \(G(V^+)\) (resp., \(G(V^-)\)) is a \(C_3\) or a \(P_2\).

Proof

We first prove the former part of this claim for \(G[V^+]\). Let \(u_1\) be a vertex of \(V^+\) with \(x_{u_1}=\max \{x_u: u\in V^+\}\). If \(G[V^+]\) has exactly one block, then it is trivial. Now, we consider that \(G[V^+]\) has at least two blocks. Suppose that there exists a block B such that \(u_1\notin B\). Let \(u_2\) be the vertex of B with \(d_{G[V^+]}(u_2, u_1)=\min \{d_{G[V^+]}(u, u_1):u\in B\}\), and define \(U=N_{G[V^+]}(u_2)\cap B.\)

Let \(\Gamma ^*=\Gamma -\{u_2u:u\in U\}+\{u_1u:u\in U\}\) and

$$\begin{aligned} \sigma ^*(ww')=\left\{ \begin{aligned}&\sigma (ww'),{} & {} \text {if}\ ww'\in E(G^*)\ \text {and}\ ww'\notin \{u_1u:u\in U\};\\&+1,{} & {} \text {if}\ ww'\in E(G^*)\ \text {and}\ ww'\in \{u_1u:u\in U\}. \end{aligned} \right. \end{aligned}$$

Clearly, \(\Gamma ^*\) is \(\mathcal {C}_{2k}\)-free. By (1), we obtain that

$$\begin{aligned} \lambda (\Gamma ^*)-\lambda (\Gamma )&\ge {\textbf {x}} ^\textrm{T}A(\Gamma ^*){\textbf {x}} -{\textbf {x}} ^\textrm{T}A(\Gamma ){\textbf {x}} \\&=2\sum _{u\in U}\sigma ^*(uu_1)x_ux_{u_1}-2\sum _{u\in U}\sigma (uu_2)x_ux_{u_2}\\&=2(x_{u_1}-x_{u_2})\sum _{u\in U}x_u\ge 0. \end{aligned}$$

If \(\lambda (\Gamma ^*)=\lambda (\Gamma )\), then \({\textbf {x}} \) is also an eigenvector of \(A(\Gamma ^*)\) corresponding to \(\lambda (\Gamma ^*)\). Based on the following eigenequations,

$$\begin{aligned} \lambda (\Gamma )x_{u_1}=\sum _{u\in N_{G}(u_1)}\sigma (uu_1)x_u \end{aligned}$$

and

$$\begin{aligned} \lambda (\Gamma ^*)x_{u_1}=\sum _{u\in N_{G}(u_1)}\sigma ^*(uu_1)x_u+\sum _{u\in U}\sigma (u_1u)x_{u}, \end{aligned}$$

then we obtain \(\sum _{u\in U}x_{u}=0\), contradicting \(x_u>0\) for \(u\in U\subseteq V^+\). Therefore, \(\lambda (\Gamma ^*)>\lambda (\Gamma )\), which contradicts the maximality of \(\lambda (\Gamma )\). This indicates that all blocks of \(G(V^+)\) intersect in exactly the common vertex \(u_1\).

Next we show the second part of this claim. Suppose that there exists a cycle, say C, of length at least 5. Let \(N_C(u_1)=\{v_1,v_2\}\) and \(N_C(v_i)\backslash \{u_1\}=\{v_i'\}\) for \(i=1,2\). Let \(\Gamma ^{**}=\Gamma -\{v_1v_1',v_2v_2'\}+\{u_1v_1',u_1v_2'\}\) and define

$$\begin{aligned} \sigma ^{**}(ww')=\left\{ \begin{aligned}&\sigma (ww'),{} & {} \text {if}\ ww'\in E(G^{**})\ \text {and}\ ww'\notin \{u_1v_1',u_1v_2'\};\\&+1,{} & {} \text {if}\ ww'\in E(G^{**})\ \text {and}\ ww'\in \{u_1v_1',u_1v_2'\}. \end{aligned} \right. \end{aligned}$$

Clearly, \(\Gamma ^{**}\) is \(\mathcal {C}_{2k}\)-free. By (1), we obtain that

$$\begin{aligned}&\lambda (\Gamma ^{**})-\lambda (\Gamma )\\&\ge {\textbf {x}} ^\textrm{T}A(\Gamma ^{**}){\textbf {x}} -{\textbf {x}} ^\textrm{T}A(\Gamma ){\textbf {x}} \\&=2\sigma ^{**}(u_1v_1')x_{u_1}x_{v_1'}+2\sigma ^{**}(u_1v_2')x_{u_1}x_{v_2'} -2\sigma (v_1v_1')x_{v_1}x_{v_1'}-2\sigma (v_2v_2')x_{v_2}x_{v_2'}\\&=2(x_{u_1}-x_{v_1})x_{v_1'}+2(x_{u_1}-x_{v_2})x_{v_2'}\ge 0. \end{aligned}$$

If \(\lambda (\Gamma ^{**})=\lambda (\Gamma )\), then \({\textbf {x}} \) is also an eigenvector of \(A(\Gamma ^{**})\) corresponding to \(\lambda (\Gamma ^{**})\). Based on the following eigenequations,

$$\begin{aligned} \lambda (\Gamma )x_{u_1}=\sum _{u\in N_{G}(u_1)}\sigma (uu_1)x_u \end{aligned}$$

and

$$\begin{aligned} \lambda (\Gamma ^{**})x_{u_1}=\sum _{u\in N_{G}(u_1)}\sigma ^{**}(uu_1)x_u+\sigma ^{**}(u_1v_1')x_{v_1'}+\sigma ^{**}(u_1v_2')x_{v_2'}, \end{aligned}$$

then we obtain \(x_{v_1'}+x_{v_2'}=0\), contradicting \(x_{v_1'}>0\) and \(x_{v_2'}>0\). Therefore, \(\lambda (\Gamma ^{**})>\lambda (\Gamma )\), which contradicts the maximality of \(\lambda (\Gamma )\).

Similarly, we can prove this claim for \(G[V^-]\). This completes the proof. \(\square \)

Since \(\Gamma \) has the maximum index among all graphs in \(\mathbb {G}(n,\mathcal {C}_{2k})\), by (1) and the above claim, \(G[V^+]\) and \(G[V^-]\) have the form of \(F_{k}\) or \(F'_{k}\) for some k. Set \(|V^+|=n_1\) and \(|V^-|=n_2\). We divide the proof into two cases.

Case 1. Suppose that n is even. Then, either \(G[V^+]=F_{k_1}\) and \(G[V^-]=F_{k_2}\) with \(2(k_1+k_2)+2=n\), or \(G[V^+]=F'_{k_1}\) and \(G[V^-]=F'_{k_2}\) with \(2(k_1+k_2)+4=n\).

Suppose that \(G[V^+]=F_{k_1}\) and \(G[V^-]=F_{k_2}\) with \(2(k_1+k_2)+2=n\). Then, \(\Gamma =F_{k_1}^+\ominus F_{k_2}^+\). Set \(k_1\le k_2\). Let

$$\begin{aligned} \mathcal {T}_{1.1}=\{F_{k_1}^+\ominus F_{k_2}^+: 2(k_1+k_2)+2=n, k_1\le k_2\} \end{aligned}$$

and

$$\begin{aligned} \mathcal {T}^*_{1.1}=\{F_{k_1}^+\oplus F_{k_2}^+: 2(k_1+k_2)+2=n, k_1\le k_2\}. \end{aligned}$$

For a graph \(F_{k_1}^+\oplus F_{k_2}^+\) in \(\mathcal {T}^*_{1.1}\), given a suitable partition of \(V(F_{k_1}^+\oplus F_{k_2}^+)\) based on the symmetry of vertices, by the quotient matrix of \(A(F_{k_1}^+\oplus F_{k_2}^+)\), we obtain that \(\lambda (F_{k_1}^+\oplus F_{k_2}^+)\) is the largest root of \(\Phi _{1.1}(\lambda )\), where

$$\begin{aligned} \Phi _{1.1}(\lambda )=&\,\lambda ^4-2\lambda ^3-4(k_1k_2+k_1+k_2)\lambda ^2-(16k_1k_2-2)\lambda \nonumber \\&-12k_1k_2+4k_1+4k_2-1. \end{aligned}$$
(3)

Similarly, \(\lambda (F_{k_1+1}^+\oplus F_{k_2-1}^+)\) is the largest root of \(\Phi _{1.1}^*(\lambda )\), where

$$\begin{aligned} \Phi _{1.1}^*(\lambda )=&\lambda ^4-2\lambda ^3-(4k_1k_2+8k_2-4)\lambda ^2-(16k_1k_2-16k_1+16k_2-18)\lambda \\&-12k_1k_2+16k_1-8k_2+11. \end{aligned}$$

Then,

$$\begin{aligned} \Phi _{1.1}(\lambda )-\Phi _{1.1}^*(\lambda )=4(\lambda +1)(\lambda +3)(k_2-k_1-1). \end{aligned}$$

Suppose that \(k_1\le k_2-2\). This indicates that \(\Phi _{1.1}(\lambda )>\Phi _{1.1}^*(\lambda )\), that is,

$$\begin{aligned} \lambda (F_{k_1}^+\oplus F_{k_2}^+)<\lambda (F_{k_1+1}^+\oplus F_{k_2-1}^+). \end{aligned}$$

Since

$$\begin{aligned} \text {Sp}(F_{k_1}^+\ominus F_{k_2}^+)=\text {Sp}(F_{k_1}^+\oplus F_{k_2}^+) \end{aligned}$$

and

$$\begin{aligned} \text {Sp}(F_{k_1+1}^+\ominus F_{k_2-1}^+)=\text {Sp}(F_{k_1+1}^+\oplus F_{k_2-1}^+), \end{aligned}$$

we get

$$\begin{aligned} \lambda (F_{k_1}^+\ominus F_{k_2}^+)=\lambda (F_{k_1}^+\oplus F_{k_2}^+)<\lambda (F_{k_1+1}^+\oplus F_{k_2-1}^+)=\lambda (F_{k_1+1}^+\ominus F_{k_2-1}^+), \end{aligned}$$

a contradiction. Hence, \(\Gamma =F_{k_1}^+\ominus F_{k_2}^+\) with \(k_1\le k_2\le k_1+1\).

Suppose that \(G[V^+]=F'_{k_1}\) and \(G[V^-]=F'_{k_2}\) with \(2(k_1+k_2)+4=n\). Then, \(\Gamma ={F'_{k_1}}^+\ominus {F'_{k_2}}^+\). Set \(k_1\le k_2\). Let

$$\begin{aligned} \mathcal {T}_{1.2}=\{{F'_{k_1}}^+\ominus {F'_{k_2}}^+: 2(k_1+k_2)+4=n, k_1\le k_2\} \end{aligned}$$

and

$$\begin{aligned} \mathcal {T}^*_{1.2}=\{{F'_{k_1}}^+\oplus {F'_{k_2}}^+: 2(k_1+k_2)+4=n, k_1\le k_2\}. \end{aligned}$$

For a graph \({F'_{k_1}}^+\oplus F_{k_2}^+\) in \(\mathcal {T}^*_{1.2}\), given a suitable partition of \(V({F'_{k_1}}^+\oplus {F'_{k_2}}^+)\) based on the symmetry of vertices, by the quotient matrix of \(A({F'_{k_1}}^+\oplus {F'_{k_2}}^+)\), we obtain that \(\lambda ({F'_{k_1}}^+\oplus {F'_{k_2}}^+)\) is the largest root of \(\Phi _{1.2}(\lambda )\), where

$$\begin{aligned} \Phi _{1.2}(\lambda )=&\,\lambda ^6-2\lambda ^5-(4k_1k_2+6k_1+6k_2+5)\lambda ^4-(16k_1k_2+6k_1+6k_2-4)\lambda ^3\nonumber \\&-(12k_1k_2-6k_1-6k_2-7)\lambda ^2+(6k_1+6k_2-2)\lambda -3. \end{aligned}$$
(4)

Similarly, \(\lambda ({F'_{k_1+1}}^+\oplus {F'_{k_2-1}}^+)\) is the largest root of \(\Phi _{1.2}^*(\lambda )\), where

$$\begin{aligned} \Phi _{1.2}^*(\lambda )=&\,\lambda ^6-2\lambda ^5-(4k_1k_2+2k_1+10k_2+1)\lambda ^4-(16k_1k_2-10k_1+22k_2-20)\lambda ^3\\&-(12k_1k_2-18k_1+6k_2-19)\lambda ^2+(6k_1+6k_2-2)\lambda -3. \end{aligned}$$

Then,

$$\begin{aligned} \Phi _{1.2}(\lambda )-\Phi _{1.2}^*(\lambda )=4\lambda ^2(\lambda +1)(\lambda +3)(k_2-k_1-1). \end{aligned}$$

Suppose that \(k_1\le k_2-2\). This indicates that \(\Phi _{1.2}(\lambda )>\Phi _{1.2}^*(\lambda )\), that is,

$$\begin{aligned} \lambda ({F'_{k_1}}^+\oplus {F'_{k_2}}^+)<\lambda ({F'_{k_1+1}}^+\oplus {F'_{k_2-1}}^+). \end{aligned}$$

Since

$$\begin{aligned} \text {Sp}({F'_{k_1}}^+\ominus {F'_{k_2}}^+)=\text {Sp}({F'_{k_1}}^+\oplus {F'_{k_2}}^+) \end{aligned}$$

and

$$\begin{aligned} \text {Sp}({F'_{k_1+1}}^+\ominus {F'_{k_2-1}}^+)=\text {Sp}({F'_{k_1+1}}^+\oplus {F'_{k_2-1}}^+), \end{aligned}$$

it is seen that

$$\begin{aligned} \lambda ({F'_{k_1}}^+\ominus {F'_{k_2}}^+)=\lambda ({F'_{k_1}}^+\oplus {F'_{k_2}}^+)<\lambda ({F'_{k_1+1}}^+\oplus {F'_{k_2-1}}^+)=\lambda ({F'_{k_1+1}}^+\ominus {F'_{k_2-1}}^+), \end{aligned}$$

a contradiction. Hence, \(\Gamma ={F'_{k_1}}^+\ominus {F'_{k_2}}^+\) with \(k_1\le k_2\le k_1+1\).

Next we turn to compare the index of \(\Gamma _1=F_{k_1}^+\ominus F_{k_2}^+\) (\(k_1\le k_2\le k_1+1\)) with that of \(\Gamma _2={F'_{k_1}}^+\ominus {F'_{k_2}}^+\) (\(k_1\le k_2\le k_1+1\)) by dividing into the following two subcases.

Subcase 1.1. Assume that \(n=4k\). Then, \(\Gamma _1=F_{k-1}^+\ominus F_{k}^+\) and \(\Gamma _2={F'_{k-1}}^+\ominus {F'_{k-1}}^+\). From (3) and (4), we obtain that

$$\begin{aligned} \lambda ^2\Phi _{1.1}(\lambda )-\Phi _{1.2}(\lambda )=(\lambda +1)\left( \left( \lambda -(4k-1)\right) \lambda ^2-(12k-11)\lambda +3\right) <0, \end{aligned}$$

since \(\lambda <4k-1\) and \(n=4k\ge 5\). This infers that \(\lambda (\Gamma _1)>\lambda (\Gamma _2)\).

Subcase 1.2. Assume that \(n=4k+2\). Then, \(\Gamma _1=F_k^+\ominus F_k^+\) and \(\Gamma _2={F'_{k-1}}^+\ominus {F'_k}^+\). From (3) and (4), we obtain that

$$\begin{aligned} \lambda ^2\Phi _{1.1}(\lambda )-\Phi _{1.2}(\lambda )=-(\lambda +1)\left( \lambda ^3+(4k+7)\lambda ^2+(12k-5)\lambda -3\right) <0. \end{aligned}$$

This infers that \(\lambda (\Gamma _1)>\lambda (\Gamma _2)\).

Hence, from subcases 1.1 and 1.2, we conclude that \(\lambda (\Gamma )\le \lambda (F_{k_1}^+\ominus F_{k_2}^+),\) with \(n=2(k_1+k_2)+2\) and \(|k_1-k_2|\le 1\), and the equality holds if and only if \(\Gamma =F_{k_1}^+\ominus F_{k_2}^+\). This completes the proof of (i).

Case 2. Suppose that n is odd. Then, \(\Gamma =F_{k_1}^+\ominus {F'_{k_2}}^+\) with \(2(k_1+k_2)+3=n\). Let

$$\begin{aligned} \mathcal {T}_{2}=\{F_{k_1}^+\ominus {F'_{k_2}}^+: 2(k_1+k_2)+3=n\} \end{aligned}$$

and

$$\begin{aligned} \mathcal {T}^*_{2}=\{F_{k_1}^+\oplus {F'_{k_2}}^+: 2(k_1+k_2)+3=n\}. \end{aligned}$$

For a graph \(F_{k_1}^+\oplus {F'_{k_2}}^+\) in \(\mathcal {T}^*_{2}\), given a suitable partition of \(V(F_{k_1}^+\oplus {F'_{k_2}}^+)\) based on the symmetry of vertices, by the quotient matrix of \(A(F_{k_1}^+\oplus {F'_{k_2}}^+)\), we obtain that \(\lambda (F_{k_1}^+\oplus {F'_{k_2}}^+)\) is the largest root of \(\Phi _{2}(\lambda )\), where

$$\begin{aligned} \Phi _{2}(\lambda )=&\,\lambda ^5-2\lambda ^4-(4k_1k_2+6k_1+4k_2+2)\lambda ^3-(16k_1k_2+6k_1-4)\lambda ^2\\&-(12k_1k_2-6k_1-4k_2-1)\lambda +6k_1-2. \end{aligned}$$

Similarly, \(\lambda (F_{k_1+1}^+\oplus {F'_{k_2-1}}^+)\) (resp., \(\lambda (F_{k_1-1}^+\oplus {F'_{k_2+1}}^+)\)) is the index of \(\Phi '_{2}(\lambda )\) (resp., \(\Phi ''_{2}(\lambda )\)), where \(\Phi '_2(\lambda )\) (resp., \(\Phi ''_2(\lambda )\)) is obtained from \(\Phi _2(\lambda )\) by replacing \(k_1\) and \(k_2\) by \(k_1+1\) and \(k_2-1\) (resp., \(k_1-1\) and \(k_2+1\)), respectively.

Suppose that \(k_1\le k_2-1\). Then,

$$\begin{aligned} \Phi _{2}(\lambda )-\Phi '_{2}(\lambda )=2(\lambda +1)(\lambda +3)(2\lambda (k_2-k_1)-\lambda -1)>0. \end{aligned}$$

This indicates that

$$\begin{aligned} \lambda (F_{k_1}^+\oplus {F'_{k_2}}^+)<\lambda (F_{k_1+1}^+\oplus {F'_{k_2-1}}^+). \end{aligned}$$

Since

$$\begin{aligned} \text {Sp}(F_{k_1}^+\ominus {F'_{k_2}}^+)=\text {Sp}(F_{k_1}^+\oplus {F'_{k_2}}^+) \end{aligned}$$

and

$$\begin{aligned} \text {Sp}(F_{k_1+1}^+\ominus {F'_{k_2-1}}^+)=\text {Sp}(F_{k_1+1}^+\oplus {F'_{k_2-1}}^+), \end{aligned}$$

it implies that

$$\begin{aligned} \lambda (F_{k_1}^+\ominus {F'_{k_2}}^+)=\lambda (F_{k_1}^+\oplus {F'_{k_2}}^+)<\lambda (F_{k_1+1}^+\oplus {F'_{k_2-1}}^+)=\lambda (F_{k_1+1}^+\ominus {F'_{k_2-1}}^+), \end{aligned}$$

a contradiction. This shows that \(k_1\ge k_2\).

Suppose that \(k_1\ge k_2+2\). Then,

$$\begin{aligned} \Phi _{2}(\lambda )-\Phi ''_{2}(\lambda )=2(\lambda +1)(\lambda +3)(2\lambda (k_1-k_2)-3\lambda +1)>0. \end{aligned}$$

This indicates that

$$\begin{aligned} \lambda (F_{k_1}^+\oplus {F'_{k_2}}^+)<\lambda (F_{k_1-1}^+\oplus {F'_{k_2+1}}^+). \end{aligned}$$

Since

$$\begin{aligned} \text {Sp}(F_{k_1}^+\ominus {F'_{k_2}}^+)=\text {Sp}(F_{k_1}^+\oplus {F'_{k_2}}^+) \end{aligned}$$

and

$$\begin{aligned} \text {Sp}(F_{k_1-1}^+\ominus {F'_{k_2+1}}^+)=\text {Sp}(F_{k_1-1}^+\oplus {F'_{k_2+1}}^+), \end{aligned}$$

we obtain

$$\begin{aligned} \lambda (F_{k_1}^+\ominus {F'_{k_2}}^+)=\lambda (F_{k_1}^+\oplus {F'_{k_2}}^+)<\lambda (F_{k_1-1}^+\oplus {F'_{k_2+1}}^+)=\lambda (F_{k_1-1}^+\ominus {F'_{k_2+1}}^+), \end{aligned}$$

a contradiction. This implies \(k_1\le k_2+1\).

Hence, \(\Gamma =F_{k_1}^+\ominus {F'_{k_2}}^+\) with \(k_2\le k_1\le k_2+1\), completing the proof of (ii). \(\square \)