The extremal function for cycles of length $\ell$ mod $k$

Burr and Erd\H{o}s conjectured that for each $k,\ell \in \mathbb Z^+$ such that $k \mathbb Z + \ell$ contains even integers, there exists $c_k(\ell)$ such that any graph of average degree at least $c_k(\ell)$ contains a cycle of length $\ell$ mod $k$. This conjecture was proved by Bollob\'{a}s, and many successive improvements of upper bounds on $c_k(\ell)$ appear in the literature. In this short note, for $1 \leq \ell \leq k$, we show that $c_k(\ell)$ is proportional to the largest average degree of a $C_{\ell}$-free graph on $k$ vertices, which determines $c_k(\ell)$ up to an absolute constant. In particular, using known results on Tur\'{a}n numbers for even cycles, we obtain $c_k(\ell) = O(\ell k^{2/\ell})$ for all even $\ell$, which is tight for $\ell \in \{4,6,10\}$. Since the complete bipartite graph $K_{\ell - 1,n - \ell + 1}$ has no cycle of length $2\ell$ mod $k$, it also shows $c_k(\ell) = \Theta(\ell)$ for $\ell = \Omega(\log k)$.


Introduction
More than forty years ago, Burr and Erdős conjectured that for each k, ℓ ∈ Z + such that kZ + ℓ contains even integers, there exists c k (ℓ) such that any graph of average degree at least c k (ℓ) contains a cycle of length ℓ mod k. Bollobás [1] was the first to show that c k (ℓ) exists, showing c k (ℓ) ≤ 1 2k [(k + 1) k − 1] for all ℓ. This upper bound was reduced by a number of authors [3,6,7,8,9,10,12,16,27]. The first linear bound c k (ℓ) ≤ 8(k − 1) was given by the second author [28]. Thomassen [27] conjectured that every graph of minimum degree at least k + 1 contains cycles of all possible even lengths mod k. Since every graph with average degree a least 2k contains a subgraph of minimum degree at least k + 1, this conjecture implies that c k (ℓ) ≤ 2k when k is even. Recently, Liu and Ma [19] showed for k even that a graph of minimum degree at least k + 1 contains cycles of all possible even lengths mod k, answering a conjecture of Thomassen [27] for even values of k. Since any graph whose blocks are cliques of order k + 1 contains no cycle of length 2 modulo k, this is best possible.

Main Theorem
The aim of this note is to determine c k (ℓ) up to a constant factor. In particular we show perhaps surprisingly that c k (ℓ) is sublinear in k if ℓ is even and ℓ = o(k) and in fact linear in ℓ if ℓ = Ω(log k) as k → ∞. A number of bounds on c k (ℓ) have been given in the literature [3,7,8,9,15] for specific values of k and ℓ. Let d k (ℓ) be the largest possible average degree of any k-vertex bipartite C ℓ -free graph. Our main theorem shows that c k (ℓ) is proportional to d k (ℓ). Theorem 1. For 3 ≤ ℓ < k, every C ℓ -free graph of average degree at least 96 · d k (ℓ) contains cycles of k consecutive even lengths. In particular, Since a graph on k vertices with no cycle C ℓ has no cycle of length ℓ mod k, c k (ℓ) ≥ d k (ℓ), providing the lower bound in Theorem 1. In fact one can do slightly better, by considering a large graph whose blocks are all extremal C ℓfree graphs with k + ℓ − 1 vertices. This gives c k (ℓ) ≥ d k+ℓ−1 (ℓ) + 2 k+ℓ . We did not attempt to optimize the upper bound in the proof of this theorem, and the constant 96 can no doubt be improved. However, we make the following conjecture which suggests the constant in front of d k (ℓ) should be 1 + o k (1).

Quantitative results
To state quantitative results, if ℓ is odd, then k 2 −1 2k ≤ d k (ℓ) ≤ k/2 (the average degree in the densest k-vertex complete bipartite graph) and so c k (ℓ) = Θ(k). The bound d k (ℓ) = O(ℓk 2/ℓ ) for ℓ even follows from known bounds on Turán numbers for even cycles, the first of which were obtained by Bondy and Simonovits [2]. The current best upper bound on d k (ℓ) for fixed ℓ is due to Bukh and Jiang [4]. This gives the following corollary: In particular this shows c k (ℓ) = Θ(ℓ) for ℓ = Ω(log k), since a complete bipartite graph with one part of size less than ℓ/2 contains no cycle of length ℓ mod k. Since d k (ℓ) = Θ(k 2/ℓ ) when ℓ ∈ {4, 6, 10} (see [29] and Füredi and Simonovits [11]), we find so the corollary is tight up to constants when ℓ ∈ {4, 6, 10} and for ℓ = Ω(log k). For cycles of length 4 mod k this substantially improves a result of Diwan [9], stating that a graph of minimum degree at least k + 1 contains a cycle of length four modulo k.

Remarks on chromatic number and cycles mod k
One may attempt to extend Theorem 1 to obtain cycles of any length modulo k under conditions on the chromatic number of the graph. Let χ k (ℓ) denote the maximum possible chromatic number of a graph with no cycle of length ℓ mod k, and let n k (ℓ) denote the largest chromatic number in a C ℓ -free graph on k vertices. Bounds on n k (ℓ) come from bounds on cycle-complete graph Ramsey numbers. In particular, the results of Caro and Yuster [5] and the results of the first author [25] show that if m = ⌈ℓ/2⌉, then for ℓ ≥ 3, This is known to be tight up to a constant factor only for ℓ = 3, for in this case Kim [14] constructed k-vertex triangle-free graphs with chromatic number O( k/ log k). The analog of Theorem 1 for chromatic number is stated in [17], and in particular, the following result holds: There exists c > 0 such that for k ≥ ℓ ≥ 1 and m = ⌈ℓ/2⌉, This theorem is a special case of Theorem 4 in [17], which shows that a graph of chromatic number d with no cycle of length ℓ contains cycles of Ω(d m log d) consecutive lengths, and so in particular if Let δ k (ℓ) denote the largest minimum degree in a 2-connected non-bipartite graph with no cycle of length ℓ mod k. For r = ⌊ℓ/2⌋, it follows from results of Ma [20] that for each fixed ℓ ≥ 3, δ k (ℓ) = O(k 1/r ), so when ℓ is odd, Theorem 4 offers a stronger conclusion for graphs of large chromatic number. For instance in the case ℓ = 3, Theorem 4 gives whereas Ma's result gives δ k (3) = Θ(k). Bondy and Vince [3] showed that there exist 2-connected non-bipartite graphs of arbitrarily large minimum degree with no cycles of lengths differing by exactly 1. For 3-connected graphs, Fan [10] showed that every non-bipartite 3-connected graph with minimum degree at least 3k contains 2k cycles of consecutive lengths. We may conjecture the following analog of Conjecture 2: We remark that since there is a wide gap between upper and lower bounds on cycle-complete graph Ramsey numbers in general, the actual asymptotic value of n k (ℓ) is likely to be very difficult to determine.

Preliminaries
In this section we collect some results which we will use in our proofs.

Breadth first search trees:
If v is a vertex of a connected graph G, then a breadth first search tree rooted at v is a spanning tree T of G created as follows. Having found a tree Note that the edges of G lie either between two consecutive levels of T , or inside levels of T .

Theta graphs:
A θ-graph consists of a cycle plus an additional edge joining two non-consecutive vertices on the cycle. The following lemma due to Bondy and Simonovits [2] is required for the proofs of Theorems 1 and 4. Lemma 6. Let G be an n-vertex θ-graph and let A ∪ B be a partition of vertices of G into two non-empty subsets. Then for every r < n, G contains a path of length r with one end in A and one end in B, unless G is bipartite graph with parts A and B.
The proof of this lemma is given in [28] (see Lemma 2 in [28]). The purpose of the additional edge e in a θ-graph is to preclude the possibility that the vertices of A occur at every mth vertex along the cycle G − e for some m|n, for in that case, there is no path of length zero mod m with one end in A and one end in B.
Long cycles in C ℓ -free graphs: To find θ-graphs we use the following two lemmas. Lemma 7. For 3 ≤ ℓ ≤ k, if F is a bipartite graph of average degree at least 24d k (ℓ) containing no C ℓ , then F contains a θ-graph with at least 2k + 2 vertices.
Proof. The proof of this lemma uses some ideas from [26]. Since the average degree of F is at least 24d k (ℓ), it contains a subgraph F ′ of minimum degree at least 12d k (ℓ). Let X be a subset of F ′ of size t ≤ k. We claim that |∂X| > 2|X|, where ∂X is a set of all vertices of F ′ \ X which have at least one neighbor in X. Indeed, if this is not the case then the subset Y = X ∪ ∂X has size at most 3t and contains all the edges of F ′ incident with X. Thus the average degree of the induced subgraph F ′ [Y ] is at least 12td k (ℓ)/(3t) = 4d k (ℓ). If 3t ≥ k, by taking a random subset of Y of size k and using linearity of expectation we obtain a subgraph with average degree at least k . Such graph has an ℓ-cycle, contradiction. If 3t < k, we can take ⌊k/(3t)⌋ disjoint copies of graph F ′ [Y ] together with at most k/2 isolated vertices to get a C ℓ -free k-vertex graph with average degree at least 4d k (ℓ)/2 > d k (ℓ), contradicting the definition of d k (ℓ).
To complete the proof we use a variant of Pósa's rotation lemma: Lemma 2.1 in [23] states that if |∂X| > 2|X| for every subset X ⊂ V (F ′ ) of size at most k, then F ′ contains a cycle of length 3k ≥ 2k + 2. Moreover one vertex of this cycle has all its neighbors on the cycle, so since the minimum degree of F ′ is at least 12d k (ℓ) ≥ 3, this gives us a θ-graph with at least 2k + 2 vertices.

Proof of Theorem 1
Let G be a C ℓ -free graph of average degree at least 96d k (ℓ). Consider a connected bipartite subgraph G ′ of G of average degree at least 48d k (ℓ). Let T be a breadth first search tree in G ′ . Since G ′ is bipartite On the other hand Therefore for some i, the edges of G ′ between L i−1 (T ) and L i (T ) form a bipartite graph F of average degree at least 24d k (ℓ). By Lemma 7, F contains a θ-graph F ′ with at least 2k + 2 vertices. Let U = V (F ′ ) ∩L i−1 (T ) and W = V (F ′ )∩L i (T ). Let T ′ be the minimum subtree of T such that V (T ′ )∩U = U. Then the vertex u of T ′ closest to the root of T has degree at least two in T ′ . This implies T ′ − {u} has at least two components. Let A be the set of vertices of U in one of the components, and B = V (F ′ )\A. Then V (F ′ ) has a partition A ∪ B, but A and B do not form the bipartition of F ′ . By Lemma 6, for each r ∈ {1, 2, . . . , k}, there exists a path P of length 2r in F ′ with one end a ∈ A and one end b ∈ B. Since P has even length, b ∈ V (T ′ ) ∩ L i−1 (T ). Let h denote the height of T ′ . Then a, b ∈ V (T ′ ) are connected in T ′ to u by a unique path of length h. Since they are in different branches of T ′ they are connected in T ′ by a path of length 2h. Together with P , this path forms a cycle of length 2h + 2r in G. This works for any r ∈ {1, 2, . . . , k}, giving cycles C 2h+2 , C 2h+2 , . . . , C 2h+2k and completing the proof.

Concluding remarks
• The case of cycles of length zero mod k has received considerable attention. Using his subdivided grid theorem for graphs of large tree-width, Thomassen [27] gave a polynomial-time algorithm for finding a cycle of length 0 mod k in a graph or a certificate that no such cycle exists. It is an open question as to whether such an algorithm exists for finding a cycle of length ℓ mod k when ℓ = 0.
• Thomassen [27] conjectured that every graph of minimum degree at least k + 1 contains cycles of all possible even lengths mod k. This conjecture was proved when k is even by Liu and Ma [19], and they showed further that there are cycles of k/2 consecutive even lengths in this case. Liu and Ma also showed that if k is odd and G is a graph of minimum degree at least k + 5, then G contains cycles of all even lengths mod k. It is natural to conjecture the following strengthening of Thomassen's conjecture [27]: Conjecture 8. If t ≥ 1, and G is a graph with a maximum number of edges that does not contain cycles of t consecutive even lengths, then every block of G is a complete graph of order at most 2t + 1.
It is an exercise to see that the conjecture is true for t = 1, and in fact the blocks in every extremal graph with an odd number of vertices are triangles. In particular, the conjecture (with t = k/2) implies c k (ℓ) ≤ k + 1 whenever k and ℓ are even, and c k (2) = k + 1. The result of Liu and Ma [19] shows c k (ℓ) ≤ 2k when both k and ℓ are even, since every graph of average degree at least 2k contains a subgraph of minimum degree at least k + 1. We refer the reader to [29] for a survey of this and related extremal problems for cycles in graphs.
• In this paper we showed c k (ℓ) = O(d k (ℓ)) = O(ℓk 1/ℓ ) when ℓ is even. We conjectured for each fixed ℓ that c k (ℓ) ∼ d k (ℓ) as k → ∞ (see Conjecture 2). It may even be true that for infinitely many n, the extremal n-vertex graph with no cycle of length 4 mod k is a connected graph whose blocks are all extremal C 4 -free graphs with k + 3 vertices. We propose the more tractable problem of determine the asymptotic value of c k (4). In this case our conjecture states c k (4) ∼ k 1/2 , since d k (4) ∼ k 1/2 (see [29]).
• Concerning chromatic number and consecutive cycle lengths, it is an open question to determine for k ≥ 2 the largest chromatic number χ k of a graph which does not contain cycles of k consecutive lengths. Lemma 9 in [17] shows that a graph of chromatic number at least 4k contains cycles of k consecutive lengths, so we deduce χ k ≤ 4k − 1. With some additional effort, one can show χ k ≤ 2k + 2 for k ≥ 2. On the other hand, a graph G * k whose blocks are all cliques of order k + 1 does not contain cycles of k consecutive lengths, so k + 1 ≤ χ k ≤ 2k + 2 for k ≥ 2. It seems plausible that G * k is the extremal construction for k ≥ 3, and perhaps χ k = k + 1 for all k ≥ 2: Conjecture 9. For all k ≥ 2, χ k = k + 1.
Gyárfás [13] proved that for k ≥ 2, if a graph G does not contain cycles of k distinct odd lengths, then it has chromatic number at most 2k − 1 with equality for k ≥ 3 if and only if G = G * 2k−1 . Perhaps the same example is extremal for cycles of k consecutive odd lengths.