Rainbow Hamiltonicity in uniformly coloured perturbed digraphs

We investigate the existence of a rainbow Hamilton cycle in a uniformly edge-coloured randomly perturbed digraph. We show that for every $\delta \in (0,1)$ there exists $C = C(\delta)>0$ such that the following holds. Let $D_0$ be an $n$-vertex digraph with minimum semidegree at least $\delta n$ and suppose that each edge of the union of $D_0$ with the random digraph $D(n, p)$ on the same vertex set gets a colour in $[n]$ independently and uniformly at random. Then, with high probability, $D_0 \cup D(n, p)$ has a rainbow directed Hamilton cycle. This improves a result of Aigner-Horev and Hefetz (2021) who proved the same in the undirected setting when the edges are coloured uniformly in a set of $(1 + \varepsilon)n$ colours.


Introduction
Determining which minimum degree forces the containment of a given spanning subgraph is a central theme in extremal combinatorics.The prototypical example is Dirac's theorem [10], which says that for an n-vertex graph G the condition δ(G) ≥ n/2 is sufficient to guarantee that G is Hamiltonian, and that this minimum degree condition is best possible.The question has been investigated in the setting of digraphs as well.Here a natural notion of minimum degree is the minimum semidegree, denoted by δ 0 (D), which is the minimum over all in-and out-degrees of the vertices of D. Ghouila-Houri [15] proved a directed analogue of Dirac's theorem, showing that, if D is an n-vertex digraph with δ 0 (D) ≥ n/2, then D is Hamiltonian.Here by a digraph D being Hamiltonian we mean that D contains a directed Hamilton cycle, i.e. a Hamilton cycle with all edges oriented consistently.
On the other hand, one of the main pursuits in probabilistic combinatorics is understanding the minimum p such that G(n, p), the binomial random graph on [n] with edge probability p, contains a given The directed analogue of G(n, p), which we call the random directed graph and denote by D(n, p), is the random digraph on [n] where each ordered pair of distinct vertices forms a directed edge independently with probability p. McDiarmid showed [21] that the threshold for Hamiltonicity in D(n, p) is at most that of G(n, p), and Frieze [14] proved a directed analogue of the above result about Hamiltonicity of random graphs with minimum degree at least 2, from which it follows that log n/n is a sharp threshold for Hamiltonicity for directed random graphs as well.Recently, Montgomery [23] determined sharp thresholds for all possible orientations of a Hamilton cycle in D(n, p).
As an interpolation between the deterministic and probabilistic models, Bohman, Frieze and Martin [8] introduced the perturbed model for graphs and digraphs.Given a fixed δ > 0, let D 0 be a digraph on vertex set [n] with minimum semidegree at least δn.The perturbed digraph is D 0 ∪ D(n, p), i.e. it is the union of a digraph on vertex set [n] with minimum semidegree at least δn, and the random digraph D(n, p) on the same vertex set.The perturbed graph model is defined similarly as G 0 ∪ G(n, p), where G 0 is an n-vertex graph with minimum degree at least δn.In [8] they proved that there exists C > 0, depending only on δ, such that for each n-vertex digraph D 0 with minimum semidegree at least δn, the perturbed digraph D 0 ∪ D(n, C/n) has with high probability a directed Hamilton cycle.That is, for every digraph with linear minimum semidegree, adding linearly many random edges results in a graph that with high probability contains a directed Hamilton cycle.Up to the dependence on δ and C, this is best possible for all δ ∈ (0, 1/2), since the complete bipartite digraph with parts of size δn and (1 − δ)n, with each edge appearing with both orientations, requires Ω(n) edges to be Hamiltonian.(When δ ≥ 1/2 no random edges are needed, due to Ghouila-Houri's theorem.)This was generalised very recently by Araujo, Balogh, Krueger, Piga and Treglown [5], who showed that with high probability the same hypotheses ensure that the perturbed digraph contains every orientation of a cycle of every possible length, simultaneously.
In this paper we consider a rainbow variant of the theorem of Bohman, Frieze and Martin.A subset of the edges of an edge-coloured graph or digraph is called rainbow if no two edges share a colour, and a subgraph is called rainbow if its edge set is rainbow.For a finite set of colours C, a graph or digraph is uniformly coloured in C if each edge gets a colour in C independently and uniformly at random.The problem of finding rainbow subgraphs of uniformly coloured graphs is well studied, in particular for G(n, p) [6,9,[11][12][13].The analogous problem in perturbed graphs was considered only more recently [1,2,4].In particular, the problem of containing a rainbow Hamilton cycle was first addressed by Anastos and Frieze [4], who showed that if the number of colours is at least about 120n, then G ∼ G 0 ∪ G(n, C/n) has a rainbow Hamilton cycle with high probability, for suitable C depending only on δ.Later, Aigner-Horev and Hefetz [1] improved this result by showing that, at the same edge probability in the random graph, (1 + ε)n colours suffice for every ε > 0 (where C now depends also on ε).We prove that the optimal number of colours suffices.
Theorem 1.1.For any δ ∈ (0, 1/2) there exists C > 0 such that the following holds.Let G 0 be an n-vertex graph with minimum degree at least δn and let G ∼ G 0 ∪ G(n, C/n) be uniformly coloured in [n].Then with high probability G contains a rainbow Hamilton cycle.
In fact, we can prove the corresponding result for uniformly coloured perturbed digraphs.
Theorem 1.2.For any δ ∈ (0, 1/2) there exists C > 0 such that the following holds.Let D 0 be an nvertex digraph with minimum semidegree at least δn and let D ∼ D 0 ∪ D(n, C/n) be uniformly coloured in [n].Then with high probability D contains a rainbow directed Hamilton cycle.
As explained above, for δ ∈ (0, 1/2), both results have the optimal edge probability, up to the dependence of C on δ.We remark that the first two authors proved Theorem 1.1 in unpublished work2 , using a somewhat simpler version of Lemma 3.1.Here, we will deduce Theorem 1.1 from Theorem 1.2 by a variation of McDiarmid's celebrated coupling argument [21] (see Section 3).
The paper is structured as follows.In Section 2 we sketch the proof of Theorem 1.2.In Section 3 we prove Theorem 1.2 assuming Lemma 3.1, the key lemma of the paper, and deduce Theorem 1.1 from Theorem 1.2.In Section 4 we state and prove some preliminary results that we will need later.Section 5 is the most technical, where we prove the existence of the 'gadgets' which underpin Lemma 3.1.In Section 6 we prove Lemma 3.1.We finish with some concluding remarks in Section 7.

Notation
).We will suppress D when the digraph in question is clear.We recall that the length of a (directed) path is the number of its edges.Given an edge-coloured digraph D, we denote the colour of an edge e by C(e) and the set of colours on the edges of a subdigraph D ′ by C(D ′ ).Moreover we say that Throughout the paper, we will assume that n is sufficiently large.Asymptotic notation hides absolute constants: if for some x, ε, n > 0 we write x = O(εn), then there is an absolute constant C > 0, which does not depend on x, ε, n or any other parameters, such that x ≤ Cεn.We write x = Ω(y) if y = O(x), and we write x = Θ(y) if both x = Ω(y) and x = O(y).For x, y ∈ (0, 1), we write x ≪ y if x < f (y) for an implicit positive increasing function f .

Proof sketch
Our proof uses the absorption method.This method is typically applicable when one searches for a spanning subgraph, and involves two stages: finding an almost spanning subgraph; and dealing with the remainder, by having a 'special' set of vertices, put aside at the beginning, that can cover any sufficiently small set of vertices.For finding the special set of vertices, we prove Lemma 3.1.It states that with high probability the perturbed digraph has a subgraph H abs such that, for any small sets of vertices V ′ and colours C ′ with |V ′ | = |C ′ |, disjoint from the vertices and colours of H abs the following holds: there exists a rainbow directed path Q with vertex set V ′ ∪ V (H abs ) and colours C ′ ∪ C(H abs ), whose ends can be chosen arbitrarily within V ′ .
Let us briefly sketch the proof of Lemma 3.1.We first put aside a subset of the vertices and a subset of the colours, which are typically called the 'reservoir' or the 'flexible set', that have the following property: for any sets of vertices and colours V ′ and C ′ of the same small size (much smaller than the reservoir) which are disjoint from the reservoir, we can find a rainbow directed path Q 0 that uses V ′ , C ′ , and a set of O(|V ′ |) vertices and colours from the reservoir.The question is then how to cover the rest of the reservoir; to this end, we build an 'absorbing structure' (H abs above) which has the following property: it can 'absorb' any subset of vertices and colours of the same size of the reservoir in a rainbow directed path Q abs .Then combining Q abs and Q 0 gives Q.
The 'absorbing structure' H abs is built by putting together several 'gadgets' or 'absorbers', graphs on Θ(1) vertices with the following property: each gadget has two directed paths with the same endpoints such that one avoids a designated vertex v and colour c in the reservoir, and the other one 'absorbs' v and c (see Figure 1 in Section 5).This absorbing structure is based on one that was introduced by Gould, Kelly, Kühn and Osthus [16] for constructing rainbow Hamilton paths in random optimal colourings of the (undirected) complete graph, which in turn is based on ideas of Montgomery [22].
3 Proof of Theorem 1.2 and Theorem 1.1 In this section we prove the main theorem, Theorem 1.2, and use it to deduce Theorem 1.1.We will use Lemma 3.1 below, which we prove in Section 6.
Let D 0 be a digraph on n vertices with minimum semidegree at least δn, and suppose that Then, with high probability, D contains a digraph H abs on at most γn vertices with the following property.For any The next lemma is a rainbow directed version of a commonly used consequence of the depth first search algorithm [7], which we will use to find an almost spanning rainbow directed path.The undirected version of the lemma was used in [12,Lemma 2.17] in the binomial random graph and in [1, Proposition 2.1] for finding a Hamilton cycle in the undirected perturbed graph.Lemma 3.2 can be proven by following almost verbatim the proof of [1, Proposition 2.1].Lemma 3.2 (cf.Proposition 2.1 [1] and Lemma 2.17 [12]).Let D be an n-vertex edge-coloured digraph.If every two disjoint sets of vertices X, Y of size k satisfy |C(E(X, Y ))| ≥ n, then D has a rainbow directed path of length at least n − 2k.
The next lemma can easily be proved using Chernoff's bound (cf.Theorem 4.1).
Then, with high probability, every two disjoint sets of vertices X, Y of size αn satisfy Our main theorem now follows easily from the previous three lemmas.
Proof of Theorem 1.2.Let η and γ satisfy Then, by Lemma 3.2, applied to the subgraph of D spanned by edges in ) be the set of vertices and colours used by neither H abs nor P 2 .Observe that Denote the first and last vertices of P 2 by x and y.Then by the property of H abs there exists a rainbow directed path Q from y to x, with The concatenation of P 2 and Q gives a rainbow directed Hamilton cycle, as desired.
Finally we prove Theorem 1.1.
Proof of Theorem 1.1.Let C be given by Theorem 1.2 such that for any digraph D 0 on [n] with minimum semidegree at least δn/4, the perturbed digraph with high probability a rainbow directed Hamilton cycle.Let N = n 2 and e 1 , . . ., e N be an enumeration of the edges of the (undirected) complete graph on [n].For each 0 ≤ i ≤ N , define a randomly edgecoloured digraph Γ i on [n] as follows, recalling that G 0 is an n-vertex graph with minimum degree at least δn, and writing e j = {x, y}.a) For j > i: 1.If e j ∈ E(G 0 ), then add both xy, yx to E(Γ i ), and colour both edges with the same colour, chosen uniformly in [n].
2. If e j / ∈ E(G 0 ), then add both xy, yx to E(Γ i ) together with probability C n , and colour both edges with the same colour, chosen uniformly in [n].b) For j ≤ i: The sequence is coupled, i.e.Γ i−1 and Γ i agree as probability spaces (but not as digraphs) on all edges apart from e i , for i ∈ where we view the undirected edges as two parallel directed edges.It is also easy to see that Γ N ∼ D 0 ∪ D(n, C 2n ) and it is uniformly coloured in [n], where D 0 is a random subgraph of G 0 , with each edge selected independently (as two parallel edges) with probability 1/3.Indeed, for e = {x, y} / ∈ E(G 0 ), clearly each of xy, yx is in E(Γ N ) independently with probability C 2n .For e ∈ E(G 0 ), with probability 1/3, both orientations of e are added to E(D 0 ), and each is coloured independently and uniformly in [n]; otherwise each orientation is added independently to E(Γ 0 ) with probability C 2n and coloured independently and uniformly in [n].A straightforward application of the union bound and Chernoff's bound implies that with high probability the minimum semidegree of D 0 is at least δn/4.Hence, by the choice of C, with high probability Γ N has a directed rainbow Hamilton cycle.We will show that for each i ∈ [N ] which then implies the theorem.
To this end, reveal the randomness on all edges apart from e i = xy, i.e. on all those edges that Γ i−1 , Γ i automatically agree on.There are three possibilities: 1. Γ i−1 ∪ {xy, yx} has no rainbow Hamilton cycle, irrespective of the colouring of xy, yx.Then, regardless of the outcome of e i , both Γ i−1 and Γ i have no rainbow Hamilton cycle.
2. Γ i−1 has a rainbow Hamilton cycle without using {xy, yx}.Then, regardless of the outcome of e i , both Γ i−1 and Γ i have a rainbow Hamilton cycle.
3. Both events above do not hold.In other words, Γ i−1 has a rainbow Hamilton cycle using one of xy, yx, for some choice of colours, but it has no rainbow Hamilton cycle that avoids both of xy, yx.
Conditioning on either of the first two cases, both Γ i−1 , Γ i have the same probability to have a rainbow Hamilton cycle.Conditioning on the third case, the probability that Γ i−1 has a rainbow Hamilton cycle is and the probability that Γ i has a rainbow Hamilton cycle is This shows that in either case the probability that Γ i−1 has a rainbow Hamilton cycle is at least as large as the probability that Γ i has one, thereby proving (1) and thus the theorem.

Preliminaries
Next we collect three preliminary results that we need: the Chernoff bound, Theorem 4.1; that random sparse subgraph of dense hypergraphs have large matchings, Lemma 4.2; and that in the perturbed digraph, between any two vertices, there is a large rainbow collection of directed paths of length three, Lemma 4.3.
Theorem 4.1 (Chernoff Bound, [17, eq.(2.8) and Theorem 2.8]).For every ε > 0 there exists c ε > 0 such that the following holds.Let X be the sum of mutually independent indicator random variables and write The next lemma, despite its technical appearance, proves the following straightforward statement: quite sparse random subgraphs of dense hypergraphs contain, with very high probability, a matching of linear size.A matching in a hypergraph is a collection of pairwise vertex-disjoint edges.The degree of a vertex v is the number of edges incident to v.
Lemma 4.2.Let 1/n ≪ ρ ≪ α, c, 1/r where r ≥ 2 is an integer.Let H be an r-uniform hypergraph on n vertices with at least αn r edges.
Writing m = cn, let H m be the random subgraph of H that consists of m edges of H, chosen with replacement and uniformly at random.Then, with probability at least 1 − exp − cα 2 n

3
, the hypergraph H m has a matching of size at least ρn.
Writing p = cn −r+1 , let H p be the random subgraph of H where we keep each edge independently with probability p.Then, with probability at least 1 − exp − cα 2 n 3r , the hypergraph H p has a matching of size at least ρn.
Proof.Write β(G) for the size of a largest matching of a hypergraph G.
It is not hard to see that H contains an induced subgraph H ′ of minimum degree at least αn r−1 on at least αn vertices.
We first prove the result for H m .Let H ′ m be the hypergraph with vertices V (H ′ ) and edges E(H m ) ∩ E(H ′ ).We will show that, with high probability, H ′ m has a matching of size at least ρn.Clearly β(H m ) ≥ β(H ′ m ), so the lemma readily follows.Suppose β(H ′ m ) < ρn, and let M be a maximal matching in By the minimum degree condition of H ′ , the number of edges with all vertices in S is at least Then, since α, rρ < 1/2, the number of S ⊆ V (H) with |S| ≥ (α − rρ)n is at most rρn ≤ e 2rρn (rρ) −rρn = exp (2rρ − rρ log(rρ))n .
Thus, by the union bound, , which gives the first part of the lemma.For the second part of the lemma observe that the same argument works: with S as above, in H p we have and a similar calculation as above shows that, for ρ sufficiently small, the probability there is such an S is at most exp − cα 2 n 3r .
Lemma 4.3 (Triangles and short paths).Let 1/n ≪ 1/C ≪ λ ≪ ρ ≪ δ, q.Let C be a set of colours of size qn, let D 0 be a digraph on n vertices with minimum semidegree at least δn, and suppose that Then, with probability at least 1 − exp (−λ n), the following holds.For any two vertices u, v ∈ V (D) there is a matching M of size at least ρn such that xy∈M {ux, xy, yv} is rainbow.
Moreover, with probability at least 1 − exp (−λn), for any u ∈ V (D) there is a matching M of size at least ρn such that xy∈M {ux, xy, yu} is rainbow.
We now show that we can find a large subset of P ′ where the paths are pairwise colour-disjoint.Reveal the colours on the edges of the paths in P ′ .By symmetry, each triple of distinct colours in C is equally likely to appear in P ′ .Hence P ′ corresponds to selecting uniformly at random with replacement |P ′ | ≥ ρ 1 n/2 edges from the complete 3-graph with vertex set C. Thus, by Lemma 4.2 (applied with (α, c, r, n) 4.2 = (1/7, ρ 1 /(2q), 3, qn)), with probability 1 − e −Ω(ρ 1 n) , this 3-graph has a matching of size ρn.This corresponds to an M ′′ ⊆ M ′ of size ρn so that xy∈M ′′ {ux, xy, yv} is rainbow.
The probability this fails for some pair u, v is, by the union bound, at most proving the first statement of the lemma.
The second statement of the lemma follows similarly by finding a large matching between disjoint subsets of N − D 0 (u) and N + D 0 (u).

Finding absorbers
In this section we show how to find 'absorbers', which are the building blocks for the digraph H abs in Lemma 3.1.
Definition 5.1 (Absorber).Let v be a vertex and c a colour.A (v, c)-absorber is an edge-coloured digraph A v,c with v ∈ V (A v,c ) and c ∈ C(A v,c ) that has two directed paths P, P ′ with the following properties: • they are rainbow; • they have the same first and last vertex; The aim of this section is to prove the following lemma, which says that for any vertex v, colour c and any small (but linear in size) sets of forbidden vertices and colours, we can find a (v, c)-absorber.
Let D 0 be a digraph on n vertices with minimum semidegree at least δn, and suppose that Then, with high probability, the following holds.For any v ∈ V (D) and c ∈ C, and for all V ′ ⊆ V (D) and C ′ ⊆ C each of size at least (1 − ν)n, there exists a (v, c)-absorber on 13 vertices with internal vertices in V ′ and internal colours in C ′ .
Our absorbers are depicted in Figure 1.We describe their structure here, though it might be easier to read off the structure from the figure.They consist of vertices {v, v 1 , v 2 } that induce an oriented triangle with edges {v 1 v, vv 2 , v 1 v 2 }, and vertices {x, y, z, u, w 1 , w 2 } inducing an oriented K 2,4 with edges {xy, xz, yu, zu, w 2 y, w 2 z, yw 1 , zw 1 }, and two directed paths of length 3 -P 1 from v 2 to x and P 2 from w 1 to w 2 -whose interiors are vertex-disjoint and disjoint of previously mentioned vertices.
The absorber is equipped with an edge colouring satisfying the following: , and the colours of the edges of P 1 and P 2 are different from one another and from those on the rest of the absorber.The (v, c)-absorbing path P and (v, c)-avoiding path P ′ are For the existence of the oriented triangle (on vertices {v, v 1 , v 2 }) and the directed paths of length three P 1 and P 2 we use Lemma 4.3.The existence of the oriented K 2,4 (with the required colouring) is more involved and uses the regularity lemma for digraphs.This is the most technical part of our proof and is accomplished in Lemma 5.11.

Finding oriented squares with diagonal directed paths
The aim of this section is to prove Lemma 5.11, which allows us to find a K 2,4 as required in Figure 1.
Since we need regular pairs to be sufficiently dense, we will find the following definition useful.
Definition 5.4.An ordered pair of disjoint vertex sets We state without proof the following straightforward consequences of Definition 5.4.We use the following degree form of the regularity lemma for digraphs, from [18].The original version of Szemerédi's regularity lemma [25] for digraphs was first proved by Alon and Shapira [3].The version we use is Lemma 7 in [18].
Theorem 5.7 (Degree form of the regularity lemma for digraphs).For every ε ∈ (0, 1) and every integer M ′ , there are integers M and n 0 such that the following holds.If D is a digraph on n ≥ n 0 vertices and d ∈ [0, 1] is any real number, then there is a partition (V 0 , . . ., V k ) of V (D), a spanning subgraph D ′ of D and a set U of ordered pairs (i, j), 1 ≤ i, j ≤ k and i ̸ = j, such that the following hold: • for every ordered pair • D ′ is obtained from D by deleting the following edges of D: all edges with both endpoints in V i , for all i ∈ [k]; all edges E D (V i , V j ) for all (i, j) ∈ U ; and all edges E D (V i , V j ) for all (i, j) / ∈ U , i ̸ = j, with d D (V i , V j ) < d.
We call V 1 , . . ., V k the clusters of the partition and V 0 the exceptional set.Note that the last two conditions of the lemma imply that for all 1 ≤ i, j ≤ k with i ̸ = j, the bipartite graph D ′ [V i , V j ] is ε-regular and has density either 0 or at least d.

Finding gadgets
In the following lemma we show that, if (A, B) and (C, B) are two dense regular pairs in a digraph whose edges are uniformly coloured, and given a dense bipartite graph H with bipartition (A, C), with very high probability there is a dense subgraph H ′ ⊆ H, such that for every edge ac in H ′ there is an oriented path of length 2 from a to c through B which is monochromatic (and of course both edges are directed outwards from a and c).
By applying this lemma twice (reversing edges for the second application, see the proof of Lemma 5.11), given four dense regular pairs (W 2 , Y ), (W 2 , Z), (Y, W 1 ), (Z, W 1 ) in a digraph whose edges are uniformly coloured, with very high probability we can find (y, z, w 3 in line with the edges spanned by {y, z, w 1 , w 2 } in our gadgets. Lemma 5.8.Let 1/n ≪ γ, ε, λ ≪ α, ρ, 1/q.Let D be a digraph, and let A, B, C be disjoint sets of vertices in D of size n, such that (A, B), (C, B) are ε-regular and have density at least ρ.Let H be a digraph with E(H) ⊆ A × C and e(H) ≥ αn 2 .Assign each edge in D a colour in C = [qn] uniformly and independently.Then, with probability at least 1 − exp(−λn), the number of edges ac in H for which there exists b ∈ B such that ab, cb ∈ E(D) and C(ab) = C(cb), is at least γn 2 .
Proof.Let β be a constant satisfying γ, λ ≪ β ≪ α, ρ, 1/q.Let H 1 be the subgraph of H spanned by edges ac such that |N + (a)∩N + (c)∩B| ≥ ρ 2 n/2.We claim that e(H 1 ) ≥ αn 2 /2.Indeed, let for all but at most εn vertices c ∈ C, using ε ≪ ρ for the last inequality.Thus e(H 1 ) ≥ e(H) Let M 1 , . . ., M k be a maximal collection of pairwise edge-disjoint matchings in H 1 of size at least αn/4.We claim that k ≥ αn/4.Indeed, otherwise, since showing that there is a matching For ac ∈ M i , we have , the events {ac ∈ M ′ i } with ac ∈ M i are independent, by Chernoff's bound we have By a union bound, with probability at least 1 − 2n exp(−Ω(βn)) ≥ 1 − exp(−λn)), we have This proves the lemma.
In the next lemma we construct the part spanned by {x, y, z, u}.Recall that we would like the colours of zu, xz, xy to match the colours of the edges vv 2 , v 1 v 2 , v 1 v in the oriented triangle in the absorber.
To achieve this, we let C 0 be a collection of Ω(n) triples of distinct colours, which are pairwise disjoint, and ensure that the colours of zu, xz, xy match the colours of one of the triples in C 0 .
We find a quadruple (x, y, z, u) satisfying the requirements of the lemma, by revealing the colours of E(D 0 ) in the order E(Y, U ), E(Z, U ), E(X, Y ), E(X, Z).At each step we find a linear size monochromatic matching between the corresponding vertex sets.To ensure that each new matching extends nicely previously chosen matchings, we will 'clean up' the graph before finding it.
First, let D 1 be the subdigraph of D 0 obtained by removing edges yu Reveal the colours of E D 1 (Y, U ). Since e(D 1 [Y, U ]) ≥ (αρµ 2 /4)n 2 , and each edge is coloured c independently with probability 1/n, Lemma 4.2 yields that, with probability at least 1 − exp(−Ω(λ ′ n)) , there exists a matching M ⊆ D 1 [Y, U ] of size at least γn with all edges coloured c.
Notice that this definition does not depend on the colours of E D (X, Z).Observe also that if xz is good for (c 1 , c 2 , c 3 ) ∈ C 0 and C(xz) = c 2 , then (x, y, z, u) satisfies the requirements of the lemma.Therefore, to complete the proof it suffices to show that, with high probability, for some (c 1 , c 2 , c 3 ) ∈ C 0 there exists at least one good edge xz ∈ E D (X, Z) with C(xz) = c 2 .For that, the crucial argument is the following claim, where we show that, with very high probability, there are many good edges for (c 1 , c 2 , c 3 ).We do so by 'extending' M with a monochromatic matching Proof.For y ∈ Y ∩ V (M ), denote by M (y) the neighbour of y in M .Let D 2 be the subdigraph of D 1 obtained by removing all edges in Z × U except edges of the form zM (y) satisfying yz ∈ E(H) and |N − (y) ∩ N − (z) ∩ X| ≥ (ρ 2 µ/2)n, for some y ∈ Y .
Next, we will find a large matching M 3 coloured c 3 which, along with M 1 and M , will give us a large number of good edges for (c 1 , c 2 , c 3 ).To this end, let D 3 be the spanning subgraph of D 2 obtained by removing all edges xy ∈ X × Y except those for which M 1 (y) exists and xM 1 (y) is an edge in D 2 .
Reveal the random colouring of Then, using that no two triples in C 0 share a colour, we have Now we reveal the colours of E D 3 (X, Z).For e ∈ E D 3 (X, Z), let A e be the event that e gets a good colour, i.e.C(e) ∈ G ′ (e).Each edge is coloured independently, so the events A e are mutually independent, and it holds that P[A e ] = |G ′ (e)| /n.Hence, the probability that no event A e holds is Hence, with probability at least 1 − exp(−q 0 γ 3 n), at least one edge gets a good colour, i.e. there exists e ∈ E D 3 (X, Z) such that C(e) ∈ G ′ (e), as required for the lemma.Altogether, all the required events hold simultaneously with probability at least 1 − exp(−Ω(λ ′ n)) − exp(−q 0 γ 3 n) ≥ 1 − exp(−λn), as required.
Next, we show how to find a copy of K 2,4 with the orientation in Figure 1.As above, we additionally make sure that the edges zu, xz, xy are coloured according to a triple of colours from a linear set C 0 of pairwise disjoint triples of distinct colours.When applying Lemma 5.11 to find a (v, c)-absorber (cf.Lemma 5.2 and Section 6), C 0 will be precisely the set of colour triples seen on a collection of rainbow triangles intersecting only on v. Proof Consider a partition (V 0 , . . ., V k ), with M ′ ≤ k ≤ M , of V (D) and a spanning subgraph D ′ , both given by Theorem 5.7 with parameters ε 5.7 = ε, d 5.7 = ρ and M ′ .Let R be the reduced digraph associated with this partition, that is the digraph on ] is ε-regular and has density at least ρ.
Claim 5.12.The digraph R contains a copy of K.
Proof.We observe that the minimum semidegree of R satisfies δ + (R) ≥ δk/2 because, otherwise, there would be vertices with out-degree at most (δk/2) We will use, twice, the following assertion.
Let X, Y, U, Z, W 1 , W 2 ⊆ V (D) be the vertex clusters corresponding to the vertices of the copy of K in R given by Claim 5.12.Using Lemma 5.5, by removing up to O(εn) vertices from each cluster, we can ensure that (X, Y ), (X, Z), (W 1 , Y ), (W 1 , Z), (Y, U ), (Z, U ), (Y, W 1 ), (Z, W 1 ) are (ε, ρ/2)-superregular and that X, Y, Z, U, W 1 , W 2 all have the same size, which we denote by n ′ .Thus, without loss of generality, we assume this is the case for the remainder of the proof.
Delete some triples from C 0 if necessary so that C 0 covers at most n/   We fail to find a T or K as required with probability at most exp(−Ω(λn)).
By Lemma 4.3, with probability 1 − exp(−Ω(λn)), for any two vertices a, b ∈ V ′ there are ρ ′ n rainbow directed paths of length three from a to b which are pairwise colour disjoint and internally vertex disjoint.Hence, with probability 1 − exp(−Ω(λn)), this and the conclusion of Claim 5.13 hold simultaneously.
Then, using ν ≪ ρ ′ , there exist two colour-and vertex-disjoint rainbow directed paths P 1 , P 2 of length 3 such that: P 1 is directed from v 2 to x; P 2 is directed from w 1 to w 2 ; the interiors of P 1 and P 2 are in V ′ \ (V (K) ∪ V (T )); and the colours of The number of V ′ ⊆ V of size at least (1 − ν)n is at most n n νn = exp(O (ν log ν) n), and the same bound holds for the number of C ′ ⊆ C of the same size.Using ν ≪ λ, the probability we fail to find an absorber for some v, c, V ′ , C ′ , is by the union bound, at most n 2 e O(ν log ν)n • e −Ω(λn) = o(1).

Proof of Lemma 3.1
In this section we prove Lemma 3.1.The following lemma enables us to cover any small set of vertices and colours.

.
Given a digraph D and x, y ∈ V (D), we write xy for the edge directed from x to y.Given X, Y ⊆ V (D), we write E D (X, Y ) for the set of edges xy with x ∈ X and y ∈ Y , and e + D (X, Y ) = |E D (X, Y )| for its size, and similarly e − D (X, Y ) = |E D (Y, X)|.The out-neighbourhood of a vertex v is denoted by N + D (v) and its size by deg + D (v).For a vertex set Y , we write N + D (v, Y ) = N + D (v) ∩ Y and denote its size by deg + D and write V = V (D) and C = [n].By Lemma 3.1 we may assume that there exists a subdigraph H abs ⊆ D with |V (H abs )| ≤ γn and the properties stated in Lemma 3.1, so in particular |C(H abs )| = |V (H abs )| − 1; and by Lemma 3.3 (on input α = η/4) that any two disjoint subsets X, Y ⊆ V of size k = ηn/4 satisfy |C(E(X, Y ))| ≥ (1 − η/4)n = n − k.Let C 2 = C \ C(H abs ) and let V 2 be an arbitrary satisfy the following: Γ i−1 ∪ xy has a rainbow Hamilton cycle through xy if and only if C(xy) ∈ C 1 , and Γ i−1 ∪ yx has a rainbow Hamilton cycle through yx if and only if ) and C(P ′ ) = C(P ) \ {c} = C(A v,c ) \ {c}.We call P the (v, c)-absorbing path and P ′ the (v, c)-avoiding path.The internal vertices of A v,c are V (A v,c ) \ {v} and the internal colours are C(A v,c ) \ {c}.The first and last vertices of the absorber are the first and last vertices of P and P ′ .

Figure 1 :
Figure 1: At the top is the (v, c)-absorber used in Lemma 5.2.At the bottom the first figure shows the (v, c)-absorbing path and the second figure the (v, c)-avoiding path.The directed paths P 1 , P 2 have length 3 and are rainbow with colours disjoint of one another and of the other colours in the figure.
Y, Z, U be disjoint sets of µn vertices in a digraph D such that (X, Y ), (X, Z), (Y, U ), (Z, U ) are (ε, ρ)-super-regular.Let H be a digraph with E(H) ⊆ Y × Z and e(H) ≥ αµ 2 n 2 .Let C = [n], let c ∈ C, and let C 0 be a set of pairwise disjoint triples of colours in C \ {c} of size at least q 0 n.Assign each edge in D a colour from C, uniformly and independently.Then, with probability at least 1 − exp(−λn), there is a quadruple (x, y, z, u) ∈ X × Y × Z × U with xy, xz, yu, zu ∈ E(D) and yz ∈ E(H), such that (C(zu), C(xz), C(xy)) ∈ C 0 and C(yu) = c.
P 1 and P 2 are in C ′ \ (C(K) ∪ C(T )).Then the graph A v,c , defined asA v,c = K ∪ T ∪ P 1 ∪ P 2 ,is a (v, c)-absorber: the (v, c)-absorbing path and the (v, c)-avoiding path arev 1 vv 2 P 1 xzw 1 P 2 w 2 yu and v 1 v 2 P 1 xyw 1 P 2 w 2 zuand it is straightforward to check they satisfy Definition 5.1 and have 13 vertices.

Lemma 6 . 1 (
Flexible sets).Let 1/n ≪ 1/C ≪ ζ ≪ µ ≪ δ ≤ 1.Let D 0 be a digraph on n vertices with minimum semidegree at least δn, and suppose that D ∼ D 0 ∪ D(n, C/n) is uniformly coloured in C = [n].Then there exist V flex ⊆ V , C flex ⊆ C of size 2µn such that with high probability the following holds.For all distinct u, v ∈ V , c ∈ C, and V ′ flex ⊆ V flex , C ′ flex ⊆ C flex of size at least (2µ − ζ)n, there exists a rainbow directed path of length seven from u to v, with internal vertices in V ′ flex and colours in C ′ flex ∪ {c}, that contains the colour c.
toss a coin that comes up heads with probability 1/3.If it comes up heads, add both xy, yx to E(Γ i ) and colour each independently and uniformly at random in [n].If it comes up tails, add each xy, yx independently with probability C 2n to E(Γ i ), and colour each independently and uniformly at random in [n]. 2. If e j / ∈ E(G 0 ), add each of xy, yx independently with probability C 2n to E(Γ i ), and colour each independently and uniformly at random in [n].