Counting Hypergraphs with Large Girth
Abstract
Morris and Saxton [17] used the method of containers to bound the number of -vertex graphs with edges containing no -cycles, and hence graphs of girth more than . We consider a generalization to -uniform hypergraphs. The girth of a hypergraph is the minimum such that there exist distinct vertices and hyperedges with for all . Letting denote the number of -vertex -uniform hypergraphs with edges and girth larger than and defining , we show
which is tight when divides up to a term in the exponent. This result is used to address the extremal problem for subgraphs of girth more than in random -uniform hypergraphs.
Keywords: Hypergraph, Cycle, Berge.
1 Introduction
Let be a family of -uniform hypergraphs, or -graphs for short. Define to be the number of -free -graphs on , and define to be the number of -free -graphs on with exactly hyperedges. If denotes the maximum number of hyperedges in an -free -graph on , then it is not difficult to see that for ,
and summing over one obtains . The state of the art for bounding is the work of Ferber, McKinley, and Samotij [9] which shows that if is an -uniform hypergraph with and not too small, then
and this result encompasses many of the earlier results in the area [3, 4, 6, 17].
There are relatively few families for which effective bounds for are known. One family where results are known is , the family of all graph cycles of length at most . Morris and Saxton implicitly proved the following in this setting:
Theorem 1.1 ([17]).
For and , there exists a constant such that if is sufficiently large and , then
In the appendix we give a formal proof of this result. Theorem 1.1 generalizes earlier results of Füredi [11] when and of Kohayakawa, Kreuter, and Steger [15]. Erdős and Simonovits [8] conjectured for and ,
(1) |
which is only known to hold for – see Füredi and Simonovits [12] and also [24] for details. The truth of this conjecture would imply that the upper bound in Theorem 1.1 is tight up to the exponent of .
In this paper we extend Theorem 1.1 to -graphs. For , an -graph is a Berge -cycle if there exist distinct vertices and distinct hyperedges with for all . In particular, a hypergraph is said to be linear if it contains no Berge 2-cycle. We denote by the family of all -uniform Berge -cycles. If is an -graph containing a Berge cycle, then the girth of is the smallest such that contains a Berge -cycle. Let denote the family of all -uniform Berge cycles of length at most . With this , and an -graph has girth larger than if and only if it is -free. We again emphasize that hypergraphs with girth are all linear. We write for the number of -vertex -graphs with edges and girth larger than and for the number of -vertex -graphs with girth larger than .
Balogh and Li [2] proved for all and ,
This upper bound would be tight up to a term in the exponent if the following is true:
Conjecture I.
For all and and ,
Conjecture I holds for and – see [7, 16, 22, 23] – but is open and evidently difficult for and . Györi and Lemons [13] proved with , so the conjecture concerns constructions of dense -graphs of girth more than . The conjecture for without the is (1), and for each is stronger than (1), as can be seen by forming a graph from an extremal -vertex -graph of girth more than whose edge set consists of an arbitrary pair of vertices from each hyperedge. We emphasize that the term in Conjecture I is necessary for , due to the Ruzsa-Szemerédi Theorem [7, 22], and for , due to work of Conlon, Fox, Sudakov and Zhao [5].
1.1 Counting -graphs of large girth.
In this work we simplify and refine the arguments of Balogh and Li [2] to prove effective and almost tight bounds on relative to .
Theorem 1.2.
Let and . Then for all ,
(2) |
We note that (2) corrects a bound111Theorem 20 of [20] claims a stronger upper bound for than what we prove in Theorem 1.2, but we have confirmed with the authors that there was a subtle error in their proof. which appears in [20]. The inequality (2) is essentially tight when divides , due to standard probabilistic arguments (see for instance Janson, Łuczak and Rucinski [14]): it is possible to show that when , the uniform model of random -vertex -graphs with edges has girth larger than with probability at least for some constant depending only on and . In particular, there exists some constants such that for we have
(3) |
where the third inequality used and the last inequality used the trivial bound . This shows that the bound of Theorem 1.2 is best possible when divides up to a multiplicative error of for some constant . We believe that (3) should define the optimal exponent, and propose the following conjecture:
Conjecture II.
For all , and ,
Theorem 1.2 shows that this conjecture is true when divides , so the first open case of Conjecture II is when and .
In the case that Berge -cycles are forbidden instead of all Berge cycles of length at most , we can prove an analog of Theorem 1.2 with weaker quantitative bounds. To this end, let denote the number of -vertex -free -graphs on at most hyperedges.
Theorem 1.3.
For each , there exists such that
We suspect that this result continues to hold with replaced by .
1.2 Subgraphs of random -graphs of large girth.
Denote by the -graph obtained by including each hyperedge of independently and with probability . Given a family of -graphs , let denote the size of a largest -free subgraph of . Recall that a statement depending on holds asymptotically almost surely or a.a.s. if it holds with probability tending to 1 as . A hypergraph of girth at least three is a linear hypergraph, and it is not hard to show by a simple first moment calculation that if , then a.a.s
Our first result essentially determines the a.a.s behavior of the number of edges in an extremal subgraph of of girth four. In this theorem we omit the case , as it is straightforward to show that a.a.s when in this range.
Theorem 1.4.
Let . If , then a.a.s.:
Due to Theorems 1.2 and 1.4, the number of linear triangle-free -graphs with vertices and edges where and is:
The authors and Nie [19] obtained bounds for -uniform loose triangles222The loose triangle is the Berge triangle whose edges pairwise intersect in exactly one vertex., where for the same essentially tight bounds as in Theorem 1.4 were obtained, but for there remains a significant gap. In the case of subgraphs of girth larger than four, Theorem 1.2 allows us to generalize results of Morris and Saxton [17] and earlier results of Kohayakawa, Kreuter and Steger [15] giving subgraphs of large girth in random graphs in the following way:
We emphasize that there is a significant gap in the bounds of Theorem 1.5 due to the presence of in the exponent of in the upper bound and its absence in the lower bound, and this gap is closed by Theorem 1.4 when by an improvement to the lower bound. A similar phenomenon appears in recent work of Mubayi and Yepremyan [18], who determined the a.a.s value of the extremal function for loose even cycles in for all but a small range of . It seems likely that the following conjecture is true:
Conjecture III.
Let and . Then there exists such that a.a.s.:
Conjecture II suggests the possible value , which is the correct value for by Theorem 1.4. We are not certain that this is the right value of in general, even when and , and more generally, Conjecture I is an obstacle for and . Theorem 1.5 shows that if exists, then provided Conjecture I holds.
Letting , we plot the bounds of Theorem 1.5 in Figure 1, where the upper bound is in blue and the lower bound is in green. The truth of Conjecture II for would imply the slightly better upper bound .

Notation. A set of size will be called a -set. As much as possible, when working with a -graph and an -graph with , we will refer to elements of as edges and elements of as hyperedges. Given a hypergraph on , we define the -shadow to be the -graph on consisting of all -sets which lie in a hyperedge of . If are -graphs on , then denotes the -graph on which has edge set .
2 Proof of Theorem 1.2
As Balogh and Li [2] observed, if and has girth larger than , then is uniquely determined by , which we can view as the graph obtained by replacing each hyperedge of by a clique. A key insight in proving Theorem 1.2 is that we can replace each hyperedge of with a sparser graph and still uniquely recover from this graph. To this end, we say that a graph is a book if there exist cycles and an edge such that and for all . In this case we call the cycles the pages of and we call the common edge the spine of . The following lemma shows that if we replace each hyperedge in by a book on vertices which has small pages, then the vertex sets of books in the resulting graph are exactly the hyperedges of .
Lemma 2.1.
Let be an -graph of girth larger than . If contains a book on vertices such that every page has length at most , then there exists a hyperedge such that .
-
Proof.
Let be a cycle in with such that for and . If we claim that there exists an such that . Indeed, by definition of there exists some hyperedge with for all and some hyperedge with . If all of these hyperedges are equal then we are done, so we may assume . Define to be the largest index such that for all , define to be the largest index so that for all , and so on up to , and note that since . If all the hyperedges are distinct, then they form a Berge -cycle in since for all , a contradiction. Thus we can assume for some . We can further assume that for any , as otherwise we could replace with . Finally note that , as otherwise we would have , contradicting the maximality of . We conclude that the distinct hyperedges form a Berge -cycle with in , a contradiction. This proves the claim.
Now let be a book with spine and pages of length at most . By the claim there exist hyperedges such that for all , and in particular for all . Because is linear, this implies that all of these hyperedges are equal and we have . If has vertices, then we further have . ∎
We now complete the proof of Theorem 1.2. With we observe for all that there exists a book graph on vertices with edges . Indeed if divides one can take copies of which share a common edge, and otherwise one can take copies of and a copy of with . From now on we let denote this book graph. If and is any -set with , define . If is an -graph on , define to be the graph on which has all edges of the form for ; so in particular is the graph obtained by replacing each hyperedge of with a copy of .
Let denote the set of -graphs on with hyperedges and girth more than , and let be the set of graphs on with edges and girth more than . We claim that maps to . Indeed, if then each hyperedge of contributes a distinct edge to since is linear, so . One can show that if form a -cycle in , then form a Berge -cycle in ; so implies does not contain a cycle of length at most .
Let . Then we define a map by
We claim that this map is injective. Indeed, fix some and let denote the set of books in the graph . By definition of we have for all . Moreover, if then Lemma 2.1 implies . Thus (and hence ) is uniquely determined by , which is itself determined by , so the map is injective. In total we conclude
proving Theorem 1.2.
3 Proof of Theorem 1.3
For arbitrary hypergraphs , the map (let alone the map to ) is not injective. However, we will show that this map is “almost” injective when considering which are -free. To this end, we say that a set of vertices is a core set of an -graph if there exist distinct hyperedges with for all . The following observation shows that core sets are the only obstruction to being injective.
Lemma 3.1.
Let be an -graph. If induces a in , then either or is a core set of .
-
Proof.
By assumption of inducing a in , for all there exist with . By definition of , this means there exist (not necessarily distinct) with . Given this, either for some , or all of the distinct, in which case is a core set of . In either case we conclude the result.
∎
We next show that -free -graphs have few core sets.
Lemma 3.2.
Let and let be a -free -graph with hyperedges. The number of core sets in is at most .
-
Proof.
We claim that contains no core sets if . Indeed, assume for contradiction that contained a core set with distinct hyperedges . It is not difficult to see that the hyperedges form a Berge -cycle, a contradiction to being -free. Thus from now on we may assume .
Let denote the set of core sets in , and for any and -set , define to be the number of core sets with . Observe that for at most -sets , since in particular must be contained in a hyperedge of .
Given , define to be the core sets which contain an -set with , and let . Observe that since each -set with is contained in at most elements of . In particular,
(4) Assume for the sake of contradiction that . We prove by induction on that one can find distinct vertices and distinct hyperedges such that for and , and such that . For the base case, consider any . As this is a core set, there exist distinct hyperedges and , proving the base case of the induction.
Assume that we have proven the result for . By assumption of , we have , so there exists a set of vertices such that for all . Because , there exists some such that . For this , let and let be distinct hyperedges containing and respectively, which exist by assumption of this being a core set. Note that is distinct from every other since for , and similarly the hyperedges are distinct from every hyperedge with since these new hyperedges contain . This proves the inductive step and hence the claim. The case of this claim implies that contains a Berge -cycle, a contradiction. Thus , and the result follows by (4). ∎
Combining these two lemmas gives the following result, which allows us to reduce from -graphs to -graphs. We recall that denotes the number of -vertex -free -graphs on at most hyperedges.
Proposition 3.3.
For each , there exists such that
-
Proof.
If is any -set with , let . Given an -graph on , let be the -graph on with edge set , and define and . Observe that . Let denote the set of all -graphs on with at most hyperedges which are -free, and let denote the image sets of under these respective maps. Observe that is injective since it records , so it suffices to bound how large can be.
Let denote the set of -graphs on which have at most edges and which are -free. It is not difficult to see that . We observe by Lemmas 3.1 and 3.2 that for any , say with , there are at most copies of in . We also observe that if , then is a set of at most copies of in . Thus given any , there are at most choices of such that . We conclude that
proving the result. ∎
Applying this proposition repeatedly gives . Combining this with the trivial inequality gives Theorem 1.3.
4 Proof of Theorems 1.4 and 1.5
To prove that our bounds hold a.a.s., we use the Chernoff bound [1].
Proposition 4.1 ([1]).
Let denote a binomial random variable with trials and probability of success. For any we have .
Proof of the upper bounds in Theorem 1.5. Let
For , define
and note that this is large enough to apply Theorem 1.1 for . Let denote the number of subgraphs of which are -free and have exactly edges, and note that if and only if . By Markov’s inequality, Theorem 1.2, and Theorem 1.1:
The right hand side converges to zero, so for , a.a.s:
As is non-decreasing in , the bound
continues to hold a.a.s. for all .
Proof of the upper bound in Theorem 1.4. This proof is almost identical to the previous, so we omit some of the redundant details. Let and let denote the number of subgraphs of which are -free and have exactly edges. By Markov’s inequality, Theorem 1.2, and the trivial bound which is valid for all , we find for all
This quantity converges to zero, so we conclude the result by the same reasoning as in the previous proof.
This proof shows that for all we have . However, for this is weaker than the trivial upper bound .
Proof of the lower bounds in Theorem 1.5. We use homomorphisms similar to Foucaud, Krivelevich and Perarnau [10] and Perarnau and Reed [21]. If and are hypergraphs and is any map, we let for any . For two -graphs and , a map is a homomorphism if for all , and is a local isomorphism if is a homomorphism and whenever with . A key lemma is the following:
Lemma 4.2.
If and is a local isomorphism, then has girth at most .
-
Proof.
Let be a Berge -cycle with and . Then there exist distinct vertices such that for and . First assume there exists such that . By reindexing, we can assume for some , and further that for any . Note that since and is a local isomorphism. If we also have for all , then for and , so is the edge set of a Berge -cycle in as required.
Suppose for some , and as before we can assume there exists no with . Then are distinct vertices with for and . Note that since this would imply , contradicting that is a homomorphism, so . Thus the hyperedges form a Berge -cycle in with as desired.
This proves the result if for some . If this does not happen and the are all distinct, then is a Berge -cycle, and if then the same proof as above gives a Berge -cycle in . ∎
The following lemma allows us to find a relatively dense subgraph of large girth in any -graph whose maximum -degree is not too large, where the -degree of an -set is the number of hyperedges containing .
Lemma 4.3.
Let and let be an -graph with maximum -degree for each . If for all , then has a subgraph of girth larger than with
-
Proof.
Let be an extremal -free -graph on vertices and chosen uniformly at random. Let be the random subgraph which keeps the hyperedge if
-
, and
-
for any other with .
We claim that is -free. Indeed, assume contained a subgraph isomorphic to some element of . Let be the subgraph of with and , and note that implies that each hyperedge of satisfies (1), so every element of is a hyperedge in . By conditions (1) and (2), is a local isomorphism from to . By Lemma 4.2, contains a Berge cycle of length at most , a contradiction to being -free.
It remains to compute . Given , let denote the event that (1) is satisfied, let , and let denote the event that for any , which in particular implies (2) for the hyperedge . It is not too difficult to see that , and that for any we have . Note for each that , as has at most subsets of size each of -degree at most . Taking a union bound we find
where the second to last inequality used for . Consequently
and linearity of expectation gives . Thus there exists some -free subgraph with at least hyperedges. ∎
-
By the Chernoff bound one can show for
that a.a.s. has maximum -degree at most for all . If Conjecture I is true, then a.a.s for Lemma 4.3 with gives:
This proves the lower bound in Theorem 1.5.
Lemma 4.4.
Let be an -graph and let be the number of Berge -cycles in on vertices. For all , has a subgraph of girth larger than with
where is an absolute constant.
-
Proof.
By work of Ruzsa and Szemeredi [22] and Erdős, Frankl, Rödl [7], it is known for all that there exists a -free -graph on vertices with hyperedges. Choose a map uniformly at random and define to be the subgraph which keeps a hyperedge if and only if .
We claim that if form a Berge triangle in , then . Observe that if are vertices with , then we must have e.g. , as otherwise . Because is linear we must have . These hyperedges can not all intersect in 1 vertex since this together with the distinct vertices defines a Berge triangle in , so we must have say . But this means are distinct vertices in and , so and we must have as desired.
The probability that a given Berge triangle on vertices in maps to a given hyperedge in is at most (since this is the probability that every vertex of maps into the edge of ). By linearity of expectation, contains at most Berge triangles in expectation. An identical proof shows that contains at most Berge 2-cycles in expectation. We can then delete a hyperedge from each of these Berge cycles in to find a subgraph with
The result follows since . ∎
We now prove the lower bound in Theorem 1.4. By Markov’s inequality one can show that a.a.s. . By the Chernoff bound we have a.a.s. that , so if we take , then a.a.s. is significantly smaller than . A similar result holds for each term with and , so by Lemma 4.4 we conclude a.a.s., proving the lower bound in Theorem 1.4.
We note that the proof of Lemma 4.4 fails for larger . In particular, a Berge 4-cycle can appear in by mapping onto two edges in intersecting at a single vertex, and with this the bound becomes ineffective.
5 Concluding remarks
In this paper, we extended ideas of Balogh and Li to bound the number of -vertex -graphs with edges and girth more than in terms of the number of -vertex graphs with edges and girth more than . The reduction is best possible when and divides . Theorem 1.3 shows that similar reductions can be made when forbidding a single family of Berge cycles.
By using variations of our method, we can prove the following generalization. For a graph , a hypergraph is a Berge- if there exists a bijection such that for all . Let denote the family of -uniform Berge-. We can prove the following extension of Theorem 1.3: if there exists a vertex such that is a forest, then there exists such that
For example, this result applies when is a theta graph. We do not believe that the exponent is optimal in general, and we propose the following problem.
Problem I.
Let . Determine the smallest value such that there exists a constant so that, for all ,
Theorem 1.3 shows that for all , but in principle we could have . We claim without proof that it is possible to use variants of our methods to show , but beyond this we do not know any non-trivial upper bounds on .
We proposed Conjecture III on the extremal function for subgraphs of large girth in random hypergraphs: for some constant , a.a.s.:
For , this conjecture is true with , and Conjecture II suggests perhaps , although we do not have enough evidence to support this (see also the work of Mubayi and Yepremyan [18] on loose even cycles). It would be interesting as a test case to know if :
Problem II.
Prove or disprove that Conjecture III holds with .
It seems likely that controls the a.a.s. behavior of as . Specifically, it is clear that if is a family of finitely many -graphs and and are defined so that as , then a.a.s. as , contains no -free subgraph with at least edges. It would be interesting to determine when a.a.s contains an -free subgraph with at least edges. In particular, we leave the following problem:
Problem III.
Let and so that as . Then a.a.s contains a subgraph of girth more than with at least edges.
In particular, perhaps one can obtain good bounds on the variance of in .
Acknowledgments. We thank the referees for their helpful comments.
References
- [1] N. Alon and J. H. Spencer. The probabilistic method. John Wiley & Sons, 2004.
- [2] J. Balogh and L. Li. On the number of linear hypergraphs of large girth. Journal of Graph Theory, 93(1):113–141, 2020.
- [3] J. Balogh, B. Narayanan, and J. Skokan. The number of hypergraphs without linear cycles. Journal of Combinatorial Theory, Series B, 134:309–321, 2019.
- [4] J. Balogh and W. Samotij. The number of -free graphs. Journal of the London Mathematical Society, 83(2):368–388, 2011.
- [5] D. Conlon, J. Fox, B. Sudakov, and Y. Zhao. The regularity method for graphs with few 4-cycles. arXiv preprint arXiv:2004.10180, 2020.
- [6] J. Corsten and T. Tran. Balanced supersaturation for degenerate hypergraphs. arXiv preprint arXiv:1707.03788, 2017.
- [7] P. Erdős, P. Frankl, and V. Rödl. The asymptotic number of graphs not containing a fixed subgraph and a problem for hypergraphs having no exponent. Graphs and Combinatorics, 2(1):113–121, 1986.
- [8] P. Erdős and M. Simonovits. Supersaturated graphs and hypergraphs. Combinatorica, 3(2):181–192, 1983.
- [9] A. Ferber, G. McKinley, and W. Samotij. Supersaturated sparse graphs and hypergraphs. International Mathematics Research Notices, 2020(2):378–402, 2020.
- [10] F. Foucaud, M. Krivelevich, and G. Perarnau. Large subgraphs without short cycles. SIAM Journal on Discrete Mathematics, 29(1):65–78, 2015.
- [11] Z. Füredi. Random ramsey graphs for the four-cycle. Discrete Mathematics, 126(1-3):407–410, 1994.
- [12] Z. Füredi and M. Simonovits. The history of degenerate (bipartite) extremal graph problems. In Erdős Centennial, pages 169–264. Springer, 2013.
- [13] E. Győri and N. Lemons. Hypergraphs with no cycle of a given length. Combinatorics, Probability & Computing, 21(1-2):193, 2012.
- [14] S. Janson, T. Łuczak, and A. Rucinski. Random graphs. Wiley-Interscience Series in Discrete Mathematics and Optimization. Wiley-Interscience, New York, 2000.
- [15] Y. Kohayakawa, B. Kreuter, and A. Steger. An extremal problem for random graphs and the number of graphs with large even-girth. Combinatorica, 18(1):101–120, 1998.
- [16] F. Lazebnik and J. Verstraëte. On hypergraphs of girth five. The Electronic Journal of Combinatorics, 10(1):R25, 2003.
- [17] R. Morris and D. Saxton. The number of -free graphs. Advances in Mathematics, 298:534–580, 2016.
- [18] D. Mubayi and L. Yepremyan. Random Turán theorem for hypergraph cycles. arXiv preprint arXiv:2007.10320, 2020.
- [19] J. Nie, S. Spiro, and J. Verstraëte. Triangle-free subgraphs of hypergraphs. arXiv preprint arXiv:2004.10992, 2020.
- [20] C. Palmer, M. Tait, C. Timmons, and A. Z. Wagner. Turán numbers for berge-hypergraphs and related extremal problems. Discrete Mathematics, 342(6):1553–1563, 2019.
- [21] G. Perarnau and B. Reed. Existence of spanning -free subgraphs with large minimum degree. Combinatorics, Probability and Computing, 26(3):448–467, 2017.
- [22] I. Z. Ruzsa and E. Szemerédi. Triple systems with no six points carrying three triangles. Combinatorics (Proceedings of the Fifth Hungarian Colloquium Keszthely, 1976), volume II, Colloquium Mathemtical Society, János Bolyai, 18:939–945, 1978.
- [23] C. Timmons and J. Verstraëte. A counterexample to sparse removal. European Journal of Combinatorics, 44:77–86, 2015.
- [24] J. Verstraëte. Extremal problems for cycles in graphs. In Recent trends in combinatorics, volume 159 of IMA Vol. Math. Appl., pages 83–116. Springer, [Cham], 2016.
Appendix: Proof of Theorem 1.1
Here we give a formal proof of Theorem 1.1. The key tool will be the following theorem of Morris and Saxton.
Theorem 1 ([17] Theorem 5.1).
For each , there exists a constant such that the following holds for sufficiently large with . There exists a collection of at most
graphs on such that for all and such that every -free graph is a subgraph of some .
Recall that we wish to prove that for and , there exists a constant such that if is sufficiently large and , then
The bound is trivial if since , so we may assume from now on. Because for all , it suffices to prove this bound for . For any integer and sufficiently large, Theorem 1 implies
(5) |
with the first inequality using that every -free graph on edges is an -edged subgraph of some . By taking , which is sufficiently small to apply (5) provided , we see that satisfies the desired inequality.