arXiv:2012.14992v2 [math.CO] 16 Jan 2021 hscniinol for only condition this hr xssatasesl(u-emtto umti ihdist with submatrix n (sub-permutation transversal a exists there nfr yegah aho size of each , uniform odbtensome between hold hscnetr a teghndto: strengthened was conjecture this fteiett of identity the if edntduigodnr aetee,s ntentto ( notation the in so parentheses, ordinary using denoted be hti,i saset a is it is, That etoe,i en hti s2. is it that means it mentioned, okdo eto ftepaper. 075-15 the no. of 3 MegaGrant Section of on framework worked the in Federation Russian h ai kdwk-ui rn gemn o 823748. no. Scien agreement pap res Israel grant This 2020 Skldowska-Curie Horizon the Technion. Marie Union’s the by the European at the part Chair from in funding Bank received Discount supported the was and Aharoni 2023464 R. of search h eerho .Zri a upre yNFgatDMS-1953 grant NSF 2016077. by supported was Zerbib S. of research The [email protected] [email protected] − NTEAAOIBRE OJCUEFRGENERAL FOR CONJECTURE AHARONI-BERGER THE ON o integers For eakoldetefiaca upr rmteMnsr fEdu of Ministry the from support financial the acknowledge We aoscnetr fRsrBuliSen[,1]i hti an in that is 13] [8, Ryser-Brualdi-Stein of conjecture famous A ie family a Given o hrn:Dprmn fMteais ehin Israel. Technion, Mathematics, of Department Aharoni: Ron A h uhr eespotdb SIre iainlScience Binational US-Israel by supported were authors The l egr eateto ahmtc,Uiest fHaifa of University Mathematics, of Department Berger: Eli ai hdosy eateto ahmtc,PictnUn Princeton Mathematics, Univer of State Iowa Mathematics, of Department Department Zerbib: Shira Chudnovsky: Maria ,adta for that and 1, family O HRN,EIBRE,MRACUNVK,ADSIAZERBIB SHIRA AND CHUDNOVSKY, MARIA BERGER, ELI AHARONI, RON yegah.For . oe on of bound lower Abstract. xeddt lentn ah ol rv the prove would paths alternating to extended n smttcrsls u n rbe ean btnt:pro obstinate: remains problem one but results, asymptotic rp fbprie n hntemthnsaedson.W p We disjoint. are matchings the when of and bound bipartite, if graph fsize of naygahhv ano acigo size of rainbow a have graph any in (or n ,b ,r c, b, a, collection aearibwmthn fsize of matching rainbow a have S 3 2 S n scerfo h otx)i h ag faprilcoc function. choice partial a of range the is context) the from clear is { ojcueo h rttoatosi that is authors two first the of conjecture A n x a − ( = i i d hr xssataseslo size of transversal a exists there odd j .Gvnafamily a Given s. ,ipoigo h trivial the on improving 1, 3 . 4 n | ewie( write we { S r 1 C − samlie,nml lmnsmyrpa.Fmle will Families repeat. may elements namely multiset, a is ) 1 priehprrps ewie( write we hypergraphs, -partite 3 S , . . . , ≤ . O C , 1.W lopoearsl nribwpts htif that paths, rainbow on result a prove also We (1). i 5 1 } fe rpsadfrdson acig eoti a obtain we matchings disjoint for and graphs -free i < 1. n b ,b a, fst,an sets, of ) a ano acigo size of matching rainbow a has , 2 Introduction GRAPHS i < . . . < ) → H r 1 c fst,w write we sets, of feeyfml of family every if n m S − 2 1 ≤ n ribwset -rainbow o n n naaoosrsl for result analogous an and , ( n n n − } .Ti skonwe the when known is This ). − ac n noainpormunder program innovation and earch o where , ( .Teeaeqieafew a quite are There 1. n 21-96we h rtauthor first the when -2019-1926 conjecture. ) iy USA. sity, eFudto IF rn no. grant (ISF) Foundation ce ri ato rjc hthas that project a of part is er 929. onain(S)gatno. grant (BSF) Foundation [email protected]. n ethat ve n ,b a, ainladSineo the of Science and cational a kHk acig fsize of matchings n[]tefis atof part first the [1] In . x i o ut“ano set” “rainbow just (or i ) a | j ntsmos fsize of symbols) inct i oealower a rove → ∈ acig nan in matchings n [email protected] for ∈ n matchings r P S × c I i fw demand we If . qaiymay equality ) P j n c vriy USA, iversity, If . (1 ai square Latin H ∈H ≤ Israel. , r j | H h re- The ≤ snot is | . m r ). - . 2 RON AHARONI, ELI BERGER, MARIA CHUDNOVSKY, AND SHIRA ZERBIB

Conjecture 1.1 (Aharoni-Berger [1]). (n,n) n 1. → − In [1] this was conjectured only for bipartite graphs, but there is no counterex- ample known also for general graphs. Here are some known facts: (F1) (n, 3 n) P n [5]. 2 → (F2) (n, 3 n + o(n)) n [9]. 2 → (F3) (2n 1,n) P n (The Latin rectangle case was proved in [10], the general case− in [1]).→ (F4) 2n 1 matchings in a , of respective sizes 1, 2, 3,...,n 1,n,n,...,n− (n is repeated n times) have a rainbow matching of size n. [6].− (F5) (n,n) P n √n [14]. → − (F6) ( k+2 n (k + 1),n) P n k [7]. ⌊ k+1 ⌋− → − (F7) (3n 3,n) n [3]. (F8) 2n matchings− → of size n have a rainbow set with a fractional matching of size n [4]. (F9) (n,n + o(n)) P n [12]. (F10) n disjoint matchings→ of size n + o(n) in any graph have a rainbow matching of size n. [11]. It was conjectured in [7] and in [1] that (2n,n) n. This would follow, in particular, from Conjecture 1.1. → The subject of this paper is the following weakening of Conjecture 1.1, that extends (F5) to general graphs: Conjecture 1.2. (n,n) n o(n). → − This would follow from: Conjecture 1.3. (n,n + o(n)) n. → n In r-uniform hypergraphs a greedy argument yields (n,n) r r . We shall n 1 → ⌈ ⌉ improve this to (n,n) r r− 1 + O( r ). In the case r = 2, the explicit calculation → 2 yields (n,n) 2 n 4 . This improves upon the result (n,n) 2 n o(n), that → 3 − 3 → 3 − follows from (F2). When the graph is C3, C5 -free or the given matchings are disjoint, the bound can be improved to 3{n O(1):} 4 − Theorem 1.4. 2 4 (1) (n,n) 3 n 3 . → −−1 − 3 n 2 4r−6 (2) (n,n) r r− 1 . → 2 (3) If = (F1,...,Fn) is a family of matchings of size n in a C3, C5 -free graph,F then there exists a rainbow matching of size at least 3 n{ 9 . } 4 − 4 (4) If = (F1,...,Fn) is a family of disjoint matchings of size n in a graph, thenF there exists a rainbow matching of size at least 3 n 9 . 4 − 2 Note that (F10) implies that n pairwise disjoint matchings of size n admit a rainbow matching of size n o(n). Theorem 1.4(4) improves this bound only for finitely many n’s. Theorem− 1.4 is proved in Section 2.

Question 1.5. Does there exist a function f(r) such that (n,n) r n f(r)? → − The proof of (F5) uses alternating paths. Extending that proof to general graphs will require proving the following: ON THE AHARONI-BERGER CONJECTURE FOR GENERAL GRAPHS 3

Conjecture 1.6. Let G be a graph and let M be a matching in G. Any family of sets of disjoint augmenting M-alternating paths in G, with > 2 M paths,H has a strongly rainbow augmenting M-alternating path, namelykHk an augmenting| | M- alternating path whose edges edges are chosen from paths in different sets in . H Assume the conjecture is true. We claim then that (n,n) n √2n . Let → −⌊ ⌋ F1,...,Fn be matchings of size n in a general graph. Let M be a maximal size rainbow matching. We claim that M n √2n. Assume for contradiction that | |≥ − M √2n, implying that the symmetric difference ∈ | |−| | M Fi contains a set Hi of √2n disjoint augmenting M-alternating paths. Let △ 2 = (Hi, i I). Then > √2n = 2n > 2 M , and by the conjecture there existsH a strongly∈ rainbowkHk augmenting M-alternating| | path P . Then M P is a rainbow matching larger than M , a contradiction. △ In Section 3 we prove a version| of| Conjecture 1.6 with ordinary (non-alternating) paths replacing augmenting M-alternating paths – a possible first step. Notation 1.7. An end of a proof of a subsidiary argument in a proof is marked by . ♦ 2. Proof of Theorem 1.4 2.1. Definitions and lemmas. Definition 2.1. Two sets of edges, A, B are orthogonal if a b = 1 for every a A, b B. | ∩ | ∈ ∈ The following lemma is (up to niceties) a well-known fact, usually expressed as “there do not exist n mutually orthogonal Latin squares of order n”.

Lemma 2.2. Let M0,M1,...,Mt be mutually orthogonal matchings in an r-uniform hypergraph, where M = h and Mi = r for 1 i t. Then t r. 0 { } | | ≤ ≤ ≤ Proof. Let e M and let u e h. Since the edges in Mi meet e at distinct ∈ 1 ∈ \ vertices, each Mi, 2 i t, contains an edge ei meeting h at u. Orthogonality ≤ ≤ implies that the edges ei, 2 i t, meet h at distinct vertices in h e, and hence their number t 1 is at most≤ h≤ e = r 1. \  − | \ | − The proofs of all four parts of Theorem 1.4 start the same way. Let = F (F1,...,Fn) be a collection of matchings of size n in an r-uniform hypergraph (in the last three parts of the theorem r = 2). Let R be a rainbow matching of maximal size, say q. Let be the collection of matchings in not represented in R. G F Given G and e R we say that e is G-wasteful if either (1) e meets at most r 1 edges∈ from G G (meaning∈ e is not using its full hitting potential with respect to−G), or (2) there exists an edge g G meeting both e and another edge f R (meaning e is not essential for hitting∈ g). For an edge e R let T (e) be the set∈ of matchings G for which e is non-G-wasteful. By the definition∈ of “wastefulness” the following∈ holds: G

( ) G T (e) if and only if there exist r edges in G intersecting e and not intersecting∗ ∈ any other edge of R. 4 RON AHARONI, ELI BERGER, MARIA CHUDNOVSKY, AND SHIRA ZERBIB

For a matching G let T G be the set of edges e R such that G T (e). Write t(G)= T G . ∈ G ∈ ∈ | | Lemma 2.3. T (e) r for every e R. | |≤ ∈ Proof. Suppose there are r + 1 matchings in T (e). For each G T (e) let Ge be ∈ the set of edges of G meeting e. Then Ge is a matching of size r orthogonal to e. By Lemma 2.2 there exist A, B T (e) such that Ae,Be are not cross-intersecting, ∈ meaning that there are a Ae and b Be, such that a b = . Since A, B T (e), a and b do not intersect any∈ edge in∈R e . Then R∩ a,b∅ e is a rainbow∈ matching, and it is larger than R, contradicting\{ } the maximality∪{ }\{ of R}. 

Lemma 2.3 implies (1) T (e) rq. X | |≤ e∈R

2.2. Parts (1) and (2) of Theorem 1.4. Given t = t(G), the maximal size of G is attained when the edges in R T G are arranged in pairs, so that the two edges in each pair meet at most 2r 1\ distinct edges of G, and the last edge, if it exists (namely if R is odd), meets at− most r 1 additional edges of G. Since R is a cover for G, this implies− S 1 1 n = G rt + (q t)(r )= qr (q t). | |≤ − − 2 − 2 − So, t 2n 2qr + q. Summing up over all G and changing the order of summation,≥ we− get ∈ G T (e) = T G (2n q(2r 1)) = (2n q(2r 1))(n q). X | | X | |≥ − − |G| − − − e∈R G∈G Combining this with (1) yields (2n q(2r 1))(n q) rq. − − − ≤ Rearranging, we get (2r 1)q2 (n +2rn + r)q +2n2 0. − − ≤ Solving for q, we have q q , where ≥ 1 n +2rn + r (n +2rn + r)2 8(2r 1)n2 (2) q = − p − − . 1 2(2r 1) − Let ∆ = (n +2rn + r)2 8(2r 1)n2 − − = n2(4r2 12r +9)+ n(4r2 +2r)+ r2 − be the discriminant in (2). Completing ∆ to a square entails 2r2 + r 2 ∆

Thus

n +2rn + r √∆ q = − 1 2(2r 1) − n +2rn + r n(2r 3) r 2 6 > − − − − − 2r−3 2(2r 1) − n 1 3 = − 2 − 4r−6 . r 1 − 2 This shows n 1 3 (3) q> − 2 − 4r−6 , r 1 − 2 proving Part (1) of Theorem 1.4. Part (2) is obtained by plugging in r = 2.

2.3. Additional definitions. For the proofs of parts (3) and (4) of Theorem 1.4 we need additional definitions. For a matching G , we say that a pair of edges ∈ G e,f in R is half-G-wasteful if there are three edges ge,gf ,gef G satisfying the {following:} ∈

ge intersects e and no other edge in R, • gf intersects f and no other edge in R, and • gef intersects both e and f. • We also say then that each of e and f are half-G-wasteful. Denote by HW (e) the set of all G for which the edge e R is half-G-wasteful. Let W G be the set of edges e R∈such G that G HW (e), and∈ write w = W G . Let B∈be the bipartite∈ graph with respective sides| |and R, in which G is adjacent to e R if and only if e HW (G). Then G ∈ G ∈ ∈

(4) HW (e) = degB(e)= E(B) . X | | X | | e∈R e∈R

Let NB(e) be the neighborhood of e R in the graph B. The maximal size of G is attained∈ when the edges in R (T G W G) are arranged in triples, so that∈ the G three edges in each triple meet at mo\ st four∪ distinct edges of G. Since R is a cover of every G , we have S ∈ G 3 4 n = G 2t + w + (q t w), | |≤ 2 3 − − implying 3n 4q 2t + w . Summing over all G we obtain − ≤ 2 ∈ G 1 1 2 T (e) + HW (e) = (2 T G + W G ) X | | 2 X | | X | | 2| | (5) e∈R e∈R G∈G (3n 4q) (3n 4q)(n q). ≥ − |G| ≥ − − 6 RON AHARONI, ELI BERGER, MARIA CHUDNOVSKY, AND SHIRA ZERBIB

2.4. Proof of Part (3) of Theorem 1.4. Assume the conditions of Part (3) of n Theorem 1.4 hold, namely that there is no C3 or C5 in Fi. Si=1 Lemma 2.4. T (e) =1, hence T (e) q. | | Pe∈R | |≤ Proof. Assume G, H T (e). Let g,g′ G and h,h′ H be edges intersecting e and not any other edge∈ in R, such that g,h∈ meet at the∈ same vertex of e. Since the graph contains no triangles, the set (R e) g,h′ is a rainbow matching of size q + 1, contradicting the maximality of R\. ∪{ } 

Lemma 2.5. Let f R and ge,gf ,gef G be edges witnessing the fact that ∈ ′ ′ ∈ ′ ′ G HW (e). Suppose G , G = G , and there exists ge G intersecting e in ∈ ∈ G 6 ∈ ′ one vertex and not intersecting any other edge in R. Then ge g e = . ∩ e ∩ 6 ∅ ′ Proof. We have to show that ge and ge meet e at the same vertex. If not, then since ′ the graph contains no triangles, the set (R e) ge,ge is a rainbow matching of size q + 1, contradicting the maximality of \R. ∪{ }  Lemma 2.6. HW (e) 2q. Pe∈R | |≤ Proof. By (4) it is enough to show E(B) 2q. | |≤ Claim 2.7. Let G , G and e,f R. If (e,f) is a half-wasteful pair for both 1 2 ∈ G ∈ G1, G2 then degB(e)=2.

Proof of the claim. Clearly, degB(e) 2 since G , G NB(e). Assume to the ≥ 1 2 ∈ contrary that NB(e) contains G so that G = G , G . Then by Lemma 2.5 3 ∈ G 3 6 1 2 the edges in G1, G2, G3 that meet only e intersect at the same vertex of e. Since the graph does not contain C3, this implies that the edges in G1, G2 that meat both e and f coincide. Let a G1 be an edge meeting only f in R, let b G2 be an edge meeting e,f in R, and∈ let c G be an edge meeting only e in R. Note∈ that a,c do not intersect ∈ 3 since the graph contains no C5. Replacing e,f in R with a,b,c we obtain a rainbow matching of size q + 1, a contradiction. ♦ Let D = e R degB(e) 3 . { ∈ | ≥ } Claim 2.8. For every e D there exists a subset S(e) R with the following properties: ∈ ⊆

(1) S(e) = degB(e). | | (2) For every f S(e), degB(f)=1. (3) S(e) S(f)=∈ whenever e,f D and e = f. ∩ ∅ ∈ 6 Proof of the claim. Let e D and write d = degB(e). Let NB(e)= G ,...,Gd , ∈ { 1 } and let f ,...,fd R be edges such that (e,fi) is a half-Gi-wasteful pair. Let 1 ∈ S(e)= f ,...,fd . { 1 } To prove (1), we have to show that fi = fj if i = j. Indeed, if f := fi = fj 6 6 then (e,f) is a half-wasteful pair for both Gi, Gj , implying by Claim 2.7 that deg (e) = 2, contradicting the fact that e D. B ∈ To prove (2), we show that degB(fi) = 1 for every i. First, Gi is adjacent to fi in B, showing degB(fi) 1. Assume for contradiction that there exists G , ≥ ∈ G G = Gi, so that fi is also a half-G-wasteful edge. Let j [d] so that Gj = Gi, G 6 ∈ 6 (such j exists since d 3). Let a Gi, b Gj be edges meeting only e in ≥ ∈ ∈ R. Let c Gi be an edge meeting both e,fi. Let d Gi and g G be edges ∈ ∈ ∈ ON THE AHARONI-BERGER CONJECTURE FOR GENERAL GRAPHS 7 meeting only f in R. Then by Lemma 2.5, a,b meet e at the same vertex and d, g meet f at the same vertex. Since the graph contains no C3, this implies that b c = c g = . Since the graph contains no C5, we have also b g = , implying that∩ (R ∩ e,f ∅) b,c,g is a rainbow matching of size q + 1, a∩ contradiction.∅ To prove\{ (3),} let∪{e = f} D and suppose h S(e) S(f). Let G HW (e,h) 6 ∈ ∈ ∩ 1 ∈ and G HW (f,h). Since G is a matching G = G . Let G NB(e) so that 2 ∈ 1 1 6 2 3 ∈ G3 = G1, G2 (it exists because degB(e) 3). By Lemma 2.5, the edges in G1, G2 meeting6 only h intersect at the same vertex≥ of h. Let b G be an edge meeting ∈ 2 only h in R, let a G1 be an edge meeting e,h, and let c G3 be an edge meeting only e in R. Again,∈ a b = a c = for otherwise we have∈ a C , and b c = for ∩ ∩ ∅ 3 ∩ ∅ otherwise we have a C5. Then like before, replacing e,h in R by a,b,c results with a larger rainbow matching, a contradiction. ♦ For i =1, 2 let Ui = e R degB(e)= i , and let U = D = R (U U ). For { ∈ | } 3 \ 1 ∪ 2 i [3] let Ei be the set of edges in B adjacent to a vertex in Ui. ∈By Claim 2.8 E U = E . Therefore, | 3| ≤ | 1| | 1| 3 3 E(B) = Ei 2 E + E 2 Ui 2q. | | X | |≤ | 1| | 2|≤ X | |≤ i=1 i=1 This completes the proof of the lemma.  Combining (5) with Lemmas 2.4 and 2.6 we get (3n 4q)(n q) 3q, − − ≤ entailing q> 3n 9 . This completes the proof of Part (3) of the theorem. 4 − 4 2.5. Proof of Part (4) of Theorem 1.4. Assume the conditions of Part (4) of Theorem 1.4 hold. That is, the matchings F1,...,Fn are pairwise disjoint. For e R, let Ee be the set of edges g HW (e) intersecting e and no other edge in R∈. ∈ S

Lemma 2.9. Suppose e R has degB(e) 3. Then all the edges in Ee intersect ∈ ≥ e at the same vertex (i.e., Ee e = ). T ∩ 6 ∅ Proof. Write e = uv. Let G1, G2, G3 be three distinct matchings in HW (e), and let gi Gi be an edge intersecting e and no other edges in R. It is enough to show ∈ that g1,g2,g3 meet e at the same vertex. Assume g1,g2 meet e at v, and g3 meets e at u. Since G , G are disjoint, g = g , and thus g cannot meet both g and g . 1 2 1 6 2 3 1 2 Say g1 g3 = . Then the set (R e) g1,g3 is a rainbow matching of size q + 1, contradicting∩ the∅ maximality of R\. ∪{ } 

Let D = e R degB(e) 5 . { ∈ | ≥ } Lemma 2.10. For every e D there exists a subset S(e) R with the following properties: ∈ ⊆ (1) S(e) degB (e) . | |≥ 2 (2) For every f S(e), degB(f) 2. (3) If e,f D and∈ e = f, then S≤(e) S(f)= . ∈ 6 ∩ ∅ Proof. Let e D and write d = degB(e). Let NB(e) = G ,...,Gd , and let ∈ { 1 } f ,...,fd R be edges so that (e,fi) is a half-Gi-wasteful pair. Let S(e) = 1 ∈ f ,...,fd . { 1 } 8 RON AHARONI, ELI BERGER, MARIA CHUDNOVSKY, AND SHIRA ZERBIB

To prove (1) it is enough to show that there do not exist three indices j,k,ℓ [d] ∈ such that fj = fk = fℓ. Assume for contradiction that such j,k,ℓ exist, and let i i i f := fj = fk = fℓ. For i j,k,ℓ , let ge,gf ,gef Gi be edges witnessing the fact ∈{ } ∈ j k ℓ that (e,f) is a half-Gi-wasteful pair. By Lemma 2.9, ge ge ge e = , implying j j ∩ ∩ ∩ 6 ∅ g gk gℓ e = . Since the edges g ,gk ,gℓ meet also f, at least two of them ef ∩ ef ∩ ef ∩ 6 ∅ ef ef ef must be equal, contradicting the fact that the matchings are pairwise disjoint. To prove (2), let f S(e) and assume degB(f) 3. Let H HW (e,f), with ∈ ≥′ ∈ edges he,hf ,hef H witnessing this fact. Let G, G HW (f) be two matchings ∈ ∈ different than H. By Lemma 2.9, all the edges in Ef meet f hf , and all the edges ∩ in Ee meet e he. In particular, no edge in Ef Ee intersects hef . ∩ ′ ′ ∪′ Let g Ef G and g Ef G . Then g,g are distinct. Since degB(e) 4, ∈ ′ ∩ ′′ ∈ ∩ ≥ ′ Ee (H G G ) contains at least one edge. Thus there exist edges a g,g \ ∪ ∪ ′ ′′ ∈ { } and b Ee (H G G ) such that a,b do not intersect. Replacing e,f in R with ∈ \ ∪ ∪ a,b and hef , we get a larger rainbow matching, a contradiction. To prove (3), let e = f D and suppose h S(e) S(f). Let A HW (e,h) 6 ∈ ∈ ∩ ∈ and B HW (f,h). Since A, B are matchings, A = B. Let ae,ah,aeh A and ∈ 6 ∈ bf ,bh,bfh B be edges witnessing A HW (e,h) and B HW (f,h), respectively. ∈ ∈ ∈ By Lemma 2.9, all the edges in Ee meet e at the same vertex, and all the edges in Ef meet f at the same vertex. Split into two cases.

Case 1: The edges ah and bh intersect h at the same vertex. Since Ee ae,be 2 there exists an edge in c Ee ae,be not intersecting bh. | \{ }| ≥ ∈ \{ } Thus (R bh,aeh,c ) e,h is a larger rainbow matching, a contradiction. ∪{ } \{ } Case 2: The edges ah and bh intersect h at two different vertices. In this case aeh,bfh do not intersect, and clearly, no edge in Ee Ef intersect ∪ either aeh or bfh. Since degB(e),degB(f) 5, there exist edges c Ee ae,be ≥ ∈ \{ } and d Ef af ,bf so that c,d,aeh,bfh is a rainbow matching in . Thus ∈ \{ } { } G (R c,d,aeh,bfh ) e,f,h is a rainbow matching of size q+1, a contradiction.  ∪{ } \{ } Lemma 2.11. HW (e) 4q Pe∈R | |≤ Proof. For i [4] let Ui be the set of edges in R of i in B, and let U = D. ∈ 5 For i [5], let Ei be the set of edges in B adjacent to a vertex in Ui. By Lemma 2.10 we∈ have, E 2( U + U ). | 5|≤ | 1| | 2| Therefore,

5 4 5 E(B) = Ei i Ui + 2( U + U ) 4 Ui 4q. | | X | |≤ X | | | 1| | 2| ≤ X | |≤ i=1 i=1 i=1 This completes the proof of the lemma. 

Combining (1), (5) and Lemma 2.11 we get (3n 4q)(n q) 6q, − − ≤ 3n 9 implying q > 4 2 and proving Part (4). This completes the proof of Theorem 1.4. − ON THE AHARONI-BERGER CONJECTURE FOR GENERAL GRAPHS 9

3. Strongly rainbow paths A main tool used in the study of rainbow matchings is alternating paths. For example, among facts (F1-F10) listed in the first section, only for two, (F4) and (F8), there is no alternating paths proof known (the existing proofs use topology). Often the proof goes through results on rainbow directed paths. To state the latter, we need some definitions. Definition 3.1. Given two sets S,T of vertices, a directed path P is called an S T -path if V (P ) (S T ) = in(P ),ter(P ) and in(P ) S, ter(P ) T . (here− and elsewhere ∩in(P )∪ and ter{(P ) are the initial} and terminal∈ vertices of∈ P , respectively). Definition 3.2. Let be a family of (not necessarily distinct or disjoint) sets of paths. A path is calledH strongly rainbow if each of its edges is chosen from a path belonging to a different F . ∈ H This is double rainbow-ness: a rainbow set of edges, one from each path in a rainbow set of paths. A similar definition applies to alternating paths. Definition 3.3. Let M be a matching in a graph, and let be a family of sets of M-alternating paths. An M-alternating path is called stronglyH -rainbow if its non-M edges are taken from paths in distinct sets H . H ∈ H Here is a list of known facts about rainbow paths. Part (3) was proved in [2], and the others are taken from [6]. In the next theorem and its proof we shall use the following notation. G is an undirected graph (though the paths in it that we consider are directed), M a matching in G, S,T V (G) and Y = V (G) (S T ). ⊆ \ ∪ Theorem 3.4. (1) Let F be a set of directed S T paths. If S T = and F > Y then there exists a directed S T −rainbow path. ∩ ∅ | | | | (2) Suppose G is bipartite. Let− F be family of augmenting M-alternating paths with F > M . Then there exists a rainbow augmenting M-alternating path. | | | | (3) If F is a family of M-alternating paths with F > 2 M then there exists a rainbow augmenting M-alternating path. | | | | (4) (A strengthening of (1)): Let be a family of sets of disjoint directed S T paths. If > Y then thereH exists a directed strongly rainbow S T path.− (5) (CorollarykHk of (4)):| |If G is bipartite, M is a matching, is a family− of sets of sets of disjoint augmenting M-alternating paths andH > M then there exists a strongly rainbow augmenting alternating patkHkh. | | All these are sharp. For example, the sharpness of (4) is shown by the family H consisting of the path sv v ...vmt repeated m times (here S = s ,T = t ). 1 2 { } { } Theorem 3.5. Let the vertex set of a graph be partitioned into two sets, S, Y . Let be a family of sets of disjoint S S paths. If > 2 Y then there exists a stronglyH rainbow S S path. − ||H|| | | − This is sharp, as shown by the following construction. Let S = u, v , and let { } Y = y ,...,ym . Let = ( i, i 2m) where Hi consists of the single path { 1 } H H ≤ uy y ...,ymv for i m, and of the single path vymym− ...,y v for m

For a rooted tree G and a vertex v on it we denote by Gv the path on G from the root to v. For a forest whose components are rooted trees and a vertex v V ( ), we write v for theF path Gv, where G is the component of containing v.∈ Similarly,F vG denotesF the sub-tree of G rooted at v. If K,L areF trees sharing a vertex v, we denote by KvL the union of the path Kv and the tree vL. This definition does not imply that KvL is a tree, but in our applications it will be.

Definition 3.6. Let = (H ,H ,...,Hq) be an ordered family of (not necessarily H 1 2 distinct or disjoint) sets of paths. A strongly rainbow path e1e2 ...em (the eis being its edges, in the path’s order) is called rainbow monotone if ej E(Hi ) for ∈ j i1

(P1) At each step precisely one G~ (s) or one ~(s) grows, meaning that it is added j Zj a vertex from Y , not met as yet. ′ (P2) The tree G~(s) is rooted at s S, and V (G~ (s)) V (G~ (s )) = whenever j ∈ j ∩ j ∅ s = s′. 6 (P3) The union j of the trees G~ (s), s S, is a forest. G j ∈ (P4) For s S, the forest ~j (s) is the union of rooted trees, having a special form: ∈ Z ′ ′ ′ each tree in ~(s) has its root r in V (G~ (s )) for some s S, s = s, and its Zj j ∈ 6 other vertices in V (G~j (s)). We denote such a tree by Z~j (s, r). (P5) At each step a new vertex from Y is added either to ~ or to ~(s) for some Gj Zj s S. ∈ (P6) Edges are added to Z~(s, r) for ~i ~j only after the path ~r terminating at i ≥ Gj r has been constructed. (P7) The forests ~ and ~(s) are rainbow-monotone. Gj Zj (P8) If two trees, U ~(s ) and W ~(s ) meet, where s = s , then they ∈ Zj 1 ∈ Zj 2 1 6 2 share only one vertex, which is the root of at least one of them.

(The secret wish of the trees in ~j (s) is to reach s. If fulfilled, the path in Z′ ~r ~ (r, s) going from the the root s of the tree in ~ containing r to s, will then Gj Zj Gj be a rainbow S S path.) Combined, these− properties yield:

Claim 3.7. The path ~j r does not meet V (Z~j (s, r)) r , hence ~j rZ~j (s, r) is a tree. G \{ } G Having introduced the protagonists of the proof and their intended inductively preserved properties, let us describe the inductive construction. The preservation of the properties (P1)-(P8) will be mostly easy to validate - we comment only on those that are not obvious. Let consist of the singleton trees (s), s S, G(0,0) ∈ and let (s) = for every s S. Suppose ~ and ~(s), s S, have been Z(0,0) ∅ ∈ Gj Zj ∈ defined; let ~j+ = (k,i) be the index following ~j in the lexicographic order, and let ON THE AHARONI-BERGER CONJECTURE FOR GENERAL GRAPHS 11

i P = P . We shall use P to extend either ~ or ~(s) for some s S, maintaining k Gj Zj ∈ monotonicity. Below we assume, for contradiction, that such an extension is not possible.

Claim 3.8. V (P ) V ( ~ ). ⊆ Gj If not, the first edge on P leaving V ( ~) could be added to ~. Gj Gj ♦ Claim 3.9. The forests ~ , as well as the trees ~rZ~(s, r), are rainbow-monotone. Gj Gj j k Proof of the claim. In the construction we go over the paths Pi one by one. When k k an edge e from Pi is added, it is at the top of a tree. When we get to Pj , j>i, k k we cannot put an edge from it right after e, because Pi and Pj are vertex disjoint. t So e will be put on top of a path in a tree, that consists of edges from Pz for t < k. This explains the monotonicity of both ~(s) and Z~(s, r). By (6) it follows that Gj j their concatenation ~rZ~(s, r) it is also rainbow-monotone. Gj j ♦ Claim 3.10. If s S then s V ( ~(s)). ∈ 6∈ Zj Indeed, if s V (Z~(s, r)) then the path ~ rZ~(s, r)s terminating at s is a rainbow- ∈ j Gj j monotone S S path. − ♦

Let t = ter(P ). By Claim 3.10, t V ( ~(t)). Let v be the first vertex on P that 6∈ Zj belongs to V (G~(t)) V ( ~(t)), and let u be the vertex preceding it on P . We now j \ Zj add the edge uv to the forest ~(t). There are two possible cases. Zj Case I. u V (G~ (t)). Then the edge uv is added to the existing tree in ~(t) ∈ j Zj containing u.

Case II. u V (G~ (t)). It is possible that u has been used already as a root of 6∈ j a tree Z~(t,u) in ~(t). In this case we add the edge uv to Z~(t,u). Otherwise, a j Zj j new tree Z~+ (t,u) is created in ~+ (t), consisting of the single edge uv. j Zj Note that in any of this cases ~ (t) is enlarged by the vertex v. Zj Since each step uses one path from , and since at each step either a rainbow S H S S path emerges, or one of the forests ~ or ~ annexes a vertex of Y , it follows − Gj Zj that 2 Y , as desired.  kHk ≤ | | References

[1] R. Aharoni and E. Berger, Rainbow matchings in r-partite r-graphs, Electron. J. Combin 16 (2009), no. 1. [2] R. Aharoni, E. Berger, M. Chudnovsky, D. Howard, P. Seymour, Large rainbow matchings in general graphs, European J. Combin. 79 (2019), 222–227 [3] R. Aharoni, J. Briggs, J. Kim and M. Kim Rainbow paths and rainbow matchings in graphs, arXiv:2004.0759. [4] R. Aharoni, R. Holzman and Z. Jiang, Rainbow fractional matchings, Combinatorica 39 (2019), 1191–1202. [5] R Aharoni, D Kotlar and R Ziv. Representation of large matchings in bipartite graphs, SIAM Journal of Discrete Mathematics 31 (2017) 1726–1731. [6] R. Aharoni, D. Kotlar and R. Ziv, Uniqueness of the extreme cases in theorems of Drisko and Erd˝os-Ginzburg-Ziv. European J. Combin. 67 (2018), 222–229. [7] J. Bar´at, A. Gy´arf´as, G. S´ark¨ozy, Rainbow matchings in bipartite multigraphs, Period. Math. Hung. 74 (2017) 108–111. 12 RON AHARONI, ELI BERGER, MARIA CHUDNOVSKY, AND SHIRA ZERBIB

[8] R. A. Brualdi and H. J. Ryser, Combinatorial Matrix Theory, Cambridge UniversityHow Many Colors Guarantee a Rainbow Matching?How Many Colors Guarantee a Rainbow Matching? Press, Cambridge, UK, 1991. [9] D. Clemens and J. Ehrenm¨uller, An improved bound on the sizes of matchings guaranteeing a rainbow matching. Electron. J. Combin. 23 (2016), no. 2. [10] A. A. Drisko, Transversals in row-latin rectangles, J. Combin. Theory, Ser. A 84 (1998) 181–195. [11] P. Gao, R. Ramadurai, I. Wanless and N. Wormald, Full rainbow matchings in graphs and hypergraphs, arXiv:1709.02665. [12] A. Pokrovskiy, An approximate version of a conjecture of Aharoni and Berger. Adv. Math. 333 (2018), 1197–1241. [13] S. K. Stein, Transversals of Latin squares and their generalizations, Pacific J. Math. 59 (1975), 567–575. [14] D.E. Woolbright, An n n has a transversal with at least n √n distinct × − elements, J. Combin. Theory, Ser. A 24 (1978), 235–237.