%! TEX root = Combi.tex
% vim: tw=50
% 05/11/2024 09AM

% Example class: Friday, MR3, 1:30pm
% Hand in Q2, Q3: pigeonhole, 5pm 05/11
% (Also hand in any starred questions if applicable)

Define a sequence $A_0, A_1, \ldots \subset \Q_n$
as follows:
\begin{itemize}
  \item Set $A_0 = A_1$.
  \item Having chosen $A_0, \ldots, A_k$: if $A_k$
    is \gls{icomp} with $\Ci(A_k) \neq A_k$ and
    set $A_{k + 1} = \Ci(A_k)$ -- and continue.
\end{itemize}
Must terminate, because $\sum_{x \in A_k}
\text{(position of $x$ in \gls{simpord})}$ is
strictly decresing.

The final family $B = A_k$ satisfies $|B| = |A|$,
$|\neigh(B)| \le |\neigh(A)|$, and is \gls{icomp}
for all $i$. Does $B$ \gls{icomp} for all $i$
imply that $B$ is an initial segment of
\gls{simpord}? (If yes, then $B = C$ and we are
done).

Sadly, no. For example in $\Q_3$ can take
$\{\emptyset, 1, 2, 12\}$:
\begin{center}
  \includegraphics[width=0.6\linewidth]{images/7a39827950e5472c.png}
\end{center}

However:

\begin{fclemma}[]
  % Lemma 2 2
  Assuming:
  - $B \subset \Q_n$ is \gls{icomp} for all $i$
  - $B$ not an initial segment of the
  \gls{simpord}
  Then:
  one of the following is true:
  \begin{itemize}
    \item either $n$ is odd, say $n = 2k + 1$, and
      $B = X\rsubs[\le k] - \{k + 2, k + 3,
      \ldots, 2k + 1\} \cup \{1, 2, \ldots, k + 1\}$
    \item or $n$ is even, say $n = 2k$, and $B =
      X\rsubs[< k] \cup \{x \in X\rsubs[k] : 1 \in
      x\} - \{1, k + 2, k + 3, \ldots, 2k\} \cup
      \{2, 3, 4, \ldots, k + 1\}$.
  \end{itemize}
\end{fclemma}

For the even case: ``Remove the last
\glsref[rset]{$k$-set} with
$1$, and add the first \glsref[rset]{$k$-set} without $1$.''
\begin{center}
  \includegraphics[width=0.6\linewidth]{images/3aed31d9d6044779.png}
\end{center}
After we prove this, we will have solved our
problem, as in each case we certainly have
$|\neigh(B)| \ge |\neigh(C)|$.

\begin{proof}
  Since $B$ is not an initial segment of
  \gls{simpord}, there exists $x < y$ (in
  \gls{simpord}) with $x \notin B$, $y \in B$.
  \begin{center}
    \includegraphics[width=0.6\linewidth]{images/654accffe0724da0.png}
  \end{center}
  For each $1 \le i \le n$: cannot have $i \in x$,
  $i \in y$ (as $B$ is \gls{icomp}). Also cannot
  have $i \notin x$, $i \notin y$ for the same
  reason.

  So $x = y^c$.

  Thus: for each $y \in B$, there exists at most
  one earlier $x$ with $x \notin B$ (namely $x =
  y^c$). Similarly, for each $x \notin B$ there is
  at most one later $y$ with $y \in B$ (namely $y
  = x^c$).
  \begin{center}
    \includegraphics[width=0.6\linewidth]{images/f164eac4684e4601.png}
  \end{center}
  So $B = \{z : z \le y\} - \{x\}$, with $x$ the
  predessor of $y$ and $x = y^c$.

  Hence if $n = 2k + 1$ then $x$ is the last
  \glsref[rset]{$k$-set}, and if $n = 2k$ then $x$
  is the last \glsref[rset]{$k$-set} with $1$.
\end{proof}

\begin{proof}[Proof of \cref{harper}]
  Done by above.
\end{proof}

\begin{remark*}
  \phantom{}
  \begin{enumerate}[(1)]
    \item Can also prove \nameref{harper}
      \glspl{uvc}.
    \item Can also prove \nameref{KK} using these
      `codimension $1$' compressions.
  \end{enumerate}
\end{remark*}

\glssymboldefn{ineigh}%
For $A \subset \Q_n$ and $t = 1, 2, 3, \ldots$,
the $t$-neighbourhood of $A$ is $A_{(t)} =
\neigh^t(A) = \{x \in \Q_n : d(x, A) \le t\}$.
\begin{center}
  \includegraphics[width=0.6\linewidth]{images/ab5df83399a64ce9.png}
\end{center}

\begin{fccoro}[]
  \label{coro_2_3}
  % Corollary 2 3
  Assuming:
  - $A \subset \Q_n$ with $|A| \ge \sum_{i = 0}^r
  {n \choose i}$
  Then:
  \[
    |A_{(t)}| \ge \sum_{i = 0}^{r + t} {n \choose
    i}
  \]
  for all $t \le n - r$.
\end{fccoro}

\begin{proof}
  \cref{harper} with induction on $t$.
\end{proof}

To get a feeling for the strength of
\cref{coro_2_3}, we'll need some estimates on
things like $\sum_{i = 0}^{r} {n \choose i}$.
\begin{center}
  \includegraphics[width=0.6\linewidth]{images/c51d6938b0df4812.png}
\end{center}
``Going $\eps\sqrt{n}$ standard deviations away
from the mean $\frac{n}{2}$.''

\begin{fcprop}[]
  % Proposition 2 4
  Assuming:
  - $0 < \eps < \quarter$
  Then:
  \[
    \sum_{i = 0}^{\left\lfloor \left( \half - \eps
    \right) n \right\rfloor } {n \choose i} \le
    \frac{1}{\eps} e^{-\frac{\eps^2 n}{2}} \cdot
    2^n
  .\]
\end{fcprop}

``For $\eps$ fixed, $n \to \infty$, this is an
\emph{exponentially small} fraction of $2^n$.''

\begin{proof}
  For $i \le \left\lfloor \left( \half - \eps
  \right) n \right\rfloor$:
  \[
    {n \choose i} = {n \choose i} \frac{i}{n - i +
    1}
  ,\]
  so
  \[
    \frac{{n \choose i - 1}}{{n \choose i}}
    = \frac{i}{n - i + 1}
    \le \frac{\left( \half - \eps \right)
    n}{\left( \half + \eps \right) n}
    = \frac{\half - \eps}{\half + \eps}
    = 1 - \frac{2\eps}{\half + \eps}
    \le 1 - 2\eps
  .\]
  Hence
  \[
    \sum_{i = 0}^{\left\lfloor \left( \half - \eps
    \right) n \right\rfloor} {n \choose i}
    \le \frac{1}{2\eps} {n \choose \left\lfloor
    \left( \half - \eps \right) n \right\rfloor}
  \]
  (sum of a geometric progression).

  Same argument tells us that
  \begin{align*}
    {n \choose \left\lfloor \left( \half - \eps
    \right) n \right\rfloor}
    &\le {n \choose \left\lfloor \left( \half -
    \frac{\eps}{2} \right) n \right\rfloor}
    \left( 1 - 2 \frac{\eps}{2}
    \right)^{\frac{\eps n}{2} - 1}
    &&\text{-1 from the $\lfloor \bullet \rfloor$ stuff}
    \\
    &\le 2^n \cdot 2 (1 - \eps)^{\frac{\eps n}{2}}
    \\
    &\le 2^n \cdot 2 e^{-\frac{\eps^2 n}{2}}
    &&\text{as $1 - \eps \le e^{-\eps}$}
  \end{align*}
  Thus
  \[
    \sum_{i = 0}^{\left\lfloor \left( \half - \eps
    \right) n \right\rfloor} {n \choose i} \le
    \frac{1}{2\eps} \cdot 2e^{-\frac{\eps^2 n}{2}}
    \cdot 2^n
    . \qedhere
  \]
\end{proof}
