%! TEX root = PC.tex
% vim: tw=80 ft=tex
% 20/10/2025 09AM

\newpage
\section{Lovasz-Erdős Local Lemma}

What is the idea fo a local lemma? It's a general statement in probability about
when a certain probability is non-zero.

A silly example: Say I have $100$ independent coins.
How do I prove that there exists a configuration of these coins such that
everything is heads?

Our earlier techniques don't work on something like this: before we either
started with an event that holds with probability, or something that is close to
an event that holds with high probability.
$100$ heads is neither of these things, but obviously it exists because
everything is independent.

The Local Lemma allows us to show that the probability of an event is non-zero
provided we have ``enough'' independence, which we make precise below.

\begin{fclemma}[Erdős-Lovasz, 70s]
  \label{lemma:local}
  \glsnoundefn{locallem}{Local Lemma}{N/A}%
  Assuming:
  - $\mathcal{F} = \{A_i\}$ is a family of events in a probability space
  - $\mathcal{G}$ a \gls{depg} of $\mathcal{F}$
  - $\Pbb(A_i) \le \frac{1}{e(\Delta + 1)}$, where $\Delta =
  \Delta(\mathcal{G})$ is the max degree of $\mathcal{G}$
  Then:
  \[
    \Pbb \left( \bigcap_i A_i^c \right)
    > 0
  .\]
\end{fclemma}

\begin{fcdefn}[Dependency graph]
  \glsnoundefn{depg}{dependency graph}{dependency graphs}%
  If $\mathcal{F} = \{A_i\}$ is a family of events, a \emph{dependency graph}
  $\mathcal{G}$ is a graph with vertex set $\mathcal{F}$, with the property
  that: for all $i$, the event $A_i$ is independent from $\{A_j : A_j \not\sim
  A_i\}$.
\end{fcdefn}

Note that a family of events $\mathcal{F}$ can have many possible \glspl{depg},
but in applications there is often a particularly natural choice to take.

Picture:
\begin{center}
  \includegraphics[width=0.3\linewidth]{images/a4867e57395c40b4.png}
\end{center}

Reminder: $A_i$ is \emph{independent} from $\{A_j : A_j \not\sim A_i\}$ if $E$
is formed by taking intersections of $A_j, A_j^c \not\sim A_i$, we have
\[
  \Pbb(A_i \cap E)
  = \Pbb(A_i) \Pbb(E)
.\]

\begin{fcthm}[Spencer]
  $R(k) \ge (1 + o(1)) \frac{\sqrt{2} k}{e} 2^{k/2}$.
\end{fcthm}

\begin{proof}
  Let $\delta > 0$ and let $n = (1 - \delta) \frac{\sqrt{2} k}{e} 2^{k/2}$.
  Choose a colouring uniformly at random.
  For every $S \in [n]^{(k)}$, define the event
  \[
    A_S
    = \text{``$S^{(2)}$ are monochromatic''}
  .\]
  We clearly have $\Pbb(A_S) = 2^{-{k \choose 2} + 1}$.

  Let $\mathcal{G}$ be a \gls{depg} on $\{A_S\}_S$, where we say $A_S \sim A_T$
  if $S^{(2)} \cap T^{(2)} \neq \emptyset$.
  \[
    \Delta
    = \Delta(G)
    \le {k \choose 2} \cdot {n - 2 \choose k - 2}
    \le k^4 \cdot \left( \frac{1}{n^2} \right) {n \choose k}
  \]
  We now check:
  \[
    \Delta \cdot 2^{-{k \choose 2} + 1}
    \le 2k^4 \left( \frac{1}{n^2} \right) \left( \frac{en}{k} \right)^k 2^{-{k
    \choose 2}}
    = \left[ (1 + o(1)) \frac{1}{n^{2 / k}} \left( \frac{en\sqrt{2}}{k} \cdot
    2^{-k / 2} \right) \right]^k
  .\]
  This $\to 0$.
  So the condition in \gls{locallem} holds for sufficiently large $k$.
\end{proof}

\begin{remark*}
  This is the best known lower bound for diagonal Ramsey.
\end{remark*}

\begin{fcdefn}[$k$-uniform hypergraph]
  \glsnoundefn{kunif}{$k$-uniform hypergraph}{$k$-uniform hypergraphs}%
  Say $\mathcal{H}$ is a \emph{$k$-uniform hypergraph} on vertex set $X$ if
  $\mathcal{H} \subset X^{(k)}$.
\end{fcdefn}

\begin{fcdefn}[Colourable hypergraph]
  \glsadjdefn{2colk}{$2$-colourable}{$k$-uniform hypergraph}%
  Say a hypergraph $\mathcal{H}$ is $2$-colourable if there exists $\chi : X \to
  \{\text{red}, \text{blue}\}$ such that there is no monochromatic $e \in
  \mathcal{H}$.
\end{fcdefn}

\begin{center}
  \includegraphics[width=0.3\linewidth]{images/7d2080c45c0849da.png}
\end{center}

\begin{fcthm}[]
  Assuming:
  - $\mathcal{H}$ a \gls{kunif} with maximum degree $d$
  - $d \le \frac{2^{k - 1}}{ek} - 1$
  Then:
  $\mathcal{H}$ is $2$-colourable.
\end{fcthm}

\begin{note*}
  This theorem has no condition on $|\mathcal{H}|$ in the assumptions.
  Thus, this theorem is not just picking out a high probability event out of all
  uniformly random colourings: if $|\mathcal{H}|$ is large and has a reasonable
  number of edges, then with high probability there will be a monochromatic
  edge.
\end{note*}

\begin{proof}
  We choose our colouring of the ground set $X$ uniformly at random.
  For each $e \in \mathcal{H}$, define the event
  \[
    A_e
    = \text{``$e$ monochromatic''}
  .\]
  We have $\Pbb(A_e) = 2^{-k + 1}$, so we want $2^{-k + 1} \le \frac{1}{e(\Delta
  + 1)}$.
  Note if we define our \gls{depg} $\mathcal{G}$ by $A_e \sim A_f$ if $e
  \cap f \neq \emptyset$, then
  \[
    \Delta(\mathcal{G})
    \le d \cdot k
  .\]
  Now just use the bound on $d$ in the hypothesis.
\end{proof}

\begin{remark*}
  Actually, our second application implies the first on $R(k)$: just let
  $\mathcal{H}$ be the \kunif{{k \choose 2}} on $X = [n]^{(2)}$, defined by
  \[
    \mathcal{H}
    = \{S^{(2)} : S \in [n]^{(k)}\}
  .\]
\end{remark*}

We now move onto proving \gls{locallem}.

\begin{fcthm}[Lopsided Local Lemma]
  \label{lemma:lopsidedlocal}
  Assuming:
  - $\mathcal{F} = \{A_i\}$ a family of events
  - $\mathcal{G}$ a \gls{depg}
  - $x_1, \ldots, x_n \in (0, 1)$ be such that $\forall i$,
  \[
    \Pbb(A_i)
    \le x_i \prod_{A_i \sim A_j} (1 - x_j)
  \]
  (where $A_i \sim A_j$ denotes adjacency in the \gls{depg}).
  Then:
  \[
    \Pbb \left( \bigcap_{i = 1}^n A_i^c \right)
    \ge \prod_{i = 1}^{n} (1 - x_i)
  .\]
\end{fcthm}

This is slightly more mysterious than the first form, but it can be much more
useful.
Specifically, if the probabilities $\Pbb(A_i)$ aren't all the same, then this
lopsided form allows us to tune the values of $x_i$ more precisely than if we
just use \gls{locallem}.
We'll see an example of this at the end of this section.

\begin{proof}
  We use
  \[
    \Pbb(A \cap B)
    = \Pbb(A \mid B) \Pbb(B)
  .\]
  Applying this many times, we have
  \begin{align*}
    \Pbb \left( \bigcap_{i = 1}^n A_i^c \right)
    &= \prod_{i = 1}^{n} \Pbb(A_i^c \mid A_1^c \cap \cdots \cap A_{i - 1}^c) \\
    &= \prod_{i = 1}^{n} (1 -
    \ub{\Pbb(A_i \mid A_1^c \cap \cdots \cap A_{i - 1}^c)}_{\le x_i?})
  \end{align*}
  We will prove that this term is $\le x_i$ by instead proving the more general
  statement:
  \[
    (*) = \Pbb \left( A_i ~\bigg|~ \bigcap_{j \in S} A_j^c \right)
    \le x_i
  ,\]
  where $S \subset [n] \setminus \{i\}$.
  We prove by induction on $|S|$.

  If $S = \emptyset$, then done by hypothesis.

  If $S \neq \emptyset$, then define
  \[
    D
    = \bigcap_{\substack{j \in S \\ j \sim i}} A_j^c,
    \qquad
    I
    = \bigcap_{j \in S \\ j \not\sim i} A_j^c
  .\]
  Note that
  \begin{align*}
    (*)
    &= \Pbb(A_i \mid D \cap I) \\
    &= \frac{\Pbb(A_i \cap D \cap I)}{\Pbb(D \cap I)} \\
    &\le \frac{\Pbb(A_i \cap I)}{\Pbb(D \cap I)} \\
    &= \frac{\Pbb(A_i) \Pbb(I)}{\Pbb(D \cap I)} \\
    &= \frac{\Pbb(A_i)}{\Pbb(D \mid I)}
  \end{align*}
