Spectral radius of graphs with given size and odd girth

Let $\mathcal{G}(m,k)$ be the set of graphs with size $m$ and odd girth (the length of shortest odd cycle) $k$. In this paper, we determine the graph maximizing the spectral radius among $\mathcal{G}(m,k)$ when $m$ is odd. As byproducts, we show that, there is a number $\eta(m)>\sqrt{m-k+3}$ such that every non-bipartite graph $G$ with size $m$ and spectral radius $\rho\ge \eta(m)$ must contains an odd cycle of length less than $k$ unless $m$ is odd and $G\cong SK_{k,m}$, which is the graph obtained by subdividing an edge $k-2$ times of complete bipartite $K_{2,\frac{m-k+2}{2}}$. This result implies the main results of [Discrete Math. 345 (2022)] and \cite{li-peng}, and settles the conjecture in \cite{li-peng} as well.


Introduction
Let H be a set of some fixed graphs.A graph is said to be H-free if it does not contain subgraphs isomorphic to any members of H.In 1907, Mantel [13] presented the following famous result, which aroused the study of the so-called Turán-Type extremal problem in graph theory.
Theorem 1 (Mantel [13]).Let G be an n-vertex graph.If G is triangle-free, then m(G) ≤ m(K ⌊ n 2 ⌋,⌈ n 2 ⌉ ), equality holds if and only if Problems involving triangles play an important role in the development of both extremal and spectral extremal graph theory.A classic Mantel's theorem, implies that every n-vertex graph of size m > ⌊ n 2  4 ⌋ must contain a triangle.Since then, much attentions have been paid to Turán-Type Extremal Problem and Mantel's Theorem has many interesting applications.Further related results may be found dotted throughout the literature in the nice survey [4] for example.For a graph G, let ρ(G) be the spectral radius of G.In 1970, Nosal [21] proved that if a graph G is triangle-free with m edges, then ρ(G) ≤ √ m.This a classic result in spectral graph theory for triangle-free graphs, and it can be viewed as the spectral version of Mantel's Theorem, also usually called the spectral Mantel theorem.More precisely, Nikiforov [18] characterized the extremal triangle-free graphs attaining the upper bound.In what follows, we state this spectral result in a complete form.
Theorem 2 ( [21,18]).Let G be a graph with m edges.If G is triangle-free, then ρ(G) ≤ √ m, equality holds if and only if G is a complete bipartite graph.
Theorem 3 (Lin, Ning and Wu [11]).Let G be a non-bipartite graph with size m.If ρ(G) ≥ √ m − 1, then G contains a triangle unless G is a C 5 .
Theorem 3 can be viewed as a stability result on Theorem 2, since it excluded the complete bipartite graphs in our consideration.This type of result is also regarded as the second extremal graph problem in the literature.Moreover, by a well-known inequality ρ(G) ≥ 2m(G) n originated from Collatz and Sinogowitz [1] ) is non-bipartite and it also is {C 3 , C 5 , . . ., C 2k+1 }-free.In 2022, Zhai and Shu [25] proved a further improvement on Theorem 3. Let ρ * (m) be the largest root of Theorem 4 (Zhai and Shu [25]).Let G be a non-bipartite graph of size m.If ρ(G) ≥ ρ * (m), then G contains a triangle unless m is odd and Notice that for m ≥ 6, we have Theorem 4 implies both Mantel's theorem and Lin, Ning and Wu's result as well.In 2022, Wang [22,Theorem 5] improved slightly Theorem 4 by determining the m-edge graphs G for every m, if G is a triangle-free and non-bipartite graph with ρ(G) ≥ √ m − 2. Very recently, by applying Cauchy's interlacing theorem of all eigenvalues, Li and Peng [10] found some forbidden induced subgraphs and presented an alternative proof of Theorem 4. Note that the unique extremal graph in Theorem 4 contains many copies of C 5 .Moreover, Li and Peng [10] considered the further stability result on Theorem 4 by forbidding both C 3 and C 5 as below.Let γ(m) denote the largest root of Theorem 5 (Li and Peng [10]).Let G be a graph with m edges.If G is {C 3 , C 5 }-free and G is non-bipartite, then ρ(G) ≤ γ(m), equality holds if and only if m is odd and Moreover, Li and Peng [10, Conjecture 4.1] proposed the following conjecture.

2
)), equality holds if and only if m is odd and G It is worth mentioning that the analogous result of Conjecture 1 for {C 3 , C 5 , . . ., C 2k+1 }free non-bipartite graphs with given order n was previously proposed in [11].The problem was proved by Lin and Guo [12] and also independently proved by Li, Sun and Yu [7, Theorem 1.6] using a different method.
In this paper, we aim to generalize all the above results and confirm Conjecture 1. Unlike the techniques in [10] where the authors developed the key ideas from [11], in present paper, we will expand the ideas mainly from [25].The odd girth of a graph is defined as the length of a shortest odd cycle.Recall that G(m, k) be the set of graphs with size m and odd girth k.Let C k (a, b) be the graph obtained from a cycle by replacing the edge v 1 v k with a complete bipartite graph K a,b (see Fig. 1).On the other hand, C k (a, b) is just a local blow up of the cycle C k , and it also can be seen as a subdivision of K a+1,b+1 by subdividing an edge with a path of length k − 3.In particular, we denote ), where m ≥ k ≥ 5 is an odd integer; see Fig. 1.Clearly, ) in Theorem 4 is just SK 5,m , and Remark 1.On the one hand, from the proofs in Section 3, we actually obtain all nonbipartite graphs of size m satisfying ρ > √ m − k + 3 for any odd integer k ≥ 5. On the other hand, though Theorem 7 removes the assumption of m being odd, it does not means that the extremal graph maximizing ρ is obtained among G(m, k) when m is even.If m = k + 5 and k = 5, Theorem 7 indicates that the extremal graph is exactly C 5 (2,2).For other cases, Theorem 7 only implies ρ(G) < m−k+2 √ m−k+1 for any G ∈ G(m, k) when m is even.The extremal graph is still unknown in general.At last, we believe that our method is also valid when m is even.In fact, when m is even, it is easy to see that ρ > √ m − k + 2. By replacing √ m − k + 3 with √ m − k + 2 in Section 3, the case where m is even could be settled with some additional analysis.
By the knowledge of equitable partition [6,Page 198], ρ(SK k,m ) is the largest root of p(x), where p(x) = det(xI − B) and B is the k × k matrix given as Clearly, Theorem 4 is the special case for k = 5 of Corollary 1, and Theorem 5 is the special case for k = 7.Furthermore, Corollary 1 completely solves Conjecture 1.

Preliminaries
At the beginning of this section, we shall give some terminologies and notations.For two disjoint subsets S, T ⊆ V (G), e(S) is the number of edges with both endpoints in S and e(S, T ) is the number of edges with one endpoint in S and the other in Its corresponding unit eigenvector is called the Perron vector of G. From the famous Perron-Frobenius theorem, Perron vector is a positive vector for a connected graph G.An internal path of G is a sequence of vertices v 1 , v 2 , ..., v s with s ≥ 2 such that: (i) the vertices in the sequence are distinct (except possibly

Lemma 1 ([5]
). Suppose that G = W n (see Fig. 2) and uv is an edge on an internal path of G. Let G uv be the graph obtained from G by the subdivision of the edge uv.Then ρ(G uv ) < ρ(G).Now we give upper and lower bounds for the spectral radius of SK k,m .Lemma 2. For every odd integers m ≥ k ≥ 5, we have Proof.For convenience, denote by ρ = ρ(SK k,m ) and t = m−k+2

2
. It suffices to show For any positive number x, denote by and . Therefore, one can easily verify that ρ ≥ 2t In what follows, we show For any odd integer r ≥ 5, let G r = SK r,2t+r−2 and ρ r = ρ(G r ).We have proved that ρ r < √ 2t + 2. For each G r , label G r like SK k,m in Fig. 1, that is, v 1 and v r−1 are the only vertices of degree greater than 2, where and the last inequality is due to the fact that 1−x ℓ−1 1−x ℓ is a decrease function when 0 < x < 1, βx αx is a increase function, and Now suppose to the contrary that ρ 2tβρ < 1.There exists ǫ > 0 such that ρ 2tβρ < 1 − ǫ.Since 0 < c t < 1, there exists N > 0 such that ǫ for any n ≥ N. Take r = max{k, 2N + 1}, and ℓ = r−1 2 .Therefore, ρ ≥ ρ r due to Lemma 1, and thus

Lemma 3 ([23]
).Let u, v be two distinct vertices in a connected graph G, and Lemma 4 ([2]).Let s, t, u, v be the four distinct vertices of a connected graph G and let st, uv ∈ E(G) , while sv, tu / ∈ E(G).If (x s − x u )(x v − x t ) ≥ 0, where x is the Perron vector of G, then ρ(G − st − uv + sv + tu) ≥ ρ(G) with equality if and only if x s = x u and Let H be a subgraph of G.For u, v ∈ V (H), denote by d H (u, v) the distance of u, v in H, that is, the length of a shortest path from u to v in H.We close this part by the following result, which is immediate by simple observations and its proof is omitted.

Proofs.
In this part, we give the proof of Theorem 6.The techniques in our proof are motivated by that of Zhai and Shu [25].Avoiding fussy repetition and tedious calculations, we always assume that k ≥ 7 though our method is valid for k = 5.Let G * be the extremal graph with the maximum spectral radius among all graphs in G(m, k).By Lemma 2, the lower bound of G * is given by Our goal is to determine the structure of G * .Let C k be a shortest cycle of G * .Keep in mind that G * has no odd cycle with length less than k.We always assume that x = (x 1 , x 2 , . . ., x |V (G)| ) is the Perron vector of G * , and u * is a vertex with the largest component in x, i.e., Note that e(A) = 0 because G * contains no triangle.This fact yields an upper bound of e(B).
Proof.Since e(A) = 0, we have i∈A d A (i)x i = 0. Note that x u .
According to the assumption (2), we have Proof.According to Lemma 7, let C = u * u 0 v 1 v 2 . . .v k−3 u a u * be a shortest odd cycle of G * , where u 0 , u a ∈ A. We claim that v 1 , v 2 , . . ., v k−3 ∈ B since otherwise there would be a shorter odd cycle in G * .Note that e(B) ≤ k − 4. The result follows.Let since otherwise G * would contain a shorter odd cycle.So, we may denote A 1 = N A (v 1 ) = {u 0 , u 1 , . . ., u a−1 } for some a ≥ 1 and . Clearly, A 1 , A 2 and A 3 are independent sets.Now the structure of G * is as shown in Fig. 3 (a).
Proof.Suppose to the contrary that v i ∼ u for some u ∈ A and 2 clearly, then there would an odd cycle of length shorter than k.Indeed, if v i ∼ u 0 , then either the cycle Proof.Suppose to the contrary that For components of x corresponding to A, we get the following result.
Lemma 13. x u a−1 ≥ x ua and if A 3 = ∅, then x ua ≥ x w for any w ∈ A 3 .
Proof.Suppose to the contrary that Clearly, G ′ ∈ G(m, k) and Lemma 4 implies ρ(G ′ ) > ρ(G), a contradiction.Suppose to the contrary that x a ≤ x w for some w According to Lemma 13, we know that x u a−1 ≥ x ua and x ua ≥ x w for any w ∈ A 3 .We denote A 3 = {u a+1 , u a+2 , . . ., u a+c } for some c ≥ 0. By sorting the vertices of A 1 and A 3 , we may assume further that Lemma 14.If B 2 = ∅, then for w ∈ B 2 , let d(w) = s, we have N(w) = {u 0 , u 1 , . . ., u s−1 }.
Proof.Suppose to the contrary that u i ∼ w with i ≥ s.Therefore, there exists 1 ≤ j ≤ s − 1 such that u j ∼ w.Thus, G ′ = G * − u i w + u j w ∈ G(m, k) with ρ(G ′ ) > ρ * due to (4) and Lemma 3, this is a contradiction.
The following two lemmas (Lemmas 15 and 16) are key ingredients in the proof of our main result.To some extent, it characterized clearly the structure of the desired extremal graph.More precisely, we will show that if B 2 = ∅, then A 3 = ∅ and every vertex of B 2 is adjacent to every vertex of A 1 ∪ A 2 .We now begin the details in earnest.
Case 2. a = 1.In this case, from (7), we have It leads to f Therefore, 3(b 2 + 1) < 4, and thus b 2 < 1/3.It leads to b 2 = 0.In this case, as similar to the proof of Lemma 11, we construct a new graph G ′ by contracting the By calculations, we have f (x) > 0 whenever Since ρ * x u 2 = (1 + b 2 )x u * , we have Therefore, (b 2 + 1) < 4, and thus b 2 < 3. Let G 1 and G 2 be the graphs shown in Fig. 4.
The proof is completed.
Recall the definition of C k (a, b) (see Fig. 1).Lemma 15 and Lemma 16 indicate that in Fig. 3, if B 2 = ∅, then A 3 = ∅ and every vertex of B 2 is adjacent to every vertex of A 1 ∪ A 2 .In other words, A 1 and B 2 ∪ {u * } form a complete bipartite, and

Open problems for cycles
Theorem 6 determines the extremal graphs for non-bipartite graphs without any short odd cycle of {C 3 , C 5 , . . ., C 2k+1 }.In this section, we will conclude some recent development on this topic and propose some open problems for readers.Let K k ∨ I t be the graph consisting of a clique on k vertices and an independent set on t vertices in which each vertex of the clique is adjacent to each vertex of the independent set.A well-known conjecture in extremal spectral graph theory involving consecutive cycles states that Conjecture 2 (Zhai-Lin-Shu [24]).Let k be fixed and m be large enough.If G is a graph with m edges and then G contains a cycle of length t for every t ≤ 2k + 2, unless G = K k ∨ I 1 k ( m−( k 2 )) .One may consider naturally the problem of finding the maximum spectral radius among all {C 3 , C 4 , . . ., C 2k+2 }-free graphs with m edges.We remark here that this problem is an easy consequence of Nikiforov in [17], which implies that the star graph on m edges attains the maximum spectral radius.Indeed, Nikiforov [17] proved that for m ≥ 10, every C 4 -free graph G satisfies ρ(G) ≤ √ m, equality holds if and only if G is uniquely a star with m edges.The above problem is a direct corollary by noting that the star graph contains no copies of C t for every 3 ≤ t ≤ 2k + 2. The following Conjecture 3 seems weaker than Conjecture 2 at first glance.While they are equivalent since the bound in right hand side is monotonically increasing on k ∈ [2, +∞).So it is reasonable to attribute this conjecture to Zhai, Lin and Shu.
Conjecture 3 (Zhai-Lin-Shu).Let k be fixed and G be a graph of sufficiently large size m without isolated vertices.If G is C 2k+1 -free or C 2k+2 -free, then equality holds if and only if G = K k ∨ I 1 k ( m−( k 2 )) .In 2021, Zhai, Lin and Shu [24] proved this conjecture in the case of k = 2 and odd m, and later Gao, Lou and Huang [14] proved the case of k = 2 and even m.These cases were also provided by Li, Sun and Wei [8].Conjecture 3 remains open for k ≥ 3.
Let C △ t denote the graph on t + 1 vertices obtained from C t and C 3 by identifying an edge.It was proved in [24] that the complete bipartite graphs attain the maximum spectral radius among {C △ 3 , C △ 4 }-free graphs with m edges.In [20], Nikiforov enhanced that the same result still holds for C △ 3 -free graphs.Very recently, Li, Sun and Wei [8] determined the extremal graph for C △ 4 -free or C △ 5 -free when the size m is odd, and soon after, Fang, You and Huang [3] determined the extremal graph for even m.Observe that C 2k+1 ⊆ C △ 2k and C 2k+2 ⊆ C △ 2k+1 .Motivated by Conjecture 3, Yongtao Li tells privately us that it is also interesting to consider the following conjecture.

Figure 1 :Theorem 6 .
Figure 1: The graph C k (a, b) and SK k,m .Now we present the main result in this paper.Theorem 6.For two odd integers m ≥ k ≥ 5, if G ∈ G(m, k), then ρ(G) ≤ ρ(SK k,m ), with equality if and only if G ∼ = SK k,m .Note that, all lemmas in our proof (see Section 3) only use the assumption ρ ≥ (m−k+ 2)/ √ m − k + 1 > √ m − k + 3 and ρ is as large as possible.Therefore, if we assume that G is a non-bipartite graph of size m and ρ(G) ≥ (m − k + 2)/ √ m − k + 1 > √ m − k + 3 with ρ(G) as large as possible, then we get G = C k (a, b) or SK k,m .According to the proofs in Section 3, we actually get the following stronger result.Theorem 7. Let G be a non-bipartite graph with size m, and k ≥ 5 an odd integer.If ρ(G) ≥ m−k+2 √ m−k+1 > √ m − k + 3, then G contains an odd cycle of length less than k unless G = C 5 (2, 2), or m is odd and SK k,m .
), Theorem 7 implies the following result.Corollary 1.Let G be a non-bipartite graph with size m, and k ≥ 5 an odd integer.If ρ(G) ≥ η(m, k), then G contains an odd cycle of length less than k unless G ∼ = SK k,m .

Figure 2 :
Figure 2: The graph W n and the subdivision operation.

Lemma 5 .
Let C be an odd cycle of length l ≥ 5 in graph G.For two vertices x, y ∈ V (C) and u ∈ V (G) \ V (C) with x ∼ u and y ∼ u, if d C (x, y) ≥ 2, then G contains an odd cycle containing u with length at most l.Furthermore, if d C (x, y) ≥ 3, then such cycle has length at most l − 1.
B)) x u * = (m − e(B)) x u * .It leads to e(B) < k − 3, and thus e(B) ≤ k − 4.Lemma 7. u * must be on a shortest odd cycle of G * .Proof.Let C be a shortest odd cycle of G * .If u * ∈ C, there is nothing to prove.Otherwise, since e(A) = 0 and e(B) ≤ k − 4, there exists at least two vertices x, y ∈ A ∩ V (C) with d C (x, y) ≥ 2. Hence we will get a cycle containing u * with length at most k by Lemma 5. Lemma 8. B induces a P k−3 with some isolates possibly.

Figure 3 :
Figure 3: The structures yielded by Lemmas 8, 9 and 10 where the dashed lines between two parts means that the adjacency relations between the vertices in one part and those in the other part are still unknown.
3 and u * ∼ u and v i ∼ u, Lemma 5 indicates there would be a shorter odd cycle as well, a contradiction.According to Lemma 9, the structure of G * is as shown in Fig.3 (b).Without loss of generality, we may assume that x v 1 ≥ x v k−3 in what follows.Lemma 10. |A 2 | = 1, i.e., A 2 = {u a }.

G 1 G 2 Figure 4 :
Figure 4: The graphs G 1 and G 2 in the proof of Lemma 15.