\section{Introduction}
\subsection{Dirac-type problems}
Arguably the two most studied objects in graph theory are \emph{perfect matchings} and \emph{Hamilton cycles}. A perfect matching in a graph $G=(V,E)$ is a collection of vertex-disjoint edges which covers $V$, and a Hamilton cycle is a cycle passing through all the vertices of $G$. 
As opposed to the problem of finding a perfect matching (if one exists) in a graph $G$ which has efficient (polynomial-time) resolutions, the analogous problem for Hamilton cycles is listed as one of the NP-hard problems by Karp \cite{karp1972reducibility}.  Therefore, as one cannot hope to find a Hamilton cycle efficiently, it is natural to study sufficient conditions which guarantee its existence.

One of the first results of this type is the celebrated theorem by Dirac \cite{dirac1952some}, which states that every graph on $n\geq 3$ vertices with minimum degree $\frac{n}{2}$ is \emph{Hamiltonian}, that is, contains a Hamilton cycle (and in particular, if $n$ is even, then it also contains a perfect matching). While Dirac's theorem is sharp in general, one would like to find sufficient conditions for sparser graphs. A natural candidate to begin with is a typical graph sampled from the binomial random graph model $G(n,p)$. That is, a graph $G$ on vertex set $[n]$, where each (unordered) pair is being sampled as an edge with probability $p$, independently. In 1960, Erd\H{o}s and R\'enyi raised a question of what the threshold probability of Hamiltonicity in random graphs is. This question attracted a lot of attention in the past few decades. After a series of efforts by various researchers, including Korshunov \cite{korshunov1976solution} and P\'osa \cite{posa1976hamiltonian}, the problem was finally solved
by Koml\'os and Szemer\'edi \cite{komlos1983limit} and independently by Bollob\'as \cite{bollobas1984evolution}, who proved that if
$p \geq (\log_{} n + \log_{} \log_{} n + \omega(1))/n$, where $\omega(1)$ tends to infinity with $n$ arbitrarily slowly,
then the probability of the random graph $G(n, p)$ being Hamiltonian tends to~1 (we say such an event happens \emph{with high probability}, or \emph{whp} for brevity) . This result is best possible since for $p \leq (\log_{} n + \log_{} \log_{} n - \omega(1))/n$ whp there are vertices of
degree at most one in $G(n, p)$ (see, e.g. \cite{bollobas1998random}). An even stronger result was given by Bollob\'as \cite{bollobas1984evolution}. He showed that for the random graph process, the hitting time for Hamiltonicity
is exactly the same as the hitting time for having minimum degree 2, that is, whp the very
edge which increases the minimum degree to 2 also makes the graph Hamiltonian.

In this paper, we take advantage of the study of the local resilience in random graphs and random digraphs, which was first introduced by Sudakov and Vu \cite{sudakov2008local}. 
Roughly speaking, the local resilience is the largest proportion of edges that one can delete from every vertex in a given graph $G$ satisfying a property $\mathcal P$, such that the resulting (sub)graph still satisfies $\mathcal P$.
We shall use resilience results on perfect matchings in random bipartite graphs due to Sudakov and Vu~\cite{sudakov2008local} and Hamiltonicity in random digraphs by Montgomery~\cite{montgomery2020hamiltonicity}, see Lemma \ref{lem:bip-matching} and Lemma \ref{thm:resilience}, respectively.


\subsection{A rainbow setting}

In recent years, rainbow structures in graph systems have received a lot of attention~\cite{aharoni2018rainbow, Howard2017A, bradshaw2020transversals, bradshaw2021one, Cheng1, Cheng2, cheng2019rainbow, joos2020rainbow, New, 2020A, LU, 2020B, Montgomery22}.
Formally, given a family of (hyper)graphs $\mathcal G=\{G_1,\dots, G_m\}$ defined on the same vertex set, a copy of an $m$-edge (hyper)graph $H$ is called \emph{rainbow} if $E(H)\subseteq \bigcup_{i\in [m]}E(G_i)$ and $|E(H)\cap E(G_i)|=1$ for every $i\in [m]$.

A rainbow version of the Dirac-type problems in systems of graphs was conjectured by Aharoni et al.\cite{aharoni2018rainbow}: let $G_1,\ldots, G_{n}$ be a system of graphs on the same vertex set $V=[n]$ with minimum degree $\delta(G_i)\ge n/2$ for each $i\in[n]$, there exists a rainbow Hamilton cycle. Cheng, Wang and Zhao \cite{cheng2019rainbow} verified the conjecture asymptotically and Joos and Kim \cite{joos2020rainbow} proved the full conjecture. Very recently, Bradshaw, Halasz, and Stacho \cite{bradshaw2021one} strengthened the result by showing that the system of graphs actually admit exponentially many rainbow Hamilton cycles under the same assumptions. Bradshaw \cite{bradshaw2020transversals} generalized the Dirac-type result for Hamiltonicity of bipartite graphs by Moon and Moser \cite{moon1963hamiltonian} to the rainbow setting

Another interesting structure to consider is the perfect matching. In the rainbow setting we are given $n/2$ graphs $G_1,\ldots,G_{n/2}$ on the same vertex set $[n]$, and we are seeking for a rainbow perfect matching, namely, a perfect matching that consists of exactly one edge from each~$G_i$. 



In this note, we give Dirac-type results for rainbow perfect matchings and rainbow Hamilton cycles in random graphs.
Our main results read as follows.

\begin{thm}
\label{thm:dirac-rainbow-random-PM}
Let $\varepsilon>0$ and $p=\omega\left(\frac{\log n}{n}\right)$ where $n$ is even.
Suppose $G_1,\ldots, G_{n/2}$ are independent samples of $G(n,p)$ on the same vertex set $V=[n]$. 
Then, whp we have that for every spanning subgraphs $H_i\subseteq G_i$, $1\leq i\leq n/2$, with $\delta(H_i)\geq (\frac{1}{2}+\varepsilon)np$, the family $\{H_1,\dots,H_{n/2}\}$ admits a rainbow perfect matching.
\end{thm}

\begin{thm}
\label{thm:dirac-rainbow-Hamilton-cycle}
Let $\varepsilon>0$ and $p=\omega\left(\frac{\log n}{n}\right)$.
Suppose $G_1,\ldots, G_{n}$ are independent samples of $G(n,p)$ on the same vertex set $V=[n]$. 
Then, whp we have that for every spanning subgraphs $H_i\subseteq G_i$, $1\leq i\leq n$, with $\delta(H_i)\geq (\frac{1}{2}+\varepsilon)np$, the family $\{H_1,\dots,H_{n}\}$ admits a rainbow Hamilton cycle.
\end{thm}

\subsection{Notation}
Given a graph $G$ and 
$X\subseteq V(G)$, let $N(X)=\bigcup_{x\in X}N(x)$.
For
two subsets $X,Y\subseteq V(G)$ we define $E_G(X,Y)$ to be the set of all edges $xy\in E(G)$ with $x\in X$ and $y\in Y$, and set $e_G(X,Y):=|E(X,Y)|$ (the subscript $G$ will be omitted whenever there is no risk of confusion). Moreover, $G[X,Y]$ is defined by a graph with vertex set $X\cup Y$ and edge set $E_G(X,Y)$.  When
$x \in V (G)$, $d_G(x)$ is the \emph{degree} of $x$ in $G$.
For a graph $H$, $X\subset V(H)$, and a vertex $v\in V(H)$, we define 
$d_H(v,X)=|\{uv\in E(H):u\in X\}|$. 
In particular, if $X=\{u\}$ for some vertex $u$, then we write $d(v,u):=d(v,\{u\})$.

For a graph $G$, we denote by $\delta(G)$ as its minimum degree. For a digraph $D$, we denote $\delta^+(D),\delta^-(D)$ as its minimum out-degree and minimum in-degree, respectively. 
Moreover, let
\[
\delta^0(D)=\min\{\delta^+(D),\delta^-(D)\}.
\]

If $f(n)/g(n) \to 0$ as $n \to\infty$, then we say $g(n) = \omega(f(n))$ and $f(n) = o(g(n))$. If there exists a
constant $C$ for which $f(n) \leq Cg(n)$ for all $n$, then we say $f(n) = O(g(n))$ and $g(n) = \Omega(f(n))$. If
$f = O(g(n))$ and $f(n) = \Omega(g(n))$, then we say that $f(n) = \Theta(g(n))$. The
random graph $G(n, p)$
has vertex set $[n] = \{1, \dots , n\}$ and edges chosen independently at random with probability $p$.  The
random digraph $D(n, p)$
has vertex set $[n] = \{1, \dots , n\}$ and directed edges $(u,v)$, which is an ordered pair of vertices, chosen independently at random with probability $p$. 



\section{Preliminary Results}

In this section we first present some useful tools for the proofs, and then introduce our key auxiliary graphs and how to use them. 


\subsection{Chernoff’s inequalities}
We will use the following well-known bound on the upper and lower tails of the binomial distribution, which is given by Chernoff (see Appendix A in \cite{AS}).

\begin{lem}[Chernoff's inequality]\label{lem:Chernoff}
Let $X \sim \mathrm{Bin}(n, p)$ and let $\mathbb{E}[X] = \mu$. Then
\begin{itemize}
    \item $\Pr[X<(1-a)\mu]<e^{-a^2\mu/2}$ for every $a>0$;
    \item $\Pr[X>(1+a)\mu]<e^{-a^2\mu/3}$ for every $0<a<3/2$.
\end{itemize}
\end{lem}

\begin{rem}
Chernoff's inequalities also hold when $X$ is hypergeometrically distributed with mean $\mu$.
\end{rem}

The following simple bound is also useful in our proof.

\begin{lem}\label{lem:simple-inequality}
Let $X \sim \mathrm{Bin}(m, q)$. Then, for all $k$ we have
$$
\Pr[X\geq k]\leq \left(\frac{emq}{k}\right)^k.
$$
\end{lem}
\begin{proof}
Indeed, note that
$$
\Pr[X\geq k]\leq \binom{m}{k}q^k\leq \left(\frac{emq}{k}\right)^k
$$
as desired.
\end{proof}

\subsection{Talagrand-type inequality}
Our main probabilistic tool is the following concentration inequality of McDiarmid \cite{mcdiarmid2002concentration}.

\begin{thm}\label{thm:Talagrand}
Given a set $S$ of size $m$, we let ${\rm Sym}(S)$ denote the set of all $m!$ permutations of $S$. Let $\{B_1,\dots, B_k\}$ be a family of finite non-empty sets, and let $\Omega = \Pi_i {\rm Sym}(B_i)$. Let $\pi =\{\pi_1,\dots, \pi_k\}$ be a family of independent permutations, such that for $i$, $\pi_i \in {\rm Sym}(B_i)$ is chosen uniformly at random.

Let $c$ and $r$ be constants, and suppose that a nonnegative real-valued function $h$ on $\Omega$ satisfies the following conditions for each $\pi\in\Omega$.

\begin{enumerate}
    \item Swapping any two elements in any $\pi_i$ can change the value of $h$ by at most $2c$.
    \item If $h(\pi) = s$, there exists a set $\pi_{proof} \subseteq\pi$ of size at most $rs$, such that $h(\pi') \geq s$ for any $\pi'\in\Omega$ where $\pi'\supseteq \pi_{proof}$.
\end{enumerate}
Then for each $t\geq 0$ we have
$$                                                                                  
\Pr[h \leq M(h(\pi)) - t] \leq 2 \exp{\left(-\frac{t^2}{16rc^2M} \right)}.
$$
\end{thm}



\subsection{Typical properties of graphs}

In this section, we collect some useful properties of a typical sequence of independent samples of $G(n,p)$, which are regarded as ``colors'', on the same vertex set $V=[n]$. First, we show that the degrees are concentrated.


\begin{lem}\label{lem:similar-degrees}
Let $\varepsilon>0$ and let $N\leq n^2$. Let $G_1,\ldots, G_{N}$ be independent samples of $G(n,p)$ on the same vertex set $V=[n]$. Then, whp we have 
$$
(1-\varepsilon)np\leq \delta(G_c)\leq \Delta(G_c) \leq (1+\varepsilon)np
$$
holds for all $c\in [N]$ provided that $p=\omega(\frac{\log_{}n}{n})$.
\end{lem}
\begin{proof}

Fix some vertex $u\in[n]$ and some color $c\in[N]$. Observe that $d_{G_c}(u) \sim Bin(n-1, p)$, and therefore $\mu := \mathbb{E}[d_{G_c}(u)] = (n -1)p$.
Hence, since $p=\omega(\frac{\log n}n)$, by Lemma \ref{lem:Chernoff} we obtain that
$$
\Pr[d_{G_c}(u) \notin(1 \pm \varepsilon)\mu] \leq 2\exp{\left(-\frac{\varepsilon^2\mu}{3}\right)}=o\left(\frac{1}{n^3}\right).
$$
Taking a union bound over all vertices $u\in[n]$ and all colors $c\in[N]$, we conclude that
$$
\Pr[\exists u \in[n] ,\exists c\in[N]\text{ s.t. }d_{G_c}(u)\notin  (1\pm\varepsilon)\mu]=o(1).
$$
This completes the proof.
\end{proof}

Next, we show that given $n/2$ graphs $H_1,\dots, H_{n/2}$, if we take a random equipartition of $[n]$, then whp the corresponding bipartite subgraphs of $H_i$ have the ``correct'' degrees. 

\begin{lem}\label{lem:partition}
For every $\varepsilon>0$ there exists $C:=C(\varepsilon)$ for which the following holds. Let $m=n/2$. Let $H_1,\dots,H_m$ be graphs on the same vertex set $V=[n]$, where $n$ is a sufficiently large even integer. Suppose that $\delta(H_c)\geq C\log_{}n$ for all $c\in [m]$. Then, a $(1-o(1))$-fraction of the partitions $V=V_1\cup V_2$ into sets of size $m$ satisfy the following property: For every vertex $u\in V$ and $c\in[m]$, and for $i=1,2$ we have 
$$
d_{H_c}(u,V_i)\in(1\pm\varepsilon)\cdot \frac{d_{H_c}(u)}{2}.
$$
\end{lem}

\begin{proof}
Consider a random partition $V=V_1\cup V_2$ into sets both of size $m$. For some fixed vertex $u\in[n]$ and some fixed $c\in[m]$,  note that $d_{H_c}(u)$ is hypergeometrically distributed with expected value $\frac{d_{H_c}(u)}{2}$. Therefore, by Lemma \ref{lem:Chernoff} we obtain that
$$
\Pr\left[d_{H_c}(u,V_i)\notin (1\pm \varepsilon)\cdot \frac{d_{H_c}(u)}{2}\right]\leq 2e^{-\varepsilon^2 \frac{d_{H_c}(u)}{2}/3}\leq 2e^{-3\log_{}n}=2n^{-3},
$$
where the last inequality holds for a large enough $C$.

By applying a union bound over all possible $u$'s and $i$'s, we obtain that the probability of having such a vertex $u$ and an index $i$ is at most $(n^2/2)\cdot 2n^{-3}=n^{-1}$.
This completes the proof.
\end{proof}

\subsection{Auxiliary graphs and proof ideas}
In this section we define some auxiliary graphs/digraphs that are going to play key roles in the proofs of our main theorems. 

\subsubsection{Perfect matchings}
Our proof uses an auxiliary bipartite graph as follows.

\begin{defi}\label{def:auxiliary-graph}
Let $n$ be an even integer. Let $H_1',\dots,H_{n/2}'$ be bipartite graphs on the same vertex set $V=[n]$, each of which has the same bipartition $V=V_1 \cup V_2$ with $|V_1|=|V_2|=n/2$. By relabeling the vertices (if necessary), we may assume $V_1=[{n}/{2}]$. Given a permutation $\pi:V_1\to V_1$, the auxiliary bipartite graph $B_\pi:=B_\pi(H_1',\dots,H_{n/2}')$ is constructed as follows:
the parts of $B_{\pi}$ are $V_1$ and $V_2$; the edge set consists of all pairs $(i,j)\in V_1\times V_2$ such that $ij\in E(H_{\pi(i)}')$.
\end{defi}

\begin{rem}\label{rem:PM-implies-RM}
Observe that a perfect matching in $B_\pi$ corresponds to a rainbow perfect matching in the family $H_1', \dots, H_{n/2}'$. Indeed, every edge $\{i,j\}$ in $B_\pi$ with $i\in V_1$ and $j\in V_2$ corresponds to an edge $\{i,j\}$ in $H_{\pi(i)}'$, and since $\pi$ is a permutation of $V_1$, a perfect matching of $B_{\pi}$ uses exactly one edge from each $H'_i$.
\end{rem}

We also need the following result of Sudakov and Vu~\cite{sudakov2008local} on local resilience of perfect matchings in random bipartite graphs, whose proof can be found in the proof of~\cite[Theorem 3.1]{sudakov2008local}.
Let $V_1$ and $V_2$ be disjoint vertex sets each of size $n/2$, where $n\in 2\mathbb N$.
A random bipartite graph $B(n,p)$ defined on the partition $V_1\cup V_2$ is a bipartite graph such that given $(i,j)\in V_1\times V_2$, $ij\in E(B(n,p))$ with probability $p$ and all pairs $ij$ are chosen independent of each other.
\begin{lem}[Sudakov and Vu \cite{sudakov2008local}]
\label{lem:bip-matching}
Let $\varepsilon>0$ and $p=\omega\left(\frac{\log n}{n}\right)$ where $n$ is even.
Let $V_1$ and $V_2$ be disjoint vertex sets each of size $n/2$.
Then, whp a spanning subgraph $H\subseteq B(n,p)$ defined on $V_1\cup V_2$ such that $\delta(H)\geq (\frac{1}{2}+\varepsilon)\frac{np}{2}$ contains a perfect matching.
\end{lem}

We first demonstrate how to use the auxiliary bipartite graph to prove the following bipartition version of Theorem~\ref{thm:dirac-rainbow-random-PM}.

\begin{thm}
\label{thm:dirac-rainbow-random-PM2}
Let $\varepsilon>0$ and $p=\omega\left(\frac{\log n}{n}\right)$ where $n$ is even.
Suppose $G_1,\ldots, G_{n/2}$ are independent samples of $B(n,p)$ defined on $V_1\cup V_2$, each of size $n/2$. 
Then, whp we have that for every spanning (bipartite) subgraphs $H_i\subseteq G_i$, $1\leq i\leq n/2$, with $\delta(H_i)\geq (\frac{1}{2}+\varepsilon)\frac{np}2$, the family $\{H_1,\dots,H_{n/2}\}$ admits a rainbow perfect matching.
\end{thm}

Here is an outline of our proof.
Given a set $V$ of $n\in 2\mathbb N$ vertices and a balanced bipartition $V=V_1\cup V_2$,  fix a permutation $\pi: V_1\to V_1$.
If we expose $n/2$ independent samples of $B(n,p)$ on $V_1\cup V_2$, denoted by $G_1,\dots, G_{n/2}$, then we have that the bipartite graph $G_\pi=B_\pi(G_1,\dots, G_{n/2})$ defined in Definition~\ref{def:auxiliary-graph} is also a random bipartite graph.

Then, given $(i,j)\in V_1\times V_2$,  $ij\in G_\pi$ if and only if $ij\in E(G_{\pi(i)})$, which happens with probability precisely $p$ and is independent with all other pairs in $V_1\times V_2$.
In particular, whp $G_\pi$ is resilient for perfect matching -- by Lemma~\ref{lem:bip-matching}. That is, whp every spanning subgraph $H$ of $G_\pi$ with $\delta(H)\geq (\frac{1}{2}+\frac\varepsilon 2)\frac{np}2$ contains a perfect matching. However, once the independent samples are exposed, there might be some "bad" permutations $\pi$ such that there exists $i\in V_1$ satisying $ij\notin E(G_{\pi(i)})$ for most $j\in V_2$. Fortunately, we can prove that almost every $\pi$ is not bad by Markov's inequality. 
On the other hand, we shall show that (Lemma~\ref{lem:large-degrees}) if $\pi$ is a uniformly random permutation of $V_1$ and $H_1,\dots, H_{n/2}$ are graphs such that $H_i\subseteq G_i$ and $\delta(H_i)\ge (\frac{1}{2}+\varepsilon)\frac{np}2$, then whp the bipartite graph $B_\pi=B_\pi(H_1,\dots, H_{n/2})$ satisfies that $B_\pi\subseteq G_\pi$ and $\delta(B_\pi)\ge (\frac{1}{2}+\frac{\varepsilon}2)\frac{np}2$.
Therefore, by the resilience property of $G_\pi$ we conclude that $H_\pi$ has a perfect matching, which gives rise to a rainbow perfect matching of the family $H_1,\dots, H_{n/2}$.
This will prove Theorem~\ref{thm:dirac-rainbow-random-PM2}.




To derive Theorem~\ref{thm:dirac-rainbow-random-PM}, it suffices to show that there is a balanced bipartition of the vertex set such that the bipartite subgraphs of our graphs inherits the degree condition, which is proved in Lemma~\ref{lem:partition}.

\subsubsection{Directed Hamilton cycles}

For Hamiltonicity we will need to construct an auxiliary digraph as follows.

\begin{defi}\label{def:auxiliary-digraph}
Let $H_1',\dots,H_{n}'$ be graphs on the same vertex set $V=[n]$, Given a permutation $\pi:V\to V$, the auxiliary digraph ${D}_\pi:={D}_\pi(H_1',\dots,H_{n}')$ is constructed as follows: \\
$V$ is the vertex set of ${D}_\pi$ and for any vertex $i,j\in V$, $(i,j)\in E({D}_\pi)$ if and only if $ij\in E(H_{\pi(i)}')$.
\end{defi}

\begin{rem}\label{rem:auxiliary-digraph}
Observe that a directed Hamilton cycle in the auxiliary digraph ${D}_\pi$ corresponds to a rainbow Hamilton cycle in the family $H_1',\dots,H_{n}'$. Indeed, a directed Hamilton cycle in ${D}_\pi$ is a directed Hamilton cycle in $K_n$ whose edges $(i,j)$ belongs to distinct $H_{\pi(i)}'$ since $\pi$ is a permutation.
\end{rem}

We also need the following result on local resilience of Hamiltonicity in random digraphs due to Montgomery \cite{montgomery2020hamiltonicity} (in fact, Montgomery proved a way stronger result but the following is enough for our needs).



\begin{lem}\label{thm:resilience}
Let $\varepsilon>0$. Then whp a spanning subdigraph $D\sim D(n,p)$ defined on $V=[n]$ such that $\delta^0(D)\geq (\frac{1}{2}+\varepsilon)np$ contains a Hamilton cycle, provided that $p=\omega(\frac{\log_{}n}n)$.
\end{lem}

Similar to what we did in the previous subsection, we explain how this auxiliary digraph works. Given a set $V$ of $n$ vertices,  fix a permutation $\pi: V\to V$.
If we expose $n$ independent samples of $G(n,p)$ on $V$, denoted by $G_1,\dots, G_{n}$, then the digraph $G_\pi=D_\pi(G_1,\dots, G_{n})$ defined in Definition~\ref{def:auxiliary-digraph} is a random digraph.
Indeed, given $(i,j)\in V^2$, then $ij\in G_\pi$ if and only if $(i,j)\in E(G_{\pi(i)})$, which happens with probability precisely $p$ and is independent with all other pairs in $V^2$.
In particular, $G_\pi$ is resilient for Hamiltonicity -- by Lemma~\ref{thm:resilience}, whp any spanning subdigraph $H$ of $G_\pi$ with $\delta^0(H)\geq (\frac{1}{2}+\frac\varepsilon 2)np$ contains a directed Hamilton cycle.
On the other hand, we shall show that (Lemma~\ref{lem:large-degrees-digraphs}) if $\pi$ is a uniformly random permutation of $V$ and $H_1,\dots, H_{n}$ are graphs such that $H_i\subseteq G_i$ and $\delta(H_i)\ge (\frac{1}{2}+\varepsilon)np$, then whp the digraph $D_\pi=D_\pi(H_1,\dots, H_{n})$ satisfies that $D_\pi\subseteq G_\pi$ and $\delta(D_\pi)\ge (\frac{1}{2}+\frac{\varepsilon}2)np$.
Therefore, by the resilience property of $G_\pi$, we conclude that $D_\pi$ has a directed Hamilton cycle, which gives rise to a rainbow Hamilton cycle of the family $H_1,\dots, H_{n}$.
This will prove Theorem~\ref{thm:dirac-rainbow-Hamilton-cycle}.







\subsection{Most $B_{\pi}$'s have large minimum degree}

In this section we prove that given a balanced partition $[n]=V_1\cup V_2$ and bipartite graphs $H_1',\ldots,H'_m$ with a common bipartition $V_1\cup V_2$ (with $m=n/2$) and large minimum degrees, the resulting auxiliary graph $B_\pi$ also has large minimum degree whp where $\pi$ is a uniformly random permutation. The proof is a special case of Lemma 13 in \cite{FH}, but we include it for completeness. 

\begin{lem}\label{lem:median}
Let $0<\alpha<\frac{1}{2}$ and let $n\in2\mathbb{N}$ be sufficiently large. Let $m=n/2$. Let $H_1',\dots,H_{m}'$ be bipartite graphs on the same vertex set $V=[n]$ with the same parts $V=V_1 \cup V_2$ of the same size $m$, where $V_1=[m]$. Suppose that $\delta^*(H_c')\geq \frac{200}{\alpha^2}$ for all $c\in [m]$. 
Let $\pi$ be a uniformly random permutation on $V_1$ and $\mu_i=\mathbb{E}[d_{B_\pi}(i)]$. 
Then, for every $j\in V_2$, we have 
$$
M_j:=M(d_{B_\pi}(j))\in (1\pm\alpha)\mu_j.
$$
\end{lem}

\begin{rem}
The above lemma allows us to use $\mu_j$ instead of $M_j$ in Theorem \ref{thm:Talagrand} when it is applied to $d_{B_\pi}(j)$.
\end{rem}

\begin{proof}
Consider $B_\pi$, where $\pi$ is a uniformly random permutation on $V_1$. Let $j$ be some vertex in $V_2$. Let $\mu_j=\mathbb{E}[d_{B_\pi}(j)]$ and $\sigma^2= \mathrm{Var}(d_{B_\pi}(j))$. Moreover, for each $i\in V_1$, we define an indicator random variable $\mathds{1}_i$, where $\mathds{1}_i=1$ if $\{i,j\}\in E(H_{\pi(i)}')$. Observe that $d_{B_{\pi}}(j)=\sum_{i\in V_1} \mathds{1}_i.$ 

Applying Chebyshev's inequality, we have 
$$
\Pr[|d_{B_\pi}(j)-\mu_j|\geq \alpha\mu_j]\leq \frac{\sigma^2}{\alpha^2\mu_j^2}.
$$
If we can show that $\sigma^2\leq \frac{\alpha^2\mu_j^2}{100}$, then the result follows. Indeed, with probability at least 99/100 we have that $d_{B_\pi}(j)\in (1\pm\alpha)\mu_j$ and thus we conclude that the median $M_j$ also lies in this interval. Now the remaining part is to prove the desired inequality by computing $\mu_j=\mathbb{E}[d_{B_\pi}(j)]$ and $\sigma^2= \mathrm{Var}(d_{B_\pi}(j))$.

Note that the event $\left(\mathds{1}_i=1\right)$ only depends on the value of $\pi(i)$. There are $m$ possible values in total for $\pi(i)$, and exactly the colors in which $ij$ is an edge contribute to $\mathds{1}$. Let $d_{H_c'}(i,j)=1$ if $ij\in E(H_c')$, and $d_{H_c'}(i,j)=0$ otherwise. So
$$
\Pr[\mathds{1}_i=1]=\frac{\sum_{c=1}^m d_{H_c'}(i,j)}{m}.
$$ 
By linearity of expectations, we have
$$
\mu_j=\sum_{i=1}^m \mathbb{E}[\mathds{1}_i]=\sum_{i=1}^m\frac{\sum_{c=1}^m d_{H_c'}(i,j)}{m} =\sum_{c=1}^m\frac{\sum_{i=1}^m d_{H_c'}(i,j)}{m}=\sum_{c=1}
^m \frac{d_{H_c'}(j)}{m}.
$$
To compute the variance, note that for each $i\neq k$ in $V_1$, we have
$$
\begin{aligned}
\mathbb{E}\left[\mathds{1}_i\mathds{1}_k\right]
&=\sum_{c=1}^m \Pr\left[\mathds{1}_i=\mathds{1}_k=1|\pi(i)=c\right] \Pr\left[\pi(i)=c\right]\\
&=\sum_{c=1}^m \frac{1}{m} d_{H_c'}(i,j)\Pr\left[\mathds{1}_k=1|\pi(i)=c\right]\\
&=\sum_{c=1}^m \frac{1}{m} d_{H_c'}(i,j)\frac{\sum_{c'\neq c} d_{H_{c'}'}(k,j)}{m-1}.
\end{aligned}
$$
Thus,
$$
\begin{aligned}
\mathrm{Var}\left(d_{B_\pi}\left(j\right)\right)&=\mathrm{Var}\left(\sum_{i=1}^m \mathds{1}_i\right)
=\sum_{i=1}^m \mathrm{Var}\left(\mathds{1}_i\right) + \sum_{i\neq k}\mathrm{Cov}\left(\mathds{1}_i,\mathds{1}_k\right)\\
&\leq \mu_j+\sum_{i\neq k}\left(\mathbb{E}\left[\mathds{1}_i\mathds{1}_k\right] - \mathbb{E}\left[\mathds{1}_i\right]\mathbb{E}\left[\mathds{1}_k\right]\right)\\
&=\mu_j + \sum_{i\neq k}\left(\sum_{c=1}^m \frac{1}{m} d_{H_c'}(i,j)\frac{\sum_{c\neq c'}d_{H_{c'}'}(k,j)}{m-1}-\frac{\sum_{c=1}^m d_{H_c'}(i,j)}{m}\frac{\sum_{c'=1}^m d_{H_{c'}'}(k,j)}{m}\right)\\
&=\mu_j + \sum_{i\neq k}\left(\left(\frac{1}{m(m-1)}-\frac{1}{m^2}\right)\sum_{c=1}^m d_{H_c'}(k,j)\sum_{c'=1}^m d_{H_{c'}'}(i,j)-\frac{1}{m(m-1)}\sum_{c=1}^m d_{H_c'}(k,j)d_{H_c'}(i,j)\right)\\
&\leq \mu_j + \frac{1}{m^2(m-1)}\sum_{i,k=1}^m\left(\sum_{c=1}^m d_{H_c'}(k,j)\sum_{c'=1}^m d_{H_{c'}'}(i,j)\right)\\
&=\mu_j+\frac{1}{m-1}\mu_j^2.
\end{aligned}
$$
To complete the proof, first observe that we have $\frac{1}{m-1}\mu_j^2\leq \frac{\alpha^2\mu_j^2}{200}$ since $m$ is sufficiently large. Also, we have $\mu_j\leq \frac{\alpha^2\mu_j^2}{200}$ since $\mu_j\geq \frac{200}{\alpha^2}$ by assumption. 
Now we obtain $\sigma^2\leq \frac{\alpha^2\mu_j^2}{100}$ and the lemma follows.
\end{proof}


\begin{lem}\label{lem:large-degrees}
For every $\varepsilon>0$ there exists $C:=C(\varepsilon)$ for which the following holds for sufficiently large $m\in\mathbb{N}$ and $p=C\frac{\log m}m$. Let $H_1',\dots,H_m'$ be bipartite graphs on the same vertex set $V=[n]$ with the same parts $V=V_1 \cup V_2$ of the same size $m$, where $V_1=[m]$. Suppose that $\delta^*(H_c')\geq (\frac{1}{2}+\varepsilon)mp$ for every $c\in[m]$. Then for a uniformly random permutation $\pi:[m]\to [m]$,  whp we have $\delta(B_\pi)\geq (\frac{1}{2}+\frac{\varepsilon}{2})mp$.
\end{lem}

\begin{proof}
Consider $B_\pi$, where $\pi$ is a uniformly random permutation. As $\delta^*(H_c')\geq (\frac{1}{2}+\varepsilon)mp$ for every $c\in[m]$, it is guaranteed that for all $i\in V_1$ we have that $d_{B_\pi}(i)\geq (\frac{1}{2}+\varepsilon)mp$.
Now consider some $j\in V_2$ and observe from the proof of Lemma \ref{lem:median}, under the same notation, that $\mu_j:=\mathbb{E}[d_{B_\pi}(i)]\geq (\frac{1}{2}+\varepsilon)mp.$

In order to complete the proof, we want to show that the $d_{B_\pi}(j)$'s are ``highly concentrated'' using Theorem \ref{thm:Talagrand}. To this end, let $h(\pi):=d_{B_\pi}(j)$ and note that swapping any two elements of $\pi$ can change the value of $h$ by at most 2. Moreover, note that if $h(\pi) =d_{B_\pi}(j)= s$, then it is enough to choose $\pi_{proof}$ as the $s$ indices reflected in $N_{B_\pi}(j)$. Therefore, $h(\pi)$ satisfies the conditions of Theorem \ref{thm:Talagrand} with $c = 1$ and $r = 1$.

Now, let $\alpha=\frac{\varepsilon}{100}$, and observe that by Lemma \ref{lem:median} we have that the median $M$ of $d_{B_\pi}(j)$ lies in the interval $(1\pm\alpha)\mu_j$.
Therefore, we have
$$
\Pr \left[h\leq (\frac{1}{2}+\frac{\varepsilon}{2})mp\right]\leq \Pr\left[h\leq (1-\frac{\varepsilon}{2})\mathbb{E}[d_{B_\pi}(j)]\right]
$$
and the latter can be upper bounded by
$$
\Pr\left[h\leq (1-\frac{\varepsilon}{2})(1+\alpha)M\right]\leq \Pr\left[h\leq (1-\frac{\varepsilon}{4})M\right].
$$
Now, by Theorem \ref{thm:Talagrand} we obtain that
$$
\Pr\left[h\leq (\frac{1}{2}+\frac{\varepsilon}{2})mp\right]\leq 2\exp{\left\{-\frac{(\varepsilon M/4)^2}{16M}\right\}}.
$$
Next, using (again) the fact that $M\in (1\pm\alpha)\mu_j$ and that $\mu_j=\Theta(mp)\geq C\log_{}m$, we can upper bound the above right hand side by
$2\exp{ (-\Theta(mp))} \leq n^{-2}$.
Finally, in order to complete the proof, we take a union bound over all $j\in V_2$ and obtain that whp $\delta(B_\pi)\geq (\frac{1}{2}+\frac{\varepsilon}{2})mp$.
\end{proof}

\subsection{Most $D_{\pi}$'s have large minimum degree}

The following lemma says that given digraphs $H_1',\ldots,H'_m$ with large minimum semidegrees (minimum of out-degrees and in-degrees), the resulting auxiliary digraph $D_\pi$ also has large minimum degree whp where $\pi$ is a uniformly random permutation.

\begin{lem}
\label{lem:large-degrees-digraphs}
For every $\varepsilon>0$ there exists $C:=C(\varepsilon)$ for which the following holds for sufficiently large $n\in\mathbb{N}$ and $p=C\frac{\log_{}n}n$. Let $H_1',\dots,H_n'$ be graphs on the same vertex set $V=[n]$. Suppose that $\delta(H_c')\geq (\frac{1}{2}+\varepsilon)np$ for every $c\in[n]$. Then for a uniformly random permutation $\pi:V\to V$,  whp we have $\delta^0(D_\pi)\geq (\frac{1}{2}+\frac{\varepsilon}{2})np$.
\end{lem}

The proof of Lemma \ref{lem:large-degrees-digraphs} is very similar to that of Lemma \ref{lem:large-degrees} so we leave it to the appendix.

\section{Proof of main results}

We first give a proof of Theorem~\ref{thm:dirac-rainbow-random-PM2} and use it to derive Theorem~\ref{thm:dirac-rainbow-random-PM}.
\begin{proof}[Proof of Theorem~\ref{thm:dirac-rainbow-random-PM2}]
Let $\varepsilon > 0$ and $p \geq C \frac{\log_{}n}n$, for a sufficiently large $C$. Let $m=\frac{n}{2}$. Let $G_1,\ldots, G_{m}$ be independent samples of $B(n,p)$ on $V_1\cup V_2$.  
Let $H_c\subseteq G_c$ be any (bipartite) subrgraphs with $\delta(H_c) \geq (1/2+\varepsilon)mp$. We wish to demonstrate that whp the family of graphs $H_1,\dots,H_m$ has a rainbow perfect matching.

Now, let $\pi$ be a permutation on $V_1$ chosen uniformly at random.
Therefore, Lemma \ref{lem:large-degrees} (with input graphs $H_1,\dots, H_m$) guarantees that for almost all permutation $\pi$, $H_\pi=B_\pi(H_1,\dots, H_m)$ (as defined in \ref{def:auxiliary-graph}) satisfies 
\begin{enumerate}[label=$(\dagger)$]
\item $\delta(H_\pi)\geq (\frac{1}{2}+\frac{\varepsilon}{2})mp$. 
\label{item:dagger}
\end{enumerate}
We focus on all $\pi$ satisfying above and  condition on~\ref{item:dagger}.

Note that the bipartite graph $G_\pi=B_\pi(G_1,\dots, G_m)$ is a random bipartite graph, where all pairs in $V_1\times V_2$ are present with probability $p$, and independent with other pairs of vertices.
Moreover, by definition, $H_\pi$ is a subgraph of $G_\pi$.
Thus, by~\ref{item:dagger}, we have that $H_\pi$ is a subgraph of $G_\pi$ with $\delta(H_\pi)\geq (\frac{1}{2}+\frac{\varepsilon}{2})mp$.
Therefore, by Lemma~\ref{lem:bip-matching}, whp $H_\pi$ contains a perfect matching, which by Remark \ref{rem:PM-implies-RM} implies that the family $H_1,\dots,H_m$ whp admits a rainbow perfect matching.
\end{proof}

\begin{proof}[Proof of Theorem~\ref{thm:dirac-rainbow-random-PM}]
Let $\varepsilon > 0$ and $p \geq C \frac{\log_{}n}n$, for a sufficiently large $C$. Let $m=\frac{n}{2}$. Let $G_1,\ldots, G_{m}$ be independent samples of $G(n,p)$ (on the same vertex set $V=[n]$).  
Let $H_c\subseteq G_c$ be any subgraphs with $\delta(H_c) \geq (1/2+\varepsilon)np$. We wish to show that whp the family of graphs $H_1,\dots,H_m$ has a rainbow perfect matching.

Observe that by Lemma \ref{lem:similar-degrees}, whp the family of graphs $G_1,\ldots, G_{m}$ satisfies
\begin{enumerate}[label=$(\ddagger)$]
\item $(1-\varepsilon)np\leq \delta(G_c)\leq \Delta(G_c) \leq (1+\varepsilon)np$ for all $c\in[m]$. \label{item:ddag}
\end{enumerate}
For the rest of the proof, we condition on~\ref{item:ddag}.



Now, let $\alpha > 0$ such that $(1-\alpha)(1/2+\varepsilon) \geq 1/2+\varepsilon/2$.
By Lemma \ref{lem:partition} with $\alpha$ in place of $\varepsilon$, we obtain that most balanced bipartitions of $[n] = V_1\cup V_2$ satisfy the following: for every $u\in V_i$, $i=1,2$, and for every $c\in[m]$, we have 
$$
d_{H_c}(u,V_{3-i})\ge (1-\alpha)\cdot \frac{d_{H_c}(u)}{2} \ge (1-\alpha)\cdot \left(\frac{1}{2}+\varepsilon\right)\frac{np}2 \ge \left(\frac{1}{2}+\frac\varepsilon 2 \right)\frac{np}2.
$$

Now for $i\in [m]$ and any given partition $[n]=V_1\cup V_2$, we let $G_i':=G_i[V_1, V_2]$ and $H_i':=H_i[V_1, V_2]$ be the spanning subgraphs of $G_i$ and $H_i$, respectively, induced by the bipartition $V_1\cup V_2$.
Observe that, for a given partition, all $G_i'$ are independent samples of $B(n,p)$ on $V_1\cup V_2$. Moreover, for most balanced bipartitions the graphs $H_i'\subseteq G_i'$ satisfy $\delta(H_i')\ge \left(\frac{1}{2}+\frac\varepsilon 2 \right)\frac{np}2$.
Therefore, by Theorem~\ref{thm:dirac-rainbow-random-PM2}, we obtain that by taking a random partition $[n]=V_1\cup V_2$, whp the family $\{H_1',\dots,H_{n/2}'\}$ admits a rainbow perfect matching. This completes the proof.
\end{proof}












Now we give a proof of Theorem \ref{thm:dirac-rainbow-Hamilton-cycle}.



\begin{proof}[Proof of Theorem~\ref{thm:dirac-rainbow-Hamilton-cycle}]

Let $\varepsilon > 0$ and $p \geq C \frac{\log_{}n}n$, for a sufficiently large $C$. Let $G_1,\ldots, G_{n}$ be independent samples of $G(n,p)$ (on the same vertex set $V=[n]$).  
Let $H_c\subseteq G_c$ be any subgraphs with $\delta(H_c) \geq (1/2+\varepsilon)np$. We wish to show that whp the family of graphs $H_1,\dots,H_n$ has a rainbow Hamilton cycle.

Similar to above, whp the family of graphs $G_1,\ldots, G_{n}$ satisfies \ref{item:ddag} for $m=n$. For the rest of the proof, we condition on~\ref{item:ddag}.

Now, let $\pi$ be a permutation on $V$ chosen uniformly at random.
Therefore, Lemma \ref{lem:large-degrees-digraphs} (with input graphs $H_1,\dots, H_n$) guarantees that whp $D_\pi'=D_\pi(H_1,\dots, H_n)$ (as defined in \ref{def:auxiliary-digraph}) satisfies 
\begin{enumerate}[label=$(*)$]
\item $\delta(D_\pi')\geq (\frac{1}{2}+\frac{\varepsilon}{2})np$. \label{item:dag}
\end{enumerate}
We condition on $(*)$.

Note that the digraph $D_\pi=D_\pi(G_1,\dots, G_n)$ is a random digraph, where all pairs are present with probability $p$, and independent with other pairs of vertices.
Moreover, by definition, $D_\pi'$ is a subdigraph of $D_\pi$.
Therefore, by Lemma~\ref{thm:resilience}, whp $D_\pi'$ contains a Hamilton cycle, which by Remark \ref{rem:auxiliary-digraph} implies that the family $H_1,\dots,H_n$ whp admits a rainbow Hamilton cycle. This completes the proof.
\end{proof}



\section{Concluding Remarks}

In this note we address the Dirac-type problems for rainbow perfect matching and Hamilton cycle in a family of random graphs.
Our method reduces the rainbow embedding problem to that in closely related contexts with a single host graph. 
That is, we use appropriate auxiliary graphs that ``assemble'' the family of graphs to one graph, so that the rainbow subgraph problem is reduced to finding a single copy of the desired subgraph in this auxiliary graph.
For perfect matching and $F$-factors\footnote{Given graphs $F$ and $H$, an \emph{$F$-factor} in $H$ is a spanning subgraph of $H$ consisting of vertex-disjoint copies of $F$.}, the natural candidate for the auxiliary graph is the multi-partite graphs.
For connected objects such as Hamilton cycles, we show that directed graphs are helpful auxiliary graphs.

Our method is also applicable to the dense setting and to random hypergraphs.
We end by the following result for perfect matching in $k$-partite $k$-graphs.
For $k > d>0$ and a $k$-partite $k$-graph $H$, let $\delta_d^*(H)$ be the maximum integer $m$ such that every crossing\footnote{A set is called \emph{crossing} if it contains at most one vertex from each part of the partition.} $d$-set in $V(H)$ has degree at least $m$.
For $k > d> 0$, let $\delta_{k,d}$ be the smallest real number $\delta>0$ such that for every $\varepsilon>0$ there exists $n_0>0$ such that every $k$-partite $k$-graph $H$ with $n$ vertices in each part satisfying $\delta_d^*(H)\ge (\delta+\varepsilon)n^{k-d}$ contains a perfect matching.

\begin{thm}
Given integers $k>d>0$ and $\varepsilon>0$, there exists $n_0$ such that the following holds for integer $n\ge n_0$.
Let $H_1,\dots, H_{n}$ be a family of $k$-partite $k$-graphs on the same $k$-partition with $n$ vertices in each part.
Suppose $\delta_d^*(H_i)\ge (\delta_{k,d}+\varepsilon)n^{k-d}$ for every $i\in [n]$.
Then the family admits a rainbow perfect matching.
\end{thm}

\begin{proof}[Proof Sketch]
Let $V=V_1\cup V_2\cup \cdots \cup V_k$ be a $k$-partition with $n$ vertices in each part.
Given a permutation $\pi$ of $V_1=[n]$, define the auxiliary $k$-partite $k$-graph $H_\pi$ on $V_1\cup V_2\cup \cdots \cup V_k$ such that a crossing $k$-tuple $S=\{a_1,\dots, a_k\}$ with $a_i\in V_i$ belongs to $E(H_\pi)$ if and only if $S\in E(H_{\pi(a_1)})$.
Then for a random permutation $\pi$ of $V_1$, one can show that whp $\delta_d^*(H_\pi)\ge (\delta_{k,d}+\varepsilon/2)n^{k-d}$.
Take such a permutation $\pi$ and since $n$ is sufficiently large, $\delta_d^*(H_\pi)\ge (\delta_{k,d}+\varepsilon/2)n^{k-d}$ implies that $H_\pi$ contains a perfect matching $M$.
Since $M$ contains precisely one edge from each $H_i$, it is a rainbow perfect matching of the family.
\end{proof}

It follows from a result of Pikhurko~\cite{Pik} that $\delta_{k,d}=1/2$ for $d\ge k/2$.




\bibliographystyle{abbrv}
