Unavoidable hypergraphs

The following very natural problem was raised by Chung and Erd\H{o}s in the early 80's and has since been repeated a number of times. What is the minimum of the Tur\'an number $\text{ex}(n,\mathcal{H})$ among all $r$-graphs $\mathcal{H}$ with a fixed number of edges? Their actual focus was on an equivalent and perhaps even more natural question which asks what is the largest size of an $r$-graph that can not be avoided in any $r$-graph on $n$ vertices and $e$ edges? In the original paper they resolve this question asymptotically for graphs, for most of the range of $e$. In a follow-up work Chung and Erd\H{o}s resolve the $3$-uniform case and raise the $4$-uniform case as the natural next step. In this paper we make first progress on this problem in over 40 years by asymptotically resolving the $4$-uniform case which gives us some indication on how the answer should behave in general.


Introduction
The Turán number ex(n, H) of an r-graph H is the maximum number of edges in an r-graph on n vertices which does not contain a copy of F as a subhypergraph.For ordinary graphs (the case r = 2), a rich theory has been developed (see [31]), initiated by the classical Turán's theorem [43] dating back to 1941.The problem of finding the numbers ex(n, H) when r > 2 is notoriously difficult, and exact results are very rare (see surveys [30,32,40,42] and references therein).
The following very natural extremal question was raised by Chung and Erdős [8] almost 40 years ago.What is the minimum possible value of ex(n, H) among r-graphs H with a fixed number of edges?The focus of Chung and Erdős was on the equivalent inverse question which is perhaps even more natural.Namely, what is the largest size of an r-graph that we can not avoid in any r-graph on n vertices and e edges?This question was repeated multiple times over the years: it featured in a survey on Turántype problems [30], in an Erdős open problem collection [7] and more recently in an open problem collection from AIM Workshop on Hypergraph Turán problems [36].
Following Chung and Erdős we call an r-graph H as above (n, e)-unavoidable, so if every r-graph on n vertices and e edges contains a copy of H. Their question now becomes to determine the maximum possible number of edges in an (n, e)-unavoidable r-graph.Let us denote the answer by un r (n, e).In the graph case, Chung and Erdős determined un 2 (n, e) up to a multiplicative factor for essentially the whole range.In a follow-up paper from 1987, Chung and Erdős [9] studied the 3-uniform case and identified the order of magnitude of un 3 (n, e) for essentially the whole range of e. 3 In the same paper Chung and Erdős raise the 4-uniform case as the natural next step since the 3-uniform result fails to give a clear indication on how the answer should behave in general.In the present paper we resolve this question by determining un 4 (n, e) up to a multiplicative factor for essentially the whole range of e.
The optimal unavoidable hypergraphs, or in other words hypergraphs which minimise the Turán number, turn out to be certain combinations of sunflowers of different types.For this reason, it is essential for our proof of Theorem 1.1 to have a good understanding of the Turán numbers of sunflowers for a wide range of parameters.This turns out to be a well-studied problem in its own right.

Sunflowers
A family A 1 , . . ., A k of distinct sets is said to be a sunflower if there exists a kernel C contained in each of the A i such that the petals A i \ C are disjoint.The original term for this concept was "Δ-system".The more recent term "sunflower" coined by Deza and Frankl [11] has recently become more prevalent.For r, k ≥ 1, let f r (k) denote the smallest natural number with the property that any family of f r (k) sets of size r contains an (r-uniform) sunflower with k petals.The celebrated Erdős-Rado theorem [17] from 1960 asserts that f r (k) is finite; in fact Erdős and Rado gave the following bounds: They conjectured that for a fixed k the upper bound can be improved to f r (k) ≤ O(k) r .Despite significant efforts, a solution to this conjecture remains elusive.The current record is f r (k) ≤ O(k log r) r , established by Bell, Chueluecha and Warnke [3], by slightly improving the O(k log(kr)) r bound given in 2019 by Rao [38], both of which are based upon a recent breakthrough on the problem due to Alweiss, Lovett, Wu and Zhang [2].Some 43 years ago, Duke and Erdős [12] initiated the systematic investigation of a closely related problem.Denote by Sf r (t, k) the r-uniform sunflower with k petals, and kernel of size t.Duke and Erdős asked for the Turán number of Sf r (t, k).Over the years this problem has been reiterated several times [7,30] including in a recent collaborative "polymath" project [37].The case k = 2 of the problem has received considerable attention [22,25,27,33,34,41], partly due to its huge impact in discrete geometry [26], communication complexity [39] and quantum computing [5].Another case that has a rich history [13,15,16,[19][20][21]24] is t = 0 (a matching of size k is forbidden); the optimal construction in this case is predicted by the Erdős Matching Conjecture.For fixed r, t and k with 1 ≤ t ≤ r − 1 and k ≥ 3 Frankl and Füredi [23,Conjecture 2.6] give a conjecture for the correct value of ex(n, Sf r (t, k)) up to lower order terms, based on two natural candidates for near-optimal Sf r (t, k)-free r-graphs.They verify their conjecture for r ≥ 2t + 3, but otherwise, with the exception of a few particular small cases, it remains open in general.If we are only interested in asymptotic results the answer of ex(n, Sf r (t, k)) ≈ n max{r−t−1,t} was determined by Frankl and Füredi [22] and Füredi [29].
Another natural question is what happens if we want to find large sunflowers, in other words if we only fix the uniformity r and "type" of the sunflower, determined by its kernel size t, while allowing k to grow with n.Further motivation for this question is that it is easy to imagine that it could be very useful to know how big a sunflower of a fixed type we are guaranteed to be able to find in an r graph with n vertices and e-edges.In particular, it is precisely the type of statement we require when studying the unavoidability problem of Chung and Erdős.In the graph case r = 2 the question simply asks for the Turán number of a (big) star and the answer is easily seen to be ex(n, Sf 2 (1, k)) ≈ nk.In contrast, the 3-uniform case is already non-trivial: Duke and Erdős [12] and Frankl [18] showed ex(n, Chung [6] even managed to determine the answer in the 3-uniform case up to lower order terms, while Chung and Frankl [10] determined ex(n, Sf 3 (1, k)) precisely for large enough n.Chung and Erdős [9] wrote in their paper that results for such large sunflowers with uniformity higher than 3 are far from satisfactory.Here we make first progress in this direction, by solving asymptotically the 4-uniform case.

General proof strategy
Our proof strategy for determining f r (n, e) for most of the range is as follows.In order to show an upper bound f r (n, e) ≤ D we need to show there is no r-graph with more than D edges which is contained in every r graph with n vertices and e edges.With this in mind we consider a number of, usually very structured, n-vertex r-graphs on e or more edges, and argue they can not have a common subhypergraph with more than D edges.The hypergraphs we use are often based on Steiner systems or modifications thereof.A major benefit of this approach is that our collection of hypergraphs often imposes major structural restrictions on possible common graphs which have close to D edges as well and tells us where to look for our optimal examples of unavoidable hypergraphs which we need in order to show matching lower bounds, by upper bounding their Turán numbers.
Organisation.In the following section we establish some preliminary results we will need later.In Section 3 we prove Theorem 1.2.In Section 4 we prove the first two parts of Theorem 1.1.In Section 5 we deal with the remaining regime.This section is split into several parts, in Section 5.1 we establish a number of 3-uniform results we will need for the lower bounds, which is proved in Section 5.2.We prove the upper bounds in Section 5.4.Finally, in Section 6 we make some final remarks and give a number of open problems and conjectures.Let G be an r-graph, and let S ⊆ V (G) such that 1 ≤ |S| ≤ r − 1.Then the link graph, denoted L S , is the (r − |S|)-graph on V (G), whose edges are the sets T of size r − |S| such that S ∪ T ∈ E(G).The codegree of S in G is defined as the number of edges of G which contain S. If the codegree of S is at least k, we say that S is k-expanding.We will refer to the immediate fact that in any k-uniform hypergraph the number of edges times the uniformity equals the sum of degrees over all vertices as the handshaking lemma.

Notation
For non-negative functions f and g we write either f g or f = O(g) to mean there is a constant C > 0 such that f (n) ≤ Cg(n) for all n, we write f g or f = Ω(g) to mean there is a constant c > 0 such that f (n) ≥ cg(n) for all n, we write f ≈ g to mean that f g and f g.To simplify the presentation we write f g or g f to mean that f ≥ Cg for a sufficiently large constant C, 5 which can be computed by analysing the argument.In particular, in this paper choosing C = 2 30 would be sufficient for all our arguments.All asymptotics are as n → ∞ unless specified otherwise.
From now on whenever we say optimal unavoidable graph, we mean it has the largest number of edges up to a constant factor.Throughout the paper we omit floor and ceiling signs whenever they are not crucial, for the sake of clarity of presentation and since they would only, possibly, impact the constant factors.

Preliminaries
In this section we collect several simple results, that we use later on.The next two results will provide us with building blocks for examples of hypergraphs which will be useful both for proving lower bounds on Turán numbers of sunflowers needed for Theorem 1.2, as well as to force structure when proving upper bounds in Theorem 1.1.We include proofs for completeness.Lemma 2.1 (Partial Steiner Systems).Let k > t > 0 be fixed integers.For every n sufficiently large, there exists a k-graph S(t, k, n) on n vertices such that every set of vertices of size t is contained in at most one edge, and the number of edges of 5 Note here that we are defining , in a way which is more common in fields outside of combinatorics, namely f g does not mean g = o(f ) but is more similar to g = O(f ) with the exception that we are allowed to choose the constant in the big O as small as we like, as long as it remains fixed.
This completes the proof.
The above result as stated requires k to be fixed, however for certain applications we will want to relax this assumption.The following result is a special case where t = 2 and we allow k ≤ n/2.Here we say a hypergraph is linear if no two of its edges intersect in more than one vertex.Lemma 2.2.For 2 ≤ k ≤ n/2, there exists a linear k-graph on n vertices with at least n 2 /4k 2 edges.
Proof.By Chebyshev's theorem, there is a prime p between n/2k and n/k.Look at the affine plane F 2 p , and consider its subset The vertex set of our hypergraph will be V .Note that |V | < n.The edges are partial lines L (x,y) , defined as follows for each (x, y) ∈ F 2 p : Notice that for distinct pairs (x 1 , y 1 ) and (x 2 , y 2 ) the corresponding lines L (x 1 ,y 1 ) and L (x 2 ,y 2 ) intersect in at most one vertex, so our k-graph is linear, and has p 2 ≥ n 2 /4k 2 edges.
The following simple lemma will often come in useful.
Lemma 2.3.Let G be a graph with at least 2k edges and with no star S k .Then G contains a matching of size .
Proof.We find an -matching M in G as follows.Let v ∈ V (G) be a non-isolated vertex, and take an arbitrary edge (u, v) incident with v and put it in M .Now delete all edges incident to u and v from G and repeat this procedure.If we found less than such edges, we deleted at most 2( − 1)k edges in G, so there is an edge left which we can add to M .
The next auxiliary lemma is a generalisation of [8, Lemma 5] which will come in useful when looking at higher uniformities.We give a different proof, as it illustrates an idea which will be used a lot later on.Proof.Let t = min{s, √ sn/k}.If there are at least t vertices with degree at least (t − 1)(k + 1) + k = t(k + 1) − 1 then we can greedily find t vertex-disjoint copies of S k .This means that by removing at most t • n ≤ sn edges we get a graph with maximum degree less than t(k + 1).Now let us take a maximal collection of vertex-disjoint S k 's.Unless we are done there are at most (t − 1)(k + 1) vertices spanned by these stars, so in total they touch less than t 2 (k + 1) 2 ≤ 4t 2 k 2 ≤ 4sn edges.So upon removing them we are left with at least sn ≥ kn edges and can find another S k .

Turán numbers of sunflowers
In this section we give the proof of Theorem 1.2.

3-uniform case
We will need the following 3-uniform results, which were already established by Duke and Erdős [12] and Frankl [18].We include our, somewhat simpler proofs, for completeness and to illustrate the ideas we will use in the 4-uniform case.There are only two different types of 3-uniform sunflowers, namely Sf 3 (1, k) For the upper bound, we will show that every 3-graph G with 4k 2 n edges contains a copy of Sf 3 (1, k).Let G be such a 3-graph and suppose towards a contradiction that it does not contain an Sf 3 (1, k).For each v ∈ V (G) let D v denote the 2-graph on V whose edges are the 2k-expanding pairs Y such that v ∪ Y ∈ E(G).D v does not contain matchings and stars of size k; if D v contained a k-matching then v and this matching would make an Sf 3 (1, k) in G; if D v contained a star of size k then we can greedily extend each edge of the star by a new vertex to obtain an Sf 3 (1, k), since the edges are 2k-expanding.Using Lemma 2.3 this implies that D v can have at most 2k 2 edges.The number of edges of G containing a 2k-expanding pair is upper bounded by v |D v | ≤ 2k 2 n, so if we delete all such edges we are left with a 3-graph G with at least 2k 2 n edges with no 2k-expanding pairs of vertices.Now take a vertex v with degree at least 3|E(G )|/n ≥ 4k 2 in G ; it cannot have a star of size 2k in its link graph, as then the pair v and centre of the star would be 2k-expanding.Using Lemma 2.3 this means there must be a k-matching in its link graph, which together with v forms an Sf 3 (1, k) in G, so we are done.
We now proceed to the second type of sunflowers.
Proof.To prove the lower bound, we consider the linear 3-graph S(2, 3, n) on [n] with Ω(n 2 ) edges, given by Lemma 2.1.Let G be a union of k − 1 random copies of S (2, 3, n), where each copy is obtained by randomly permuting the vertices of S(2, 3, n).Since each pair of vertices lies in at most one edge from each copy of S(2, 3, n), G does not contain a copy of Sf 3 (2, k).A fixed triple is chosen with probability Ω(1/n) in a random copy of S (2, 3, n), independently between our k − 1 copies.Thus the probability that a given triple is chosen in one of our k − 1 copies is at least Ω(k/n) so the expected number of chosen triples is Ω(kn 2 ), giving ex(n, Sf 3 (2, k)) = Ω(kn 2 ).We now turn to the upper bound.Let G be a 3-graph with kn 2 edges.By averaging, there must exist a pair of vertices belonging to at least k edges, which make a copy of Sf 3 (2, k) in G.

4-uniform case
In this subsection we determine the behaviour of the Turán number of 4-uniform sunflowers, namely we prove Theorem 1.2.We begin with Sf 4 (1, k).
Proof.We consider the lower bound first.We split the n vertices into disjoint sets A of size n − k ≥ n/2 and B of size k.Let G be the 4-graph consisting of edges which have two vertices in each of A and B, so in total G has ≈ k 2 n 2 edges.Note that G is Sf 4 (1, k)-free.Indeed, if we can find a copy of Sf 4 (1, k) each of its edges contains two vertices in B, one of which is not the common vertex, so it uses at least k + 1 vertices of B, which has size k, a contradiction.For the upper bound, we will show that every 4-graph G with e k 2 n 2 edges contains a copy of Sf 4 (1, k).Let G be such a 4-graph and suppose it does not contain a copy of k 2 n edges then by Lemma 3.1 we can find an Sf 3 (1, k) in D v and greedily extend it to an Sf 4 (1, k) in G, so we may assume that each D v has at most e/(2n) edges.The number of edges of G containing a 3k-expanding triple is upper bounded by v |D v | ≤ e/2 so if we delete all such edges we are left with a 4-graph G with at least e/2 edges and no 3k-expanding triple of vertices.Now look at pairs of vertices which are 18k 2 -expanding.Any such pair has no star of size 3k in its link graph as that would give a 3k-expanding triple, so by Lemma 2.3 it has a matching of size 3k.If we can find a star of size k formed by the 18k 2 -expanding pairs, then using the matchings we found in the link graphs we can once again greedily extend it into a copy of Sf 4 (1, k).Hence, the total number of 18k 2 -expanding pairs is at most kn.They can lie in at most 3k 2 n 2 different edges (since the third vertex we can choose in n many ways but the fourth in at most 3k, because there are no 3k-expanding triples).Deleting all such edges from G we obtain G with at least e/4 ≥ 18k 2 n 2 edges, without 18k 2 -expanding pairs, which is a contradiction (since by density G must have an 18k 2 -expanding pair).
Remark.By induction this easily extends to higher uniformities, giving ex(n, Sf r (1, k)) ≈ r k 2 n r−2 .We now turn to the second type of 4-uniform sunflowers, namely Sf 4 (2, k). Proof.
We choose 2k vertices uniformly at random, with repetition from [n] and choose G 1 to be the complete graph on these 2k vertices.Suppose we obtained graphs G 1 , . . ., G i , where i < m.Choose again a set of uniformly random 2k vertices, and choose G i+1 to be the complete graph on these vertices from which we remove all the edges in G 1 , . . ., G i and after this we remove all edges not participating in a K 4 .
Notice that for each graph G i , with i ∈ [m], the expected number of K 4 's is at least since probability that 4 randomly sampled vertices are different is at least 1 − 6/n ≥ 1/2 and by a union bound the probability that one of its 6 edges already got chosen in some ) and we are done.
For the upper bound, there must be a vertex v with degree k 2 n in any graph on k 2 n 2 edges, so we can find an Sf 3 (1, k) in its link graph, by Lemma 3.1, which together with v forms a copy of Sf 4 (2, k).
Finally, we deal with the third and last kind, namely Sf 4 (3, k).
Proof.For the lower bound, we take a 4-graph G which is a union of k − 1 random copies of a 4-graph S(3, 4, n) on n vertices with Ω(n 3 ) edges, given by Lemma 2.1.A single triple of vertices lies in at most one edge for each copy so in total in at most k − 1 edges; this means there is no Sf 4 (3, k) in G.Each fixed quadruple is an edge of G with probability Ω(1/n), independently between different choices.Thus the probability that a quadruple is chosen in G is at least Ω(k/n), so the expected number of chosen triples is at least Ω(kn 3 ).Therefore, ex(n, Let G be a 4-graph on n vertices with kn 3 edges.By the pigeonhole principle there is a triple of vertices belonging to at least k edges, which makes an Sf 4 (3, k).This shows ex(n, Sf 4 (3, k)) ≤ kn 3 .
The above three results establish Theorem 1.2 when k n.This shows that ex(n, Sf 4 (i, k)) ≈ n 4 for any k = cn for some small enough constant c.The bound in the remaining range, namely when k ≥ cn, is immediate since Sf 4 (i, k) ⊆ Sf 4 (i, k ) for any k ≤ k in the case of lower bounds and by the trivial bound ex(n, Sf 4 (i, k)) ≤ n 4 in the case of upper bounds, since we are only interested in bounds up to constant factor.

Unavoidability, sparse regimes
In this section we prove Theorem 1.1 for e n 3 , so for the majority of the first two regimes.We note that in order to prove Theorem 1.1 it is sufficient to prove it for the regimes e n 2 , n 2 e n 3 and n 3 e n 4 since in the remaining cases e ≈ n 2 , e ≈ n 3 the bounds of the regimes match (up to a constant factor) and un 4 (n, e) is monotone in e.We begin with the sparsest regime e n 2 , which is quite simple to handle but illustrates the general approach.Proof.Starting with the upper bound, let H be an (n, e)-unavoidable 4-graph where e ≤ cn 2 for some sufficiently small constant c > 0. This means it is contained in any 4-graph on n vertices with at least e edges and our task is to show that it must consist of only one edge.To see this, observe that the 4-graph S(2, 4, n), given by Lemma 2.1, has Ω(n 2 ) ≥ e edges so it must contain H as a subgraph.This forces H to be linear.Similarly, the n-vertex 4-graph which consists of all edges which contain two fixed vertices has Ω(n 2 ) ≥ e edges so also has H as a subgraph.This forces any two edges of H to intersect in at least 2 vertices.Since H must also be linear this means it can have at most 1 edge.The lower bound is immediate, since any n-vertex graph with e edges contains an edge (e ≥ 1) so a single edge graph is (n, e)-unavoidable showing un 4 (n, e) ≥ 1.
Proof.Let H be an (n, e)-unavoidable 4-graph and let k = c √ e/n, for c > 0 large enough.This means that any n-vertex 4-graph with at least Ω(k 2 n 2 ) edges must contain H (by choosing c large enough, since e = n 2 k 2 /c 2 ).Note that the regime bounds imply 1 k √ n.To show the bound it suffices to show that |E(H)| ≤ min{2k 3/2 , (k 2 n) 1/3 }.In order to do this, we will consider a number of examples of 4-graphs with more than e edges.Each of them will reveal some additional information on how H should look like and allow us to conclude it can't have more than the claimed number of edges.
• The 4-graph S(3, 4, n), given by Lemma 2.1, has Ω(n 3 ) ≥ e edges.So it forces H to have no two edges intersecting in three vertices.• The graph with one special vertex contained in all of n−1 3 possible edges implies that all edges of H must contain a common vertex, say v. Let H 3 be the link graph of v (so a 3-graph).
• We take the graph obtained from an n-vertex linear k-graph by taking every 4subset of every edge in this k-graph as an edge.Note that by Lemma 2.2, since k √ n, we can find such a 4-graph with Ω(k 2 n 2 ) edges.This implies that H 3 splits into components of size at most k each, since v is contained in all 4-edges and by construction any two 4-edges which intersect in more than one vertex belong to a single k-edge of our starting linear k-graph.
• Let us take the hypergraph with sets of vertices V 1 of size k and V 2 of size n − k such that we choose any pair of vertices in V 1 and any pair of vertices in V 2 and join them in an edge.This 4-graph has Ω(k 2 n 2 ) edges.Since every edge has at least two vertices in V 1 this means every edge of H 3 must have at least one vertex in V 1 ; in other words, H 3 has a cover of size at most k, so we fix such a cover and denote it by C. Consequently, H 3 has at most k components.• Let us take a set S of 2k 2  n vertices and split them into k 2 pairs.We join each of these k 2 pairs with every pair among the n − |S| vertices outside of S into a 4-edge.This gives us an n vertex 4-graph with Ω(k 2 n 2 ) edges, so we must be able to find a copy of H inside it.If v is embedded inside S and we let w be its pair, then v and w belong to each edge of H.We claim this implies that H has at most k edges.To see this observe first that every edge of H 3 contains w, so H 3 only has a single component.By the third point we know it consists of at most k vertices.We further know, by the first point, that if we remove w we get a matching, since otherwise we would have two edges of H which intersect in 3 vertices.This implies H has at most k edges and we are done.So, v must be embedded outside of S. If a vertex of C is in S then it participates in at most one edge of H (since we know each such edge contains the vertex of C, its pair in S and v and there is only one edge of H containing any triple of vertices), so such vertices contribute at most k edges.If we remove these edges from H we know that in the remaining 4-graph upon removing v and the vertex of C from an edge we obtain one of our pairs in S.
Since we removed at most k min{k 3/2 , (k 2 n) 1/3 } edges, so at most a constant proportion of edges in H, we may assume we started with H in which such edges did not exist.Putting together the observations so far we know that H has a fixed vertex v in all edges, its link graph is the 3-graph H 3 which consists of at most k vertex-disjoint copies of a subhypergraph of Sf 3 (1, k), whose centres are vertices of C and whose petals upon removal of the centre vertices give a matching M (our pairing of vertices in S) which in total has size at most k 2 .The following two further examples provide us with one of the desired bounds each.
k , we extend each edge of this graph into 4-edges by adding every possible pair of the remaining vertices (the set of which we denote by V 2 ).Since this 4-graph will have n vertices and Ω(k 2 n 2 ) edges, so contains H. Let us consider the edges of M containing a vertex embedded in V 1 .There can be at most 2k 3/2 such edges since |V 1 | = 2k 3/2 , so upon deleting all corresponding edges of H we are left with a subgraph of H in which v and C got embedded into V 1 (or we are left with an empty graph).But this implies |C| ≤ 2 √ k, so again there are at most 2k 3/2 edges of H remaining (since we know that if we fix a vertex from C, in addition to v, their link graph is a matching of size at most k).It follows that |E(H)| ≤ 4k 3/2 giving us the first part of the result.
• Take a set V 1 of (k 2 n) 1/3  n vertices and let V 2 be the set of remaining vertices.We make a 4-graph by taking any triple in V 1 and a single vertex in V 2 .This gives us Ω(k 2 n 2 ) edges and implies |E(H)| ≤ (k 2 n) 1/3 since among every pair of vertices in M at least one must be in V 1 .
This completes the proof.The rest of this section is devoted to the upper bound part of the following theorem, as the lower bound follows from Theorem 4.2.Analysing the above proof narrows down the possibilities for an optimal unavoidable graph significantly, leading us to St 4 ( √ k, k, 1) as a natural candidate for an optimal unavoidable graph.This indeed turns out to be the case as a consequence of the following result.
Before proving this result let's see why it gives the desired lower bound for the unavoidability problem.We want to show that there is an (n, e)-unavoidable 4-graph with min{(e/n 2 ) 3/4 , (e/n) 1/3 } edges, for any n 2 e n 3 .To do this we choose k as large as possible, so that e max{k 2 n 2 , k 9/2 n}, which means that k min{(e/n 2 ) 1/2 , (e/n) 2/9 }.By our choice of k the above theorem applies and tells us that any 4-graph with n vertices and e edges contains St 4 ( √ k, k, 1), i.e. it is (n, e)-unavoidable.This implies there is an (n, e)-unavoidable 4-graph with k 3/2 min{(e/n 2 ) 3/4 , (e/n) Proof.Assume first that there exist vertices v 1 , . . ., v √ k with degree at least 18k 3 .Since there are no pairs of vertices with codegree larger than 3k 3/2 , we know that the link graph of any v i does not contain a star of size 3k 3/2 , so by Lemma 2.3 it must contain a matching of size 3k 3/2 .Now assume we have found i − 1 disjoint copies of Sf 3 (1, k) centred at v 1 , . . ., v i−1 and not using any other v j 's.Let us consider a matching of size 3k 3/2 in the link graph of v i .At most √ k + 2(i − 1)k < 2k 3/2 of the pairs in the matching already contain a vertex from either {v i , . . ., v √ k } or belonging to one of our (i − 1) already found copies of Sf 3 (1, k)'s.The remaining pairs make a matching of size at least k in the link graph of v i while avoiding {v 1 , . . ., v √ k } as well as any already used vertex.This gives us a new Sf 3 (1, k) centred at v i which is disjoint from the previous ones.After repeating √ k many times we get the desired √ k vertex-disjoint copies of Sf 3 (1, k).So we may assume there are less than √ k vertices with degree at least 18k 3 .Each such vertex belongs to at most 3k 3/2 n edges (the second vertex we can choose in n ways and then third in 3k 3/2 ways since codegrees are at most 3k 3/2 ).Thus in total there are at most 3k 2 n edges containing a vertex with degree at least 18k 3 .We delete these edges and are left with at least e/2 edges.
Suppose we have found i − 1 vertex-disjoint copies of Sf 3 (1, k) in the remaining 3graph, where 1 ≤ i ≤ √ k.There are at most (i − 1)(2k + 1) • 18k 3 < 54k 9/2 edges which contains a vertex from one of these copies.Removing these edges, we are left with at least e/4 k 2 n edges.Thus Lemma 3.1 applies giving us a new Sf 3 (1, k).This way we obtain √ k vertex-disjoint copies of Sf 3 (1, k).
We are now ready to finish our analysis of the middle range by proving Theorem 4.3.
Proof of Theorem 4.3.The lower bound follows from Theorem 4.2.
Turning to the upper bound, set m max{k 2 n, k 9/2 } and let G be an n-vertex 4-graph with at least nm edges.Suppose to the contrary that G has no copies of St 4 ( √ k, k, 1).Let us first consider the case that there are at most nm/2 edges containing a 3k 3/2expanding triple in G. Remove all these edges to obtain a 4-graph G with at least nm/2 edges in which there is no 3k 3/2 -expanding triple.By the handshaking lemma, we can find a vertex x in G of degree at least 2m.If we look at the 3-graph G x obtained by removing x from all these edges we know it has at least 2m edges, additionally we know that no pair of vertices is 3k 3/2 -expanding in G x as such pair together with x would give a 3k 3/2 -expanding triple.So all codegrees in G x are at most 3k 3/2 and Lemma 4.5 applies, giving us √ k vertex-disjoint copies of Sf 3 (1, k) which together with x make a copy of St 4 ( √ k, k, 1), a contradiction.Therefore, there are at least nm/2 edges which contain a 3k 3/2 -expanding triple.For any v ∈ V (G) let D v denote the 3-graph consisting of triples X such that v ∪ X ∈ E(G) and X is 3k Proof.Suppose to the contrary that we can find distinct vertices v 0 , . . ., v √ k such that {v 0 , v i } makes a 3k 3/2 -expanding pair for all 1 ≤ i ≤ √ k.We know that {v 0 , v i } completes into an edge of D x in at least 3k 3/2 different ways, so we can greedily find k vertices v i1 , . . .v ik such that {v 0 , v i , v ij } ∈ E(D x ) and all v i , v ij are distinct, for all 1 ≤ i ≤ √ k and 1 ≤ j ≤ k.The last part is due to the fact that we choose at most 1 + √ k + k 3/2 < 2k 3/2 vertices in total and each pair completed an edge in at least 3k 3/2 ways so we always have an unused vertex to choose for our v ij 's.Now since each {v 0 , v i , v ij } ∈ E(D x ) and is in particular expanding, we can extend it into an edge of G in 3k 3/2 ways so again greedily we obtain St 4 ( √ k, k, 1) as it contains 1 + √ k + 2k 3/2 < 3k 3/2 vertices so we always have a new vertex to choose to extend {v 0 , v i , v ij }.This is a contradiction.As y ∪ e i is a 3k Finally, it follows from Claims 2 and 3 that the number of edges in D x containing a 3k 3/2 -expanding pair is at most . Deleting all such edges we are left with m/4 edges of D x such that no pair of vertices is 3k 3/2 -expanding.Lemma 4.5 implies we can find √ k disjoint copies of Sf 3 (1, k) which together with x gives us a St 4 ( √ k, k, 1), a contradiction.This completes the proof.

Unavoidability, the dense regime
In this section we deal with the last regime, when e n 3 .Note once again that by monotonicity of un 4 (n, e) and combining it with Theorem 4.4 this will imply the result for e ≈ n 3 as well.
For the majority of the regime the optimal unavoidable 4-graphs turn out to be based on generalised stars.Specifically, for e = kn 3 they will be disjoint unions of St 4 ((n/k) 1/3 , (n/k) 1/3 , k) of suitable size.Unfortunately, in this regime upper bounds do not force as much structure as they do in the previous section, so we begin with the lower bounds.With this in mind our first goal is to determine ex(n, St 4 (d 1 , d 2 , d 3 )) for d 1 = d 2 = (n/k) 1/3 and d 3 = k (although our methods should allow one to answer this question in general as well).
In order to find a copy of St 4 (d 1 , d 2 , d 3 ) in a graph we will either find d 1 vertex-disjoint copies of St 3 (d 2 , d 3 ) inside the link graph of a vertex or find St 3 (d 1 , d 2 ) consisting of so called expanding triples, namely triples of vertices which belong to many edges of our graph.In the former case we are done immediately, in the latter we can use the expansion of the triples to greedily extend each edge of our St 3 (d 1 , d 2 ) using d 3 new vertices.To find disjoint copies of St 3 (d 2 , d 3 ) or St 4 (d 1 , d 2 , d 3 ) we can simply remove any already used vertex from the graph and argue that the remainder still contains enough edges to find a new copy.Unfortunately, as we have already seen in the previous section this approach fails to provide enough stars in most cases.A way around this is to embed the leaves of all our stars (since there are many of them) among vertices with low degrees, the 3rd layer vertices among vertices with only slightly higher degree and so on.This approach requires very good understanding of Turán numbers of 3-uniform generalised stars and their unions which we give in the following section.
In the subsequent section we show the desired bounds for our 4-uniform case.Interestingly, towards the end of the range, as e approaches n 4 , generalised stars stop being the optimal examples and are replaced with (disjoint unions) of complete 4-partite graphs, which we will find through a combination of the Kövári-Sós-Turán theorem and a similar embedding trick where we embed largest parts of our already found r-partite graphs into vertices with low degree, in order to be able to find many disjoint copies.

Turán numbers of 3-uniform generalised stars
In this section we will give a number of upper bounds on Turán numbers of generalised stars, and their disjoint unions.The first two results determine these Turán numbers up to constant factors and we prove them in full generality since we find them interesting in their own right.The subsequent three lemmas allow us to do even better (find our stars in graphs with even less edges) if we know certain additional properties of our graph or give us more control where in the graph we can find our stars.We do not state these in full generality, but rather for the cases which arise naturally in the proof of our 4-uniform result.
The following lemma, which generalises Lemma 3.1, determines the Turán number of any 3-uniform generalised star, up to a constant factor.Theorem 5.1.For every positive integers n, h and k, we have Proof.Let G be a 3-graph with e max{kn 2 , h 2 k 2 n} edges.We want to find h vertexdisjoint copies of S k in the link graph of some vertex.Let D v be the subgraph of the link graph of v consisting of pairs Y for which v ∪ Y is an edge of G and Y is 3hk-expanding.
If at least e/2 edges in G contain a pair which is 3hk-expanding then there exists a D v of size at least e/(2n), as v∈V |D v | ≥ e/2.If D v contains an S h , then since it consists of 3hk-expanding edges, we would be done by greedily extending it into a copy of St 3 (h, k), since 3hk ≥ hk + h + 1 = |St 3 (h, k)|.Hence, we suppose there is no S h in D v , i.e. every vertex has degree at most h in D v .Take a maximal collection of disjoint k-stars in D v .If this collection consists of at least h stars, they together with v make St 3 (h, k) and we are done, so let us assume towards a contradiction that there are less than h of them.So the union of the stars in this collection has at most hk + h ≤ 2hk vertices, which participate in at most 2hk • h ≤ e/(4n) edges of D v , since we have shown that degree of any vertex is at most h.This means that among the remaining at least e/(4n) ≥ kn edges in D v we can find a new S k , contradicting maximality of our collection.
So we may assume that G contains at most e/2 edges containing a 3hk-expanding pair; removing all such edges we obtain a graph G in which there is no 3hk-expanding pair of vertices.We can find a vertex with degree at least e/n and once again keep finding k-stars in its link graph for as long as we have less than h of them.At any point we have at most hk vertices and they have degree at most 3hk in the link graph of the found vertex (since we removed all edges containing a 3hk-expanding pair), so they always touch at most 3h 2 k 2 ≤ e/(4n) edges, hence we have at least e/(4n) ≥ kn other edges, and we can find a new S k , as desired.
Remark.One can show the bound in the proposition is tight, up to a constant factor, provided 2 ≤ k ≤ n/h.Indeed, Lemma 3.2 gives the first term, and taking n/(hk) disjoint copies of the complete 3-graph on hk vertices gives the second.Note also that, since |St 3 (h, k)| > hk, when hk > n we can never find a copy of St 3 (h, k) in a graph on n vertices, hence the largest St 3 (h, k)-free graph is complete; this completes the picture on Turán numbers of generalised 3-uniform stars (case k = 1 being Lemma 3.1).
The next result shows that if |E(G)| max{kn 2 , h 2 k 2 n} then not only G contains a copy of St 3 (h, k), as guaranteed by the above proposition, but it contains many disjoint copies of them.After the proof we make a few remarks about the optimality of the given result, which the reader might want to read beforehand, since one might find this helpful to understand where the parameters come from.Theorem 5.2.Every 3-graph on n vertices with e sn 2 edges, with s ≥ max{k, h 2 k 2 /n}, contains at least t = min{s, √ sn/h, s 1/3 n 2/3 /(hk)} vertex-disjoint copies of St 3 (h, k).
Proof.Let G be a 3-graph on n vertices with e edges.Set L 2 = e/(3ht) and L 3 = e/(3hkt).We call a star St 3 (h, k) in G well-behaved if its h second layer vertices have degrees at most L 2 and its hk third layer vertices have degrees at most L 3 .Suppose we have found a collection of less than t vertex-disjoint well-behaved generalised stars St 3 (h, k).The used vertices touch at most t We call this set of edges R.
Our goal now is to show that we can find a new well-behaved star St 3 (h, k) in G among the vertices which are not contained in any of the previous stars.Let A denote the set of vertices with degree at least L 2 , B the set of vertices with degrees between L 3 and L 2 and C the set of vertices with degree at most L 3 .Note that |A ∪B| ≤ 9ht +9hkt ≤ 18hkt.Furthermore, there exists a subset F ⊆ E(G) \ R such that every edge in F contains the exact same number of vertices in A, as well as in B, and in C, and we have |F | ≥ hkt .Hence, we can use Lemma 2.4 to find h vertex-disjoint copies of S k in its link graph.To see why the lemma gives this, note that for s = sn/(hkt) we have min{s , √ s n/k} ≥ h and s ≥ k.Indeed, we have where we used s ≥ h 2 k 2 /n and t ≤ √ sn/h in the first inequality, t ≤ s 1/3 n 2/3 /hk in the second and last inequalities, where we also used n ≥ s ≥ k.This yields a copy of St 3 (h, k) with all second and third layer vertices in C, so the copy is well-behaved.Case (iv).Each edge in F has exactly one vertex in C.
Let P be the set of sn 2 /(hkt) 2 -expanding pairs of vertices in A ∪ B. The total number of edges in F which do not contain a pair in P is less than < 41sn pairs have both vertices in A, there are at least 18sn pairs in P with at least one vertex in B. This means that there is a vertex in A ∪ B having at least 18sn/|A ∪ B| ≥ sn/(hkt) ≥ h neighbours (with respect to P) in B, so we find a copy of S h in P with leaves in B. Since the pairs in P have degrees at least sn 2 /(hkt) 2 ≥ hkt ≥ hk (using t ≤ s 1/3 n 2/3 /hk), we can greedily extend this S h into a copy of St 3 (h, k), which is well-behaved since every edge in S h had at most one vertex in A and exactly two in A ∪ B so the third vertex of any edge containing it must be in C, by the case assumption.
Remark.This result is again best possible in a number of ways.We need the bound on s in order to be able to find even a single star, since Theorem 5.1 is tight, as explained by the remark below it.The actual number of stars we find is also optimal: the bound t ≤ s follows by taking K s,n,n , t ≤ √ sn/h by taking K √ sn, √ sn,n (note that √ sn ≤ n) and t ≤ s 1/3 n 2/3 /(hk) by taking the complete graph on s 1/3 n 2/3 ≤ n vertices.
The following lemmas arise as parts of our argument bounding ex(n, St 4 (d, d, k)), where d = (n/k) 1/3 , in the following subsection.They are either strengthenings of the above bounds or allow us more control over where we find vertices of our 3-uniform stars.Proof.We first show that for any vertex w of degree at least 7kn in H, there is an St 3 (d, k) centred at w. Observe first that the link graph L w does not contain a star of size 3kd 2 , as otherwise the centre of this star and w make a pair of too high codegree.This means that in the link graph of w we can find d vertex-disjoint copies of S k , again by a greedy procedure.Indeed in every step we have used at most 2kd vertices, each having degree at most 3kd 2 in L w , so in total they touch at most 6k 2 d 3 = 6kn edges, and we can find the new S k among the remaining nk edges.This gives us the desired St 3 (d, k) centred at w.
Let A be the set of vertices with degree larger than ed/(8n) nkd and B the set of vertices with degree at most this.Since we have e edges in total this implies |A| ≤ 24n/d.This in turn implies that there can be at most |A| 2 • 3kd 2 ≤ e/3 edges with at least 2 vertices in A, so we can remove them to get a subgraph H ⊆ H in which every vertex has at most one vertex in A and |E(H )| ≥ 2e/3 kn 2 .Let us first assume there are at least e/3 edges with all vertices in B. Taking a maximal collection of vertex-disjoint St 3 (d, k) using only such edges, either we are done (if we have found d of them) or have used at most 2kd 2 vertices, each with degree at most ed/(8n).So in total, currently used vertices touch at most 2kd 2 • ed/(8n) = e/4 edges of H . Upon removing them we are left with at least e/12 kn 2 edges with all vertices in B and disjoint from the set of already used vertices.In particular, there is still a vertex of degree at least 7kn and we can use the observation from the beginning of the proof to find an additional St 3 (d, k), a contradiction.
So we may assume there are at least e/3 edges with one vertex in A and 2 in B. Now take a maximal collection of vertex-disjoint copies of St 3 (d, k) with centres in A and remaining vertices in B. Either we are done or we have used at most d vertices from A and 2kd 2 vertices in B. The former have degrees at most n • 3kd 2 (second vertex we may choose in n many ways, but for the final we are restricted by the codegree assumption) so touch at most d •n •3kd 2 = 3n 2 ≤ e/24 edges.The latter have degrees at most ed/(8n), by definition of B, so touch at most 2kd 2 • ed/(8n) = e/4 edges.Hence, upon removing all these edges we are left with at least e/24 ≥ 7kn 2 of our edges, all of which are disjoint from the set of already used vertices.This means there is a vertex in A with degree at least 7kn, so once again using our initial observation we find an additional St 3 (d, k), a contradiction.
The following lemma allows us to find many copies of 3-uniform stars with an added restriction that its leaves should avoid a relatively small subset of vertices, provided the edges of our graph have at least one vertex in this small subset.The choice of parameters might seem a bit arbitrary, but it arises from our intended application of the lemma in the 4-uniform case.
where in the last inequality we used the assumption on t.We delete from H any edge containing two vertices in X.We deleted at most such edges, using (2).Hence, vertices in X after deletion still have degree at least δ 2 .We now show how to find d vertex-disjoint copies of St 3 (d, k) with centres in X, 2nd layer vertices in C and leaves in D \ X.We construct them as follows.We pick a vertex from X and look inside its link graph for copies of stars S k with centres in C, leaves in D \ X and not using any already used vertices.If we find d of them we proceed to the next vertex of X, otherwise we stop.If we did not stop by the time we considered all vertices of X, we have found our desired structure.So we may assume that we do stop at some point when considering x ∈ X.At this point we have used at most d 2 vertices from C and kd 2 + d ≤ 2kd 2 vertices from D (the first term being the contribution of D \ X and the second of X).In the link graph L x (note that this graph consists of edges with one vertex in C and one in D), already used vertices from C touch at most d 2 • n ≤ δ/8 edges in total, using (2).Furthermore, used vertices from D touch at most 2kd The final lemma for the 3-uniform case is the following.It is similar in spirit to the above one, except that it works with smaller sets and only finds a single star.While the above lemma will be used to embed a number of stars within the link graph of a fixed vertex, the following one will be used to find the star making the first three layers of the generalized stars that we will consider in the next subsection.B-pairs.We say a B-pair is C-expanding if it extends into an edge of H using a vertex from C in at least 3d 2 many ways.This means there are at most e/4 edges which contain a non-C-expanding B-pair.The remaining, at least e/4, edges only contain C-expanding B-pairs.Each of these edges can be split into a B-pair, which must be C-expanding and a vertex in C. Hence, there needs to be at least C-expanding B pairs.Hence, we can find a star of size d made of such pairs and since each of them extends to at least 3d 2 ≥ |St 3 (d, d)| edges using a vertex in C, we find our desired star by a greedy procedure.

Optimal 4-uniform unavoidable graphs
We finally have all the 3-uniform results our hearts might desire, we proceed to the 4-uniform case.
We begin by determining the Turán number of a single copy of our unavoidable generalised 4-uniform star.The proof is relatively simple since we did most of the legwork in the previous section.Proof.For ease of notation, set St = St 4 (d, d, k).Let G be an n-vertex 4-graph with e kn 3 edges.We say a triple of vertices X is expanding in G if it is 3kd 2 -expanding.
Claim.If at least e/2 kn 3 edges contain an expanding triple, then G contains St. ).Suppose we have found t < d vertex-disjoint copies of St 3 (d, k) in D v ; they span at most 3kd 2 vertices, each having degree at most 6dn in D v .Hence, these vertices are incident to at most 18n 2 edges, so if we remove all of them, we are left with at least e/(4n) edges.Now, Theorem 5.1 implies that we can find another disjoint St 3 (d, k).Therefore, we can find at least d vertex-disjoint copies of St 3 (d, k) inside D v , which together with v give us a copy of St.
By the claim we may assume there are at most e/2 edges containing an expanding triple, so after deleting them we are left with a subgraph G with at least e/2 kn 3 edges, with no expanding triples.Take a vertex of maximum degree; it has degree at least e/n kn 2 and in its link graph no pair of vertices belongs to more than 3kd 2 edges since there is no expanding triple.So Lemma 5.3 implies the result.
The following result gives us our optimal unavoidable 4-graphs.d, d, k).A generalised star St in G is said to be well-behaved if its second layer vertices are embedded among vertices with degree at most L 2 (i.e.vertices in B ∪ C ∪ D), the third layer vertices in vertices of degree at most L 3 (i.e.vertices in C ∪ D), and the fourth layer vertices in vertices of degree at most L 4 (i.e.vertices in D).Let us consider a maximal collection of vertex-disjoint well-behaved generalised stars St.If we found less than t stars then already used vertices touch at most t 8 e edges.So there are at least e/8 edges disjoint from any previously used edges and our task is to show we can embed an additional well-behaved St using these edges.
Handshaking lemma gives us: = 35 different types of edges according to how many vertices they have in each of the sets A, B, C and D. We distinguish several cases depending on how many vertices our edges in F have in D.

Case (i). All edges in F have 4 vertices in D.
Any St we find in this case is well-behaved so we are done by Lemma 5.6.

Case (ii). All edges in F have exactly 3 vertices in D.
There is a vertex v in A ∪ B ∪ C of degree at least  Let T denote the collection of all triples in A ∪ B ∪ C of codegree at least  d, d) within T (meaning that the second and third layer of vertices are embedded in B ∪ C and C respectively) then we are done by greedily extending it and choosing distinct vertices in D for 4-th layer vertices of St, which we can In the last regime, i = r − 1, the upper bound given by Theorem 5.10 generalises easily and seems to give the correct answer for all uniformities (as long as e n r ).Here, even the optimal unavoidable r-graphs seem to be clear, namely they should consist of an appropriate number of copies of St r ((n/k) 1/(r−1) , . . ., (n/k) 1/(r−1) , k), however bounding their Turán numbers seems to be highly non-trivial.The assumption e n r−ε was made since it is not hard to generalise Theorem 5.8 (we do so in the Appendix) and hence determine un r (n, e) for all n r−ε e n r for some ε > 0. The main stumbling block for extending our methods to higher uniformities is the fact that Turán numbers of sunflowers ex(n, Sf r (t, k)) are not very well understood when r ≥ 5 and k is allowed to depend on n, as pointed out by Chung and Erdős in [9].The main reason being that these sunflowers represent main building blocks for all our examples, across most of the range.On this front, the appropriate generalisation of Theorem 1.2 seems to be as follows.
Conjecture 6.3.For every fixed r ≥ 5 and t < r one has ex(n, Sf r (t, k)) ≈ k min{t+1,r−t} n max{r−t−1,t} .This would generalise a result of Frankl and Füredi [22] and Füredi [29] (who solve it when k is a constant) and the question may be attributed to Chung and Erdős.One can generalise our constructions from Section 3 to show the lower bound part, and some methods for upper bounds also generalise.We can prove this conjecture for several more uniformities, although even in the case r = 5 we needed additional ideas.
Since generalised stars seem to be optimal unavoidable graphs, as long as e n r−1 , (at which point their unions take over) the following seems to be the key problem one needs to resolve in order to answer Question 6.1.Question 6.4.Let r be fixed.Determine the order of magnitude of ex(n, St r (d 1 , . . ., d r−1 )), where d i 's are allowed to depend on n.
One can read out the answer for r = 3 from Theorem 5.1 and we believe our methods suffice to also solve it for r = 4. Yet for higher uniformities even the case in which we keep the d i 's fixed, which is yet another generalisation of the result of Frankl and Füredi [22] and Füredi [29] on Turán numbers of sunflowers with fixed uniformity and number of petals, seems potentially interesting.
Both Conjecture 6.2 and Question 6.4 are examples of an interesting general question.Turán numbers of both graphs and hypergraphs are well-studied, but in most cases one is only interested in Turán numbers of a graph of fixed size.For many classical examples one can ask what happens if the fixed size restriction is removed.This can be very useful in a number of situations, perhaps the most ubiquitous being the Kövári-Sós-Turán theorem [35] which is often used to find complete bipartite graphs of order even comparable to that of the underlying graph.For some additional examples see [1,14,28].It definitely seems there is plenty of potential for interesting future work in this direction.
So far we have avoided discussing the assumption e n 4 in Theorem 1.1, mostly following in line of Chung and Erdős.In fact we can replace this condition in Theorem 1.1 with e ≤ n 4 − n 1+c for any c > 0 (it requires choosing s and t slightly differently in Theorem 5.8).The problem seems to change significantly at this point and attains a very different flavour.Even the graph case, which was raised by Chung and Erdős in 1983 has only recently been resolved in [4] and it suggests that around this point the optimal extremal examples seem to become (pseudo)random graphs in place of the complete rpartite graphs and the answer changes.Given that even the graph case turned out to be somewhat involved and relies on completely different ideas, we leave this open for future research.Question 6.5.For r ≥ 3 determine the order of magnitude of un r (n, e) when e = (1 − o(1)) n r .
Another natural follow-up question is to determine how optimal (up to a constant factor) (n, e)-unavoidable r-graphs look like.It is entirely possible to answer this question without answering Question 6.1, since one can potentially force the structure of an optimal unavoidable graph similarly as in Theorem 4.2 (as was demonstrated by Chung and Erdős in the 3-uniform case).At the very least we believe that optimal unavoidable graphs should be (close to) generalised stars as long as e is not too close to n 4 .Towards the end of the range the situation becomes blurry, as at least for part of the range, both copies of complete r-partite graphs and generalised stars are simultaneously optimal. of expanding vertices is at most e 1/r r ≤ e/6.Therefore, by removing those edges we obtain a subhypergraph H with e/2 edges such that any edge of H contains at least one non-expanding vertex, and the edges of H don't touch used vertices.Let V 1 , . . ., V r−1 be r − 1 copies of V (G), and V r be a copy of the set of non-expanding vertices.Denote by M the set of r-tuples (v 1 , . . ., v r ) in √ n ≥ t.The sets A 1 , . . ., A r are disjoint, for the edges of H consist of distinct vertices.Hence H contains a copy of K r (s, . . ., s, t) in which the r-th vertex class is embedded in the set of non-expanding vertices, a contradiction to the maximality of k.
. A generalised star is defined recursively as follows: St 2 (d) is the usual star S d with d leaves, and St r (d 1 , . . ., d r−1 ) is the r-graph in which all edges have a vertex v in common and upon removal of v from every edge we obtain d 1 copies of St r−1 (d 2 , . . ., d r−1 ).

Lemma 2 . 4 .
Any graph with n vertices and e = 6sn ≥ 6kn edges contains at least min{s, √ sn/k} vertex-disjoint copies of the star S k .

For
y = x, let D xy denote the set of pairs X such that y ∪ X ∈ E(D x ) and X is 3k 3/2 -expanding in D x .Claim 2. For every y = x, one has |D xy | ≤ 6k 3/2 n.Proof.Suppose to the contrary that |D xy | ≥ 6k 3/2 n for some y = x.According to Lemma 2.4 (with s = k 3/2 ), the graph D xy contains min k 3/2 , √ k 3/2 n k ≥ √ k (using n ≥ k 3/2 ) vertex-disjoint copies of S k .Label the edges of these stars by e 1 , e 2 , . . ., e k 3/2 .

Lemma 5 . 3 .
Let H be a 3-graph on n vertices with e kn 2 edges.If every pair of vertices belongs to less than 3kd 2 edges of H, then H contains d vertex-disjoint copies of St 3 (d, k), where d = (n/k) 1/3 .

Lemma 5 . 4 . 3 td 2
Let n, k and t be positive integers with t ≤ min{k, √ d}, where d = (n/k) 1/3 .Let H be an n-vertex 3-graph with e n edges.Let C ⊆ V (H) such that |C| ≤ 16nt/d and assume that every edge of H has precisely one vertex in C. Then H contains d vertex-disjoint copies of St 3 (d, k) whose leaves lie outside of C. Proof.Let D = V (H) \ C. Suppose there exists a set X of d vertices in D with degree at least

Lemma 5 . 5 .
Let n, k and t be positive integers with t ≤ min{k, √ d}, where d = (n/k)

td 2 k
= n 3 /(td 2 ) edges with the remaining vertices being one in C and two in D. By Lemma 5.4 (note that |C| ≤ 16td 2 k = 16nt/d), the link graph of v contains d vertex-disjoint copies of St 3 (d, k) whose leaves lie in D. Case (iv).All edges in F have exactly 1 vertex in D.
We prove a lower bound first.Let us say that a (2-)graph G is good if it has at most 2k vertices and each of its edges is contained in a copy of K 4 .If we can show that there exists m edge disjoint copies of good graphs G 1 , . . ., G m on the same vertex set [n], with at least Θ(n 2 k 2 ) copies of K 4 in total among G 1 , . . ., G m , then we would be done.Indeed, we can construct a 4-graph H on [n] by putting a 4-edge in H for any 4 vertices which induce a copy of K 4 in one of G 1 , . . ., G m ; this 4-graph has at least Θ(n 2 k 2 ) edges, and by assumption each vertex pair P in [n] is an edge of at most one graph G i , and therefore all the 4-edges in H which contain P contain only vertices from G i of which there are at most 2k, so no pair can be the centre of a sunflower Sf 4 (2, k) which has 2k + 2 vertices.Now we show the existence of such G 1 1/3 } edges, as desired.So, combining Theorem 4.3 and Theorem 4.2 we obtain the desired result for the middle range.Theorem 4.4.For n 2 e n 3 , we have un 4 (n, e) ≈ min (e/n 2 ) 3/4 , (e/n) 1/3 .Let us now turn to the proof of Theorem 4.3.For the upper bound our task is to show that any 4-graph G on n vertices with e max{k 2 n 2 , k 9/2 n} edges contains a copy of St 4 ( √ k, k, 1).To this end, note that by the pigeonhole principle, the link graph L v of some vertex v ∈ V (G) must have e/n max{k 2 n, k 9/2 } triples.If L v contains √ k vertex-disjoint copies of Sf 3 (1, k), then we are done.Unfortunately, a 3-graph on n vertices with max{k 2 n, k 9/2 } edges may not have more than one vertex-disjoint copy Sf 3 (1, k), let alone √ k copies.For example, the 3-graph consisting of all triples containing a fixed vertex has n−1 2 edges (which is large enough when k n 4/9 ), and it clearly does not contain two disjoint copies of Sf 3 (1, k).As the next result shows, one can remedy the situation by imposing a boundedness condition on the codegrees.Lemma 4.5.Let k ≥ 2. Every n-vertex 3-graph with at least e max{k 2 n, k 9/2 } edges, in which every pair of vertices has codegree at most 3/2 -expanding.Note that we have v∈V (G) |D v | ≥ nm/2 since each edge of G, containing a 3k 3/2 -expanding triple, contributes at least 1 to this sum.Hence, there exists a vertex x with |D x | ≥ m/2.
Claim 1.There is no star of size √ k consisting of 3k 3/2 -expanding pairs in the 3-graph D x .
3/2 -expanding triple for every i, we can greedily find distinct vertices v 1 , . . ., v k 3/2 ∈ V (G) \ j e j such that y ∪ e 1 ∪ v 1 , . . ., y ∪ e k 3/2 ∪ v k 3/2 are edges of G. Proof.Suppose otherwise and let v 1 , . . ., v √ k denote vertices with |D xv i | ≥ 6k 2 .Since by Claim 1 there are no stars of size √ k in D xv i we know by Lemma 2.3 that there must be a matching of size 3k 3/2 in D xv i .Now assume for some i ≤ √ k we have found i − 1 vertex-disjoint copies of Sf 3 (1, k) centred at v 1 , . . ., v i−1 which do not use vertices from {v i , . . ., v √ k }.We know there is a matching of size 3k 3/2 in D xv i , at most √ k + 2k 3/2 of the pairs in the matching use a vertex which already belongs to one of our Sf 3 (1, k)'s so we can still find a k-matching in D xv i , avoiding any already used vertices.This gives us a new Sf 3 (1, k) centred at v i disjoint from the previous ones and we may repeat this √ k many times.Finally, these copies of Sf 3(1, k) when joined with x make a copy of St 4 ( √ k, k, 1) which is a contradiction.
= 10 different types of edges according to how many vertices they have in each of the sets A, B and C. We distinguish four cases.Case (i).The edges in F have no vertices in C.We have |F | ≤ |A∪B| 3 (hkt) 3 ≤ sn 2 |F |, a contradiction.Case (ii).All three vertices of each edge in F are in C. We can find a copy of St 3 (h, k) using only the edges in F by Theorem 5.1, since s ≥ max{k, h 2 k 2 /n} and |F | sn 2 .As all its vertices are in C the star is well-behaved.Case (iii).All edges of F have exactly two vertices in C.There must exist a vertex in A ∪ B of degree at least |F | |A∪B| ≥ |F | The remaining, at least |F |/2 edges each contain a pair from P and each such pair can belong to at most n edges, so |P| ≥ |F |/(2n) sn.Since at most |A| , avoiding all already used vertices.Hence, we find another appropriate S k , a contradiction.So we may assume that there are at most d vertices in D with degree at least δ.These vertices participate in at most ≤ k); we delete them and are left with a graph H with at least 3e 4 edges such that all vertices in D have degree at most δ in H . Let us take a maximal collection of vertex-disjoint copies of St 3 (d, k) with centres in C. If we are not done, the centres touch at most dn 2 ≤ e 4 edges, while the other used vertices touch at most 2kd 2 • δ = e 4 edges (since they all belong to D so touch at most δ edges).So there are at least e/4 edges which do not touch any of the used vertices.Let H be the graph consisting of these edges.Now it is enough to find another St 3 (d, k) in H , with its centre in C. Note that there is a vertex in C of degree at least x 1/3 .Let H be a 3-graph on vertex set B ∪ C where B and C are disjoint, |B| ≤ 16td 2 and |C| ≤ 16td 2 k.If H has e kn 2 edges then it contains a copy of St 3 (d, d) whose leaves all lie in C. If we have e/4 edges living completely in C then by Theorem 5.1, since e/4 ≥ 2 8 n 2 ≥ max{d|C| 2 , d 4 |C|}, where we used t 2 ≤ d for the first term and t ≤ k for the second, we can find a copy of St 3 (d, d) consisting of these edges, so in particular having all leaves in C, as desired.So we may assume there are at least e/2 edges containing vertices from both B and C. Let H be the subgraph consisting of such edges.A pair of vertices in H is said to be a B-pair if it contains at least one vertex in B. There are at most |B| • (|B| + |C|) ≤ 2 9 t 2 d 4 k ≤ 2 9 d 4 k 3 = 2 9 kn 2 /d 2 ≤ e/(12d 2 ) since every edge containing an expanding triple contributes at least one to the sum on the left.This implies that there exists a vertex v with |D v | ≥ e/(2n).Now, if there exists a vertex w with degree at least 6dn in D v then we can find d vertex-disjoint copies of the star of size d within the link graph of w in D v , by Lemma 2.4 and using that n = d 3 k ≥ d3.Adding w to these edges gives us an St 3 (d, d) within D v (so consisting of expanding triples).This in turn implies we are done by greedily extending it to a copy of St.So we may assume every vertex has degree at most 6dn in D v .Theorem 5.1 tells us that we can find at least one St 3 (d, k) in any 3-graph with e/(4n) kn 2 edges (using that n = d 3 k ≥ d 2 k so that d 2 k 2 n ≤ kn 2 2and |C| ≤ 4e/L 4 = 16td 2 k.This implies |A ∪ B| ≤ 32td 2 and |A ∪ B ∪ C| ≤ 48td 2 k.Hence the total number of edges with at least 2 vertices in A, or at least 3 vertices in A ∪ B, or all 4 vertices in A ∪ B ∪ C is upper bounded by≤ 2 6 t 2 d 2 n 2 +2 10 t 3 d 6 n +2 19 t 4 d 8 k 4 ≤ 2 6 d 5/2 n 2 +2 10 k 3 d 6 n +2 19 d 9 k 4 ≤ 2 6 n 3 k +2 10 n 3 k +2 19 n 3 k ≤ 2 20 kn 3 ≤ e/16, where we used t 4 ≤ d and t ≤ k in the second inequality and n = kd 3 in the third.In particular, there are at least e/16 remaining edges (which do not touch used vertices) such that they have at least 1 vertex in D, at least 2 vertices in C ∪ D and at least 3 vertices in B ∪ C ∪ D. Furthermore, there exists a subset F of these edges of size |F | ≥ (e/16)/35 kn 3 which all have the same number of vertices in each of A, B, C and D, since there are 7 4+3 3 td 2 k = n 2 dk/t.Using Theorem 5.2 (with s := dk/t and h := d so that s ≥ k and ns = k 2 d 4 /t ≥ h 2 k 2 ), we get at least d vertex-disjoint copies of St 3 (d, k), since Together with v, this gives a desired well-behaved copy of St.Case (iii).All edges in F have exactly 2 vertices in D.There can be at most|A||B| n 2 ≤ 128t 2 n 3 /k < |F | edges in F with 1 vertex in Aand 1 in B. Hence our edges either have exactly 2 vertices in B and 2 in D, or at least 1 vertex in C. Subcase (a).All edges in F have 2 vertices in B and 2 in D. pairs in their link graph.Since there are |B| 2 different B-B pairs, ones outside of P belong to at most |B| 2 •|F |/|B| 2 ≤ |F |/2 edges.Hence, the remaining |F |/2 edges have their B-B pair belonging to P. Each B − B pair can extend into an edge in at most |D| Therefore, P contains a star of size d.We embed vertex-disjoint stars S k into the link graphs of the leaves of our star in P, dealing with one leaf at a time and moving to the next one when we found d stars S k inside its link.Unless we are done, we have used at most 2kd 2 vertices which can touch at most 2kd 2 • n many D-D pairs within the current link graph.Thus we still have at least nkd 2 ≥ kn many D-D pairs in the link graph, disjoint from any already used vertices, which means we can find another S k , as desired.Subcase (b).All edges have at least 1 vertex in C and exactly 2 vertices in D.
Given a vertex set S, a pair of vertices in S is called an S-S pair.Denote by P the set of B-B pairs with at least |F |/|B| 2 ≥ 3nkd 2 There is a vertex v ∈ A ∪ B ∪ C which appears in at least so at least half of the edges in F contain a triple in T , and so16t 3 d 5 k 2 ≤ 2 16 d 6 k 2 = 2 16 n 2 ≤ |T |/2 triples with a vertex in A, we can remove them to obtain a collection T of triples in B ∪C such that |T | kn2.Now, if we find a well-behaved St 3 (