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

\begin{proof}[Proof of $G(n, p) \supset C_n$ when $p > \frac{20 \log n}{n}$]
  Let $G_1 \sim G(n, p_1)$ where $p_1 = \frac{12\log n}{n}$, $G_2 \sim G(n,
  p_2)$ where $p_2 = \frac{\log \log n}{n}$.
  Let $G = G_1 \cup G_2$: then $G \sim G(n, p)$ where $p = (12 + o(1))
  \frac{\log n}{n}$.

  Define $E$ to be the event that $G_1$ is an \gls{exp}.
  Define $P$ to be the event that $G_1 \supset P_n$.
  Then
  \begin{align*}
    \Pbb(G \not\supset C_n)
    &\le \Pbb(G \not\supset C_n \cap E \cap P) + \ub{\Pbb(E^c) +
    \Pbb(P^c)}_{o(1)} \\
    &\le \max_{G_1 \in E \cap P} \Pbb_{G_2}(G \not\supset C_n) + o(1)
  \end{align*}
  Let $P$ be a Hamiltonian path in $G_1$.
  \begin{center}
    \includegraphics[width=0.6\linewidth]{images/7cdf8b5176534e89.png}
  \end{center}
  Since $G_1$ is an \gls{exp}, we have $|X(P)| > \frac{n}{6}$.
  So there are $\ge \frac{n}{6}$ edges that, if included, will complete a
  Hamiltonian cycle by Pósa rotation lemma.
  So
  \[
    \Pbb(G \not\supset C_n)
    \le (1 - p)^{\frac{n}{6}} + o(1)
    \to 0
    .
    \qedhere
  \]
\end{proof}

\newpage
\section{The method of Hypergraph Containers}

\begin{fcdefn}[]
  \glssymboldefn{turan}%
  For graphs $G$, $H$,
  \[
    \turaninternal(G, H)
    = \max \{e(K) : K \subset G \text{ and } K \not\supset H\}
  .\]
\end{fcdefn}

\begin{example*}
  $\exnum(n, H) = \turan(K_n, H)$.
\end{example*}

We are interested in $\turan(G, K_3)$ when $G \sim G(n, p)$.

\begin{fcthm}[Frankl, Rödl]
  \label{thm:FR}
  For $p \gg \frac{1}{\sqrt{n}}$ and $G \sim G(n, p)$,
  \[
    \turan(G, K_3)
    = (1 + o(1)) \frac{pn^2}{4}
  \]
  with high probability.
\end{fcthm}

\begin{remark*}
  \leavevmode
  \begin{itemize}
    \item Easy to see ``$\ge$'': consider a bipartition
      \begin{center}
        \includegraphics[width=0.6\linewidth]{images/472e00a343ef4ecb.png}
      \end{center}
    \item If $p \le \frac{\eps}{\sqrt{n}}$, then recall from earlier in the
      course our work on $R(3, k)$: in this regime for $p$, we have few
      triangles compared to number of edges, so we can get a triangle-free
      subgraph by just deleting an edge from every triangle.
  \end{itemize}
\end{remark*}

Let $m = (1 + \delta) \frac{pn^2}{4}$.
Let
\[
  X_m
  = |\{H \subset G : H \not\supset K_3 \text{ and } e(H) = m\}|
.\]
If $\Ebb X_m \to 0$, then by Markov done.
But:
\begin{align*}
  \Ebb X_m
  &= |\{H \subset K_n : H \not\supset K_3, e(H) = m\}| \cdot p^m \\
  &\ge {\frac{n^2}{4} \choose m} \cdot p^m \\
  &\ge \left( \frac{pn^2}{m} \right)^m \\
  &\ge \left( \frac{4}{(1 + \delta)} \right)^{n^{3 / 2}} \\
  &\to \infty
\end{align*}
So first moment method fails horribly here.

\begin{remark*}
  This quantity is useluss because these triangle free graphs are very
  correlated.
\end{remark*}

\textbf{Idea:} What if every $K_3$-free graph was bipartite? (This is a massive
lie, but we discuss it anyway to motivate the proof of \nameref{thm:FR}).
\begin{align*}
  \Pbb(\exists H, H \subset G, e(H) = m, H \not\supset K_3) \\
  &\stackrel{!}{\le} \sum_{\text{$(A, A^c)$ bipartite on $V(G)$}}
  \Pbb(|G \cap (A \times A^c)| \ge m) \\
  &\le 2^n \exp \left( - \frac{(\delta pn^2)}{3 \frac{pn^2}{4}} \right)^2 \\
  &\to 0
\end{align*}
(the $!$ is to emphasise that here we use the false statement that ``every
triangle-free graph is bipartite'').
On the penultimate step, we used that
\[
  \Ebb|G \cap (A \times A^c)|
  \le \frac{n^2}{4} \cdot p \\
  \le 2^n \exp(-\delta^2 pn^2)
.\]
But $m \ge (1 + \delta) \frac{pn^2}{4}$.

Note that there exist triangle-free graphs that are far from being bipartite:
\begin{center}
  \includegraphics[width=0.6\linewidth]{images/ad9aefb98dc644c6.png}
\end{center}

So we need something a little different:

\begin{fcthm}[Containers for triangle-free graphs]
  \label{thm:trianglecontainers}
  For all $n$, there exists a collection of graphs $\mathcal{C}_n$ with the
  following properties:
  \begin{enumerate}[(1)]
    \item $|\mathcal{C}| \le n^{O(n^{3 / 2})}$.
    \item every $G \in \mathcal{C}$ contains at most $o(n^3)$ triangles.
    \item every triangle-free graph on $n$ vertices is contained in some $G \in
      \mathcal{C}$.
  \end{enumerate}
\end{fcthm}

\begin{remark*}
  This result is essentially sharp.
  Before we constructed very ``random like'' graphs with density $p =
  \frac{\gamma}{\sqrt{n}}$.
  So we expect ${\frac{n^2}{2} \choose \frac{pn^2}{2}} = n^{O(n^{3 / 2}}$ such
  graphs.
  Intuitively, these should be in different containers.
\end{remark*}

\begin{fclemma}[Supersaturation]
  \label{lemma:supersat}
  For all $\eps > 0$, there exists $\delta$ such that:

  If $G$ is an $n$ vertex graph with
  \[
    e(G)
    \ge \left( 1 + \eps \right) \frac{n^2}{4}
  ,\]
  then $G$ contains $\delta n^3$ triangles.
\end{fclemma}

\begin{proof}
  Let $k$ be a large constant.
  Note ${n \choose 2}{n -02 \choose k - 2} = {n \choose k}{k \choose 2}$
  Consider
  \begin{align*}
    (*)
    &= \frac{1}{{n \choose k}} \sum_{S \in [n]^{(k)}} \frac{e(G[S])}{{k \choose
    2}} \\
    &= \frac{e(G)}{{n \choose k}{k \choose 2}} \cdot {n - 2 \choose k - 2} \\
    &= \frac{e(G)}{{n \choose 2}} \\
    &\ge \half (1 + \eps)
  \end{align*}
  If the number of $k$ subsets with $> \half {k \choose 2}$ edges is $\eta {n
  \choose k}$, then
  \[
    (*)
    \le \eta \cdot 1 + \half (1 - \eta)
    \le \half (1 + \eta)
  .\]
  So $\eta \ge \eps$.
  Apply Turán to this $\eps$ proportion of subsets.
  This gives us $\eps {n \choose k}$ pairs of $(\text{$k$-subsets},
  \text{triangles})$.
  But each triangle is counted at most ${n - 3 \choose k - 3}$.
  So there must exist
  \[
    \ge \frac{\eps {n \choose k}}{{n - 3 \choose k - 3}}
    \ge c\eps n^3
  \]
  triangles, for some $c > 0$.
\end{proof}

\begin{proof}[Proof of \nameref{thm:FR} for $p \gg \frac{\log n}{\sqrt{n}}$]
  Let $p \gg \frac{\log n}{\sqrt{n}}$, $G \sim G(n, p)$, $m = (1 + \delta)
  \frac{pn^2}{4}$.
  \begin{align*}
    \Pbb(\exists H, H \not\supset K_3, H \subset G, e(H) = m)
    &\le \Pbb\left(\exists K \in \mathcal{C}_n, |H \cap G| \ge (1 + \delta)
    \frac{pn^2}{2}\right) \\
    &\le \sum_{K \in \mathcal{C}_n} \Pbb\left(|K \cap G| \ge (1 + \delta)
    \frac{pn^2}{2}\right)
  \end{align*}
  Note that by \nameref{lemma:supersat},
  \[
    \Ebb|K \cap G|
    = p \cdot e(K)
    \le p (1 + o(1)) \frac{n^2}{4}
  .\]
  So we can continue the earlier calculation to get
  \begin{align*}
    &\le |\mathcal{C}_n| \exp \left( -\frac{\left(\delta
    \frac{pn^2}{2}\right)^2}{3 \frac{pn^2}{4}} \right) \\
    &= n^{Cn^{3 / 2}} \exp(c\delta^2 pn^2) \\
    &= n^{Cn^{3 / 2}} \exp(-C_2(\log n)n^{3 / 2}) \\
    &\to 0
  \end{align*}
  if $C_2 > C$.
\end{proof}
