Dirac-type theorems in random hypergraphs

For positive integers $d<k$ and $n$ divisible by $k$, let $m_{d}(k,n)$ be the minimum $d$-degree ensuring the existence of a perfect matching in a $k$-uniform hypergraph. In the graph case (where $k=2$), a classical theorem of Dirac says that $m_{1}(2,n)=\lceil n/2\rceil$. However, in general, our understanding of the values of $m_{d}(k,n)$ is still very limited, and it is an active topic of research to determine or approximate these values. In this paper we prove a"transference"theorem for Dirac-type results relative to random hypergraphs. Specifically, for any $d<k$, any $\varepsilon>0$ and any"not too small"$p$, we prove that a random $k$-uniform hypergraph $G$ with $n$ vertices and edge probability $p$ typically has the property that every spanning subgraph of $G$ with minimum degree at least $(1+\varepsilon)m_{d}(k,n)p$ has a perfect matching. One interesting aspect of our proof is a"non-constructive"application of the absorbing method, which allows us to prove a bound in terms of $m_{d}(k,n)$ without actually knowing its value.


Introduction
Over the last few decades, there has been a great deal of interest in analogues of combinatorial theorems relative to a random set. To give a simple example, let us consider Mantel's theorem [39], a classical theorem asserting that any subgraph of the complete n-vertex graph K n with more than about half of the n 2 possible edges must contain a triangle. The random analogue of Mantel's theorem says that if one considers a random subgraph G ⊆ K n , obtained by including each edge independently at random with some suitable probability 0 < p < 1, then typically G has the property that each subgraph with more than about half of the edges of G must contain a triangle. That is to say, Mantel's theorem is "robust" in the sense that an analogous statement typically holds even in the "noisy environment" of a random graph. The study of combinatorial theorems relative to random sets has been closely related to several of the most exciting recent developments in probabilistic and extremal combinatorics, including the sparse regularity method, hypergraph containers and the absorbing method. See [11] for a general survey of this topic.
In the early history of this area, the available methods were somewhat ad-hoc, but recent years have seen the development of some very general tools and techniques that allow one to "transfer" a wide variety of combinatorial theorems to the random setting, without actually needing to know the details of their proofs. As an illustration of this, consider the hypergraph 1 Turán problem, which is a vast generalisation of Mantel's problem. For a k-graph H, let ex(n, H) be the maximum possible number of edges in an n-vertex k-graph which contains no copy of H, and define the Turán density of H as π(H) = lim n→∞ ex(n, H) n k (a simple monotonicity argument shows that this limit exists). In the graph case, where k = 2, the values of each π(H) are given by the celebrated Erdős-Stone-Simonovits theorem [15,16], but for higher uniformities very little is known about the values of π(H). Despite this, Conlon and Gowers [9] and independently Schacht [51] were able to prove an optimal theorem in the random setting. Let G ∼ H k (n, p) be an instance of the random k-graph with edge probability p; they proved that if p is not too small then typically G has the property that every subgraph with at least (π k (H) + ε) n 2 p edges has a copy of H.
Moreover, they were able to find the optimal range of p (that is, the essentially best possible definition of "not too small") for which this holds. In other words, whenever we are able to prove a Turán-type theorem for graphs or hypergraphs, we "automatically" get a corresponding theorem in the random setting. This was quite a striking development: before this work, similar theorems were known only for a few graphs H (and no higher-uniformity hypergraphs), despite rather a lot of effort. For a more detailed history of this problem we refer the reader to [9,51] and the references therein.
The methods and tools developed by Conlon and Gowers, and by Schacht, were later supplemented by some further work by Conlon, Gowers, Samotij and Schacht [10]. The ideas developed by these authors are very powerful (and actually apply in much more general settings than just Turán-type problems), but a common shortcoming is that none of them are sensitive to "local" information about the individual vertices of a graph or hypergraph, and therefore they are not sufficient for proving relative versions of theorems in which one wishes to understand the presence of spanning substructures.
For example, Dirac's theorem [13] famously asserts that every n-vertex graph with minimum degree at least n/2 has a Hamiltonian cycle: a cycle passing through all the vertices of the graph. A random analogue of this theorem was conjectured by Sudakov and Vu [52] and proved by Lee and Sudakov [37] (see also the refinements in [42,43]): For any ε > 0, if p is somewhat greater than log n/n, then a random graph H 2 (n, p) typically has the property that every spanning subgraph with minimum degree at least (1 + ε)np/2 has a Hamiltonian cycle. Since this work, there has been a lot of interest in random versions of Dirac-type theorems for other types of spanning or almost-spanning subgraphs (see for example [2,3,5,6,7,19,21,26,41,45,54]), introducing a large number of ideas and techniques that are quite independent of the aforementioned general tools. In this paper we are interested in Dirac-type problems for random hypergraphs. Before discussing this further, we take a moment to make some definitions and introduce the topic of (non-random) Dirac-type problems for hypergraphs.
Recall that Dirac's theorem asserts that every n-vertex graph with minimum degree at least n/2 has a Hamiltonian cycle. If n is even then we can take every second edge on this cycle to obtain a perfect matching: a set of vertex-disjoint edges that covers all the vertices of our graph. So, Dirac's theorem can also be viewed as a theorem about the minimum degree required to guarantee a perfect matching. While there are certain generalisations of (Hamiltonian) cycles to hypergraphs 2 , the notion of a perfect matching generalises unambiguously, and we prefer to focus on perfect matchings when considering hypergraphs of higher uniformities.
One subtlety is that in the hypergraph setting there are actually multiple possible generalisations of the notion of minimum degree. For a k-graph H = (V, E) and a subset S ⊆ V of the vertices of H, satisfying 0 ≤ |S| ≤ k − 1, we define the degree deg H (S) of S to be the number of edges of H which include S. The minimum d-degree δ d (H) of H is then defined to be the minimum, over all d-sets of vertices S, of deg H (S). For integers n, k, d such that 0 ≤ d ≤ k − 1 and n is divisible by k, let m d (k, n) be the smallest integer m such that every n-vertex k-graph H with δ d (H) ≥ m has a perfect matching. Dirac's theorem says that m 1 (2, n) ≤ n/2 , and it is quite easy to see that this is tight.
The problem of determining or approximating the values of m d (k, n) is fundamental in extremal graph theory, and has attracted a lot of attention in the last few decades (see for example the surveys [47,55] and the references therein). The main conjecture in this area is as follows.
where o(1) represents some error term that tends to zero as n tends to infinity along some sequence of integers divisible by k.
There are constructions showing that the expression in Conjecture 1.1 is a lower bound for m d (k, n); the hard part is to prove upper bounds.
In much the same way that the Turán densities π(H) encode the asymptotic behaviour of the extremal numbers ex(H, n), it makes sense to define Dirac thresholds that encode the asymptotic behaviour of the values of m d (k, n). However, compared to the Turán case, convergence to a limit is nontrivial; in Section 3 we prove the following result (which will be helpful to state and prove our main result, but is also of independent interest). Theorem 1.2. Fix positive integers d < k. Then the quantity m d (k, n)/ n−d k−d converges to a limit µ d (k) ∈ [0, 1], as n tends to infinity along the positive integers divisible by k.
So, the situation is quite similar to the hypergraph Turán problem: the optimal theorems in the nonrandom setting are not known, but there is still some hope of proving a "transference" theorem, giving bounds in the random setting in terms of the (unknown) Dirac thresholds µ d (k).
Of course, in order to prove a random analogue of any extremal theorem, in addition to having a handle on the extremal theorem one also needs to have a good understanding of random graphs and hypergraphs. This presents a rather significant obstacle when investigating perfect matchings, because the study of perfect matchings in random hypergraphs is notoriously difficult. Famously, Shamir's problem asks for which p a random k-graph H k (n, p) has a perfect matching, and this was resolved only a few years ago in a tour-de-force by Johansson, Kahn and Vu [28] (see also the new simpler proof in [20], and the refinement in [29]). Roughly speaking, they proved that if p is large enough that H k (n, p) typically has no isolated vertices (the threshold value of p is about n 1−k log n), then H k (n, p) typically has a perfect matching. All known proofs of this theorem are quite "non-constructive", involving some ingenious way to show that a perfect matching is likely to exist without being able to say much about its properties or how to find it.
In any case, it is natural to make the following conjecture, "transferring" Dirac-type theorems to random hypergraphs. Conjecture 1.3. Fix γ > 0 and positive integers d < k, and consider any 0 < p < 1 (which may be a function of n). Suppose that n is divisible by k. Then a.a.s. 3 G ∼ H k (n, p) has the property that every has a perfect matching. Note that in the above conjecture we do not make any assumption on p, though in some sense we are implicitly assuming p = Ω(n d−k log n), because otherwise one can show that a random k-graph G ∼ H k (n, p) will a.a.s. have δ d (G) = 0 (meaning that there is no subgraph G satisfying the condition in the conjecture). Due to the aforementioned difficulty of studying perfect matchings in random hypergraphs, we believe that Conjecture 1.3 will be extremely difficult to prove for small p (especially for p ≈ n 1−k log n), and therefore we believe that the hardest (and most interesting) case is where d = 1. On the other extreme, if d = k − 1 then it suffices to consider the regime where p = Ω(n −1 log n), which is substantially easier due to certain techniques which allow one to reduce the problem of finding hypergraph perfect matchings to the problem of finding perfect matchings in certain bipartite graphs 4 . Using such a reduction, the d = k − 1 case of Conjecture 1.3 was proved by Ferber and Hirschfeld [17].
Our main result in this paper is the following substantial progress towards Conjecture 1.3, proving it for all d < k under certain restrictions on p (even though the values of µ d (k) are in general unknown). Theorem 1.4. Fix γ > 0 and positive integers d < k. Then there is C > 0 such that the following holds. Suppose that p ≥ max{n −k/2+γ , Cn −k+2 log n}, and that n is divisible by k. Then a.a.s. G ∼ H k (n, p) has the property that every spanning subgraph Recalling the implicit assumption p = Ω(n d−k log n), Theorem 1.4 actually resolves the d > k/2 case of Conjecture 1.3, and comes very close to resolving the case d = k/2 (if d is even). Also, note that except in the case where k = 3 and d = 1, the assumption p ≥ Cn −k+2 log n is superfluous (being satisfied automatically when p = Ω(n d−k log n) and p ≥ n −k/2+γ ). Actually, this particular assumption can be weakened quite substantially, but in the interest of presenting a clear proof, we discuss how to do this only informally, in Section 9.
There are a number of different ideas and ingredients that go into the proof of Theorem 1.4. Perhaps the most crucial one is a non-constructive way to apply the so-called absorbing method. To say just a few words about the absorbing method: in various different contexts, it is much easier to find almost-spanning substructures than genuine spanning substructures. For example, a perfect matching is a collection of disjoint edges that cover all the vertices of a hypergraph, but it is generally much easier to find a collection of disjoint edges that cover almost all of the vertices of a hypergraph. The insight of the absorbing method is that one can sometimes find small "flexible" substructures called absorbers, arranged in a way that allows one to make local modifications to transform an almost-spanning structure into a spanning one. This method was pioneered by Erdős, Gyárfás and Pyber [14], and was later systematised by Rödl, Ruciński and Szemerédi [48], in connection with their study of Dirac-type theorems in hypergraphs.
In previous work, the typical approach was to build absorbers in a "bare-hands" fashion, considering some set of vertices which we would like to be able to "absorb", and reasoning about the possible incidences between edges close to these vertices in order to prove that an appropriate absorber is present. For this to be possible, one must define the notion of an absorber in a very careful way. In contrast, further developing some ideas that we introduced in [18], we are able to find absorbers using a "contraction" argument, together with one of the general tools developed by Conlon, Gowers, Samotij and Schacht [10]. This gives us an enormous amount of freedom, and in particular we can define absorbers in terms of the Dirac thereshold µ d (k) (without knowing its value!). This freedom is also crucial in allowing us to choose absorbers which exist in H k (n, p) for small p (that is, for p close to n −k/2 , which seems to be the limit of our approach).
The structure of the rest of the paper is as follows. First, in Section 2 we give an introduction to the absorbing method, and outline the proof of Theorem 1.4. Afterwards, we present the short proof of Theorem 1.2 in Section 3, as a warm-up to to the absorbing method before we present the more sophisticated ideas in the proof of Theorem 1.4.
In Section 4 we discuss the so-called sparse regularity method, and in Section 5 we record some basic facts about concentration of the edge distribution in random hypergraphs. Everything in these sections will be quite familiar to experts. In Section 6 we explain how to find almost-perfect matchings in the setting of Theorem 1.4, in Section 7 we state a sparse absorbing lemma and explain how to use it to prove Theorem 1.4, and in Section 8 we present the proof of this sparse absorbing lemma.
Finally, in Section 9 we have some concluding remarks, including a discussion of how to weaken the assumption p ≥ Cn −k+2 log n in the case (d, k) = (1, 3).

Outline of the proof of the main theorem
Suppose that G ∼ H k (n, p) is a typical outcome of H k (n, p), and G ⊆ G is a spanning subgraph of G with minimum d-degree at least (µ d (k) + γ)p n−d d . Our goal is to show that G contains a perfect matching. Since the proof is quite involved, we break down the steps of the proof into subsections.

Almost-perfect matchings
The first observation is that our task is much simpler if we relax our goal to finding an almost-perfect matching (that is, a matching that covers all but o(n) vertices). This is due to the existence of a powerful tool called the sparse regularity lemma. Roughly speaking, the sparse regularity lemma allows us to model the large-scale structure of the sparse k-graph G using a small, dense k-graph R called a cluster k-graph. Each edge of R corresponds to a k-partite subgraph of G where the edges are distributed in a "homogeneous" or "quasirandom" way 5 .
It is not hard to show that the degree condition on G translates to a similar degree condition on R, though small errors are introduced in the process: we can show that almost all of the d-sets of vertices in R have degree at least say (µ d (k) + γ/2) t−d d , where t is the number of vertices of R. We then use the definition of µ d (k) (without knowing its value!) to show that R has an almost-perfect matching. This is not immediate, because R may have a few d-sets of vertices with small degree, but it is possible to use a random sampling argument to overcome this difficulty. In any case, an almost-perfect matching in R tells us how to partition most of the vertices of G into subsets such that the subgraphs induced by these subsets each satisfy a certain quasirandomness condition. We can then take advantage of this quasirandomness to find an almost-perfect matching in each of the subgraphs. Combining these matchings gives an almost-perfect matching in G .
The details of this argument are in Section 6.

The absorbing method
It may not be obvious that being able to find almost-perfect matchings is actually useful, if our goal is to find a perfect matching. It is certainly not true that we can start from any almost-perfect matching and add a few edges to obtain a perfect matching. However, it turns out that something quite similar is often possible in problems of this type. Namely, in some hypergraph matching problems it is possible to find a small subset of vertices X which is very "flexible" in the sense that it can contribute to matchings in many different ways. We can then find an almost-perfect matching covering almost all the vertices outside X, and take advantage of the special properties of X to complete this into a perfect matching. This idea is now called the absorbing method. It was introduced as a general method by Rödl, Ruciński and Szemerédi [48] (though similar ideas had appeared earlier, for example by Erdős, Gyárfás and Pyber [14] and by Krivelevich [34]). The absorbing method has been an indispensable tool for almost all work on hypergraph matching problems in the last decade. To give a specific example, the strong absorbing lemma of Hán, Person and Schacht [24] (appearing here as Lemma 3.1) shows that in a very dense k-graph G we can find a small "absorbing" set of vertices X, with the special property that for any set W of o(n) vertices outside X, the induced subgraph G[X ∪ W ] has a perfect matching. So, if we can find an almost-perfect matching M 1 in G − X, we can take W as the set of unmatched vertices and use the special property of X to find a perfect matching M 2 in G[X ∪ W ], giving us a perfect matching M 1 ∪ M 2 in G.
It is much more difficult to prove absorbing lemmas in the sparse setting of Theorem 1.4. To explain why, we need to say a bit more about how absorbing lemmas are proved in the dense setting. Almost always, the idea is to build an absorbing set X using small subgraphs called absorbers 6 . In the context of matching problems in k-graphs, an absorber in a k-graph G rooted at a k-tuple of vertices x 1 , . . . , x k is a subgraph H whose edges can be partitioned into two matchings, one of which covers every vertex in V (H) and the other of which covers every vertex except x 1 , . . . , x k . A single edge {x 1 , . . . , x k } is a trivial absorber, and in the case k = 2 (that is, the case of graphs), an odd-length path between x 1 and x 2 is an absorber. See Figure 1 for a nontrivial example of a 3-uniform absorber.
x 1 x 2 x 3 y 1 y 2 y 3 Figure 1. An illustration of a 3-uniform absorber rooted on vertices x 1 , x 2 , x 3 . The dark edge covers all non-root vertices and the two light edges form a matching covering all the vertices of the absorber.
The details in the proofs of different absorbing lemmas vary somewhat, but a common first step is to show that there are many absorbers rooted at every k-tuple of vertices, using fairly "bare-hands" arguments that take advantage of degree assumptions. For example, suppose an n-vertex 3-graph G has δ 2 (G) ≥ (1/2 + γ)n, consider any vertices x 1 , x 2 , x 3 , and suppose we are trying to find a copy of the absorber pictured in Figure 1. There are at least (1/2 + γ)n choices for y 1 such that {x 1 , x 2 , y 1 } ∈ E(G). For any such y 1 , and any of the n − 4 remaining choices of y 2 , there are at least (1/2 + γ)n choices for y 3 such that {y 1 , y 2 , y 3 } ∈ E(G), and at least (1/2 + γ)n choices such that {x 3 , y 2 , y 3 } ∈ E(G), so by the inclusion-exclusion principle there are at least 2γn choices for y 3 such that both {y 1 , y 2 , y 3 } and {x 3 , y 2 , y 3 } are in E(G). All in all, this gives about γn 3 ≈ 3γ n 3 absorbers rooted at x 1 , x 2 , x 3 . Having shown that every k-tuple of vertices supports many absorbers, one can then often use a straightforward probabilistic argument to construct an arrangement of absorbers that gives rise to an absorbing set X as in the strong absorbing lemma. Continuing with the previous example, if we choose a random set T of say (γ/2)n disjoint triples of vertices, then for every choice of x 1 , x 2 , x 3 , there are typically about (3γ)(γ/2)n triples in T which give an absorber rooted on x 1 , x 2 , x 3 . We can then take X as the set of vertices in the triples in T . It is not hard to check that this set satisfies the assumptions of the strong absorbing lemma: given a set W of o(n) vertices outside X, we can partition W into triples {x 1 , x 2 , x 3 } and iteratively "absorb" them into T to obtain a perfect matching in G[X ∪ W ].

Finding absorbers in sparse graphs
Unfortunately, the ideas sketched above fail in many different ways in the sparse setting. First, there is the problem of how to actually find absorbers. It is in general very difficult to understand when one can find a copy of a specific k-graph in a subgraph G of a random k-graph G. Indeed, this is the random Turán problem described in the introduction, and general results have become available only very recently. One of the most flexible tools in this area is the sparse embedding lemma proved by Conlon, Gowers, Samotij and Schacht [10] (previously, and sometimes still, known as the KŁR conjecture of Kohayakawa, Łuczak and Rödl).
Roughly speaking, the sparse embedding lemma says that for any 7 k-graph H, if p is large enough that a random k-graph G ∼ H k (n, p) typically contains many copies of H (this depends on a "local sparseness" measure of H), then G satisfies the following property. If we apply the sparse regularity lemma to a spanning subgraph G ⊆ G, and find a copy of H in the resulting cluster graph R, then there is a corresponding copy of H in G itself. Roughly speaking, the sparse embedding lemma allows us to work in the dense cluster graph, where it is much easier to reason directly about existence of subgraphs, and then "pull back" our findings to the original graph.
One may hope that we can just repeat the arguments in the proof of the strong absorbing lemma to find absorbers in the dense cluster graph, and somehow use the sparse embedding lemma to convert these into absorbers in the original graph. Unfortunately, life is not this simple, for (at least...) two reasons. The first issue is that we need our absorbers to satisfy some local sparseness condition, because otherwise we can only work with a very limited range of p. It is not obvious how to use existing "bare-hands" methods to find such absorbers.
The second issue is that the sparse embedding lemma is not suited for embedding rooted subgraphs. The cluster graph R is just too rough a description of G for it to be possible to deduce information about specific vertices in G from information in R.
To attack the first of these issues, we use a novel non-constructive method to find our absorbers. Namely, since an absorber is built out of matchings, we can use the definition of the Dirac threshold itself to find absorbers (even if we do not actually know its value). To be more specific, consider a k-graph

and let M be a large constant. Using a concentration inequality, we can show that that almost all
if M is large enough, then almost all M -vertex induced subgraphs have a perfect matching. We then have a lot of freedom to construct a locally sparse absorber using these matchings.
To overcome the second of the aforementioned issues, we further develop a "contraction" technique we introduced in [18]. The problem is that the cluster graph does not "see" individual vertices; it can only see large sets of vertices. In the case k = 2 (that is, the graph case), an obvious fix would be to consider the set of neighbours (or perhaps neighbours-of-neighbours) of our desired roots, instead of the roots themselves. However, in the case k ≥ 3, every edge containing a root vertex x i contains k − 1 > 1 other vertices. That is to say, "neighbours" come grouped in sets of size k − 1 (the collection of all such sets is called the link (k − 1)-graph of x i ). So, it seems we would need an embedding lemma that works with sets of (k − 1)-sets of vertices, not just sets of vertices.
The way around this problem is to choose a large matching in the link (k − 1)-graph of each x i , and "contract" each of the edges in each of these matchings to a single vertex, to obtain a contracted graph G cont . If we do this carefully, the resulting graph can still be viewed as a subgraph of an appropriate random k-graph, so the sparse embedding lemma still applies. It then suffices to find a suitable "contracted absorber" in G cont , which would correspond to an absorber in the original k-graph G . We can do this with the sparse embedding lemma.
The details of the arguments sketched in this section appear in Section 8.

Combining the absorbers
The above discussion gives a rough idea for how to find an absorber rooted at every k-set of vertices, in a suitable spanning subgraph of a random graph. However, it is still not at all obvious how to combine these to prove a sparse embedding lemma. A simple probabilistic argument as sketched in Section 2.2 cannot suffice: unfortunately, there are just not enough absorbers.
We get around the issue as follows. Instead of using our absorbers to find a matching M which can "absorb" every k-set of vertices, we fix a specific "template" arrangement of only linearly many k-sets we would like to be able to absorb. It is easy to handle such a small number of k-sets: we can in fact greedily choose disjoint absorbers for each of these special k-sets, to obtain an "absorbing structure" H. Building on ideas due to Montgomery [40], we show that it is possible to choose our template arrangement of k-sets in such a way that H has a very special kind of robust matching property: H has a "flexible set" of vertices Z such that H still has a perfect matching even after any constant fraction of the vertices in Z are deleted 8 .
We can then let X = V (H), and prove that X gives a sparse absorbing lemma, as follows. For any small set W of vertices outside X, we can first find a matching M 1 covering W and a constant fraction of Z, using a hypergraph matching criterion due to Aharoni and Haxell [1]. Then, our robust matching The details of this argument, along with the statement of our sparse absorbing lemma and the deduction of Theorem 1.4, are in Section 7.

Convergence of the Dirac threshold
In this section we prove Theorem 1.2, which will be a good warm-up for some of the ideas that we will develop further to prove Theorem 1.4.
The main ingredient in the proof of Theorem 1.2 is the strong absorbing lemma due to Hán, Person and Schacht [24, Lemma 2.4] (building on ideas of Rödl, Ruciński and Szemerédi [49,48]).
Lemma 3.1. For any positive integers d < k, and any γ > 0, there is n 0 ∈ N such that for every n > n 0 the following holds. Suppose that G is a k-graph on n vertices with δ d ( where n → ∞ along the integers n divisible by k. Our main goal is to prove the following lemma. Proof of Theorem 1.2, given Lemma 3.2. Lemma 3.2 implies that m d (k, n)/ n−d k−d ≤μ d (k) + γ for sufficiently large n (divisble by k), and since γ > 0 was arbitrary it follows that . Now, our proof of Lemma 3.2 will consist of two steps. First, we prove that the conditions of Lemma 3.2 ensure an almost-perfect matching, then we will use the strong absorbing lemma (Lemma 3.1) to transform this into a perfect matching. The following lemma encapsulates the first of these steps. Lemma 3.3. Fix positive integers d < k and consider any η > 0. Then for sufficiently large n, every n-vertex k-graph G with δ d (G) ≥ (μ d (k) + η) n−d k−d has a matching covering all but o(n) vertices. To prove Lemma 3.3 we need the following lemma showing that random subgraphs of hypergraphs typically inherit minimum-degree conditions. We state this in a slightly more general form than we need here, for use later in the paper. Lemma 3.4. Consider an n-vertex k-graph G, where all but δ n d of the d-sets have degree at least (µ + η) n−d k−d . Let S be a uniformly random subset of Q vertices of G. Then with probability at least Proof. Let W (d) be the collection of d-sets with degree less than (µ + η) n−d k−d in G, and randomly order the vertices of G as v 1 , . . . , v n , so we may take S = {v 1 , . . . , v Q }. We will prove that the desired result will then follow from symmetry and the union bound. First note that the probability of the event Also, making any "swap" to our subset {v d+1 , . . . , v Q } (that is, exchanging any element with an element outside this subset) affects The desired result follows.
be as in Lemma 3.4 (taking η = γ and δ = 0), and note that we can make λ arbitrarily small by making Q large. Now, we randomly partition the vertex set into n/Q subsets of size Q. By Lemma 3.4, with positive probability all but a λ-fraction of the subsets have minimum degree at least (μ d (k) + γ/2) Q−d k−d . By our choice of Q, each of these Q-vertex subsets S ⊆ V (G) has the property that G[S] has a perfect matching, and we can combine these to find a matching covering all but λn vertices. Since λ could have been arbitrarily small, this implies that we can find a matching covering all but o(n) vertices. Now, it is straightforward to deduce Lemma 3.2 from Lemma 3.1 and Lemma 3.3, concluding our proof of Theorem 1.2.
Proof of Lemma 3.2. From the discussion in the introduction, note thatμ d (k) ≥ 1/2, so the assumptions in Lemma 3.1 are satisfied and we can find an "absorbing set" X ⊆ V (G) of at most (γ/2) k n vertices.
Let n = n − |X| and observe that since X is so small, we have By Lemma 3.3, it follows that G − X has a matching covering all vertices except a set W of size o(n). By the defining property of the absorbing set X, it follows that G has a perfect matching.

The sparse regularity method
The proof of Theorem 1.4 makes heavy use of the sparse regularity method. So, we will need a sparse version of a hypergraph regularity lemma. There is a general hypergraph regularity lemma which is quite complicated to state and prove (see [22,50]), but we will only need (a sparse version of) the so-called "weak" hypergraph regularity lemma (see [33]). Weak hypergraph regularity lemmas are suitable for embedding linear hypergraphs, which are hypergraphs in which no pair of edges share more than one vertex.
To state our sparse hypergraph regularity lemma we first need to make some basic definitions.
• Density: Consider vertex sets X 1 , . . . , X k in a k-graph G. Let e(X 1 , . . . , X k ) be the number of k-tuples (x 1 , . . . , x k ) ∈ X 1 × · · · × X k for which {x 1 , . . . , x k } is an edge of G (if X 1 , . . . , X k are disjoint, this is the number of edges with a vertex in each X i ). Let be the density between X 1 , . . . , X k .
• Regular tuples: • Regular partitions: A partition of the vertex set of a k-graph into t parts V 1 , . . . , V t is said to be (ε, p)-regular if it is an equipartition (meaning that the sizes of the parts differ by at most one), and for all but at most ε t k of the k-sets Now, our sparse weak hypergraph regularity lemma is as follows. We omit its proof since it is straightforward to adapt a proof of the sparse graph regularity lemma (see [32] for a sparse regularity lemma for graphs, and see [33,Theorem 9] for a weak regularity lemma for dense hypergraphs).
For us, the most crucial aspect of the sparse regularity lemma is that it can be used to give a rough description of a sparse k-graph G , in terms of a dense cluster k-graph which we now define. Definition 4.3. Given an (ε, p)-regular partition V 1 , . . . , V t of the vertex set of a k-graph G, the cluster hypergraph is the k-graph whose vertices are the clusters If the sparse regularity lemma is applied with small ε and large t 0 , the cluster hypergraph approximately inherits minimum degree properties from the original graph G, as follows.
Lemma 4.4. Fix positive integers d < k, 0 < δ < 1 sufficiently small ε > 0 and sufficiently large t 0 ∈ N, and let G be an n-vertex (o(1), p, 1 + o(1))-upper-uniform k-graph (in particular, we assume that n is sufficiently large). Let G ⊆ G be a spanning subgraph with δ d (G ) ≥ δ n−d k−d p. Let R be the t-vertex cluster k-graph obtained by applying the sparse regularity lemma to G with parameters t 0 , p and ε. Then all but at most Lemma 4.4 can be proved with a standard counting argument. It is a special case of Lemma 4.7, which we will state and prove in the next subsection.

Refining an existing partition
We will need to apply the sparse regularity lemma to a k-graph whose vertices are already partitioned into a few different parts with different roles. It will be important that the regular partition in Lemma 4.2 can be chosen to be consistent with this existing partition.
Lemma 4.5. Suppose that a k-graph G has its vertices partitioned into sets P 1 , . . . , P h . In the (ε, p)regular partition guaranteed by Lemma 4.2, we can assume that all but at most εht of the clusters V i are contained in some P j .
For the reader who is familiar with the proof of the regularity lemma, the proof of Lemma 4.5 is straightforward. Indeed, in order to prove the regularity lemma, one starts with an arbitrary partition and iteratively refines it. Therefore, one can start with the partition (P 1 , . . . , P h ) and proceed in the usual way. For more details, see the reduction in [18,Lemma 4.6].
Next, we state a more technical version of Lemma 4.4, deducing degree conditions in the cluster graph from degree conditions between the P i . To state this we first need to generalise the definition of a cluster graph.
Definition 4.6. Consider a k-graph G, and let P 1 , . . . , P h be disjoint sets of vertices. Also, consider a (ε, p)-regular partition V 1 , . . . , V t of the vertices of G. Then the partitioned cluster graph R with threshold τ is the k-graph defined as follows. The vertices of R are the clusters V i which are completely contained in some P j , with an edge {V i1 , . . . , V i k } if d(V i1 , . . . , V i k ) > τ p and the induced k-partite k-graph between V i1 , . . . , V i k is (ε, p)-regular.
Lemma 4.7. Let d < k be positive integers, let ε > 0 be sufficiently small, and let t 0 ∈ N be sufficiently large. Let G be an n-vertex (o(1), p, 1 + o(1))-upper-uniform k-graph with a partition P 1 , . . . , P h of its vertices into parts of sizes n 1 , . . . , n h . Let G ⊆ G be a spanning subgraph and let R be the partitioned cluster k-graph with threshold τ obtained by applying Lemmas 4.2 and 4.5 to G with parameters t 0 , p and ε.
For every 1 ≤ i ≤ h, let P i be the set of clusters contained in P i , and let t i = |P i |. Also, for every J ⊆ {1, . . . , h}, write P J := j∈J P j , n J = |P J |, P J = j∈J P j and t J = |P J |. Then the following properties hold.
(2) Consider some i ≤ h and some J ⊆ {1, . . . , h}, and suppose that all but o(n d ) of the d-subsets of vertices X ⊂ P i satisfy Then for each i, j, all but at most √ ε t d of the d-sets of clusters X ⊂ P i have Note that Lemma 4.4 is actually a special case of Lemma 4.7 (taking h = 1 and threshold τ = 2ε).
Proof. The clusters in P i comprise at most t i (n/t) vertices, so recalling the statement of Lemmas 4.2 and 4.5, we have |P i | = n i ≤ t i (n/t) + εht(n/t). It follows that t i ≥ (n i /n)t − εht, proving (1). Now we prove (2). Let W (d) be the collection of all d-sets of clusters W = {W 1 , . . . , W d } that are contained in more than √ ε k k−d irregular (that is, non-(ε, p)-regular) k-sets {W 1 , . . . , W d , V 1 , . . . , V k−d }. Then Now, consider any i ≤ h and J ⊆ {1, . . . , h}, and suppose that the condition in (2) holds. Consider any d-set X of clusters in Pi d \W (d) . We wish to estimate deg P J (X ). Let E be the set of edges of G which have a vertex in each of the d clusters in X , and k − d vertices in P J . In order to estimate deg P J (X ), we count |E| in two different ways. First, we break E into subsets depending on how they relate to the cluster graph R.
Let E R be the set of e ∈ E which "arise from R" in the sense that the vertices of e come from distinct clusters that form an edge in R containing X . By upper-uniformity, we have Let E irr be the subset of edges in E arising from irregular k-sets. By the choice of X ∈ Pi d \W (d) , we have Let E τ be the subset of edges in E arising from k-sets of clusters (containing X ) that are regular but whose density is less than τ (and therefore do not appear in the cluster graph). We have Let E mul be the set of edges in E which have multiple vertices in the same cluster of P J , and let E Z be the set of edges in E which involve a vertex not in a cluster in P J (because its cluster was not completely contained in any P j ). Simple double-counting arguments give All in all, we obtain On the other hand, by the degree assumption in G and the fact that n J ≥ t J (n/t), we have It follows that

A sparse embedding lemma
One of the most powerful aspects of the sparse regularity method is that, for a subgraph G of a typical outcome of a random graph, if we find a substructure in the cluster graph (which is usually dense, therefore comparatively easy to analyse), then a corresponding structure must also exist in the original graph G . For graphs, this was famously conjectured to be true by Kohayakawa, Łuczak and Rödl [31], and was proved by Conlon, Gowers, Samotij and Schacht [10]. We will need a generalisation to hypergraphs, which was already observed to hold in [10] and appears explicitly as [18,Theorem 4.12]. To state it we will need some definitions.

Concentration lemmas
In this section we collect a number of basic facts about concentration of the edge distribution in random hypergraphs and random subsets of hypergraphs. First, we show that the upper-uniformity condition in the sparse regularity lemma is almost always satisfied in random hypergraphs.
We can then take the union bound over all choices of X 1 , . . . , X k .
The following corollary is immediate, and will be more convenient in practice.
Next, the following lemma shows that in random hypergraphs all vertices have about the expected degree into any large enough set. Lemma 5.3. Fix λ > 0 and k ∈ N. Then there is C > 0 such that if p ≥ Cn 2−k , a.a.s. G ∼ H k (n, p) has the following property. For every vertex w and every set S ⊆ V (G) of at most λn vertices, there are at most 2(λn)p n−2 k−2 edges in G containing w and a vertex of S. Proof. For any vertex w and any set S of at most λn vertices, the expected number of edges containing both w and a vertex of S is at most (λn)p n−2 k−2 . Then the desired result follows from the Chernoff bound and the union bound over at most 2 n choices of S.
We will also need the following lemma, showing that if we consider a high-degree spanning subgraph of a typical outcome of a random hypergraph, then random subsets are likely to inherit minimum degree properties.
Lemma 5.4. Fix positive integers d < k, and fix any 0 ≤ µ ≤ 1 and 0 < γ, σ ≤ 1. Then for any p ≥ n d−k log 3 n, a.a.s G ∼ H k (n, p) has the following property. Consider a spanning subgraph G ⊆ G with minimum d-degree at least (µ + γ)p n−d k−d , and let Y be a uniformly random subset of σn vertices of G . Then a.a.s. every d-set of vertices has degree at least (µ + γ/2)p σn−d Proof. For a d-set of vertices A and 1 ≤ t ≤ k − d, define p t (A) to be the number of pairs of edges (e, f ) ∈ G such that e and f both include A, and |e ∪ f | = 2(k − d) − t, and define the random variablē For each (k−d)-set of vertices e ⊆ V (G), let ξ e be the indicator random variable for the event e∪A ∈ E(G). Note that∆ is a quadratic polynomial in the ξ e , and has expectation E 0 := E∆ A = O n 2(k−d)−1 p 2 . For any k-sets of vertices e, f ⊆ V (G), we compute the expected partial derivatives Let E 1 be the common value of the E ∂∆ A /∂ξ e and let E 2 be the maximum value of the E ∂ 2∆ A /∂ξ e ∂ξ f . Let E ≥0 = max{E 0 , E 1 , E 2 } and let E ≥1 = max{E 1 , E 2 }. Given our assumption p ≥ n d−k we have Applying a Kim-Vu-type polynomial concentration inequality (see for example [53, Theorem 1.36]), we see that for all t ≥ 0,

It follows that∆
with probability 1 − n ω(1) . By a union bound, a.a.s. this holds for all d-sets A. This is the only property of G we require. So, fix an outcome of G satisfying (1) for all A, and fix a spanning subgraph G ⊆ G with minimum d-degree at least (µ + γ)p n−d k−d . Instead of considering a uniformly random set of σn vertices, we consider a closely related "binomial" random vertex subset Y obtained by including each vertex with probability σ := σ − n −2/3 independently. This suffices because Y can a.a.s. be coupled as a subset of a uniformly random set of size σn (note that the standard deviation of the size of Y is O( √ n)).
Let A be a d-set of vertices, and let Γ(A) be the link (k − d)-graph of A with respect to G . Then deg Y (A) is the number of e ∈ Γ(A) that are subsets of Y , so has expected value |Γ(A)|(σ ) k−d ≥ (µ + γ)p σ n−d k−d . By Janson's inequality (see [27, Theorem 2.14]), our assumption on p, and (1), we have Then, take the union bound over all A.
Finally, we also need the following "almost-all" version of Lemma 5.4.

Almost-perfect matchings
The easier part of the proof of Theorem 1.4 is to show that a degree condition implies the existence of almost-perfect matchings, as follows.
Lemma 6.1. Fix positive integers d < k and consider any γ > 0. Suppose p = ω n 1−k log n . Then, with probability 1 − e −Ω(pn k ) , G ∼ H k (n, p) has the following property. Every spanning subgraph G ⊆ G with δ d (G ) ≥ (µ d (k) + γ)p n−d k−d has a matching covering all but o(n) vertices. We will prove Lemma 6.1 with the sparse regularity lemma. It will be important that an almostperfect matching in the cluster hypergraph R can be translated to an almost-perfect matching in the original hypergraph G. This will be deduced from the following lemma. Lemma 6.2. Consider an (ε, p)-regular k-partite k-graph G with parts V 1 , . . . , V k of the same size m, and density at least 2εp. Then G has a matching of size at least (1 − ε)m.
Proof. By the definition of (ε, p)-regularity, for any choice of so d(V 1 , . . . , V k ) ≥ εp, meaning that the sets V 1 , . . . , V k span at least one edge. Now, suppose for the purpose of contradiction that there is no matching of size (1 − ε)m in G, and consider a maximum matching M . Since |M | ≤ (1 − ε)m, the set of uncovered vertices V i in each V i has size at least εm, so V 1 , . . . , V k span at least one edge, by the above discussion. But then this edge can be used to extend M to a larger matching, contradicting maximality. Now we prove Lemma 6.1.
Proof of Lemma 6.1. Choose large Q, divisible by k, such that m d (k, Q)/ Q−d k−d ≤ µ d (k) + γ/4. Also, choose some small ε > 0 and let λ = Q d √ ε + e −Ω(η 2 Q) be as in Lemma 3.4 (taking η = γ/2 and δ = √ ε). Choosing large Q, and ε small relative to Q, we can make λ arbitrarily small. Since p = ω n 1−k log n , by Corollary 5.2 G is a.a.s. (o(1), p, (1 − o(1)))-upper-uniform. So, by Lemma 4.4, if we apply the sparse regularity lemma (Lemma 4.2) to G with small ε and large t 0 , we obtain a cluster k-graph R such that all but √ ε t d of the d-sets of clusters have degree at least (μ d (k) + γ/2) n−d k−d . Now, we randomly partition the t clusters into t/Q subsets of size Q. By Lemma 3.4, with positive probability all but a λ-fraction of the subsets have minimum degree at least (μ d (k) + γ/4) Q−d k−d . By our choice of Q, each of the latter Q-cluster subsets S has the property that R[S] has a perfect matching, and we can combine these to find a matching covering all but λt of the t vertices of the cluster graph.
Each edge of this matching corresponds to a k-tuple of clusters (V i1 , . . . , V i k ) in which we can find a matching with (1 − ε)(n/t) vertices, by Lemma 6.2. We can combine these matchings to get a matching in G covering at least (1 − ε − λ)n vertices. Since ε and λ could have been arbitrarily small, this implies that we can find a matching covering all but o(n) vertices.

Sparse absorption
The most challenging part of the proof of Theorem 1.4 is to prove a suitable sparse analogue of the strong absorbing lemma. Specifically, the lemma we will prove is as follows.
Lemma 7.1. Fix positive integers d < k and sufficiently small γ > 0. There are λ, C > 0 such that the following holds. For p satisfying p ≥ n −k/2+γ and p ≥ Cn 2−k , a.a.s. G ∼ H k (n, p) has the following property. For any spanning subgraph G of G with minimum d-degree at least (µ d (k) + γ)p n−1 k−1 , there is a set X ⊆ V (G ) such that (i) |X| ≤ (γ/2) k n, and (ii) for every set W ⊆ V (G)\X of at most λn vertices, there is a matching in G covering exactly the vertices of X ∪ W (provided |X ∪ W | is divisible by k).
Most of the rest of the paper will be devoted to proving Lemma 7.1, but first we give the simple deduction of Theorem 1.4 from Lemmas 6.1 and 7.1.
Proof of Theorem 1.4. Let G ∼ H k (n, p) and let G ⊆ G be a spanning subgraph with δ d (G ) ≥ (µ d (k) + γ)p n−d k−d . By Lemma 7.1, a.a.s. G has an absorbing subset X of size at most (γ/2) k n. Let n = n − |X| and observe that since X is so small, we have δ d (G − X) ≥ (µ d (k) + γ/2) n −d k−d p. By Lemma 6.1, it follows that G − X has a matching covering all vertices of V (G )\X except a set W of size o(n). By the defining property of the absorbing set X, it follows that G has a perfect matching.
The crucial idea for the proof of Lemma 7.1 is to find many small subgraphs called absorbers, which can each contribute to a matching in two different ways.
Definition 7.2 (absorbers). An absorber rooted on a k-tuple of vertices (x 1 , . . . , x k ) is a k-graph on some set of vertices including x 1 , . . . , x k , whose edges can be partitioned into: • a perfect matching, in which each of x 1 , . . . , x k are in a unique edge (the covering matching), and; • a matching covering all vertices except x 1 , . . . , x k (the non-covering matching).
We call x 1 , . . . , x k the rooted vertices of the sub-absorber and we call the other vertices the external vertices. The k edges containing each of x 1 , . . . , x k are called rooted edges, and the other edges are external edges. The order of the absorber is its number of vertices other than x 1 , . . . , x k .
Absorbers are the basic building blocks for a larger "absorbing structure", whose vertex set we will take as the set X in Lemma 7.1. The relative positions of the absorbers in this structure will be determined by a "template" with a "resilient matching" property as will be described in the next few lemmas. Lemma 7.3. For fixed k ∈ N there is L > 0 such that the following holds. For any sufficiently large r, there exists a k-graph T with at most Lr vertices, at most Lr edges, and an identified set Z of r vertices, such that if we remove fewer than r/2 vertices from Z, the resulting hypergraph has a perfect matching (provided its number of vertices is divisible by k). We call T a resilient template and we call Z its flexible set. We say r is the order of the resilient template.
We defer the proof of Lemma 7.3 to Section 7.1. It is a simple reduction from a random graph construction due to Montgomery [40]. We will want to arrange absorbers in the positions prescribed by a resilient template, as follows.
Definition 7.4. An (r, Q)-absorbing structure is a k-graph H of the following form. Consider an order-r resilient template T and put externally vertex-disjoint absorbers of order at most Q on each edge of T (that is to say, the absorbers intersect only at their root vertices). We stress that the edges of T are not actually present in H, they just describe the relative positions of the absorbers. See Figure 2. An absorbing structure H has the same crucial property as the resilient template T that defines it: if we remove fewer than half of the vertices of the flexible set Z then what remains of H has a perfect matching. Indeed, after this removal we can find a perfect matching M of T , then our perfect matching of H can be comprised of the covering matching of the absorber on each edge of M and the non-covering matching for the absorber on each other edge of T .
We will want to find an absorbing structure H whose flexible set Z has a certain "richness" property: essentially, we will want Z to have the property that for all small sets W disjoint from H, there is a matching covering W and a small portion of Z (and no other vertices). Sets Z with this property always exist in the setting of Lemma 7.1, as follows. The proof of Lemma 7.5 is not too difficult, but to avoid interrupting the flow of this section we defer its proof to Section 7.2. Briefly, the idea is to show that a random set Z typically does the job, using some concentration inequalities and a hypergraph matching criterion due to Aharoni and Haxell.
Having found a rich set Z as guaranteed by Lemma 7.5, we need to show that G has an absorbing structure with Z as its flexible set. We will greedily construct such an absorbing structure using the following lemma, which says that absorbers can be found rooted on any triple of vertices, even if a few vertices are "forbidden". Lemma 7.6. Fix k ∈ N and sufficiently small γ > 0. There is Q ∈ N and C, σ > 0 such that the following holds. For p satisfying p ≥ n −k/2+γ and p ≥ Cn 2−k , a.a.s. G ∼ H k (n, p) has the following property. Every spanning subgraph G of G with minimum d-degree at least (µ d (k) + γ)p n−d k−d has an absorber of order at most Q rooted on any k-tuple of vertices, even after deleting σn other vertices of G .
The proof of Lemma 7.6 is quite involved, and contains the most interesting new ideas in this paper. We defer it to Section 8. Finally, we deduce Lemma 7.1.
If C is large enough, then a.a.s. we can find a ρn-vertex "rich" set Z as in Lemma 7.5, having the property that for some small λ > 0, every set of λn vertices can be "matched into" Z. We may assume λ < ρ/(2k). By Lemma 7.3 there is an order r resilient template T . Now, an absorbing structure on T would have at most QLρn + Lρn vertices, and since ρ(Q + 1)L ≤ σ, we can use Lemma 7.6 to greedily build a (ρn, Q) absorbing structure H ⊆ G on the template T , having at most (γ/2) k n vertices, with Z as the flexible set. Let X = V (H).
We now claim that X satisfies the assumptions of the lemma. First, by the assumption σ ≤ (γ/2) k , it has size at most (γ/2) k n. For the second property, consider any W ⊆ V (G )\X with size at most λn, such that W ∪ X is divisible by k. By the defining property of our rich set Z, we can find a matching M 1 in G covering W and (k − 1)|W | ≤ (k − 1)λn < (ρ/2)n vertices of X. By the special property of our absorbing structure H, we can then find a matching M 2 covering all the remaining vertices in G[X ∪ W ], and then M 1 ∪ M 2 is the desired matching.

Constructing an absorbing template
In this subsection we prove Lemma 7.3. We will build our desired k-graph via a simple transformation from a bipartite graph with certain properties. The following lemma was proved by Montgomery, and appears as [42,Lemma 2.8]. We write to indicate that a union of sets is disjoint.
Lemma 7.7. For any sufficiently large s, there exists a bipartite graph R with vertex parts X and Y Z, with |X| = 3s, |Y | = |Z| = 2s, and maximum degree 40, such that if we remove any s vertices from Z, the resulting bipartite graph has a perfect matching. From Lemma 7.7 we can deduce the following lemma (this is a k-uniform version of [35, Lemma 5.2]).
Lemma 7.8. For any sufficiently large s, there exists a k-partite k-graph S with vertex parts X 1 , . . . , X k−1 and Y Z, with |X 1 | = . . . |X k−1 | = 3s, |Y |, |Z| = 2s, and maximum degree 40, such that if we remove any s vertices from Z, the resulting k-graph has a perfect matching (provided its number of vertices is even).
Proof. Consider the bipartite graph R from Lemma 7.7 on the vertex set X (Y Z), and let X k−1 = X. Obtain a k-partite graph R by adding sets X 1 , . . . , X k−2 each having |X| new vertices, and for each 1 ≤ i < k − 1 putting an arbitrary perfect matching between X i and X i+1 . Now, our k-partite k-graph S has the same vertex set as R , and an edge for every k-vertex path running through X 1 , . . . , X k−1 , Y Z (call such paths special paths). Note that an edge in R can be uniquely extended to a special path in R . Moreover, a matching in R can always be uniquely extended to a vertex-disjoint union of special paths in R .
We also need the following simple lemma showing that there are sparse hypergraphs with no large independent sets. Lemma 7.9. For any k there is some K ∈ N such that the following holds. For sufficiently large r there is a k-graph G with r vertices and at most Kn edges, with no independent set of size r/2.
Proof. Consider a random G ∼ H k (r, p) for p = (K/2)r/ r k . For a set of r/2 edges, the probability that there are no edges in that set is (1 − p) ( r/2 k ) = e −Ω(Kn) , so for large K, the Chernoff bound and the union bound show that a.a.s. every set of size r/2 induces at least one edge. Also, the Chernoff bound shows that a.a.s. G has at most Kn edges.
We are now ready to prove Lemma 7.3.
Proof of Lemma 7.3. Start with the k-graph S from Lemma 7.8, with s = r/2 , and delete at most one vertex from Z to make it have size r. Then, consider an r-vertex k-graph G as in Lemma 7.9 (which exists as long as r is large enough), and place G on the vertex set Z. Let T be the resulting k-graph. It has at most (k − 1)(3s) + 2s + 2s vertices and at most 40(4s) + K(2s) edges. Now, consider any set W of fewer than r/2 vertices of Z, such that the number of vertices in T − W is divisible by k. By the defining property of G, we can greedily build a matching M 1 in T [Z\W ] covering all but s vertices, and then by the defining property of S, there is a perfect matching M 2 in T −(W ∪ V (M 1 )). Then M 1 ∪ M 2 is the desired perfect matching of T − W .

Finding a rich set of vertices
In this subsection we prove Lemma 7.5. We will make use of the following Hall-type theorem for finding large matchings in hypergraphs, due to Aharoni and Haxell [1]. Theorem 7.10. Let {L 1 , . . . , L t } be a family of k -uniform hypergraphs on the same vertex set. If, for every I ⊆ {1, . . . , t}, the hypergraph i∈I L i contains a matching of size greater than k (|I| − 1), then there exists a function g : {1, . . . , t} → t i=1 E(L i ) such that g(i) ∈ E(L i ) and g(i) ∩ g(j) = ∅ for i = j. To apply Theorem 7.10, the following lemma will be useful, concerning the distribution of edges in random hypergraphs.
Lemma 7.11. Fix k, q ∈ N and λ > 0, and suppose p = ω n 1−k log n . Then a.a.s. G ∈ H k (n, p) has the following property. For every pair of vertex sets I, U with |I| ≤ λn and |U | ≤ q|I|, there are at most 2λp|I|n k−1 edges which contain a vertex from I and a vertex from U .
Proof. Fix I, U as in the lemma statement. By a Chernoff bound, the number of edges intersecting I and U is at most 2λp|I|n k−1 , with probability 1 − exp −Ω p|I|n k−1 . So, by the union bound, the probability that the property in the lemma statement fails is at most λn i=1 n i n qi exp −Ω pin k−1 = n −ω(1) .
We will also need the (very simple) fact that minimum d-degree assumptions are strongest when d is large.
Proof. Suppose that δ d (G) ≥ α n−d k−d , and fix any subset of S of d vertices of G. By assumption, for every subset X ⊆ V (G) \ S of size d − d , the number of edges containing X ∪ S is at least α n−d k−d . Since each edge containing S is being counted exactly k−d d−d times, we conclude that Now, we prove Lemma 7.5.
Proof of Lemma 7.5. Fix an outcome of G that satisfies the property in Lemma 7.11, for q = (k − 1) 2 and small λ > 0 to be determined, and also satisfies the property in Lemma 5.4, for µ = γ = δ/2 and d = 1. Consider a spanning subgraph G ⊆ G with minimum 1-degree at least δp n−1 k−1 . Let Z be a set of ρn vertices such that every vertex outside Z has degree at least (δ/2)p ρn−1 k−1 into Z (by Lemmas 5.4 and 7.12, almost every choice of Z will do). Now, consider any W ⊆ V (G )\X with size λn. For each w ∈ W let L w be the link (k − 1)-graph of w into Z (having an edge e ⊆ Z whenever e ∪ {w} is an edge of G ). We claim that if λ is sufficiently small then for each I ⊆ W , the (k − 1)-graph H I := w∈I L w has a matching of size greater than (k − 1)(|I| − 1). The desired result will then follow from Theorem 7.10.
To prove the claim, suppose for the purpose of contradiction that there is some I ⊆ W for which a maximum matching M in H I has size at most (k − 1)(|I| − 1) (meaning that it has at most (k−1) 2 (|I|−1) vertices). By the degree condition defining Z, H I has at least |I|(δ/2)p ρn−1 k−1 edges. On the other hand, all edges of H I intersect V (M ) by maximality, so by the property in Lemma 7.11, H I only has at most 2λp|I|n k−1 edges. This is a contradiction if λ is sufficiently small.

Finding absorbers
Now we are finally ready to prove Lemma 7.6, showing that dense subgraphs of random graphs have absorbers and completing the proof of Lemma 7.1.
The main difficulty with finding absorbers is that they are rooted objects. It is not enough to find an absorber floating somewhere in our graph (which we could easily do with the sparse embedding lemma); what we want is to find an absorber on a specific k-tuple of vertices. In order to achieve this, we define a contraction operation that reduces the task of finding a rooted absorber to the task of finding "contracted absorbers" in a much more flexible setting. , . . . , e k = x k , y 1 k , . . . , y k−1 k , then for each i put an externally vertex disjoint absorber H i rooted on y i 1 , . . . , y i k (we call each of these a sub-absorber ). Note that the edges in the non-covering matching of a contractible absorber come from the covering matchings of its constituent sub-absorbers, and the non-rooted edges in the covering matching of the contractible absorber come from the non-covering matchings of its sub-absorbers. A contracted absorber rooted at (x 1 , . . . , x k ) is a hypergraph obtained as the union of k − 1 absorbers (which we again call sub-absorbers) each rooted at (x 1 , . . . , x k ), disjoint except for their rooted vertices. One can show that a contracted absorber is always itself an absorber, but we will not need this fact. The contraction of a contractible absorber is the contracted absorber obtained by contracting each of its rooted edges to a single vertex. See Figure 3. x 1 x 2 x 3 Figure 3. An illustration of an order-18 contractible absorber rooted on (x 1 , x 2 , x 3 ), and its contraction. In this 3-uniform case the absorber construction involves two sub-absorbers. The dark hyperedges are the non-covering matching of the contractible absorber and the light hyperedges are the covering matching.
We will need our absorbers to satisfy a local sparsity condition to apply the sparse embedding lemma. We recall the definition of the girth of a hypergraph, and introduce a very closely related notion of local sparsity.
Definition 8.2. A (Berge) cycle in a hypergraph is a sequence of edges e 1 , . . . , e such that there exist distinct vertices v 1 , . . . , v with v i ∈ e i ∩ e i+1 for all i (where addition is mod , meaning that e + 1 = e 1 ). The length of such a cycle is its number of edges . The girth of a hypergraph is the length of the shortest cycle it contains (if the hypergraph contains no cycle we say it has infinite girth, or is acyclic). We say that an absorber rooted on x 1 , . . . , x k is K-sparse if it has girth at least K, even after adding the extra edge {x 1 , . . . , x k } (that is to say, it has high girth and moreover the roots are far from each other).
Recall the definition of the k-density m k (H) from Definition 4.10. Lemma 8.3. Fix η > 0 and k ∈ N. There is K > 0 such that the following holds. For any k-uniform contracted absorber H with girth at least K, we have m k (H) ≤ 2/k + η.
The proof of Lemma 8.3 is basically just a calculation so we defer it to Section 8.1. We will also need the following lemma, showing that we can use the definition of µ d (k) itself to find locally sparse absorbers. We will apply this lemma to a cluster k-graph obtained via the sparse regularity lemma.
Lemma 8.4. For any positive integers d < k and any η, K > 0, there are N ∈ N and δ, M > 0 such that the following holds. Consider a k-graph G on n ≥ N vertices such that all but δ n d d-sets of vertices have degree at least (µ d (k) + η) n−d k−d . Then for any vertices x 1 , . . . , x k which each have degree at least η n−1 k−1 , there is a K-sparse absorber with order at most M , rooted on those vertices. Without the local sparsity condition it would be fairly easy to prove Lemma 8.4, more or less by using the definition of the Dirac threshold twice. To deal with the sparseness condition we fix a locally sparse "pattern" and use the definition of the Dirac threshold plus a random sampling trick to find an absorber "in line with the pattern". We defer the details to Section 8.2.
As previously mentioned, for the proof of Lemma 7.6 we will use a contraction trick: we "contract" G to obtain a k-graph G (F, P), in such a way that if we can find contracted absorbers in G (F, P) satisfying certain properties, then these correspond to rooted contractible absorbers in G. Before proving Lemma 7.6 we define this "contraction" operation.
Definition 8.5. Consider any k-graph G, consider a family F ⊆ V (G) k−1 of disjoint (k − 1)-tuples, and consider a family P disjoint sets U 1 , . . . , U k−1 ⊆ V (G), such that the tuples in F and the sets in P do not share any vertices. Let v(P) be the total number of vertices in the sets in P.
Let G(F, P) be the k-graph obtained as follows. Start with the k-graph G[U 1 ∪ · · · ∪ U k−1 ], and for One should visualise each v = (v 1 , . . . , v k−1 ) ∈ F as being "contracted" to a single vertex w v , and all edges involving v being deleted except those edges that contain some v j and have all their other vertices in the corresponding U j . The reason for the edge deletion is to prevent the degrees of the vertices w v from being too large. This is important because if G ∼ H k (n, p) is a random k-graph, we want to be able to interpret G(F, P) as a subgraph of a random graph with the same edge probability, so that we may apply the sparse embedding lemma to it. In our proof of Lemma 7.6 we will choose F and P depending on our desired roots and the structure of G . Now we finally prove Lemma 7.6.
Proof of Lemma 7.6. First note that we can assume p = ω(n d−k ), because otherwise G itself a.a.s. has minimum d-degree zero and the lemma statement is vacuous. Now, there are a number of constants in our proof that are defined in terms of each other (constants in the sense that they do not depend on n). First, let β = 1/(3k). Second, let K be large enough to satisfy Lemma 8.3, applied with η = γ/2. Third, let M be large enough and δ > 0 be small enough to satisfy Lemma 8.4, applied with η = γ/4 and the value of K just defined. Then, σ, τ > 0 will be small relative to all constants defined so far (small enough to satisfy certain inequalities later in the proof), and we let α = σ/k 3 . Next, ε > 0 will be very small, and t 0 very large, even compared to σ. Finally, κ > 0 will be tiny compared to all other constants. We record some properties that G and each of the G(F, P) a.a.s. satisfy.
Claim. G a.a.s. satisfies each of the following properties.
(1) For each F, P as in Definition 8.5, such that |F| = kαn, the k-graph G(F, P) satisfies the conclusion of Theorem 4.11 (the sparse embedding lemma), for embedding all graphs H on at most (k−1)(M +k) vertices which have m k (H) ≤ 2/k + γ/2. (The other parameters τ, κ with which we apply the sparse embedding lemma are as described at the beginning of the proof, and the lemma gives us an upper bound on ε in terms of τ ).
(3) For any set W of 2σn vertices and every vertex x, there are at most 4(σn)p n−2 k−2 edges in G containing x and a vertex of W .
(4) For any spanning subgraph G ⊆ G with minimum d-degree at least (µ d (k) + γ)p n−d k−d , let Y be a uniformly random subset of βn vertices of G . Then a.a.s all but o(n d ) of the d-sets of vertices in Proof. Observe that each G(F, P) has at least |F| = Ω(n) vertices and it can be coupled as a subset of the binomial random k-graph on its vertex set (with edge probability p). For (1) and (2), there are at most 2 nk n sk = exp(O(n log n)) ways to choose F and P. Since p = ω(n 1−k log n), we may apply Theorem 4.11 and Corollary 5.2 and take the union bound over all possibilities for F and P. Note that the requirement on p in Theorem 4.11 is that p exceeds n −1/m k (H) by a large constant, where m k (H) ≤ 2/k + γ/2. This is certainly satisfied since we are assuming p ≥ n −k/2+γ .
Consider an outcome of G satisfying all the above properties (for the rest of the proof, we can forget that G is an instance of a random graph and just work with these properties). Let G ⊆ G be a spanning subgraph with minimum d-degree at least (µ d (k) + γ)p n−d k−d , consider any set W of σn vertices, and consider vertices x 1 , . . . , x k outside W . We will show that G − W has an absorber rooted on x 1 , . . . , x k of order at most (k − 1)(M + k). We will accomplish this by studying G (F, P) for certain F and P. First, F will be defined in terms of the edges incident to x 1 , . . . , x k , using the following claim.
Claim. For each i let Γ(x i ) be the link (k − 1)-graph of x i with respect to G − W . Then we can find matchings M i ⊆ E(Γ(x i )) of size αn, such that no two of these matchings share a vertex.
Proof. First, ignoring the disjointness condition, note that (3) implies that each Γ(x i ) has a matching M i 0 of size σn/k. Indeed, suppose a maximum matching in Γ(x i ) were to have fewer than σn/k edges. Then the set of vertices of this matching would comprise a set W of fewer than σn vertices such that all the edges of G which contain x intersect W . But by the minimum degree condition on G (and Lemma 7.12) there are at least (µ d (k) + γ)p n−1 k−1 such edges, contradicting (3) for small σ. We can then delete some edges from the M i 0 to obtain the desired matchings M i , recalling that α = σ/k 3 . Now we can define F: for each i, arbitrarily order the vertices in each edge of M i to obtain a collection F i of αn disjoint (k − 1)-tuples. Let F = k i=1 F i , and let V (F) be the set of vertices in the tuples in F. Next, we will choose the sets U 1 , . . . , U k−1 in P randomly, so that they satisfy a certain degree condition. This is encapsulated in the following claim.

Locally sparse absorbers have low k-density
In this section we prove Lemma 8.3.
Proof of Lemma 8.3. Note that a cycle of length two corresponds to a pair of edges that intersect in more than one vertex (so a hypergraph has girth greater than two if and only if it is linear). The line graph L(G) of a linear k-graph G has the edges of G as vertices, with an edge e 1 e 2 when e 1 and e 2 are incident in G. Note that v(L(G)) = e(G) and v(G) ≥ ke(G) − e(L(G)). Observe that a linear k-graph G is acyclic if and only if its line graph is a forest, in which case e(L(G)) ≤ v(L(G)) − 1 = e(G) − 1, so v(G) ≥ (k − 1)e(G) + 1.

Now consider any subgraph
by the above discussion. Otherwise, H has a cycle, which must have length at least K, so v(H ) ≥ (k − 1)K. Note that every vertex of H has degree at most 2, except k vertices x 1 , . . . ,

Locally sparse absorbers in dense hypergraphs
In this subsection we prove Lemma 8.4. If we were to ignore the local sparseness condition it would be quite simple to find an absorber rooted on our desired vertices: recalling that an absorber essentially consists of two perfect matchings on some vertex set, we could simply apply the definition of the Dirac threshold twice, in appropriate subgraphs of G.
In order to deal with the sparseness condition, we fix a high-girth hypergraph L (with edges of size about log n), which will form a "pattern" for our absorber. We consider a random injection from L into the vertex set of our graph G, so that (with positive probability) each of the edges of L corresponds to a subgraph of G with minimum d-degree exceeding its Dirac threshold, and therefore has a perfect matching. We will define L in such a way that the union of these perfect matchings gives us an absorber with the desired properties.
It is convenient to deduce Lemma 8.4 from a slightly simpler lemma where no vertices of exceptionally low degree are allowed. To state this lemma we define a slight generalisation of the notion of an absorber. Definition 8.6. An r-absorber rooted at a rk-set of vertices y 1 , . . . , y rk is a hypergraph which can be partitioned into two matchings, one of which covers the entire vertex set and the other of which covers every vertex except y 1 , . . . , y rk . We say an r-absorber is K-sparse if it has girth at least K, even after adding an extra edge {y 1 , . . . , y rk }. The point of this definition is that if we have roots x 1 , . . . , x k and we pick arbitrary disjoint edges e 1 , . . . , e k containing the roots (whose other vertices are y 1 , . . . , y (k−1)k , say), then a K-sparse (k − 1)-absorber rooted at y 1 , . . . , y (k−1)k (not containing the vertices x 1 , . . . , x k ) gives us a K-sparse absorber rooted at x 1 , . . . , x k . Now, the key lemma is as follows.
Lemma 8.7. For any γ > 0 and r, k, K ∈ N there is N ∈ N such that the following holds. For any k-graph G on n ≥ N vertices with δ d (G) ≥ (µ d (k) + γ) n−d k−d , there is a K-sparse r-absorber rooted on every rk-tuple of vertices.
As outlined at the beginning of this subsection, to enforce our local sparsity condition we will apply the Dirac threshold to subgraphs arising from a high-girth "pattern". This pattern will be constructed from the following bipartite graph.
Lemma 8.8. Fix k and K. For sufficiently large n, there is a q-regular bipartite graph F with girth at least K and at most n edges, for some q ≥ log 2 n which is divisible by k.
Proof. There are many ways to prove this. For example, fix a prime p such that n/2 K+1 ≤ p K+1 ≤ n (which exists by Bertrand's postulate), and consider the bipartite graph defined by Lazebnik and Ustimenko in [36], which is p-regular, has 2p K vertices and has girth at least K + 5. Then repeatedly delete perfect matchings at most k − 1 times until we arrive at a q-regular bipartite graph with q divisible by k. (Note that nonempty regular bipartite graphs always have perfect matchings). For large n, we have q ≥ p − (k − 1) ≥ log 2 n.
Another ingredient we will need is the following fact which actually already appeared in the proof of Lemma 3.4. Lemma 8.9. Consider an n-vertex k-graph G and consider a set A of d vertices with degree at least (µ + γ) n−d k−d . Let S be a random subset of Q vertices of G. Then with probability at least 1 − e −Ω(γ 2 Q) , A has degree at least (µ + γ/2) Q−d k−d into S. Now we are ready to prove Lemma 8.7.
Proof of Lemma 8.7. Consider a graph F as in Lemma 8.8, and for a vertex v, let F (v) be the set of edges incident to v. Then define a q-uniform hypergraph L whose vertices are the edges of F and whose edges are the sets F (v). Note that the girth condition on F transfers to L: that is, the girth of L is at least K. Also, note that the two vertex parts of F correspond to two perfect matchings M 1 and M 2 partitioning the edges of L. Let L be obtained by deleting rk vertices from one of the edges of M 2 , so that L has rk vertices z 1 , . . . , z rk which have degree 1 in L . Let L be the non-uniform hypergraph obtained by deleting each z i from the edge it is contained in (so that L has rk edges with size only q − 1, in addition to the edge of L with size only q − rk). Now, consider an rk-tuple of vertices (y 1 , . . . , y rk ) in G, and consider a uniformly random injection ι : V (L ) → V (G)\{y 1 , . . . , y rk }. Extend ι to a map V (L ) → V (G) by taking ι(z i ) = y i for each i.
Then, for each edge e ∈ E(L ), note that ι(e) is "almost" a uniformly random subset of q vertices of G. To be precise, one can couple ι(e) with a uniformly random subset S of q = Ω log 2 n vertices of G, in such a way that the size of the symmetric difference |S ι(e)| is at most 1 + 2rk. By Lemma 8.9 and the union bound, with probability 1 − o(n −k ) every d-set of vertices U satisfies implying that deg ι(e) (U ) ≥ (µ d (k) + γ/3) q−d k−d . By the union bound, a.a.s. this holds for each e ∈ E(L ), so fix such an outcome of ι. Then for each e ∈ E(L ), G[ι(e)] has minimum d-degree at least (µ d (k) + γ/3) q−d k−d , so has a perfect matching. The union of these perfect matchings gives a K-sparse r-absorber rooted at y 1 , . . . , y rk . Now, we deduce Lemma 8.4 from Lemma 8.7. For each i, choose an edge containing x i and k vertices in U , in such a way that these chosen edges form a matching M (we can do this greedily). Let y 1 , . . . , y (k−1)k be the vertices in V (M ) ∩ U , and apply Lemma 8.7 to find a K-sparse (k − 1)-absorber H rooted at y 1 , . . . , y (k−1)k . Then M ∪ H is a K-sparse absorber of order at most M rooted at x 1 , . . . , x k .

Concluding remarks
We have proved that if p ≥ max{n −k/2+γ , Cn −k+2 log n}, for any γ > 0 and sufficiently large C, then the random k-graph G ∼ H k (n, p) typically obeys a relative version of any Dirac-type theorem for perfect matchings in hypergraphs. There are a number of compelling further directions of research.
First, it is natural to try to improve our assumption on p, with the eventual goal of removing it entirely (as in Conjecture 1.3). First, as mentioned in the introduction, we observe that the assumption p ≥ Cn −k+2 log n can actually be weakened substantially (though this only affects the case (d, k) = (1, 3)). The reason for this assumption was to ensure that all vertices have linear degree, so that an absorbing structure of linear size could be built greedily. The reason we needed an absorbing structure of linear size was that Lemma 6.1 does not have effective bounds: it guarantees an almost-perfect matching covering all but o(n) vertices, but since the regularity lemma is notorious for its extremely weak quantitative aspects, this o(n) term is actually only very slightly sub-linear. However, it is possible to use a bootstrapping trick due to Nenadov and Škorić [44] to get a much stronger bound in the setting of Lemma 6.1, which allows us to make do with a much smaller absorbing structure. Using these ideas, it seems to be possible to take p to be as small as about n −4/3 , in the case (d, k) = (1, 3). Actually, there is some hope of being able to remove the extra assumption p ≥ Cn −k+2 log n altogether, by using the Aharoni-Haxell matching criterion (Theorem 7.10) to build an absorbing structure, instead of building it greedily. We have not considered this in detail.
On the other hand, the assumption that p is somewhat larger than n −k/2 seems to be much more crucial. An absorber has at least k/2 times more edges than unrooted vertices, so absorbers of constant size simply will not exist for smaller p. We imagine that completely new ideas will be required to bypass this barrier.
Another interesting direction would be to consider spanning subgraphs other than perfect matchings. For example, a loose cycle is a cyclically ordered collection of edges, such that only consecutive edges intersect, and then only in a single vertex. A tight cycle is a cyclically ordered collection of vertices, such that every k consecutive vertices form an edge. There is also a spectrum of different notions of cycles between these two extremes, and Dirac-type problems have been studied for Hamiltonian cycles of all these different types. We believe that it should be possible to adapt the methods in this paper to prove an analogue of Theorem 1.4 for loose Hamiltonian cycles, which are linear (no two edges intersect in more than one vertex) and behave in a very similar way to perfect matchings. It may also be possible to adapt our methods to study other types of Hamiltonian cycles, but this would probably require using different machinery from Theorem 4.11 (which only works for linear hypergraphs).
Finally, it may also be interesting to consider Dirac-type theorems relative to pseudorandom hypergraphs, which are not random but satisfy some characteristic properties of random hypergraphs. Certain extremal problems relative to pseudorandom hypergraphs have been studied by Conlon, Fox and Zhao [12] in connection with the Green-Tao theorem on arithmetic progressions in the prime numbers, and the existence of perfect matchings in pseudorandom hypergraphs has been studied by Hàn, Han and Morris [25]. It seems plausible that the methods in this paper can be adapted to work for hypergraphs satisfying some notion of pseudorandomness, but we have not explored this further.