Triangles in $C_5$-free graphs and Hypergraphs of Girth Six

We introduce a new approach and prove that the maximum number of triangles in a $C_5$-free graph on $n$ vertices is at most $$(1 + o(1)) \frac{1}{3 \sqrt 2} n^{3/2}.$$ We also show a connection to $r$-uniform hypergraphs without (Berge) cycles of length less than six, and estimate their maximum possible size.


| INTRODUCTION
Motivated by a conjecture of Erdős [3] on the maximum possible number of pentagons in a triangle-free graph, Bollobás and Győri [2] initiated the study of the natural converse of this problem. Let ex n K C ( , , ) 3 5 denote the maximum possible number of triangles in a graph on n vertices without containing a cycle of length five as a subgraph. Bollobás and Győri [2] showed that o n e x n K C o n (1 + (1)) 1 3 3 ( , , ) (1 + (1)) 5 4 .
Their lower bound comes from the following example: Take a C 4 -free bipartite graph G 0 on n n 3 + 3 ∕ ∕ vertices with about n ( 3) 3 2 ∕ ∕ edges and double each vertex in one of the color classes and add an edge joining the old and the new copy to produce a graph G. Then, it is easy to check that G contains no C 5 and the number of triangles in G is equal to the number of edges in G 0 .
In this paper our aim is to introduce a new approach and use it to improve two old results and prove a new result. Our approach consists of carefully bounding the number of paths of length 5 (or paths of length 3) by exploiting the structure of certain subgraphs. Roughly speaking, we are able to efficiently bound the number of 5-paths whose middle edge lies in a dense subgraph (e.g., in a K 4 ). We expect this approach to have further applications.
Our first result improves the previous estimates (1)-(3), on the maximum possible number of triangles in a C 5 -free graph, as follows. Applying our approach to the 2-shadow of a hypergraph of girth at least six, we prove the following result.

Theorem 2.
Let H be an r-uniform hypergraph of girth at least six on n vertices. Then Let us mention a related result of Lazebnik and Verstraëte [12] which states the following. If H is an r-uniform hypergraph of girth at least five, then Note that Theorem 2 shows that if a (Berge) cycle of length 5 is also forbidden, then the above bound can be improved by a factor of r . It would be interesting to determine whether there is a matching construction for the bound in Theorem 2, at least when r = 3.
In Section 3.2, we show a close connection between Theorems 1 and 2, and prove that the estimate in Theorem 1 can be slightly improved using Theorem 2. However, to illustrate the main ideas of the proof of Theorem 1, we decided to state Theorem 1 in a slightly weaker form.
Loh, Tait, Timmons, and Zhou [14] introduced the problem of simultaneously forbidding an induced copy of a graph and a (not necessarily induced) copy of another graph. A graph is called induced-F -free if it does not contain an induced copy of F . They asked the following question: What is the largest size of an induced-C 4 -free and C 5 -free graph on n vertices? They noted that the example showing the lower bound in (1) is in fact induced-C 4 -free and C 5 -free, thus it gives a lower bound of o n (1 + (1)) 2 3 3 3 2 ∕ . (If the "induced-C 4 -free" condition is replaced by "C 4 -free" condition, then Erdős and Simonovits [4] showed that the answer is o n (1 + (1)) 1 2 2 3 2 ∕ .) In [5], Győri and the current authors determined (asymptotically) the maximum size of an induced-K s t , -free and C k 2 +1 -free graph on n vertices whenever s = 2 and t 2  , or s t = = 3 except in the case when s t k = = = 2 (i.e., the question stated above), and in this case an upper bound of only n 2 3 2 ∕ ∕ was proven [5]. Here we show that using our approach one can slightly improve this upper bound.
Theorem 3. If G is a C 5 -free and induced-C 4 -free graph on n vertices, then

| Organization of the paper
In Section 2, we prove Theorem 1. In Section 3, we prove Theorem 2 and show how it can be used to slightly improve Theorem 1. Finally in Section 4, we prove Theorem 3.
Notation. Given a graph G and a vertex v of G, Let G be a C 5 -free graph on n vertices with maximum possible number of triangles. We may assume that each edge of G is contained in a triangle, because otherwise, we can delete it without changing the number of triangles. Two triangles T T , ʹ are said to be in the same block if they either share an edge or if there is a sequence of triangles T T T T T , , , …, , is easy to see that all the triangles in G are partitioned uniquely into blocks. Notice that triangles from two different blocks of G are edge-disjoint. Below we will characterize the blocks of G.
A block of the form abc abc abc where k 1  , is called a crown-block (i.e., a collection of triangles containing the same edge) and a block consisting of all triangles contained in the complete graph K 4 is called a K 4 -block. See Figure 1.
The following claim was proved in [6]. We repeat its proof for completeness.
Claim 1. Every block of G is either a crown-block or a K 4 -block.
Proof. If a block contains only one or two triangles, then it is easy to see that it is a crown-block. So we may assume that a block of G contains at least three triangles and let abc abc , 1 2 be some two triangles in it. We claim that if bc is contained in two triangles, then abc c 1 2 forms a K 4 . However, then there is no triangle in G which shares an edge with this K 4 and is not contained in it because if there is such a triangle, then it is easy to find a C 5 in G, a contradiction. So in this case, the block is a K 4 -block, and we are done.
So we can assume that whenever abc abc , 1 2 are two triangles then the edges ac bc ac bc , , , 2 are each contained in exactly one triangle. Therefore, any other triangle which shares an edge with either abc 1 or abc 2 must contain ab. Let abc 3 be such a triangle. Then applying the same argument as before for the triangles abc abc , 1 3 one can conclude that the edges ac bc , 3 3 are contained in exactly one triangle and so, any other triangle of G which shares an edge with one of the triangles abc abc abc , , 3 must contain ab again. So by induction, it is easy to see that all of the triangles in this block must contain ab. Therefore, it is a crown-block, as needed. □ F I G U R E 1 An example of a crown-block and a K 4 -block We define a decomposition  of the edges of G into paths of length 2, triangles and K 4 's, as follows: Since each edge of G belongs to a triangle, and all the triangles of G are partitioned into blocks, it follows that the edges of G are partitioned into blocks as well. Moreover, by Claim 1, edges of G can be decomposed into crown-blocks and K 4 -blocks. We further partition the edges of each crown-block abc abc abc Claim 2. Let u v , be two nonadjacent vertices of G. Then the number of paths of length 2 between u and v is at most two. Moreover, if uxv and uyv are paths of length 2 between u and v, then x and y are adjacent.
Proof. First let us prove the second part of the claim. Since we assumed every edge is contained in a triangle and u and v are not adjacent, there is a vertex w v ≠ such that uxw is a triangle. If w y ≠ , then uwxvy is a C 5 , a contradiction. So w y = , so x and y are adjacent, as desired.
Now suppose that there are three distinct vertices x y z , , such that uxv uyv uzv , , are paths of length 2 between u and v. Then x and y are adjacent by the discussion in the previous paragraph. Therefore uxyvz is a C 5 in G, a contradiction, proving the claim. □ Observe that the number of triangles in G is nt 3 ∕ . Our goal is to bound t from above. First we claim that for any vertex v of G, simply follows by noting that every edge is in a triangle. Now notice that t v ( ) is equal to the number of edges contained in the first neighborhood of v (denoted by N v ( ) 1 ). Moreover, there is no path of length three in the subgraph induced by N v ( ) 1 because otherwise there is a C 5 in G. So by Erdős-Gallai theorem, the number of edges contained in and dividing by n, we get ∕ . Then we may delete v and all the edges Then it is easy to see that if the theorem holds for G ʹ , then it holds for G as well. Repeating this procedure, we may assume that for every vertex v of G, t v t ( ) 3  ∕ . Therefore, by (4), we may assume that the degree of every vertex of G is at least t 3 ∕ .
Claim 3. We may assume that d G n ( ) 12 max  .
Proof. Suppose that there is a vertex v such that d v n ( ) > 12 . The sum of degrees of the vertices in N v ( ) 1 is at least 1 as we assumed that the degree of every vertex is (4). Therefore the number of edges between N v ( ) 1 and . Now notice that any vertex in N v ( ) 2 is incident to at most two of these edges by Claim 2.
for large enough n. Therefore, the total number of triangles in G is less than o (1 + (1)) . From now, we refer to a path of length five as a 5-path.
We say a 5- where C is some positive constant. Now we seek to bound the number of good 5-paths from above. Recall that we defined a decomposition  of the edges of G into three types of subgraphs: paths of length 2, triangles, and K 4 's. We distinguish three cases depending on which type of subgraph the middle edge of a good 5-path belongs to, and bound the number of good 5-paths in each of those cases separately in the following three claims.
A path of length two (or a 2-path) xyz is called good if x and z are not adjacent.
Claim 4. Let abc be a 2-path of the edge-decomposition . Then the number of good 5-paths in G whose middle edge is either ab or bc is at most n 2 .
Proof. A good 5-path xypqzw whose middle edge is ab or bc contains good 2-paths, xyp qzw , as subpaths (where pq is either ab or bc). Moreover, since xypqzw is a good 5-path and the 2-path abc is contained in the triangle abc (because of the way we defined the decomposition ), it follows that . We define n c similarly. Then the number of good 5-paths whose middle edge is either ab or bc is at most c  , so the right-hand side of the above inequality is at most n 2 , proving Claim 4.
It remains to prove this claim. Suppose for a contradiction that there are three such good 2-paths, say, p x y p x y p x y , , ). The former case is impossible by Claim 2 and in the latter case, note that a b c x , , , forms a K 4 , but this contradicts the definition of  since abc was assumed to be a 2-path component of  and no 2-path of  comes from a K 4 -block of G. □ Claim 5. Let abc be a triangle of the edge-decomposition . Then the number of good 5-paths in G whose middle edge is either ab, bc, or ca is at most n Proof. The proof is very similar to that of the proof of Claim 4. A good 5-path xypqzw whose middle edge is ab, bc, or ca contains good 2-paths, xyp, qzw, as subpaths. Moreover, since xypqzw is a good 5-path, it follows that , and let n n , b c be defined similarly. Then the number of good 5-paths whose middle edge is ab, bc, or ca is at most n n n n n n n n n By the same argument as in the proof of Claim 4, it is easy to see that n n n n + + 2 a b c  , so the above inequality finishes the proof. □ Claim 6. Let abcd be a K 4 of the edge-decomposition . Then the number of good 5-paths in G whose middle edge belongs to the K 4 is at most n Proof. Notice that any good 5-path xypqzw contains good 2-paths, xyp, qzw, as subpaths. Suppose the middle edge of xypqzw belongs to the K 4 , abcd. Then since xypqzw is a good 5-path, it follows that To see that the above inequality is true one simply needs to expand and rearrange the inequality  n n Using a similar argument as in the proof of Claim 4, it is easy to see that for any fixed vertex , respectively, and the number of . Therefore, using Claims 4-6, the total number of good 5-paths in G is at most  (by Equation 5). Therefore, Recall that when defining  we decomposed the edges of each crown-block into a triangle and 2-paths. This means that the number of triangles of G that belong to crown-blocks of G is at , and the number of triangles that belong to K 4 -blocks of G is at most α e G 4(1 − ) ( ) 6 . Therefore, the total number of triangles in G is at most ERGEMLIDZE AND METHUKU | 33 Now using (8), we obtain that the number of triangles in G is at most

| ON HYPERGRAPHS OF GIRTH AT LEAST SIX AND FURTHER IMPROVEMENT
In this section we will first study r-uniform hypergraphs of girth at least six, and prove Theorem 2. Then we use Theorem 2 to further (slightly) improve the estimate in Theorem 1 on the number of triangles in a C 5 -free graph.  ≠ , then vv v v′ 2 1 2 is a four-cycle in H ∂ , so it must be contained in a hyperedge of H, but this means the 3-path v v v v 0 1 2 is bad, a contradiction. Thus v v = ′ triangle, by the same argument of the proof of Theorem 1, the triangles of G Δ can be partitioned into crown-blocks and K 4 -blocks. So there is a decomposition  of the edges of G Δ into paths of length 2, triangles and K 4 's. First let us note that Claim 2 in the proof of Theorem 1 still holds for G (not just for G Δ ), as shown below.

|
Claim 9. Let u v , be two nonadjacent vertices of G. Then the number of paths of length 2 between u and v is at most two. Moreover, if uxv and uyv are the paths of length 2 between u and v, then x and y are adjacent.
Proof. The second part of the claim is trivial since G does not contain an induced copy of C 4 . To see the first part of the claim, suppose uxv uyv uzv , , are three distinct paths of length 2 in G. Then x and y are adjacent, so uxyvz is a C 5 in G, a contradiction. □ Our goal is to bound the average degree d of G. If a vertex has degree less than d 2 ∕ , then it may be deleted without decreasing the average degree of G, so we may assume that G has minimum degree at least d 2 ∕ . Now using this fact and Claim 9, one can show that the maximum degree of G is at most n 10 by repeating the same argument as in the proof of Claim 3. We say a 5-path v v v v v v 0 1 2 3 4 5 is bad if there exists an i such that v v v