% AUTOGENERATED FILE; you probably want to edit the .tex.in file, not this.
\documentclass[letter,12pt]{article}
\usepackage[margin=0.5in,hmargin=4cm]{geometry}
\pagestyle{headings}
\usepackage{amssymb,amsmath,hyperref,enumerate}
\usepackage{parskip}
\usepackage[all,cmtip]{xy}
\parindent=0pt
\newcommand{\defn}{\underline}
\newcommand{\qed}{\hfill\ensuremath{\Box}}
\begin{document}
\section*{Pigeonhole Principles}

\paragraph{Pigeonhole Principle (PP):}
\mbox{}\\    If some pigeons are in some pigeonholes,
\\    and there are fewer pigeonholes than there are pigeons,
\\    then some pigeonhole must contain at least two pigeons.

{\em // The "pigeons" and "pigeonholes" can be abstract!}

\paragraph{Example:}
\mbox{}\\    If there are 367 people in a room,
\\    there must be two who share a common birthday.

\subsection*{Interlude: maps and numbers}

$f : X \rightarrow  Y$ map between finite sets.

For $y\in Y$, $f^{-1}(y) =$ "fibre of $f$ over $y$" $= \{ x \;|\; f(x) = y \}$.

\paragraph{Recall:}
\begin{itemize}\item $f$ is \underline{surjective} aka \underline{onto},
\\    written $f : X \twoheadrightarrow  Y$,
\\    if for all $y \in Y$, $| f^{-1}(y) \;|\; \geq  1$

\item $f$ is \underline{injective} aka \underline{1-1},
\\    written $f : X \ensuremath{\lhook\joinrel\relbar\joinrel\rightarrow} Y$,
\\    if for all $y \in Y$, $| f^{-1}(y) \;|\; \leq  1$

\item $f$ is \underline{bijective} aka \underline{a (1-1) correspondence} aka \underline{invertible},
\\    written $f : X \xrightarrow{\equiv} Y$,
\\    if $f$ is both injective and surjective,
\\    i.e. if for all $y \in Y$, $| f^{-1}(y) \;|\; = 1$

\end{itemize}

\paragraph{Remark:}
\mbox{}\\    If $f$ is
\begin{itemize}\item injective then $|X| \leq  |Y|$ (Pigeonhole principle)
\item surjective then $|X| \geq  |Y|$
\item bijective then $|X| = |Y|$
\end{itemize}

\subsection*{Applications of the Pigeonhole principle}

\paragraph{Example:}
\mbox{}\\    If I take 13 coins,
\\    divide them into 9 piles, placed in a row,
\\    then there will be a group of neighbouring piles within the row
    such that there are exactly 4 coins in the group.
\\(Generally: $n$ coins, $m$ piles; must be $k$ coins in a contiguous group if
\mbox{}\\ \mbox{\hspace{2em}}$n+k < 2*m$
\\    (this isn't sharp))
\paragraph{Proof:}
\mbox{}\\    Let $a_i :=$ number of coins in first $i$ piles, $1 \leq  i \leq  9$.
\\    Consider the 18 numbers
\mbox{}\\ \mbox{\hspace{2em}}$a_1, a_2, ..., a_9, a_1+4, a_2+4, ..., a_9+4$.
\\    Since $1 \leq  a_i \leq  13$, these numbers are all between 1 and 17.
\\    So by the PP, two must be equal.

    Since no two $a_i$ are equal (since the piles are non-empty),
\\    and similarly no two $a_i+4$ are equal,
\\    we must have $a_i = a_j+4$ for some $i$,$j$.

    So $a_i - a_j = 4$,
\\    so 4 is the sum of the sizes of the piles after $i$ and up to $j$,
\\    namely piles $i+1,...,j$.

\paragraph{Example:}
\mbox{}\\    Using as many coins as I want,
\\    I make a row of $k$ piles.
\\    Then there is a group of neighbouring piles
    such that the number of coins in the group is divisible by $k$.
\paragraph{Proof:}
\mbox{}\\    Let $a_1,...,a_k$ be as above.

    Let $r_i$ be the remainder on dividing $a_i$ by $k$.
\\    If any $r_i=0$, we're done.
\\    Else, $0 < r_i < k$,
\\    so by the PP, two remainders are equal,
\\    $r_i = r_j$.
\\    But then $a_i - a_j$ is divisible by 7, and we conclude as in the previous
    example.


\subsection*{Packed Pigeonhole Principle}

\paragraph{Packed Pigeonhole Principle (PPP):}
\mbox{}\\    If there are more than $k*n$ pigeons in $n$ pigeonholes,
\\    then some pigeonhole contains more than $k$ pigeons.
\\(Note: "Packed" is not standard terminology. This principle is commonly
referred to as the pigeonhole principle. Brualdi calls something slightly more
general (but less pleasing) the "strong pigeonhole principle", but I don't
think we need to cover it)

\paragraph{Example:}
\mbox{}\\    If $a_1,...,a_{n^2+1}$ is a sequence of $n^2 + 1$ real numbers,
\\    there is a subsequence of length $n+1$ which is monotonic, i.e. is either
    (nonstrictly) increasing or (nonstrictly) decreasing.
\paragraph{Proof:}
\mbox{}\\    Suppose there is no increasing subsequence of length $n+1$.

    Let $l_i$ be the length of the longest increasing subsequence starting with
    $a_i$. So $1 \leq  l_i \leq  n$.

    So by the PPP, $n+1$ of these $n^2+1$ numbers are equal;
\\    say $l_{i_1} = ... = l_{i_{n+1}}$.

    Now suppose $a_{i_j} < a_{i_{j+1}}$.
\\    Then we can extend the longest increasing subsequence starting with
    $a_{i_{j+1}}$ to a longer one starting with $a_{i_j}$, by prepending $a_{i_j}$.
\\    This contradicts $l_{i_j} = l_{i_{j+1}}$.

    So $(a_{i_j})_j$ is a decreasing sequence of length $n+1$.

\paragraph{Abstract version:}
\mbox{}\\    If $f : X \twoheadrightarrow  Y$ is a surjection,
\\    and if all fibres are of size at most $k$,
\mbox{}\\ \mbox{\hspace{2em}}i.e. $| f^{-1}(y) \;|\; \leq  k$ for all $y$,
\\    then $|X| \leq  k|Y|$.

\paragraph{Remark (Division principle, map form):}
\mbox{}\\    If $f : X \twoheadrightarrow  Y$ is a surjection,
\\    and if all fibres have size exactly $k$,
\mbox{}\\ \mbox{\hspace{2em}}i.e. $| f^{-1}(y) \;|\; = k$ for all $y$,
\\    then $|X| = k|Y|$.

    (Proof: partition $X$ according to the value of $f$, apply division principle)

\paragraph{Averaging principle:}
\mbox{}\\    Given integers $a_1,...,a_n$,
\\    some $a_i$ is at least the average,
\mbox{}\\ \mbox{\hspace{2em}}$a_i \geq  (a_1+...+a_n)/n$
\\    (Note the average might not be an integer!)

\paragraph{Packed Pigeonhole follows from averaging:}
\mbox{}\\    if there are more than $k*n$ pigeons,
\\    then the average number of pigeons per pigeonhole is more than k;
\\    some pigeonhole has at least the average number of pigeons,
\\    so has more than $k$ pigeons.

\paragraph{Example:}
\mbox{}\\    Discs (p.75)
\end{document}
