The number of triple systems without even cycles Dhruv Mubayi Lujia Wang ∗ † 7 1 February 10, 2017 0 2 b e F Abstract 8 For k>4, a loose k-cycle Ck is a hypergraph with distinct edges e1,e2,...,ek such ] O that consecutive edges (modulo k) intersect in exactly one vertex and all other pairs of edges are disjoint. Our main result is that for every even integer k > 4, there exists C . c>0 such that the number of triple systems with vertex set [n] containing no Ck is at h cn2 most 2 . t a An easy constructionshows that the exponent is sharp in order of magnitude. This m may be viewed as a hypergraph extension of the work of Morris and Saxton, who [ provedtheanalogousresultforgraphswhichwasalongstandingproblem. Forr-uniform hypergraphswith r >3, we improvethe trivial upper bound but fall shortofobtaining 2 r−1 the order of magnitude in the exponent, which we conjecture is n . v 9 Ourproofmethodisdifferentthanthatusedformostrecentresultsofasimilarflavor 6 about enumerating discrete structures, since it does not use hypergraph containers. 2 One novelingredientis the useofsome (new)quantitative estimatesfor anasymmetric 0 version of the bipartite canonical Ramsey theorem. 0 . 1 0 1 Introduction 7 1 : v An important theme in combinatorics is the enumeration of discrete structures that have i X certain properties. Within extremal combinatorics, one of the first influential results of r this type is the Erd˝os-Kleitman-Rothschild theorem [25], which implies that the number of a triangle-free graphs with vertex set [n] is 2n2/4+o(n2). This has resulted in a great deal of work on problems about counting the number of graphs with other forbidden subgraphs [6, 7,8,14,15,26,31,40,48]as wellassimilar questionforotherdiscretestructures[10,11,17, 18, 35, 46, 47, 49, 51]. In extremal graph theory, these results show that such problems are closely related to the corresponding extremal problems. More precisely, the Tura´n problem asks for the maximum number of edges in a (hyper)graph that does not contain a specific subgraph. For a given r-uniform hypergraph (henceforth r-graph) F, let ex (n,F) be the r maximum number of edges among all r-graphs G on n vertices that contain no copy of ∗DepartmentofMathematics,Statistics,andComputerScience,UniversityofIllinois,Chicago,IL60607, Email:[email protected]. Research partially supported by NSFgrant DMS-1300138. †DepartmentofMathematics,Statistics,andComputerScience,UniversityofIllinois,Chicago,IL60607, Email:[email protected]. Research partially supported by NSFgrant DMS-1300138. 1 F as a (not necessarily induced) subgraph. Henceforth we will call G an F-free r-graph. Write Forb (n,F) for the set of F-free r-graphs with vertex set [n]. Since each subgraph r of an F-free r-graph is also F-free, we trivially obtain Forb (n,F) > 2exr(n,F) by taking r | | subgraphs of an F-free r-graph on [n] with the maximum number of edges. On the other hand for fixed r and F, n Forb (n,F) 6 r = 2O(exr(n,F)logn), r | | i i6exXr(n,F)(cid:18)(cid:0) (cid:1)(cid:19) so the issue at hand is the factor logn in the exponent. The work of Erd˝os-Kleitman- Rothschild [25] and Erd˝os-Frankl-Ro¨dl [26] for graphs, and Nagle-R¨odl-Schacht [45] for hypergraphs (see also [44] for the case r = 3) improves the upper bound above to obtain Forb (n,F) = 2exr(n,F)+o(nr). r | | Althoughmuchworkhasbeendonetoimprovetheexponentabove(see[1,6,7,8,31,34,48] for graphs and[10,11, 21, 47,13, 50]for hypergraphs), this is a somewhat satisfactory state of affairs when ex (n,F) = Ω(nr) or F is not r-partite. r Inthecaseof r-partiter-graphs,thecorrespondingquestionsappeartobemorechallenging since the tools used to address the case ex (n,F) = Ω(nr) like the regularity lemma are not r applicable. The major open problem here when r = 2 is to prove that Forb (n,F) = 2O(exr(n,F)). r | | The two cases that have received the most attention are for r = 2 (graphs) and F = C 2l or F = K . Classical results of Bondy-Simonovits [16] and Kov´ari-So´s-Tura´n [36] yield s,t ex (n,C ) = O(n1+1/l) and ex (n,K ) = O(n2 1/s) for 2 6 s 6 t, respectively. Although 2 2l 2 s,t − it is widely believed that these upper bounds give the correct order of magnitude, this is not known in all cases. Hence the enumerative results sought in these two cases were Forb (n,C ) = 2O(n1+1/l) and Forb (n,K ) = 2O(n2−1/s). 2 2l 2 s,t | | | | In 1982, Kleitman and Winston [32] proved that Forb (n,C ) = 2O(n3/2) which initi- 2 4 | | ated a 30-year effort on searching for generalizations of the result to complete bipar- tite graphs and even cycles. Kleitman and Wilson [33] proved similar results for C 6 and C in 1996 by reducing to the C case. Finally, Morris and Saxton [42] recently 8 4 proved that Forb (n,C ) = 2O(n1+1/l) and Balogh and Samotij [14, 15] proved that 2 2l | | Forb (n,K ) = 2O(n2−1/s) for2 6 s 6 t. Boththeseresultsusedthehypergraphcontainer 2 s,t | | method (developed independently by Saxton and Thomason [50], and by Balogh-Morris- Samotij [13]) which has proved to be a very powerful technique in extremal combinatorics. For example, [13] and [50] reproved Forb (n,F) = 2exr(n,F)+o(nr) using containers. r | | There are very few results in this area when r > 2 and ex (n,F) = o(nr). The only cases r solved so far are when F consists of just two edges that intersect in at least t vertices [9], or when F consists of three edges such that the union of the first two is equal to the third [12] (see also [4, 5, 22, 23] for some related results). These are natural points to begin these investigations since the corresponding extremal problems have been studied deeply. 2 Recently, Kostochka, the firstauthor and Verstra¨ete [37, 38, 39], and independently, Fu¨redi and Jiang [29] (see also [30]) determined the Tura´n number for several other families of r-graphs including paths, cycles, trees, and expansions of graphs. These hypergraph ex- tremal problems have proved to be quite difficult, and include some longstanding conjec- tures. Guided and motivated by these recent developments on the extremal number of hypergraphs, we consider the corresponding enumeration problems focusing on the case of cycles. Definition 1 For each integer k > 3, a k-cycle C is a hypergraph with distinct edges k e ,...,e and distinct vertices v ,...,v such that e e = v for all 1 6 i 6 k 1, 1 k 1 k i i+1 i ∩ { } − e e = v and e e = for all other pairs i,j. 1 k k i j ∩ { } ∩ ∅ Sometimes we refer to C as a loose or linear cycle. To simplify notation, we will omit the k parameter r when the cycle C is a subgraph of an r-graph. k Since ex (n,C )= O(nr 1), we obtain the upper bound r k − Forb (n,C ) =2O(nr−1logn) r k | | when r and k are fixed and n . Our main result is the following theorem, which → ∞ improves this upper bound and generalizes the Morris-Saxton theorem [42] to 3-graphs. Theorem 2 (Main Result) For integers r,k > 3, there exists c= c(r,k), such that 2cn2 if r =3 and k is even, Forb (n,C ) < | r k | (2cnr−1(logn)(r−3)/(r−2) if r >3. Since trivially ex (n,C ) = Ω(nr 1) for all r > 3, we obtain Forb (n,C ) = 2Θ(n2) when k r k − 3 k | | is even. We conjecture that a similar result holds for r > 3 and cycles of odd length. Conjecture 3 For fixed r > 3 and k > 3 we have Forb (n,C ) = 2Θ(nr−1). r k | | Almost all recent developments in this area have relied on the method of hypergraph con- tainers that we mentioned above. What is perhaps surprising about the current work is that the proofs do not use hypergraph containers. Instead, our methods employ old and new tools in extremal (hyper)graph theory. The old tools include the extremal numbers for cycles modulo h and results about decomposing complete r-graphs into r-partite ones, and the new tools includethe analysis of theshadow for extremal hypergraphproblems and quantitative estimates for the bipartite canonical Ramsey problem. 1.1 Definitions and notations Throughout this paper, we let [n] denote the set 1,2,...,n . Write X = S X : { } r { ⊂ S = r and X = S X : S 6 r . For X [n], an r-uniform hypergraph or r-graph | | } 6r { ⊂ | | } ⊂ (cid:0) (cid:1) H on vertex set X is a collection of r-element subsets of X, i.e. H X . The vertex (cid:0) (cid:1) ⊂ r (cid:0) (cid:1) 3 set X is denoted by V(H). The r-sets contained in H are edges. The size of H is H . | | Given S V(H), the neighborhood N (S) of S is the set of all T V(H) S such that H ⊂ ⊂ \ S T H. The codegree of S is d (S) = N (S). When the underlying hypergraph is H H ∪ ∈ | | clear from context, we may omit the subscripts in these definitions and write N(S) and d(S) for simplicity. The sub-edges of H are the (r 1)-subsets of [n] with positive codegree − in H. The set of all sub-edges of H is called the shadow of H, and is denoted ∂H. An r-partite r-graph H is an r-graph with vertex set r V (the V s are pairwise disjoint), i=1 i i and every e H satisfies e V = 1 for all i [r]. When all such edges e are present, H i ∈ | ∩ | ∈ F is called a complete r-partite r-graph. When V = s for all i [r], a complete r-partite i | | ∈ r-graph H is said to be balanced, and denoted K . s:r For each integer k > 1, a (loose, or linear) path of length k denoted by P , is a collection of k k edges e ,e ,...,e such that e e = 1 if i= j +1, and e e = otherwise. 1 2 k i j i j | ∩ | ∩ ∅ We will often omit floors and ceilings in our calculations for ease of notation and all logs will have base 2. 2 Proof of the main result The proof of Theorem 2 proceeds by counting edge-colored (r 1)-graphs with certain − restrictions; the details differ quite substantially for the cases r = 3 and r > 3. In this section we state the main technical statement (Theorem 5) about these edge-colorings that will be needed, as well as some other tools, and then prove Theorem 2 using these results. 2.1 Main technical statement Given an (r 1)-graph G with V(G) [n], a coloring function is a function χ : G [n] − ⊂ → such that χ(e) = z [n] e for every e G. We call z the color of e. The vector of e e ∈ \ ∈ colors N = (z ) is called an edge-coloring of G. The pair (G,N ) is an edge-colored G e e G G ∈ (r 1)-graph. A color class is the set of all edges that receive the same color. − Given G, each edge-coloring N defines an r-graph H(N ) = e z : e G , called G G e { ∪ { } ∈ } the extension of G by N . When there is only one coloring that has been defined, we also G use the notation G = H(N ) for the extension. Observe that any subgraph G G also ∗ G ′ ⊂ admits an extension by N , namely, G = e z : e G G . If G G and χ G ′∗ e ′ ∗ ′ G′ { ∪{ } ∈ } ⊂ ⊂ | is one-to-one, then G is called rainbow colored. If a rainbow colored G further satisfies ′ ′ that z / V(G) for all e G, then G is said to be strongly rainbow colored. Note that a e ′ ′ ′ ∈ ∈ strongly rainbow colored graph C G gives rise to 3-graph C in G G . k ′ k ′∗ ∗ ⊂ ⊂ Definition 4 Given r > 3,k > 3,s > 1, let f (n,k,s) be the number of edge-colored r balanced complete (r 1)-partite (r 1)-graphs G = K withV(G) [n], whose extension s:r 1 − − − ⊂ G is C -free. ∗ k The function f (n,k,s) allows us to encode r-graphs, and our main technical theorem gives r an upper bound for this function. 4 Theorem 5 Given r > 3,k > 3 there exist D = D , c = c (r,k), such that k/2 2 2 2(5/2)kslogn+4s2logD if r = 3,k is even, f (n,k,s) 6 r (2(c2+2r)sr−2logn+sr−1(log(c2+r)+(r−2)logs) if r > 3. For r and k fixed, the bounds above can be written as 2O(slogn+s2) if r = 3,k is even, f (n,k,s) = r (2O(sr−2logn+sr−1logs) if r > 3. Note that the trivial upper bound is f (n,k,s) 6 n(r 1)s+sr−1 2sr−1logn (first choose r − ∼ (r 1)s vertices, then color each of its sr 1 edges) so Theorem 5 is nontrivial only if − − s = o(n). The proof of Theorem 5 will be given in Sections 3–6. 2.2 Decomposing r-graphs into balanced complete r-partite r-graphs Chung-Erdo˝s-Spencer [19] and Bublitz [3] proved that the complete graph K can be de- n composed into balanced complete bipartite graphs such that the sum of the sizes of the vertex sets in these bipartite graphs is at most O(n2/logn). See also [55, 43] for some generalizations and algorithmic consequences. We need the following generalization of this result to r-graphs. Theorem 6 Let n > r > 2. There exists a constant c = c (r), such that any n-vertex ′1 ′1 r-graph H can be decomposed into balanced complete r-partite r-graphs K ,i = 1,...,m, si:r with s 6(logn)1/(r 1) and m sr 1 6 c nr/(logn)1/(r 1). i − i=1 i− ′1 − P Proof. An old result of Erd˝os [27] states that for any integers r,s >2 and n> rs, we have ex (n,K ) < nr 1/sr−1. r s:r − Note that for r = 2, this was proved much earlier by Ko˝v´ari-So´s-Tura´n [36]. We first assume that n > 2r. Taking the derivative, one can show that for each r > 2, n n/r (logn)1/(r 1) is an increasing function in n, hence its minimum is achieved at − 7−→ − n = 2r. So for all n > 2r, we have n 2r (logn)1/(r 1) > (log2r)1/(r 1) = 2 (log2r)1/(r 1) > 0. − − − r − r − − Thus, for any s 6 (logn)1/(r 1) 6 n/r, the Tura´n number for K is − s:r ex (n,K ) < nr 1/sr−1. r s:r − Next,wegiveanalgorithmofdecomposingH intoK s. LetH = H. Fori > 1,repeatedly s:r 1 find a K H with maximum s subject to s 6 (logn)1/(r 1) and delete it from H to si:r ⊂ i i i − i formH . Theloop terminates atstep iif H 6 nr/(logn)1/(r 1). Thenlettheremaining i+1 i − | | graph be decomposed into single edges (K s). 1:r 5 By the algorithm, the vertex size of each K satisfies that s 6 (logn)1/(r 1),1 6 i 6 m si:r i − automatically. So we are left to show the upper bound for m sr 1. i=1 i− We divide the iterations of the above algorithm into phasePs, where the kth phase consists of those iterations where the number of edges in the input r-graph of the algorithm lies in the interval (nr/(k+1),nr/k]. In other words, in phase k, each K to be found is in an si:r r-graph Hi with Hi > nr/(k+1). Define s(k) = (logn/log(k+1))1/(r−1). Then it is easy | | to see s(k) 6 (logn)1/(r 1) 6 n/r. So by Erd˝os’ result − nr = nr 1/s(k)r−1 > ex(n,K ). k+1 − s(k):r Hence, K H . So in phase k, the minimum s of a K we are able to find has the s(k):r ⊂ i i si:r lower bound 1/(r 1) logn − s > s(k) = . i log(k+1) (cid:18) (cid:19) Now notice that m m 1 sr 1 = sr . i− i · s i i=1 i=1 X X Dividing up the terms in the summation according to phases, we observe that this is a sum of the number of edges deleted in the kth phase times a weight of 1/s for each edge. Also i notice that there are at most nr/(logn)1/(r 1) single edges, we have − m sr 1 6 nr + ∞ nr 1 1 log(k+1) 1/(r−1) i− (logn)1/(r 1) k − k+1 logn i=1 − k=1 (cid:18) (cid:19)(cid:18) (cid:19) X X nr ∞ nr(log(k+1))1/(r−1) = + (logn)1/(r 1) k(k+1)(logn)1/(r 1) − k=1 − X c nr = ′1 , (logn)1/(r 1) − where ∞ (log(k+1))1/(r−1) c = 1+ . ′1 k(k+1) k=1 X Finally, for n < 2r, we just let H be decomposed into K s. Then we obtain the following 1:r bound for m sr 1. i=1 i− m 2r c nr P sr 1 = m 6 6 ′1 i− r (logn)1/(r 1) i=1 (cid:18) (cid:19) − X with appropriately chosen c = c (r). This completes the proof. ′1 ′1 6 2.3 A corollary of Theorem 5 Theorem 5is aboutthenumberof ways to edge-color complete (r 1)-partite (r 1)-graphs − − with parts of size s and vertex set in [n]. In this section, we use Theorems 5 and 6 to prove a related statement wherewe donot requirethe(r 1)-partite condition andthe restriction − to s vertices. Definition 7 For r > 3 and k > 3, let g (n,k) be the number of edge-colored (r 1)-graphs r − G with V(G) [n] such that the extension G is C -free. ∗ k ⊂ Lemma 8 Let r > 3,k > 3, and n be large enough. Then there exist c = c (r), c = 1 1 2 c (r,k) and D = D , such that 2 k/2 2(3kc1+4logD)n2 if r = 3,k is even, g (n,k) 6 r (22(c2+2r)c1nr−1(logn)(r−3)/(r−2) if r > 3. Note that if r and k are fixed, for both cases we have g (n,k) =2O(nr−1(logn)(r−3)/(r−2)). r Proof. Given any (r 1)-graph G, by applying Theorem 6 with parameter r 1 in- − − stead of r, we may decompose G into balanced complete (r 1)-partite (r 1)-graphs K ,...,K , with s 6 (logn)1/(r 2) and m sr 2 6c−nr 1/(logn)1/−(r 2), where s1:r 1 sm:r 1 i − i=1 i− 1 − − − − c = c (r)= c (r 1). Then we trivially deduce the following two facts. 1 1 ′1 − P From the second inequality, we have m 6 c nr 1/(logn)1/(r 2). 1 − − • Using the fact that these copies of K are edge disjoint, we have • si:r−1 m n sr 1 6 < nr 1. i− r 1 − i=1 (cid:18) − (cid:19) X Therefore, to construct an edge-colored G, we need to first choose a sequence of positive integers (m,s ,...,s ) such that m 6 c nr 1/(logn)1/(r 2), and s 6 (logn)1/(r 2) for all 1 m 1 − − i − i. More formally, let S = (m,s ,s ,...,s ) : m 6 c nr 1/(logn)1/(r 2),1 6 s 6 (logn)1/(r 2),1 6 i6 m . n,r 1 2 m 1 − − i − { } Then c nr 1 c1nr−1 S 6 1 − (logn)1/(r 2) (logn)1/(r−2) n,r − | | (logn)1/(r 2) − (cid:16) (cid:17) log c1nr−1 +c1nr−1log(logn)1/(r−2) = 2 (cid:18)(logn)1/(r−2)(cid:19) (logn)1/(r−2) 6 2c1nr−1. 7 Then, we sequentially construct edge-colored K for each i [m]. To make sure G is si:r−1 ∈ ∗ C -free, K has to be made C -free in the first place. Applying Theorem 5, we get the fokllowing us∗pi:pr−er1 bounds. For r = 3kand even k, m g (n,k) 6 f (n,k,s ) 3 3 i (m,s1,..X.,sm)∈Sn,3Yi=1 m 6 2(5/2)ksilogn+4s2ilogD (m,s1,..X.,sm)∈Sn,3Yi=1 6 2 mi=1(5/2)ksilogn+4s2ilogD P (m,s1,..X.,sm)∈Sn,3 6 2(5/2)klogn(c1n2/logn)+4n2logD (m,s1,..X.,sm)∈Sn,3 6 2c1n2 2(5/2)kc1n2+4n2logD · 6 2(3kc1+4logD)n2. For r > 3, and (m,s ,...,s ) S , the number of ways to construct these copies of 1 m n,r ∈ K is at most si:r−1 m m fr(n,k,si)6 2(c2+2r)sri−2logn+sri−1(log(c2+r−1)+(r−2)logsi) i=1 i=1 Y Y = 2 mi=1(c2+2r)sri−2logn+sri−1(log(c2+r−1)+(r−2)logsi) P 6 2(c2+2r)(logcn1)n1r/−(r1−2) logn+nr−1(log(c2+r−1)+(r−2)log(logn)1/(r−2)) 6 2(c2+2r)c1nr−1(logn)(r−3)/(r−2)+nr−1(log(c2+r 1)+(r 2)log(logn)1/(r−2)) − − 6 2(3/2)(c2+2r)c1nr−1(logn)(r−3)/(r−2). Note that this is the only place in the proof where we use s 6 (logn)1/(r 2). i − Therefore, m g (n,k) 6 f (n,k,s ) r r i (m,s1,..X.,sm)∈Sn,rYi=1 6 2c1nr−1 2(3/2)(c2+2r)c1nr−1(logn)(r−3)/(r−2) · 6 22(c2+2r)c1nr−1(logn)(r−3)/(r−2), and the proof is complete. 2.4 Finding a cycle if codegrees are high A crucial statement that we use in our proof is that any r-graph such that every sub-edge has high codegree contains rich structures, including cycles. This was explicitly proved in [37] and we reproduce the proof here for completeness. 8 Lemma 9 (Lemma 3.2 in [37]) For r,k > 3, if all sub-edges of an r-graph H have codegree greater than rk, then C H. k ⊂ Proof. Let F = ∂r 2H be the (2-)graph that consists of pairs that are contained in some − edge of H. Note that each edge of H induces a K in F, so all edges of F are contained in r some triangle (C ). Furthermore, since all sub-edges of H have codegree greater than rk, 3 each edge of F is in more than rk triangles. We will first find a k-cycle in F as follows. Starting with a triangle C , for i= 3,...,k 1 pick an edge e C , form C by replacing 3 i i+1 − ∈ e by the other two edges of one of at least rk i+2 triangles containing e and excluding − other vertices of C . i Next, let C F be a k-cycle with edges f ,...,f . Find in H a subgraph C = e : e = k 1 k i i ⊂ { f g ,i [k] such that V(C) = k e is of maximum size. Suppose C is not a k-cycle i ∪ i ∈ } ∪i=1 i in H. Then there are distinct i,j such that g g = . Pick v g g and consider the i j i j ∩ 6 ∅ ∈ ∩ sub-edgee v = f g v . Thecodegreed (e v ) > rk byassumption. Ontheother i i i H i \{ } ∪ \{ } \{ } hand, V(C) <rk since C is not ak-cycle, sothereexists a vertex v N (e v ) V(C). ′ H i | | ∈ \{ } \ Replacing e by e v v , we obtain a C with a larger vertex set, a contradiction. So i i ′ ′ \{ }∪{ } H contains a C . k 2.5 Proof of Theorem 2 Now we have all the ingredients to complete the proof of our main result. Proof of Theorem 2. Starting with any r-graph H on [n] with C H, we claim that k 6⊂ there exists a sub-edge with codegree at most rk. Indeed, otherwise all sub-edges of H will have codegree more than rk, and then by Lemma 9 we obtain a C H. Let e be the k ′ ⊂ sub-edge of H with 0< d (e)6 rk such that it has smallest lexicographic order among all H ′ such sub-edges. Delete all edges of H containing e from H (i.e. delete e H : e e ). ′ ′ { ∈ ⊂ } Repeat this process of “searching and deleting” in the remaining r-graph until there are no such sub-edges. We claim that the remaining r-graph must have no edges at all. Indeed, otherwise we get a nonempty subgraph all of whose sub-edges have codegree greater than rk, and again by Lemma 9, we obtain a C H. k ⊂ Given any C -free r-graph H on [n], the algorithm above sequentially decomposes H into a k collection of sets of at most rk edges who share a sub-edge (an (r 1)-set) in common. We − regard the collection of these (r 1)-sets as an (r 1)-graph G. Moreover, for each edge − − e G, let N be the set of vertices v V(H) such that e v is an edge of H at the time e ∈ ∈ ∪{ } e was chosen. So Ne ∈ [6n]r\ke , for all e ∈ G. Thus, we get a map (cid:0) (cid:1) [n] [n] e φ: Forb (n,C ) (G,N ) :G ,N = N \ : e G . r k −→ G ⊂ r 1 G e ∈ 6 rk ∈ (cid:26) (cid:18) − (cid:19) (cid:18) (cid:18) (cid:19) (cid:19)(cid:27) We observe that φ is injective. Indeed, φ 1((G,N )) = H(N ) = e z :e G,z N , − G G e e e { ∪{ } ∈ ∈ } 9 therefore Forb (n,C ) = φ(Forb (n,C )). Let P = φ(Forb (n,C )) which is the set of r k r k r k | | | | all pairs (G,N ) such that H(N ) is C -free. Next we describe our strategy for upper G G k bounding P . | | For each pair (G,N ) P and e G, we pick exactly one z1 N . Thus we get a pair G ∈ ∈ e ∈ e (G ,N ), where G = G, and N = (z1 : e G ). Then, delete z1 from each N , let 1 G1 1 G1 e ∈ 1 e e G = e G : N z1 = and pick z2 N z1 to get the pair (G ,N ). For 2 { ∈ 1 e \{ e} 6 ∅} e ∈ e \{ e} 2 G2 2 6 i < rk, we repeat this process for G to obtain G . Since each N contains only i i+1 Gi singletons, the pair (G ,N ) can be regarded as an edge-colored (r 1)-graph. Note that i Gi − we may get some empty G s. This gives us a map i [n] ψ : P (G ,...,G ) :G is edge-colored for all i [rk] . 1 rk i −→ ⊂ r 1 ∈ (cid:26) (cid:18) − (cid:19) (cid:27) Moreover, it is almost trivial to observe that ψ is injective, since if y = y , then either the ′ 6 underlying (r 1)-graphs of y and y differ, or the (r 1)-graphs are the same but the color ′ − − sets differ. In both cases one can easily see that ψ(y) = ψ(y ). Again, we let Q = ψ(P). ′ 6 By Lemma 8, we have rk Forb (n,C ) = P = Q 6 g (n,k) r k r | | | | | | i=1 Y 3k 2(3kc1+4logD)n2 if r = 3,k is even 6 i=1 (Qri=k122(c2+2r)c1nr−1(logn)(r−3)/(r−2) if r > 3 Q2 3i=k1(3kc1+4logD)n2 if r = 3,k is even 6 P (2 ri=k12(c2+2r)c1nr−1(logn)(r−3)/(r−2) if r > 3 P 2(9k2c1+12klogD)n2 if r = 3,k is even 6 (22rk(c2+2r)c1nr−1(logn)(r−3)/(r−2) if r > 3 =2cnr−1(logn)(r−3)/(r−2). where c = 9k2c +12klogD if r = 3 and k is even, and c = 2rk(c +2r)c if r > 3. The 1 2 1 constants c = c (r),c = c (r,k) and D = D are from Theorem 6 and Theorem 5, 1 1 2 2 k/2 respectively. 3 Proof of Theorem 5 for r > 3 In the remaining part of the paper, we prove Theorem 5. The cases r = 3 and r > 3 have quite different proofs. In this short section we prove the case r > 3. We need one more ingredient to prove Theorem 5, namely a partite version of the extremal result for C . This is a corollary of the main result of [37] although it can also be proved 2l directly by analyzing the shadow with a much better bound. Lemma 10 Let r > 3, k > 3 and G be an r-partite r-graph on vertex sets r V with i=1 i V = s, for all i. There exists c = c (r,k), such that if G > c sr 1 then G contains a | i| ′2 ′2 | | ′2 − F cycle of length k. 10