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

\textbf{Sketch pad:}
\begin{enumerate}[\bfseries {Idea} I:]
  \item Greedily build an \gls{ind} set $\ge \frac{n}{d + 1}$.
  \item Choose a set at random??
    Choose each vertex with probability $p$.
    But note that if $p \gg \frac{1}{d}$, then for each vertex, we are likely to
    pick $pd \gg 1$ of its neighbours.
    \begin{center}
      \includegraphics[width=0.3\linewidth]{images/a7d0adcd14e942b3.png}
    \end{center}
  \item Use \gls{locallem}?
    Too much dependence.
    \begin{center}
      \includegraphics[width=0.3\linewidth]{images/52737afda57a4fc1.png}
    \end{center}
  \item Combine Ideas I and II by using a random greedy process.
    Take a vertex, remove its neighbours.
    Then using the triangle-freeness, we should get that density decreases.
    \begin{center}
      \includegraphics[width=0.3\linewidth]{images/cb9c79bea6e14f94.png}
    \end{center}
    \textbf{Heuristic:} Let's say we build an \gls{ind} set $I$ using this
    process with $|I| = pn$.
    Assumption: ``the set $I$ looks like a random set of its density -- apart
    from the fact that it's \gls{ind}''.

    Let's consider the largest $p$ we can hope for.
    Say a vertex $v$ \emph{is open} if $N(v) \cap I = \emptyset$.
    \begin{center}
      \includegraphics[width=0.3\linewidth]{images/c4947450e1984195.png}
    \end{center}
    We might expect
    \[
      \Pbb_p(\text{$v$ is open})
      \stackrel{!}{\approx} (1 - p)^d
    .\]
    Note that $\Pbb_p(\text{$v$ is open}) \ll p$ then process is basically over
    (``amount of vertices left that we could potentially use is $\ll$ than the
    number of vertices we have so far, so not really any point in trying to
    collect them'').
    So solve $(1 - p)^d = p$.
    First estimate that we need $p = \frac{1}{d^{1 + o(1)}}$, and then using
    this we can solve to get
    \[
      p
      = (1 + o(1)) \frac{\log d}{d}
    .\]
\end{enumerate}

\textbf{Fact} (Jensen's inequality)\textbf{.} Let $\varphi$ be a convex function
on $\Rbb$.
Let $X$ be a random variable.
Then
\[
  \Ebb \varphi(X)
  \ge \varphi(\Ebb X)
.\]

\textbf{Fact.} Let $G$ be a graph with average degree $d = \frac{2e(G)}{n}$.
Then
\[
  \sum_{x \sim V(G)} \sum_{y \sim x} d(y)
  = \sum_{x \in V(G)} d(x)^2
  \ge nd^2
\]

\begin{proof}
  \begin{align*}
    \sum_{x \in V(G)} \sum_{y \sim x} d(y)
    &= \sum_x \sum_y d(y) \indicator{x \sim y} \\
    &= \sum_y d(y) \sum_x \indicator{x \sim y} \\
    &= \sum_y d(y)^2
  \end{align*}
  The inequality follows by Jensen.
\end{proof}

Now we will prove \nameref{thm:shearermaxdegtrianglefree} (in fact a slight
strengthening).
We discussed earlier that the proof will involve repeatedly removing vertices
and tracking a density increase.
Shearer found a very elegant way of tracking this, that makes the proof very
clean and magical looking, but the key idea is really the sketch argument given
above.

Define
\[
  f(d)
  = \frac{d \log d - d + 1}{(d - 1)^2}
.\]
Note $f(d) \in (0, 1)$ for $1 < d$, $f'(d) < 0$ and $f''(d) \ge 0$.
We have
\[
  f(x)
  \ge f(x_0) + (x - x_0) f'(x_0)
\]
by remainder form of Taylor's theorem.

\begin{fcthm}[Shearer on $f(d)$]
  Assuming:
  - $G$ an $n$ vertex graph
  - triangle-free
  - average degree $d$
  Then:
  \[
    \indnum(G)
    \ge f(d) n
  .\]
\end{fcthm}

\begin{proof}
  Let $v \in V(G)$.
  Define $G' = G - N(v) - v$.
  We have
  \[
    \indnum(G)
    \ge 1 + \indnum(G')
    \ge 1 + (n - d(v) - 1) f(d')
  ,\]
  where
  \[
    d'
    = \text{average degree of $G'$}
    = \frac{2e(G')}{(n - d(v) - 1)}
  \]
  and
  \[
    e(G')
    = e(G) - \sum_{y \sim v} d(y)
  \]
  by triangle-free property.
  \begin{center}
    \includegraphics[width=0.6\linewidth]{images/be36246d679b46d1.png}
  \end{center}
  Using the earlier working, we have
  \begin{align*}
    \indnum(G)
    &\ge 1 + f(d)(n - d(v) - 1) + (d' - d)f'(d)(n - d(v) - 1) \\
    &\ge f(d) n - f(d)(d(v) + 1)
    + f'(d)\left(2e(G') - 2e(G) + d \cdot d(v) + d\right)
    + 1 \\
    &\ge f(d) n - f(d)(d(v) + 1)
    + f'(d)\left(2e(G) - 2\sum_{y \sim v} d(y) - 2e(G) + d \cdot d(v) + d\right)
    + 1
  \end{align*}
  We want
  \[
    f(d) (d(v) + 1)
    \le f'(d) \left( -2\sum_{y \sim v} d(y) + d \cdot d(v) + d\right) + 1
  .\]
  We claim this holds on average.
  Average of left hand side is
  \[
    \frac{1}{n} \sum_{v \in V(G)} f(d)(d(v) + 1)
    = f(d)(d + 1)
  .\]
  Average of right hand side is (using $f'(d) < 0$),
  \begin{align*}
    \frac{1}{n} \sum \text{RHS}
    &= 1 + f'(d) \left( -\frac{2}{n} \sum_v \sum_{y \sim v} d(y) + d^2 + d
    \right) \\
    &\ge 1 + f'(d) \left( -2d^2 + d^2 + d \right) \\
    &= 1 + f'(d) (d - d^2)
  \end{align*}
  In fact, $f$ satisfies the differential equation
  \[
    f(x)(x + 1)
    = f'(x) (x - x^2) + 1
  .\]
  So the inequality holds on average, and thus there exists a good choice of $v$
  for the induction.
\end{proof}

In this proof, note that this function $f$ is not essential to the proof and is
just helpful to make the presentation as short as possible.

We now give another proof of \cref{thm:shearermaxdegtrianglefree}, but with some
constant $c$ instead of $1 + o(1)$, and this time we'll assume the maximum
degree is bounded rather than the average degree:

\begin{proof}[Second proof of \cref{thm:shearermaxdegtrianglefree}]
  Choose an \gls{ind} set $I$ uniformly at random among all \gls{ind} sets.
  We'll show
  \[
    \Ebb|I|
    \ge c \frac{n}{d} \log d
  .\]
  This is an example of what is known as the ``hard-core model''.
  It is called ``hard'' because we have a hard constraint on every edge (we
  require that each edge is not present).
