\documentclass[11pt]{article}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{multicol}
\usepackage{latexsym}
\usepackage[pdftex]{graphicx}
\usepackage{url}
\usepackage{mathrsfs}
\usepackage{hyperref}
\hypersetup{colorlinks=true}
\setlength{\oddsidemargin}{.25in}
\setlength{\evensidemargin}{.25in}
\setlength{\textwidth}{6in}
\setlength{\topmargin}{-0.4in}
\setlength{\textheight}{8.5in}

\def\zero{\multicolumn{1}{>{\columncolor{white}}c}{0}}
\def\colCell#1#2{\multicolumn{1}{>{\columncolor{#1}}c}{#2}}

\input{preamble.tex}

\begin{document}

\lecture{7: Ramsey Theory}{Week 7}
Consider the following problem:
\begin{question}
Amongst any collection of 6 people, can you always find three mutual friends or three mutual strangers?
\end{question}
\begin{solution}
Translating this into the language of graph theory, our question is the following: if you color the edges of $K_6$ red and blue, do you always have to create a triangle with monochromatically red or monochromatically blue edges?

I claim that you will always do so.  To see why: pick any red-blue coloring of $K_6$, and any vertex $v \in K_6$.  Because $\deg(v) = 5$, we know that if the five edges are shaded red and blue, there must be at least three of these edges that are the same color!  Suppose (without any loss of generality) that this color is red, and let $\{w_1,w_2,w_3\}$ be the endpoints of these edges.

Then, there are two cases:
\begin{itemize}
\item There is some edge $\{w_i, w_j\}$ that's red.  In this case, the vertices $v, w_i, w_j$ form a red triangle.
\item Every edge $\{w_i, w_j\}$ is blue.  In this case, the vertices $w_1, w_2, w_3$ form a blue triangle.
\end{itemize}

In either situation, we've found a monochrome triangle!  So these always exist.
\end{solution}

As mathematicians, whenever we prove something we're really tempted to see if a generalization of it might be true.  For example: in the above question, we showed that any two-coloring of $K_6$ creates a monochrome triangle (i.e. a $K_3$.)  One natural question we could ask, then, is the following: given a fixed value of $k$, what values of $K_n$ will a two-coloring of $K_n$'s edges always force a $K_k$ with monochrome edges to exist?  Do such values of $n$ even exist?  Also, what if we use more than two colors -- say, $c$ colors?  Will there still be values of $n$ such that a $c$-coloring of $K_n$'s edges always creates a monochrome $K_k$?

As it turns out, the answer to this question is yes!  The result is called Ramsey's theorem:
\begin{question}
(Ramsey's Theorem) Let $C = \{1, \ldots c\}$ be a collection of $c$ distinct colors, and $n_1, \ldots n_c$ a collection of integers.  Then, there is some value of $n$ such that if $K_n$'s edges are colored with $c$ colors,  it must contain a $K_{n_i}$ where all of $K_{n_i}$'s edges are colored $i$, for some $1\leq i \leq c$.
\end{question}
\begin{proof}
Let $R(n_{1}, \ldots , n_c)$ denote the smallest value of $n$ such that if $K_n$'s edges are colored with $c$ colors, then $K_n$ necessarily contains a $i$-monochrome $K_{n_i}$ (i.e. a $K_{n_i}$ where all of the edges are colored $i$.)  We seek to show that $R$ is well-defined, and always exists.

To do this, we proceed by induction on the number of colors $C = \{1, \ldots, c\}$.  When $c = 1$, note that this is trivial, as $R(k) = k$ for all $k$.

Now, consider the two-color case.  We have $R(n,1) = R(1,n) = 1$, as any two-coloring of $K_n$'s edges has a $K_1$ in which all of the edges are whatever color we want (because there are no edges in $K_1$.)

As well, we have $R(n,2) = R(2,n) = n$, because any red-blue two-coloring of $K_n$'s edges either
\begin{itemize}
\item paints all of the edges the same color (which makes a monochrome $K_n$ of some color), or
\item paints at least one edge red and another blue (which makes monochrome $K_2$'s of both colors.)
\end{itemize}

Furthermore, we claim that we have the following recursive bound on the growth of $R(r,s):$
\begin{align*}
R(r,s) \leq R(r, s-1) + R(r-1,s)
\end{align*}
To prove this, we proceed by induction on the sum $r+s$.  We've already proven the base cases via the two examples above: so we take any pair $r,s$, and can assume that our bound holds for any $x, y$ with $x+y < r+s$.

Take a complete graph $K$ on $(R(r, s-1) + R(r-1,s))$ many vertices, and color its edges red and blue (or 1 and 2, if you prefer integers).  We seek to show that there's either a monochrome red $K_r$ or monochrome blue $K_s$ in $K_n$.

To see this: pick any $v \in K$, and partition the rest of $K$'s vertices into two sets:
\begin{itemize}
\item $B'$, which contains all of the vertices in $K$ connected to $v$ by a blue edge, and
\item $R'$, which contains all of the vertices in $K$ connected to $v$ by a red edge.
\end{itemize}
Let $B$ and $R$ be the subgraphs of $K$ induced by these vertices, respectively.

Because $K$ has 
\begin{align*}
 R(r, s-1) + R(r-1,s) = |V(B)| + |V(R)| + 1
\end{align*}
many vertices, either $|V(B)| \geq  R(r, s-1)$ or $|V(R)| \geq  R(r-1,s)$. 

Suppose that we have $|V(B)| \geq  R(r, s-1)$.  Because $r + s-1 < r+s$, we can apply our inductive hypothesis, which tells us that we have either
\begin{enumerate}
\item a red $K_r$ inside of $B$, or
\item a blue $K_{s-1}$ inside of $B$, in which case (by combining this blue $K_{s-1}$ with $v$ and its edges to $B$) we have a blue $K_s$ inside of our entire $K_n$. 
\end{enumerate}
These are the two cases we were looking for; so, in the situation where $|V(B)| \geq  R(r, s-1)$, we've proven our claim!

Similarly, if we have $|R| \geq  R(r-1,s)$, we can use induction to tell us that there's  either
\begin{enumerate}
\item a blue $K_s$ inside of $R$, or
\item a red $K_{r-1}$ inside of $R$, in which case (by combining this red $K_{r-1}$ with $v$ and its edges to $R$) we have a red $K_r$ inside of our entire $K_n$,
\end{enumerate}
and we're also done.



Now, suppose that we've settled our theorem for $c-1$ colors.  We seek to resolve it for $c$ colors.  Specifically, we make the following claim:

\begin{align*}
R(n_1, \ldots n_c) \leq R(n_1, \ldots n_{c-2}, \left(R(n_{c-1}, R_c)\right)).
\end{align*}
To see this: let $K$ be the complete graph on $R(n_1, \ldots n_{c-2}, \left(R(n_{c-1}, R_c)\right))$ many vertices, and color $K$'s vertices with $c$ different colors.

Now: become selectively colorblind!  In other words, pretend temporarily that $c-1$ and $c$ have the same colors.

Then, by our inductive hypothesis, either
\begin{itemize}
\item there is an $i$-monochrome $K_{n_i}$, for some $1 \leq i \leq c-2$, or
\item there is a $(c \& c-1)$-colored $K_{R(n_{c-1},n_c)}$.  By the definition of $R(n_{c-1}, n_c)$, this means that there's either a $(c-1)$-monochrome $K_{n_{c-1}}$, or a $c$-monochrome $K_{n_c}$.
\end{itemize}
So we're done!
\end{proof}

In the language of the proof above, the opening question for this lecture can be thought of as showing $R(3,3) =6$.


In general, Ramsey numbers are ridiculously hard to find.  Paul Erd\H{o}s, a famous combinatorialist and mathematician, was fond of telling the following story about finding something as simple as $R(6,6)$:
\begin{quote}
Erd\H{o}s asks us to imagine an alien force, vastly more powerful than us, landing on Earth and demanding the value of R(5, 5) or they will destroy our planet. In that case, he claims, we should marshal all our computers and all our mathematicians and attempt to find the value. But suppose, instead, that they ask for R(6, 6). In that case, he believes, we should attempt to destroy the aliens.
\end{quote}

To illustrate some of the difficulty of finding such numbers, consider the following question:
\begin{question}
What's $R(3,4)$?
\end{question}
\begin{solution}
Pick $n$ such that for any red-blue coloring of $K_n$, we have neither a blue $K_3$ nor a red $K_4$.  Pick any $x \in K_n$, and again let
\begin{itemize}
\item $B$ be the subgraph induced by the set of vertices in $K_n$ connected to $v$ by a blue edge, and
\item $R$ be the subgraph induced by the set in $K_n$ connected to $v$ by a red edge.
\end{itemize}
If there is a blue edge in $B$, then $x \cup B$ will yield a blue $K_3$; similarly, if there is a red $K_3$ in $R$, $x \cup R$ yields a red $K_4$.  Because $R(2,4) = 4$ and  $R(3,3) = 6$, we have that if neither situation occurs, we must have $|B| \leq 3$ and $|R| \leq 5$.  In other words, we've just shown that for any vertex $x \in K_n$, we have $deg_b(x) \leq 3$ and $deg_r(x) \leq 5$.  Consequently, the total degree of $x$ must be $\leq 8$; i.e. $n \leq 9$, and thus $R(3,4) \leq 10$.

Consider the case $n=9$.  In this case, each $x$ must have $deg_b(x) = 3$ and $deg_r(x) = 5$; consequently, the number of blue edges in $K_n$ can be counted, via the degree-sum formula, to be $\frac{1}{2}\sum_{x \in K_n} deg_b(x) = 27/2 = 13.5$.  Since we can't have half of a blue edge, this is also impossible!  So $R(3,4) \leq 9$.

Conversely: consider the following drawing below.  The solid edges form a graph with girth $\geq 4$, and so do not contain a $K_3$.  As well, picking any four points on the boundary of a 8-cycle necessarily involves picking two opposite points or two adjacent points; so there is no complete $K_4$ amongst 4 points within the dashed edges. 

\begin{center}
\includegraphics[width=3in]{lecture5_drawing1_ramsey.pdf}
\end{center}

Thus, $R(3,4) > 8$; i.e. $R(3,4) = 9$.
\end{solution}

\end{document}