arXiv:2011.14363v2 [math.CO] 25 Jan 2021 m E D size have edges its all o oiieinteger positive a For Introduction 1 etxst e of set A set. vertex h aiu ieo acigin a of size maximum the H ie set a Given different a most euse we graphs M-943.Eal [email protected]. Email: DMS-1954134. upre yNF rn 1731adFnaetlRsac F Research Fundamental and 11871391 grant NSFC [email protected]. by supported h rjc Aayi n emtyo ude”o iityo Technol Ministry Information of Quantum Bundles” in on Initiative Anhui Geometry and and China, “Analysis project the [ n k ( ( r˝s[]cnetrdi 95ta mn all among that 1965 in conjectured Erd˝os [6] . ∗ ] H † § ‡ ,m k m, n, ossso etxset vertex a of consists  colo ahmtc n ttsis ia ioogUnive Jiaotong Xi’an Statistics, and Mathematics of School colo ahmtc,GogaIsiueo ehooy At Technology, of Institute Georgia Mathematics, of School colo ahmtclSine,UT,Hfi nu 230026 Anhui Hefei, USTC, Sciences, Mathematical of School colo ahmtclSine,UT,Hfi nu 230026 Anhui Hefei, USTC, Sciences, Mathematical of School e words: Key MSC2010: A lsia rbe netea e hoyak o h maxim the for asks theory set extremal in problem classical A \ nteribwmthn ojcuefr3uiomhypergrap 3-uniform for conjecture matching rainbow the On with ) euto Lca n ickwk n ih eo needn int independent of vie be might be can and Mieczkowska which and , Luczak 3-uniform of in result matchings a on result new a n n nams efc acigin matching perfect almost an find and eea xsigtcnqe nmthnsi nfr hypergraphs: uniform in matchings in on techniques existing several ano acigpolmt acigpolmo pca hypergr special a on problem matching a to problem matching rainbow h families the ariedson subsets disjoint pairwise boueconstant absolute ano eso fEdo acigcnetr:Frpstv integ positive For conjecture: Erd˝os matching of version rainbow matching [ n H H ] H \ hrn n oad n,idpnety un,Lh n Sudak and Loh, Huang, independently, and, Howard, and Aharoni [ [ a h aiu ubro de:Any edges: of number maximum the has ) k m S s regular almost an find to al et Alon of process randomization a use ; with F − H odnt h ugahof subgraph the denote to ] T i 1] fsc acigeit,te eas a that say also we then exists, matching a such If .  hnteei ocnuinad npriua,dnt by denote particular, in and, confusion no is there when fegsin edges of ν and nahypergraph a in u Gao Jun 56,05D05. 05C65, ( F ano acigcnetr,Edo acigconjecture, Erd˝os matching conjecture, matching Rainbow H 1 F , . . . , ) m D m < k k n ( ariedson de scle a called is edges disjoint pairwise f ,m k m, n, 0 n set a and n ecl ta it call we and ( m uhta hsribwvrinhlsfor holds version rainbow this that such ∗ ,m k m, n, Let . H V ⊆ euse we , e ( 1 H := ) e , . . . , [ n k ,k m k, n, ogin Lu Hongliang n neg set edge an and ) =max := ) ]  H V a iemr hnmax than more size has e [ let , [ H m sasto ariedson de in edges disjoint pairwise of set a is km V Let . uhthat such k ( epstv neeswith integers positive be − H T 1] k k odenote to )  H  := ] -graph nue on induced ntesm etxst[ set vertex same the on F − n k V Abstract  = { † ( e 1 M i − .,k ..., , { o hr.Truhu hsppr eotnidentify often we paper, this Throughout short. for k ∈ F 1 .T opeetepoes eas edt prove to need also we process, the complete To ).  gah ihn acigo size of matching no with -graphs E 1 F ge rn H100.Eal [email protected]. Email: AHY150200. grant ogies .,F ..., , n ( n i at,G 03,UA atal upre yNFgrant NSF by supported Partially USA. 30332, GA lanta, i Ma Jie S H } S − -vertex o all for hn.Prilyspotdb SCgat11622110, grant NSFC by supported Partially China. , cec n ehooyo h epesRpbi of Republic People’s the of Technology and Science f e hn.Eal [email protected]. Email: China. , and n let and , ) ∈ { m ano matching rainbow k T ⊆ m st,X’n hax 109 hn.Partially China. 710049, Shaanxi Xi’an, rsity, n k e 1 + }  ie etxsubset vertex a Given . 2 i ‡ − V eafml fhprrpso h same the on hypergraphs of family a be V nsfrteCnrlUieste.Email: Universities. Central the for unds k ∈ k   k ( F -graph H [ n , := n m ers and 3 = H − )  disaribwmatching rainbow a admits A . mnme fegsin edges of number um .W rv htteeeit an exists there that prove We ]. ≥ m k km n nasrigmatching absorbing an find igigYu Xingxing { − ,k m k, n, +1 n A km erest. onthv acig fsize of matchings have not do ] S e sasaiiyvrinof version stability a as wed k  H | − ⊆ , vpooe h following the proposed ov H aph = The . n km 1 V H | with brp of ubgraph  with H k ≥ h ubro de in edges of number the − for euse We . H : [ 1 Stability n | V  ete combine then We . A 0 } k ν F n ( ecnetthis convert We . | hnteeexist there then , -graphs H ( § = ≥ H fec dei from is edge each if ) km H ) k \ } S m < m H S ν hypergraph A . fec of each if , is ]. ⊆ , ( − H S S k V V ( ( odenote to ) -uniform n otisat contains ,m k m, n, ,m k m, n, ( ( -vertex M H . M hs ); in ) := ) or ) H H k if - , . edges. This is often referred to as the Erd˝os matching conjecture in the literature, and there has been extensive research on this conjecture, see, for instance, [3, 5, 8, 9, 10, 11, 12, 22]. In particular, the special case for k = 3 was settled for large n byLuczak and Mieczkowska [22] and completely resolved by Frankl [9]. The following analogous conjecture, known as the rainbow matching conjecture, was made by Aharoni and Howard [1] and, independently, by Huang, Loh, and Sudakov [15]. For related topics on rainbow type problems, we refer the interested reader to [16, 18, 20, 23]. Conjecture 1.1 ([1, 15]). Let n,k,m be positive integers with n km. Let = F , ..., F be a ≥ F { 1 m} family of k-graphs on the same vertex set [n] such that F > f(n,m,k) for all i [m]. Then | i| ∈ F admits a rainbow matching. The case k = 2 of this conjecture is in fact a direct consequence of an earlier result of Akiyama and Frankl [2] (which was restated [7]). The following was obtained by Huang, Loh, and Sudakov [15]. Theorem 1.2 ([15], Theorem 3.3). Conjecture 1.1 holds when n> 3k2m. Keller and Lifshitz [17] proved that Conjecture 1.1 holds when n f(m)k for some large constant ≥ f(m) which only depends on m, and this was further improved to n = Ω(m log m)k by Frankl and Kupavskii [13]. Both proofs use the junta method. Very recently, Lu, Wang, and Yu [21] showed that Conjecture 1.1 holds when n 2km and n is sufficiently large. ≥ The following is our main result, which proves Conjecture 1.1 for k = 3 and sufficiently large n. Theorem 1.3. There exists an absolute constant n such that the following holds for all n n . For 0 ≥ 0 any positive integers n,m with n 3m, let = F , ..., F be a family of 3-graphs on the same ≥ F { 1 m} vertex set [n] such that F >f(n,m, 3) for all i [m]. Then admits a rainbow matching. | i| ∈ F Our proof of Theorem 1.3 uses some new ideas and combines different techniques from Alon-Frankl- Huang-R˝odl-Rucinski-Sudakov [3],Luczak-Mieczkowska [22], and Lu-Yu-Yuan [19]. (For a high level description of our proof, we refer the reader to Section 2 and/or Section 7.) In the process, we prove a stability result on 3-graphs (see Lemma 4.2) that plays a crucial role in our proof and might be of independent interest: If the number of edges in an n-vertex 3-graph H with ν(H) < m is close to f(n,m, 3), then H must be close to S(n,m, 3) or D(n,m, 3). The rest of the paper is organized as follows. In Section 2, we introduce additional notation, and state and/or prove a few lemmas for later use. In Section 3, we deal with the families in which most F 3-graphs are close to the same 3-graph that is S(n,m, 3) or D(n,m, 3). To deal with the remaining families, we need the above mentioned stability result for matchings in 3-graphs, which is done in Section 4. In Section 5, we show that there exists an absolute constant c> 0 such that Theorem 1.3 holds for m > (1 c)n/3. The proof of Theorem 1.3 for m (1 c)n/3 is completed in Section 6. − ≤ − Finally, we complete the proof of Theorem 1.3 in Section 7.

2 Previous results and lemmas

In this section, we define saturated families and stable hypergraphs, and state several lemmas that we will use frequently. We begin with some notation. Suppose that H is a hypergraph and U, T are subsets of V (H). Let N (T ) := A : A V (H) T and A T E(H) be the neighborhood of T H { ⊆ \ ∪ ∈ } in H, and let d (T ) := N (T ) . We write d (v) for d ( v ). Let ∆(H) := max d (v) and H | H | H H { } v∈V (H) H ∆2(H) := maxT ∈ V (H) dH (T ). In case T U, we often identify dH[U](T ) with dU (T ) when there is ( 2 ) ⊆ no confusion. It will be helpful to consider “maximal” counterexamples to Conjecture 1.1. Let n,k,m be positive integers with n km and let = F , ..., F be a family of k-graphs on the same vertex set [n]. We ≥ F { 1 m} say that is saturated, if does not admit a rainbow matching, but for every F and e / F , F F ∈ F ∈ the new family (e, F ) := ( F ) F e admits a rainbow matching. The following lemma F F\{ } ∪ { ∪ { }} says that the vertex degrees of every k-graph in a saturated family are typically small.

2 Lemma 2.1. Let n,k,m be positive integers with n km. Let = F , ..., F be a saturated ≥ F { 1 m} family of k-graphs on the same vertex set [n]. Then for each v [n] and each i [m], d (v) ∈ ∈ Fi ≤ n−1 n−1−k(m−1) or d (v)= n−1 . k−1 − k−1 Fi k−1 Proof. Suppose d (v) < n−1 , where v [n] and i [m]. Then there exists e [n] F such that Fi k−1 ∈ ∈ ∈ k \ i v e. Since is saturated, the family (e, F ) admits a rainbow matching, say M e , with M ∈ F  F i ∪ { } being a rainbow matching for the family F . F \ { i} If d (v) > n−1 n−1−k(m−1) = [n]\{v} [n]\({v}∪V (M)) , then there exists an edge f F Fi k−1 − k−1 k−1 \ k−1 ∈ i such that v f and f V (M)= . Now M f is a rainbow matching for , a contradiction. So ∈  ∩ ∅  ∪ { }  F d (v) n−1 n−1−k(m−1) . Fi ≤ k−1 − k−1 We will be removing vertices of n−1 and use Lemma 2.1 to produce saturated family = k−1 F F , ..., F of k-graphs such that for each v V (F ) and each i [m], d (v) n−1 n−1−k(m−1) . { 1 m} ∈  i ∈ Fi ≤ k−1 − k−1 Next we define stable hypergraphs. Let n, k be positive integers with n k. Let e = a , ..., a ≥  { 1 k} and f = b , ..., b be members of [n] with a < a < ... < a and b < b < ... < b . We write { 1 k} k 1 2 k 1 2 k e f if a b for all 1 i k, and e

3 Lemma 2.4. For any given integer k 3, let ǫ, c be reals such that 0 < ǫ c 1.1 Let n,m be ≥ ≪ ≪ integers such that n/3k2 m (1 c)n/k. Let = F , ..., F be a family of k-graphs on vertex ≤ ≤ − F { 1 m} set [n]. If for every i [m] and v [n], d (v) n−1 n−k(m−1)−1 , then H( ) is not ǫ-close to ∈ ∈ Fi ≤ k−1 − k−1 F H (n,m,k). S   Proof. We note that S(n,m,k) has m 1 vertices of degree n−1 . Since for every i [m] and v [n], − k−1 ∈ ∈ d (v) n−1 n−k(m−1)−1 , we have Fi ≤ k−1 − k−1    n k(m 1) 1 1 n2 cn E(H (n,m,k)) E(H( )) m (m 1) − − − > > ǫnk+1, | S \ F |≥ · − · k 1 · k 10k5 k 1  −   −  where the second inequality is due to n/3k2 m (1 c)n/k and the third inequality follows from ≤ ≤ − ǫ c. This shows that H( ) is not ǫ-close to H (n,m,k). ≪ F S To deal with the case when H( ) is not close to H (n,m, 3), we first find a small matching M F D in H∗( ) such that M can “absorb” small vertex sets and H∗( ) V (M) has an almost perfect F F − matching. When is stable, the matching M can be found very easily by the following lemma and F its proof. Lemma 2.5. Let k be a fixed positive integer and let 0 < γ′ γ c 1 be reals. Let n,m be ≪ ≪ ≪ positive integers with n/3k2 m (1 c)n/k. Let = F , ..., F be a stable family of k-graphs ≤ ≤ − F { 1 m} such that V (F ) = [n] and F > f(n,m,k) for all i [m]. Then for sufficiently large n, H∗( ) i | i| ∈ F has a matching M with M γn such that for any set S V (H∗( )) V (M) with S γ′n and | | ≤ ⊆ F \ | | ≤ k S ( ) = S [n] , H∗( )[V (M) S] has a perfect matching. | ∩ V∪U | | ∩ | F ∪ Proof. Recall that = v , ..., v and = u , ..., u , where r = n/k m. Fix an integer t V { 1 m} U { 1 r} ⌊ ⌋− satisfying γ′nf(n,m,k) f(n,s,k) for | i| ≥ all i [m], every F has a matching of size s. Since F is stable, F [[s]] is a complete k-graph. Hence, ∈ i i i (i) for any i , i , ..., i kt kγn 0, there exist τ = τ(k,σ) and ≥ d = d (k,σ) such that for every integer n D d the following holds: Every n-vertex k-graph H 0 0 ≥ ≥ 0 with (1 τ)D < ∆ (H) < (1 + τ)D and ∆ (H) < τD contains a matching covering all but at most − 1 2 σn vertices. In order to obtain a k-graph H satisfying Theorem 2.6, we use the approach from [3] by conducting two rounds of randomization on H∗( ) V (M). We summarize part of the proof in [3] (more F − precisely, the proof of Claim 4.1) as a lemma. A fractional matching in a k-graph H is a function w : E(H) [0, 1] such that for any v V (H), w(e) 1. A fractional matching is → ∈ {e∈E(H):v∈e} ≤ called perfect if w(e)= V (H) /k. e∈E(H) | | P 1Here and throughoutP the rest of the paper, the notation a ≪ b means that a is sufficiently small compared with b which need to satisfy finitely many inequalities in the proof.

4 Lemma 2.7 ([3], retained from the proof of Claim 4.1). Let k 3 and H be a k-graph on at most ≥ 2n vertices. Suppose that there are subsets Ri V (H) for i = 1, ..., n1.1 satisfying the following: ⊆ (a). every vertex v V (H) satisfies that i : v Ri = (1+ o(1))n0.2, ∈ |{ ∈ }| (b). every pair u, v V (H) is contained in at most two sets Ri, { }⊆ (c). every edge e H is contained in at most one set Ri, and ∈ (d). for every i = 1, ..., n1.1, Ri has a perfect fractional matching wi.

Then H has a spanning subgraph H′ such that d ′ (v) =(1+o(1))n0.2 for all v V (H′) and ∆ (H′) H ∈ 2 ≤ n0.1.

We will also need to control the indepence number of random subgraphs of H∗( ) V (M). The F − intuition is that when H( ) is not close to H (n,m,k) or H (n,m,k), H∗( ) V (M) does not have F D S F − very large independence number. The following lemma in [19] was proved by Lu, Yu, and Yuan using the container method.

Lemma 2.8 ([19], Lemma 5.4). Let d, ǫ′, α be positive reals and let k,n be positive integers. Let H be an n-vertex k-graph such that e(H) dnk and e(H[S]) ǫ′e(H) for all S V (H) with S > αn. Let ≥ ≥ ⊆ | | R V (H) be obtained by taking each vertex of H uniformly at random with probability n−0.9. Then ⊆ for any positive real γ α, the size of maximum independent sets in H[R] is at most (α + γ)n0.1 with ≪ 0.1 probability at least 1 (nO(1)e−Ω(n )) − We need an inequality on the function f(n,m,k) proved by Frankl in [9].

Lemma 2.9 ([9], Proposition 5.1). Let n,m,k be positive integers with n km 1. Then f(n,m,k) ≥ − ≥ f(n 1,m 1, k)+ n−1 . − − k−1 We conclude this section with the well known Chernoff inequality.

Lemma 2.10 (Chernoff Inequality, see [4]). Suppose X1, ..., Xn are independent random variables taking values in 0, 1 . Let X = n X and µ = E(X). Then for any 0 < δ 1, { } i=1 i ≤ 2 2 P[X (1 +Pδ)u] e−δ u/3 and P[X (1 δ)u] e−δ u/3. (1) ≥ ≤ ≤ − ≤ In particular, if X Bin(n,p) and λ< 3 np, then ∼ 2 2 P([ X np ] λ) e−Ω(λ /np). (2) | − | ≥ ≤

3 Extremal configuration HD(n,m, 3)

From Lemma 2.1 and Lemma 2.4, we see that if is a saturated family of k-graphs on vertex set [n] F and H( ) is close to the extremal configuration H (n,m,k) then there exist F and v [n] such F S ∈ F ∈ that d (v)= n−1 . Such vertices v can be removed from all k-graphs in F to obtain a smaller F k−1 F \ { } family ′, so that ′ admits a rainbow matching if and only if admits a rainbow matching. F F F In this section, we consider the case when H( ) is close to H (n,m, 3) and is stable. F D F Lemma 3.1. Let ǫ, c be reals such that 0 < ǫ c 1. Let n,m be positive integers such that ≪ ≪ n/27 m (1 c)n/3. Let = F , ..., F be a stable family of 3-graphs on vertex set [n] such ≤ ≤ − F { 1 m} that F > f(n,m, 3) for all i [m]. If H( ) is ǫ-close to H (n,m, 3), then admits a rainbow | i| ∈ F D F matching.

5 1/6 Proof. Let b = 6ǫ n. If Fi is √ǫ-close to D(n,m, 3), then Fi contains a complete subgraph of size 3m b; for, otherwise, as F is stable, we have E(D(n,m, 3)) E(F ) b > √ǫn3, a contradiction. − i | \ i |≥ 3 We claim that for any i [m] and j 0, ..., b , 2j + 1, 2j + 2, 3m j F . To prove this ∈ ∈ { } { − } ∈ i claim we fix i [m]. Suppose for a contradiction that there exists an integer 0 t b such that ∈ ≤ ≤ 2t + 1, 2t + 2, 3m t / F . Since F > 3m−1 and F is stable, we have 1, 2, 3m F . So t 1. { − } ∈ i | i| 3 i { } ∈ i ≥ We now count the edges in F : Let q be the number of edges of F in [3m 1], and q be the number i 1  i − 2 of edges of F not contained in [3m 1]. Since F is stable and 2t + 1, 2t + 2, 3m t / F , we see i − i { − } ∈ i that a, b, c / F when 2t + 2 a 7 m. Let m = αn; then 1/27 α < 2/7. We assert that 2 ≤ n n−m+1 > 3m−1 + 2tn2. To see this, let f(x) = 1 (1 x)3 (3x)3, so 3 − 3 3 − − −   6 n n m + 1 3m 1 − − = f(α)+ o(1). n3 3 − 3 − 3       Since f ′(x) = 3(1 2x 26x2) is decreasing in [1/27, 2/7] with f ′(1/27) > 0 and f ′(2/7) < 0, we have − − f(α) min f(1/27),f(2/7) = f(2/7) = 2 for 1/27 α< 2/7. This shows that n n−m+1 ≥ { } 343 ≤ 3 − 3 − 3m−1 = f(α) n3 + o(n3) 2tn2, as asserted. Then it follows that 3 6 ≥    3m 1 3m 3t 3 3m 1 n n m + 1 F − t − − + 2tn(n 3m + 1) < − + 2tn2 < − , | i|≤ 3 − 2 − 3 3 − 3           a contradiction as F >f(n,m, 3). This finishes the proof of Claim. | i| Recall = v , ..., v from the definition of H( ). By the above claim, M := v , 2i V { 1 m} F 1 {{ i − 1, 2i, 3m i + 1 : i [b] is a matching in H( ). Without loss of generality, let F , ..., F be − } ∈ } F 1 a all k-graphs in which are not √ǫ-close to D(n,m, 3). Since H( ) is ǫ-close to H (n,m, 3), we F F D have a √ǫn < b. Then for any j [m] [b], since F is √ǫ-close to D(n,m, 3), F contains a ≤ ∈ \ j j complete subgraph with size at least 3m b. Hence we have 2j 1, 2j, 3m j + 1 F . So − { − − } ∈ j M := v , 2j 1, 2j, 3m j + 1 : b < j m is a matching in H( ) which is disjoint from M . 2 {{ j − − } ≤ } F 1 Then M M forms a matching of size m in H( ). So admits a rainbow matching, completing 1 ∪ 2 F F the proof of Lemma 3.1.

4 A stability lemma

In this section, we prove a result for stable 3-graphs, which may be viewed as a stability version of the following result ofLuczak and Mieczkowska proved in [22].

Theorem 4.1 ([22]). There exists positive integer n such that for integers m,n with n n and 1 ≥ 1 1 m n/3, if H is an n-vertex 3-graph with e(H) >f(n,m, 3), then ν(H) m. ≤ ≤ ≥ Building on the proof in [22], we prove the following.

Lemma 4.2. For any real ǫ> 0, there exists positive integer n1(ǫ) such that the following holds. Let m,n be integers with n n (ǫ) and 1 m n/3, and let H be a stable 3-graph on the vertex set [n]. ≥ 1 ≤ ≤ If e(H) >f(n,m, 3) ǫ4n3 and ν(H)

6 Proof. Suppose that e(H) >f(n,m, 3) ǫ4n3 and s := ν(H)

3s s 3 3 s 3 s 3 3s 3 20n + 19 + n + − 32n2 = o(n3), 1 · 2 1 1 × 1 2 1 2 1 ≤               where we use s 15 because the difference ≤ between the above two summations is at most

2 2 15(n 3s) 8(n 3s) s 6 45(n 3s) 120(n 3s) 2 f1(T ) 2 − + f2(T ) − − 2 − + − = O(n ), ′ s(s 15s) s(s 8) ≤ 3 s(s 15s) s(s 8) T ∈ M  − −    − −  X( 3 )

7 where 3s

For convenience, we write

5 f (x ,x ,x ,x ,x ,x,y)= α (t) x + β (t) x + β (t) y, t 1 2 3 4 5 i · i 1 · 2 · i=1 2 X 2 2 where α1(t) = 2t + 15t + 19, α2(t)= t + 12t + 20, α3(t)= t + 10t + 21 2 α4(t) = 7t + 23, α5(t) = 26, β1(t) = 3t + 15t + 19, and β2(t) = 27.

Then it follows that e(H) f (x ,x ,x ,x ,x ,x,y)+ O(n2). ≤ t 1 2 3 4 5 Next, we derive properties of the functions αi(t) and βj(t). Claim 3. For any t 0, max β (t), β (t) max α (t), α (t), α (t), α (t), α (t) + 0.2. ≥ { 1 2 }≥ { 1 2 3 4 5 } Proof. We have β (t) = 27. It is easy to see that for each i [5], the functions α (t), β (t) α (t) 2 ∈ i 1 − i and β (t) are increasing for t 0. Note that β (0.5) = 27.25, α (0.5) = 26.25, α (0.5) = 26.25 and 1 ≥ 1 2 3 α (0.5) = 26.5; so max β (t), 27 α (t) + 0.2 for t 0 and i = 2, 3, 4. Since β (t) α (t)= t2, and 4 { 1 }≥ i ≥ 1 − 1 α (√0.2) < 27 0.2, we see max β (t), 27 α (t) + 0.2 for all t 0. 1 − { 1 }≥ 1 ≥ Since β (t) s−6 1 (n 3s)2s+ 5 (n 3s)s2+ 19 s3 = 1 n3 1 (n s)3, we see max β (t), β (t) s−6 1 3 ≤ 2 − 2 − 6 6 − 6 − { 1 2 } 3 ≤ max n n−s+1 , 3s−1 + O(n2)= f(n,s, 3) + O(n2). By Claim 3 and because 5 x + x + y = 3 − 3  3 i=1 i  s−6 , we have 3     P  5 f (x ,x ,x ,x ,x ,x,y) max β (t), β (t) 0.2 x + β (t)x + β (t)y t 1 2 3 4 5 ≤ { 1 2 }− i 1 2   Xi=1 (3) 5 5 s 6 max β (t), β (t) − 0.2 x f(n,s, 3) 0.2 x + O(n2). ≤ { 1 2 } 3 − i ≤ − i   Xi=1 Xi=1 Let X (respectively, T ) denote the set of edges each of which belongs to some triple in X ∪ ∪ 27 (respectively, in T27). Now we show the following claim. Claim 4. s>m ǫn/4, and x> s−6 10ǫ4n3 ǫn/24 or y > s−6 10ǫ4n3 ǫn/12 . − 3 − − 3 3 − − 3 Proof. If s m ǫn/4, then by (3) we have    ≤ − e(H) f (x ,x ,x ,x ,x ,x,y)+ O(n2) f(n,s, 3) + O(n2) ≤ t 1 2 3 4 5 ≤ ǫ/4n f(n,m, 3) + O(n2) f(n,m, 3) ǫ4n3, ≤ − 3 ≤ −   2Since T is good, the union of any three disjoint edges of H∗ in V (T ) must contain the three vertices in V (T ) ∩ I.

8 a contradiction. So s >m ǫn/4. First we see that x + y > s−6 10ǫ4n3; for, otherwise, − 3 − 5 x 10ǫ4n3, which together with (3) implies i=1 i ≥  P e(H) f (x ,x ,x ,x ,x ,x,y)+ O(n2) f(n,m, 3) 2ǫ4n3 + O(n2) f(n,m, 3) ǫ4n3, ≤ t 1 2 3 4 5 ≤ − ≤ − a contradiction. Now suppose that x > ǫn/12 and y > ǫn/24 . Then X > ǫn/12 and T > 3 3 |∪ | |∪ 27| ǫn/24. For any edge e = (i, j, k) X with i s−6 10ǫ4n3. 3 −|∪ | 2 ≤ 3 − 12 2 3 − Hence, we have that either x ǫn/12 or y ǫn/24 .  ≤ 3  ≤  3   Suppose x> s−6 10ǫ4n3 ǫn/24 . So x> s−6 ǫn/12 and thus X >s 6 ǫn/12. Recall 3 − − 3 3 − 3 |∪ | − − that for any T X, T is a good triple and, hence, each edge of H∗ contained in V (T ) intersects I. ∈     Hence any traceable edge which intersects V ( X) must also intersect I. Thus, the number of edges of ∪ H not intersecting I is at most V (M ′) V ( X) n +50n2 ǫn n +50n2 ǫ n3. As I = s m 1, | \ ∪ | 2 ≤ 4 2 ≤ 4 | | ≤ −   ǫ E(S(n,m, 3)) E(H) = E(H) E(S(n,m, 3)) + e(S(n,m, 3)) e(H) n3 + ǫ4n3 < ǫn3. | \ | | \ | − ≤ 4 So in this case we see that H is ǫ-close to S(n,m, 3). By Claim 4, it remains to consider y > s−6 10ǫ4n3 ǫn/12 . We claim that there exists a 3 − − 3 complete 3-graph K on more than 3m 3ǫn/2 vertices and V (K) V (M ′). Suppose to contrary −  ⊆ that V (M ′) does not contain such a complete 3-graph K. Since V (M ′) (3m 3ǫn/2) = 3(s 6) ǫn ′ | |− ǫn− − − 3m + 3ǫn/2 > 2 and H is stable, V (M ) contains an independent set of size 2 , say A. Note that if T = e , e , e with e A = for all i [3], then f (T ) < 27. Since there are at least A /3 ǫn/6 { 1 2 3} i ∩ 6 ∅ ∈ 3 | | ≥ edges in M ′ which intersect with A, we see that y s−6 ǫn/6 , a contradiction. ≤ 3 − 3 Then E(D(n,m, 3) E(H) E(D(n,m, 3) E(K) 3 ǫn n < ǫn3, i.e., H is ǫ-close to D(n,m, 3). | \ | ≤ | \ | ≤2 2  This finishes the proof of Lemma 4.2.  5 Almost perfect rainbow matchings

In this section, we prove a lemma about almost perfect rainbow matchings that we will need. In fact, this result holds for families of k-graphs, for any k 3. ≥ Lemma 5.1. For any given integer k 3, there exist positive reals c and n such that the following ≥ 2 holds. Let n,m be integers with n km and n n , and let = F , ..., F be a stable family of ≥ ≥ 2 F { 1 m} k-graphs on the same vertex set [n] such that F > km−1 for each i [m]. If m> (1 c)n/k, then | i| k ∈ − admits a rainbow matching. F  Proof. We choose c′ = c′(k) and c = c(k) small enough such that 0 < c c′ 1. Let n be sufficiently ≪ ≪ large and n/k m> (1 c)n/k. Suppose to the contrary that F > km−1 for each i [m] and ≥ − | i| k ∈ F does not admit a rainbow matching.  By Corollary 2.3, we may additionally assume is saturated. Let U be the vertex set of a largest F i complete k-graph in F for i [m]. Since F is stable, we may choose U = [ U ] such that [n] U is i ∈ i i | i| \ i an independent set in F . For each i [m], we have U > (1 c′)km, for, otherwise, we have the i ∈ | i| − following contradiction for some i [m]: ∈ n c′km n n 1 n n 1 km 1 F (cn + 1) − (n km + 1) − < − , | i|≤ k − k ≤ k − k 1 ≤ k − − k 1 k        −     −    where the second inequality holds since c c′ 1 and m> (1 c)n/k), the third inequality holds since ≪ ≪ − n km < cn, and the last inequality holds since n km−1 = n−km+1 n−i < (n km + 1) n−1 . − k − k i=1 k−1 − k−1 Let U = m U . By the above paragraph, we see that U (1 c′)km. If U km, then it is i=1 i  | |≥P −  | |≥  clear that admits a rainbow matching. So we may assume that U = U [km 1]. Because U F T m ⊆ − m

9 is the vertex set of a largest complete k-subgraph of F and since F is stable and F > km−1 , m m | m| k there exists some k-set e / F such that e U = k 1 and km e. Since is saturated, there ∈ m | ∩ | − ∈ F  exists a rainbow matching M in F such that M e is a rainbow matching in (e, F ). Since F \ m ∪ { } F m F is stable for each i [m], we may assume that V (M) e = [km]. Let M ′ = e′ M : e′ U . i ∈ ∪ { ∈ 6⊆ } Claim. (a) M ′ < c′km, | | ′ (b) Each edge of Fm is contained in U or intersects an edge of V (M ), and (c) For any v V (M) U, d (v) c′k2m |U| . ∈ \ Fm[U] ≤ k−2 Proof. To prove (a), just observe that M ′ V (M ) U = (km 1) U < c′km. | | ≤ | \ | − − | | Suppose (b) fails. That is, there exists an edge f F such that f U = and f V (M ′)= . Note ∈ m \ 6 ∅ ∩ ∅ that f (U V (M ′)) = , as [n] U is independent in F . In particular, f (U V (M ′)) k 1. Let ∩ \ 6 ∅ \ m | ∩ \ |≤ − M ′ = m t for some t 1. Recall that U V (M ′)= V (M) = [km 1]. Hence U V (M ′) = kt 1 | | − ≥ ∪ − | \ | − and, thus, U (V (M ′) f) induces a common complete k-graph of size at least k(t 1) in all F . Then \ ∪ − i we see that M ′ f together with a matching of size t 1 in U (V (M ′) f) form a rainbow matching ∪{ } − \ ∪ for . So we may assume that (b) holds. F Now we prove (c). For any v V (M) U [km], by the maximality of U, there exists f [n] F ∈ \ ⊆ ∈ k \ m such that v f and f U = k 1. So there exists a rainbow matching N in F such that ∈ | ∩ | − F \ m  N f is a rainbow matching in ′(f, F ). Since F is stable for i [m], we may assume that ∪ { } F m i ∈ V (N) f = [km]. Let N ′ = e′ N : e′ U . By applying (b) to N ′, every edge of F containing v ∪ { ∈ 6⊆ } m intersects V (N ′). Since V (N ′) k N ′ k(km U ) c′k2m, there are at most c′k2m |U| edges ≤ | | ≤ − | | ≤ k−2 e′ in F containing v such that e′ U v . Hence (c) holds. This proves the claim. m ⊆ ∪ { }  Note that e U = k 1 and V (M) U = [km 1]. Let q be the number of edges of F contained | ∩ | − ∪ − 1 m in [km 1], and q be the number of edges of F with at least one vertex in [n] [km 1]. By (c), − 2 m \ − we have km 1 U U q − V (M) U | | + V (M) U c′k2m | | . 1 ≤ k − | \ | k 1 | \ | · k 2    −   −  By (b), we see q V (M ′) (n km + 1) n−2 . So we have 2 ≤ | | · − k−2 km 1 U  U n 2 F − V (M) U | | + c′k2m | | + V (M ′) (n km + 1) − | m|≤ k − | \ | k 1 k 2 − k 2    −   −   −  km 1 U U n 2 − V (M) U | | + c′k2m | | + k V (M) U (cn + 1) − ≤ k − | \ | k 1 k 2 | \ | k 2    −   −   −  km 1 U U n 2 = − V (M) U | | c′k2m | | k(cn + 1) − k − | \ | · k 1 − k 2 − k 2    −   −   −  km 1 < − , k   where the second inequality holds since n km < cn and M ′ V (M) U , and the last inequality − | | ≤ | \ | holds since c′, c are small enough and U > (1 c′)km > (1 c′)(1 c)n. This is a contradiction, | | − − − finishing the proof of Lemma 5.1.

6 Non-extremal configurations

Note that if there exist F and v [n] such that d (v) = n−1 then v can be removed from all ∈ F ∈ F k−1 k-graphs in F to obtain a smaller family ′ so that ′ admits a rainbow matching if and only F \ { } F F  if admits a rainbow matching. Hence, if such vertex does not exist in a saturated family , then F F from Lemma 2.1, we see that d (v) n−1 n−k(m−1)−1 for all v F and F . This leads us F ≤ k−1 − k−1 ∈ ∈ F to the following result.   Lemma 6.1. Given reals 0 < ǫ c 1, let n n(ǫ, c) be a sufficiently large integer and m be an ≪ ≪ ≥ integer such that n/27

10 vertex set [n] such that for every i [m], F > f(n,m, 3) and d (v) n−1 n−3(m−1)−1 for ∈ | i| Fi ≤ 2 − 2 each v [n]. If H( ) is ǫ-close to neither H (n,m, 3) nor H (n,m, 3), then admits a rainbow ∈ F S D F  matching.

Proof. Given 0 < ǫ c 1, let n′,m′ be integers such that n′ is sufficiently large and n′/27 < ′ ′ ≪ ≪ ′ m < (1 c)n /3. Let = F1, ..., Fm′ be a family of 3-graphs on the vertex set [n ] such that − F { ′ } ′ ′ F >f(n′,m′, 3) and d (v) n −1 n −1−3(m −1) for i [m′] and v [n′]. Suppose that H( ) | i| Fi ≤ 2 − 2 ∈ ∈ F is not ǫ-close to H (n′,m′, 3) or H (n′,m′, 3). Our ultimate goal is to find a rainbow matching in . S D   F Let n′ = 3m′ + 3r′ + s where 0 s < 3. Recall the definitions of H( ) and H∗( ) such that ≤ F F V (H( )) = [n′] ′ and V (H∗( )) = [n′] ′ ′, where ′ = m′ and ′ = r′. By Lemma 2.5, F ∪V F ∪V ∪U |V | |U | for 0 < γ′ γ ǫ c 1, there exists a matching M in H∗( ) with M γn′ such that for ≪ ≪ ≪ ≪ a F | a| ≤ any S V (H∗( )) V (M ) with S γ′n′ and 3 S ( ′ ′) = S [n′] , H∗( )[V (M ) S] has a ⊆ F \ a | |≤ | ∩ V ∪U | | ∩ | F a ∪ perfect matching. In the rest of the proof, without loss of generality, we use the following notation:

H = H∗( ) V (M ), [n] = [n′] V (M ), = ′ V (M )= v , ..., v , = ′ V (M )= u , ..., u . F − a \ a V V \ a { 1 m} U U \ a { 1 r}

Then n = 3m + 3r + s. Using the above property of the matching Ma, it now suffices for us to find an almost perfect matching in H. To find this almost perfect matching, our plan is to show that there exists an almost regular subgraph of H with bounded maximum co-degree so that Theorem 2.6 can be applied. To that end, in what follows we will use the two-round randomization technique developed in [3]. Let R be chosen from V (H) by taking each vertex independently with probability n−0.9. We take n1.1 independent copies of R and denote them by Ri for 1 i n1.1. For S V (H), denote ≤ ≤ ⊆ Y = i : S Ri . First we have the following claim. S |{ ⊆ }| Claim A. With probability 1 o(1), the following hold: − (i) for every v V (H), Y = (1+ o(1))n0.2, ∈ {v} (ii) every pair u, v V (H) is contained in at most two sets Ri, and { }⊆ (iii) every edge e H is contained in at most one set Ri. ∈ 1.1 −0.9|S| E 0.2 Proof. Note that YS Bin(n ,n ) for any S V (H). Thus, [Y{v}]= n for every v V (H). ∼ ⊆ 0.1 ∈ By Lemma 2.10 (2), we have P ( Y n0.2 >n0.15) e−Ω(n ). By union bound, we see (i) holds. | {v} − | ≤ To prove (ii) and (iii), let

V (H) V (H) Z = u, v : Y 3 and Z = S : Y 2 . 2 { }∈ 2 {u,v} ≥ 3 ∈ 3 S ≥        

Then E[Z ] = |V (H)| P (Y 3) n (n1.1)3(n −1.8)3 4n −0.1 and E[Z ] n (n1.1 )2(n−2.7)2 2 2 {u,v} ≥ ≤ 2 ≤ 3 ≤ 3 ≤ 8n−0.2. By Markov’s inequality, we have    P(Z = 0) > 1 4n−0.1 and P(Z = 0) > 1 8n−0.2. 2 − 3 − That implies that (ii) and (iii) hold with probability at least 1 4n−0.1 and 1 8n−0.2, respectively. − − Next we want to prove that there exists a perfect (or, rather, maximum) fractional matching in each H[Ri]. To do so, we define a maximal subset R′i Ri that satisfies R′i [n] = 3 R′i ( )) ⊆ ∩ | ∩ V∪U | as follows. If Ri [n] 3 Ri ( )) , we take a subset of Ri denote by R′i, which is chosen from | ∩ |≥ | ∩ V∪U | Ri by deleting Ri [n] 3 Ri ( )) vertices in Ri [n] independently and uniformly at random. | ∩ |− | ∩ V∪U | ∩ Otherwise Ri [n] < 3 Ri ( )) , we take a subset of Ri denote by R′i by the following two step: | ∩ | | ∩ V∪U | First we delete at most 3 vertices (chosen independently and uniformly at random) in Ri [n] so that ∩ the number ℓ of the remaining vertices is a multiple of 3; then we delete Ri ( )) ℓ/3 vertices | ∩ V∪U |− in Ri ( )) independently and uniformly at random. ∩ V∪U For S V (H), define Y ′ = i : S R′i . Note that E(Ri [n]) = n0.1, E(Ri )= n0.1/3, ⊆ S |{ ⊆ }| ∩ ∩V∪U and E(Ri )= n−0.9m. For each i, let A be the event Ri [n] n0.1

11 Claim B. With probability 1 o(1), the following hold: − (i) (A B C ) holds, i i ∧ i ∧ i (ii) for every v V (H), Y ′ = (1+ o(1))n0.2, V ∈ {v} (iii) every pair u, v V (H) is contained in at most two sets R′i, and { }⊆ (iv) every edge e H is contained in at most one set R′i. ∈ Proof. Since R′i Ri, it is clear from Claim A that (iii) and (iv) hold with probability 1 o(1). Next ⊆ − we consider (i). By Lemma 2.10 (2) (with λ = n0.095), for each 1 i n1.1, we have ≤ ≤ −Ω(n0.09) −Ω(3n0.09) −Ω(n0.09) −Ω( n n0.09) −Ω(n0.09) P(A ) e , P(B ) e = e and P(C ) e m = e . i ≤ i ≤ i ≤ Thus by union bound, P( (A B C )) = 1 o(1), proving (i). i i ∧ i ∧ i − Assuming A B C , we see Ri R′i < 2n0.095. Then by the choice of R′i, for all v V (H), i ∧ i ∧ Vi | \ | ∈ the probability P( v Ri R′i (A B C ) (v Ri) ) is at most { ∈ \ i ∧ i ∧ i ∧ ∈ } Ri R′i Ri R′i Ri R′i 2n0.095 max | \ | , | \ | | \ | < < 7n−0.005. Ri [n] Ri ( )) ≤ Ri /4 (n0.1 n0.095)/3 | ∩ | | ∩ V∪U | | | − Using coupling and applying Lemma 2.10 (2) to Bin( Y , 7n−0.005) with λ = 3n0.195, we have | v|

0.195 P Y Y ′ > 10n0.195 (A B C ) Y = (1+ o(1))n0.2 e−Ω(n ). {v} − {v} i ∧ i ∧ i ∧ {v} ≤ ( i )! ^ 

Note that with probability 1 o(1), (A B C ) and Y = (1+ o(1))n0.2 hold for all v V (H). − i i ∧ i ∧ i {v} ∈ By union bound, we can derive that 0 Y Y ′ 10n0.195 = o(n0.2) for all v V (H) with V ≤ {v} − {v} ≤ ∈ probability 1 o(1). Hence (ii) holds with probability 1 o(1). This proves Claim B. − − Let n = R′i [n] and m = R′i . Using (i) of Claim B, we see that with probability 1 o(1), i | ∩ | i | ∩ V| − m = (1+ o(1))mn−0.9 = Θ(n0.1)=Θ(n ) for all 1 i n1.1. i i ≤ ≤ Claim C. With probability 1 o(1), the following hold for all 1 i n1.1: − ≤ ≤ (a) H[R′i ] is not ǫ4/4-close to H (n ,m , 3) or H (n ,m , 3), and \U S i i D i i (b) there exists a perfect fractional matching in H[R′i].

′i Proof. For each T V (H) , let Degi(T ) := N (T ) R . By definition of H, we have that ∈ ≤2 | H ∩ 4−|T | |  n′  • for any v , d (v ) f(n′,m′, 3) (γn′) f(n,m, 3) γn3, and j ∈V H j ≥ − 2 ≥ − • for any T = v , u with v and u [n],  { j } j ∈V ∈ n′ 1 n′ 1 3(m′ 1) n 1 n 1 3(m 1) d (T )= d (u) − − − − − − − − + γn2. H Fj ≤ 2 − 2 ≤ 2 − 2        

0.1 −0.9 Assume that i(Ai Bi Ci) holds. Then ni = (1+ o(1))n and mi = (1+ o(1))mn . Since ∧ ∧ ′i Ri R′i = o(n ), for each T V (R ) with t [2], we have \ i V ∈ t ∈ i −0.9 4−t E[Deg (T )] = (1 + o(1))dH (T )(n ) .

Thus, for any v Ri, ∈V∩ E[Degi(v)] (1 + o(1))(f(n,m, 3) γn3)(n−0.9)3 f(n ,m , 3) 2γn3, ≥ − ≥ i i − i and, for any T = u, v with v and u [n], E[Degi(T )] is at most { } ∈V ∈ n 1 n 1 3(m 1) n 1 n 1 3(m 1) (1 + o(1)) − − − − + γn2 (n−0.9)2 i − i − − i − + 2γn2. 2 − 2 ≤ 2 − 2 i         

12 We apply Janson’s Inequality (Theorem 8.7.2 in [4]) to bound the deviation of Degi(T ) for T 2. i ′i | | ≤ Write Deg (T ) = Xe, where Xe =1 if e R and Xe = 0 otherwise. Let t = T 1, 2 e∈NH (T ) ⊆ | | ∈ { } and p = n−0.9. Then P 4−t n t 4 t n 4 ∆∗ = P(X = X = 1) p2(4−t)−ℓ − − − = O(n0.1(2(4−t)−1)). ei ej ≤ 4 t ℓ 4 t ℓ e ∩e 6=∅, e ,e ∈ V (H) ℓ=1  −   − −  i j Xi j ( 4−t ) X By Janson’s inequality, for v Ri, ∈V∩ 2E i ∗ E i 0.1 P(Degi(v) (1 γ)E[Degi(v)]) e−γ [Deg (v)]/(2+∆ / [Deg (v)]) e−Ω(n ), ≤ − ≤ ≤ and, for the pair v, u with v and u [n] (by considering the complement of H), we can have { } ∈V ∈ 0.1 P(Degi( v, u ) (1 + γ)E[Degi( v, u )]) e−Ω(n ) { } ≥ { } ≤ By union bound, with probability 1 o(1) we derive from above that for all 1 i n1.1 − ≤ ≤ 1). for any v Ri, Degi(v) (1 γ)E[Degi(v)]) f(n ,m , 3) 3γn3, and ∈V∩ ≥ − ≥ i i − i 2). for any pair u, v R′i with v and u [n], { j }⊆ j ∈V ∈ n 1 n 1 3(m 1) n 1 Degi( u, v ) i − i − − i − + 3γn2 i − Ω(n2), { } ≤ 2 − 2 i ≤ 2 − i       which implies that F [R′i [n]] is not ǫ3/2-close to S(n ,m , 3), since m = (1+ o(1))mn0.9 and j ∩ i i i m< (1 c)n/3. − This shows that H[R′i ] is not ǫ4/4-close to H (n ,m , 3), where γ ǫ. \U S i i ≪ Let := v : F [[n]] is not ǫ-close to D(n,m, 3) . We claim that > ǫn. Otherwise V0 { j ∈ V i } |V0| ǫn, then we have |V0|≤ n E(H (n′,m′, 3)) E(H( )) ǫn + (m ǫn)ǫn3 + γ(n′)4 ǫ(n′)4, | D \ F |≤ 3 − ≤   a contradiction as H( ) is not ǫ-close to H (n′,m′, 3)). As > ǫn, with probability 1 o(1) we F D |V0| − have (using Lemma 2.10) that 3). R′i ǫni for all 1 i n1.1. | ∩V0|≥ 2 ≤ ≤ For v R′i , we consider F [[n]]. Let G be the complement of F [[n]]. Then for any S V (G) j ∈ ∩V0 j j ⊆ with S > 3m ǫn, we have e(G[S]) ǫe(G). This is because otherwise E(D(n,m, 3)) E(Fj [[n]]) n | | − 3 ≥ | \ |≤ ǫn 2 + ǫe(G) < ǫn , contradicting vj 0. By Lemma 2.8, the maximum size of the complete i ∈ V 0.1 3-graph in Fj[R [n]] is no more than (3m/n ǫ + γ)n 3mi ǫni/2 with probability at least  0.1∩ − ≤ − 1 (nO(1)e−Ω(n )). Assuming (A B C ), this implies that F [R′i [n]] is not ǫ3/2-close to − i i ∧ i ∧ i j ∩ D(n ,m , 3). By union bound, with probability 1 o(1), we have i i V − 4). for all 1 i n1.1 and v R′i , F [R′i [n]] is not ǫ3/2-closed to D(n ,m , 3). ≤ ≤ j ∈ ∩V0 j ∩ i i By 3) and 4), we see that, with probability 1 o(1), H[R′i ] is not ǫ4/4-close to H (n ,m , 3), − \U D i i proving part (a) of Claim C.

It remains to show part (b) of Claim C, that is, to construct a perfect fractional matching wi in H[R′i] for each 1 i n1.1. Our main tool is the stability result, Lemma 4.2. ≤ ≤ Fix some 1 i n1.1. We write R′i [n] = xi , ..., xi with xi < xi < ... < xi and define ≤ ≤ ∩ { 1 ni } 1 2 ni [d] := xi ,xi , ..., xi for any integer d. We now state two simple inequalities for later use: i { 1 2 d} a f(x,y, 3) f(x,y a, 3) + and f(x,y, 3) f(x,y + a, 3) 3ax2 (4) ≥ − 3 ≥ −  

13 hold for any positive integers x, y, a with a ǫn and γ ǫ, it follows from the above definitions on w that for ⊆ | ∩ V| |V0| ≪ P i any v R′i [n], ∈ ∩

′ ′ 0 mi 0 ǫni mi ǫni w (v) := w (f) |V |20 + − |V1 | 20 + − 1 < 1. ≤ mi + ǫ ni mi 6γ 3 ni ≤ mi + ǫ ni mi 6γ 3 ni v∈Xf∈K − − Since ǫ c, we have 3m + 3ǫ20n < n 4. So there exists a vertex set a , a , a , a in K such ≪ i i i − { 1 2 3 4} that w′(a ) = 0, for i [4]. Let K′ be the 3-graph obtained from K by deleting vertices a , a , a , a . i ∈ 1 2 3 4 Starting with w := w′, we increase w using the following iterations: (i) pick a vertex v in V (K′) with maximum w(v);3 (ii) pick any edge f K′ containing v and update w(f) w(f) + 1 w(v); ∈ ← − (iii) delete all vertices u V (K′) with w(u) = 1 (which must include the vertex v) from K′; (iv) ∈ if V (K′) 2, then terminate; otherwise go to (i) again. This must terminate in finitely many | | ≤ iterations and when it terminates, we obtain a fractional matching w in K such that w(ai) = 0 for i [4] and K′ 2. So there exist two vertices b , b in V (K) a , a , a , a such that for ∈ | | ≤ 1 2 \ { 1 2 3 4} any vertex v in V (K) a1, a2, a3, a4, b1, b2 , w(v) = 1. We may suppose 1 w(b1) w(b2). Let \ { }w(b1)−w(b2) ≥ w(b≥1)−w(b2) w(a1, a2, b1) = 1 w(b1), w(a1, a2, b2) = 2 , w(a3, a4, b2) = 1 w(b1) + 2 , and − w(b1)+w(b2) − w(a1, a2, a3)= w(a1, a2, a4)= w(a1, a3, a4)= w(a2, a3, a4)= 6 . It is easy to check that w is a perfect fractional matching in K. ′ ′i Now we notice that f∈K w (f) = {e∈H[R′i]:|e∩V|=1} wi(e) = R and, f∈K w(f) = ′i | ∩ V| |R ∩[n]| = R′i ( ) . Moreover, the neighborhood of any u R′i in H[R′i] is the com- 3 | ∩ V∪U |P P j ∈ ∩U P plete 3-graph K. So we can partition the total weight (w(f) w′(f)) = R′i into R′i f∈K − | ∩ U| | ∩ U| copies of 1’s (say each is represented by a set E of edges in K), and then for each u R′i , we j P j ∈ ∩U assign the weight of each f Ej to be wi(f uj ). One can easily check that we obtain a perfect ∈ ′i ∪ { } fractional matching wi in H[R ]. This completes the proof of Claim C.

3Note that this maximum w(v) is strictly less than 1.

14 From Claims B and C, we see that the sets R′i for 1 i n1.1 satisfy (a)-(d) in Lemma 2.7. Then ≤ ≤ by Lemma 2.7, there exists a spanning subgraph H′ of H such that for each v V (H), d ′ (v)=(1+ ∈ H o(1))n0.2, and∆ (H′) n0.1. By Theorem 2.6, H contains a matching M such that S = V (H) V (M ) 2 ≤ b \ b contains at most γ′n′ vertices. Since S M M = n′ = 3r′ +3m′ +s where 0 s 2, we can delete | ∪ a ∪ b| ≤ ≤ at most s elements from S to get a subset S′ such that 3 S′ ( ′ ′) = S′ [n′] . By the setting at | ∩ V ∪U | | ∩ | the beginning of the proof, Lemma 2.5 assures that H∗( )[V (M ) S′] has a perfect matching, which F a ∪ together with M form a matching in H∗( ) of size r′ + m′. Equivalently, this says that admits a b F F rainbow matching, finishing the proof of Lemma 6.1.

7 Proof of Theorem 1.3

Let n be a sufficiently large integer. Let m be a positive integer with n 3m and let = F , ..., F ≥ F { 1 m} be a family of 3-graphs on the same vertex set [n], such that F > f(n,m, 3) for each i [m]. | i| ∈ Suppose to the contrary that does not admit a rainbow matching. In view of Lemma 2.2, we may F assume that is stable. Then by Lemma 5.1, there exists an absolute constant c = c(3) > 0 such F that m (1 c)n/3. By Theorem 1.2, m n/27. Hence, ≤ − ≥ n/27 m (1 c)n/3. (5) ≤ ≤ − We now apply the following algorithm. Initially, let = , n = n and m = m. We repeat the F0 F 0 0 following iterations. Suppose that we have defined , which contains m many 3-graphs on the same Fi i vertex set [ni]. • Step 1: Apply Corollary 2.3 to , we obtain a family of 3-graphs on the vertex set [n ] Fi Fi+1 i that is both stable and saturated, and set ni+1 = ni and mi+1 = mi. • Step 2: If for any F and any v [n ], d (v) < ni+1−1 , then set t := i + 1 and output ∈ Fi+1 ∈ i+1 F 2 ,n ,m . Ft t t  • Step 3: If there exist F and v [n ] such that d (v)= ni+1−1 , then set n′ = n ∈ Fi+1 ∈ i+1 F 2 i+1 i+1 − 1, m′ = m 1, and ′ := F ′ v : F ′ F . Relabel the vertices if necessary so i+1 i+1 − Fi+1 { − ∈ Fi \ { }}  that all 3-graphs in ′ have the same vertex set [n′ ]. Set := ′ ,n := n′ ,m := m′ Fi+1 i+1 Fi Fi+1 i i+1 i i+1 and go to Step 1.

Let be the resulting family of 3-graphs, which contains m 3-graphs on the same vertex set [n ] Ft t t and admits no rainbow matching. By (5), we see that n n m>cn is sufficiently large. We also t ≥ − see from Lemma 2.9 that F >f(n ,m , 3) holds for any F . | | t t ∈ Ft By definition, we see that t is stable and saturated such that for any F t and v Vt, nt−1 F ∈ F ∈ dF (v) < 2 . On the other hand, by Lemma 2.1, it further holds that  n 1 n 1 3(m 1) d (v) t − t − − t − for any F and v V . F ≤ 2 − 2 ∈ Ft ∈ t    

Since nt is sufficiently large, using Lemma 5.1 and Theorem 1.2 again, we may assume that

n /27 m (1 c)n /3. t ≤ t ≤ − t Now we choose 0 < ǫ c. Since satisfies the above properties, by applying Lemmas 2.4, 3.1 ≪ Ft and 6.1, we can conclude that admits a rainbow matching. This is a contradiction, completing the Ft proof of Theorem 1.3.

Acknowledgement. The authors would like to thank Peter Frankl for bringing the references [2, 7].

15 References [1] R. Aharoni and D. Howard, Size conditions for the existence of rainbow matchings, preprint. [2] J. Akiyama and P. Frankl, On the size of graphs with complete-factors, J. , 9(1) (1985), 197-201. [3] N. Alon, P. Frankl, H. Huang, V. R¨odl, A. Rucinski and B. Sudakov, Large matchings in uniform hypergraphs and the conjecture of Erd˝os and Samuels, J. Comin. Theory Ser. A, 119 (2012), 1200-1215. [4] N. Alon and J. Spencer, The Probabilistic Method, Wiley-Intersci. Ser. Discrete Math. Optim., John Wiley Sons, Hoboken, NJ, (2000), third edition, (2008). [5] B. Bollob´as, D. E. Daykin and P. Erd˝os, Sets of independent edges of a hypergraph, Quart. J. Math. Oxford Ser. (2), 27 (1976), 25-32. [6] P. Erd˝os, A problem on independent r-tuples, Ann. Univ. Sci. Budapest. E¨otv¨os Sect. Math., 8 (1965), 93-95. [7] P. Frankl, The shifting technique in extremal set theory, Surveys in combinatorics 1987 (New Cross, 1987), 81-110, London Math. Soc. Lecture Note Ser., 123, Cambridge Univ. Press, Cam- bridge, 1987. [8] P. Frankl, Improved bounds for Erd˝os matching conjecture, J. Combin. Theory Ser. A, 120 (2013), 1068-1072. [9] P. Frankl, On maximum number of edges in a hypergraph with given matching number, Discrete Appl. Math., 216 (2017), 562-581. [10] P. Frankl, Proof of the Erd˝os matching conjecture in a new range, Israel J. Math., 222 (2017), 421-430. [11] P. Frankl, T.Luczak and K. Mieczkowska, On matchings in hypergraphs, Electron. J. Combin., 19 (2012), #R42. [12] P. Frankl and A. Kupavskii, The Erd˝os matching conjecture and concentration inequalities, arXiv:1806.08855. [13] P. Frankl and A. Kupavskii, Simple juntas for shifted families, Discrete Analysis 2020:14, 18 pp. arXiv:1901.03816. [14] P. Frankl and V. R¨odl, Near perfect covering in graphs and hypergraphs, European J. Combin., 6(4) (1985), 317-326. [15] H. Huang, P. Loh and B. Sudakov, The size of a hypergraph and its matching number, Combin. Probab. Comput., 21 (2012), 442-450. [16] F. Joos and J. Kim, On a rainbow version of Diracs theorem, Bull. London Math. Soc., 52 (2020) 498-504. [17] N. Keller and N. Lifshitz, The Junta method for hypergraphs and the Erd˝os-Chv´atal simplex conjecture, arXiv:1707.02643. [18] S. Kiselev and A. Kupavskii, Rainbow matchings in k-partite hypergraphs, Bull. London Math. Soc., https://doi.org/10.1112/blms.12423 [19] H. Lu, X. Yu and X. Yuan, Nearly perfect matchings in uniform hypergraphs, arXiv:1911.07431. [20] H. Lu, X. Yu and X. Yuan, Rainbow matchings for 3-uniform hypergraphs, arXiv:2004.12558. [21] H. Lu, Y. Wang and X. Yu, A better bound on the size of rainbow matchings, arXiv:2004.12561. [22] T.Luczak and K. Mieczkowska, On Erd˝os’ extremal problem on matchings in hypergraphs, J. Combin. Theory Ser. A 124 (2014), 178-194. [23] L. Pyber, A new generalization of the Erd˝os-Ko-Rado theorem, J. Combin. Theory Ser. A, 43 (1986), 85-90.

16