% This is a TeX file
% It is essentially a programming language for mathematics documents
% You can ignore this first portion of the file, as it is essentially a bunch of "include" statements.
\documentclass[10pt]{article}

\usepackage{etex}
\usepackage{pictex, latexsym, graphicx,amsmath,amssymb,amsbsy,amsfonts,amsthm,verbatim}
\usepackage{graphics}
\usepackage{hyperref}
\usepackage{fullpage}
\usepackage{fancyhdr}
\usepackage{array}


\usepackage{tikz}
\usetikzlibrary{shapes,arrows,spy,positioning,decorations,calc}%,snakes}
\tikzset{
insep/.style={inner sep=2pt, outer sep=0pt, circle,fill}, 
free/.style={inner sep=2pt, outer sep=0pt, circle,fill=gray,draw}, 
extra/.style={inner sep=2pt, outer sep=0pt, circle,fill=white,draw}, 
}
\usepackage{tkz-berge}


\usepackage{algorithm,algorithmic}
\usepackage{multirow}

\setlength{\parskip}{0.5em}
\setlength{\parindent}{0em}
\setlength{\voffset}{-0.5in}
\setlength{\headsep}{0.25in}

% The following denotes a counter for the problems.
\newcounter{problem}
\newcommand{\problem}{\textbf{Problem \refstepcounter{problem}.}}

% These are macro shortcuts! Helpful!
\def\vu{\mathbf{u}}
\def\vx{\mathbf{x}}
\def\vy{\mathbf{y}}
\def\vz{\mathbf{z}}
\def\vb{\mathbf{b}}
\def\vv{\mathbf{v}}
\def\vw{\mathbf{w}}

\renewcommand{\implies}{\rightarrow}
%\newcommand{\lnot}{\neg}
\renewcommand{\lor}{\vee}
\renewcommand{\land}{\wedge}
\newcommand{\xor}{\oplus}
\newcommand{\symmdiff}{\triangle}
\renewcommand{\iff}{\leftrightarrow}
%\newcommand{\TRUE}{\mathbf{T}}
%\newcommand{\FALSE}{\mathbf{F}}
\newcommand{\universe}{\mathcal{U}}


\def\N{\mathbb{N}}
\def\Q{\mathbb{Q}}
\def\C{\mathbb{C}}
\def\Z{\mathbb{Z}}
\def\R{\mathbb{R}}
\def\cP{\mathcal{P}}



\begin{document}
\pagestyle{fancyplain}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NOW you can start typing your text that will appear in the PDF!!!

% Note that anything after a '%' is a comment!

% Anything immediately after a '\' is a command. 
% Some denote formatting, some are for special characters.
% The '$' symbol starts and ends "math mode". Use this only for mathematical statements
% In math mode, any sequence of letters is meant to be a list of variables, so use "\sin x" for the sine of x, which will look much different from "sin x"

\lhead{}
\rhead{}
\chead{COM S 330 --- Lecture Notes --- Week of April 6--10}

\renewcommand{\arraystretch}{1.25}



\section{Monday, April 6}


\subsection{Rosen 10.4: Connectivity}

\textbf{Reading:} Rosen 10.4

\textbf{Def:} A \emph{path (from $u$ to $v$)} in a graph $G$ is a list $v_0e_1v_1e_2v_2\dots v_{k-1}e_kv_k$ where the vertices $v_0,\dots,v_k\in V(G)$ are distinct, the edges $e_1,\dots,e_k\in E(G)$ are distinct, and $e_i = v_{i-1}v_i$ (and $v_0 = u$, $v_k = v$).
The \emph{length} of a path is the number of edges in the path ($k$ in this definition).

\textbf{Def:} The \emph{distance} between two vertices $u, v$ in a graph $G$ is the minimum length of a path from $u$ to $v$ in $G$.
We use $d(u,v)$ to denote the distance (and use $d_G(u,v)$ to specify specifically the distance in the graph $G$, when necessary).

\textbf{Prop:} If $u,v,x$ are vertices in $G$ and $vx \in E(G)$, then $d(u,x) \leq d(u,v) + 1$.

\textbf{Triangle Inequality:} If $x,y,z$ are vertices in $G$, then $d(x,z) \leq d(x,y)+ d(y,z)$.

The idea: Traveling from $x$ to $y$ and then to $z$ can only take longer than traveling directly from $x$ to $z$, not shorter.

\textbf{Note:} If no path from $u$ to $v$ exists in $G$, then $d(u,v) = +\infty$.

\textbf{Ex:} In a computer network, $d(u,v)$ is the minimum number of hops required to send a message between two computers $u$ and $v$.

\textbf{Ex:} In a collaboration graph, $d(u,v)$ is the minimum number of collaborations required to connect two people, $u$ and $v$.

\textbf{Def:} A graph is \emph{connected} if there is a path between every pair of distinct vertices; otherwise the graph is \emph{disconnected}.

\textbf{Def:} Let $G$ be a graph. A \emph{connected component} is a subgraph $H \subseteq G$ such that $H$ is connected and for all $H'$ with $H \subset H' \subseteq G$ (note: $H \neq H'$) then $H'$ is disconnected. Observe that a connected component is always an induced subgraph.


\subsection{Bipartite Graphs and Odd Cycles}

Recall that if $G$ is bipartite and $H \subseteq G$, then $H$ is bipartite.

Also, recall that $C_n$ is bipartite if and only if $n$ is even.

Thus, bipartite graphs do not contain odd cycles! This is an obviously necessary condition that is also sufficient:

\textbf{Thm:} Let $G$ be a connected graph.
$G$ is bipartite if and only if $G$ does not contain an odd cycle.

\begin{proof}
If $G$ is bipartite, then $G$ obviously does not contain an odd cycle (see discussion above).

Suppose $G$ is a connected graph that does not contain an odd cycle.
Let $v \in V(G)$ and define $X, Y$ as:
\[
	X = \{ x\in V(G) : d(v,x) \text{ is even }\},\quad
	Y = \{ y\in V(G) : d(v,y) \text{ is odd }\}.
\]	
We claim that $X\cup Y$ is a bipartition of $G$.
$V(G) = X \cup Y$ follows since $G$ is connected and $d(v,u)$ is always finite.
$X \cap Y = \varnothing$ is immediate by definition.

Suppose for the sake of contradiction that there are two distinct vertices $y_1, y_2 \in Y$ such that $y_1y_2 \in E(G)$.
Let $P_1$ and $P_2$ be paths from $v$ to $y_1$ and $y_2$, respectively, such that $P_1$ and $P_2$ have minimum length.
$P_1$ and $P_2$ have the same length, since $d(v,y_1) \leq d(v,y_2)+1$ and vice-versa.
Since $y_1$ and $y_2$ are both in $Y$, their distances are both odd, so $d(v,y_1)\leq d(v,y_2)+1$ implies $d(v,y_1) \leq d(v,y_2)$ and vice-versa.

Let $u$ be the last vertex in common between $P_1$ and $P_2$.
Let $Q_1$ and $Q_2$ be the paths from $u$ to $y_1$ and $y_2$ in the paths $P_1$ and $P_2$, respectively.
The paths $Q_1$ and $Q_2$ only share their first vertex $u$.

\textit{Special Note:} Also $Q_1$ and $Q_2$ have the same length, since if $Q_1$ is shorter than $Q_2$, then $P_2$ takes fewer edges to reach $u$ from $v$, and hence traveling along $P_2$ to $u$ and then $Q_1$ to $y_1$ creates a shorter path from $v$ to $y_1$ (contradicting the fact that $P_1$ was a path of minimum length).

Now, let $\ell$ be the length of $Q_1$ and $Q_2$.
Then, if we follow $Q_1$ from $u$ to $y_1$, the edge $y_1y_2$, then reverse $Q_2$ from $y_2$ to $u$ we find that $G$ contains a cycle of length $2\ell+1$, an odd cycle!
This contradicts that $G$ does not contain odd cycles, and hence $y_1y_2$ is not an edge in $G$.

The proof that no edge $x_1x_2$ is in $G$ For $x_1, x_2 \in X$ follows from a similar argument.
\end{proof}


\subsection{Quantities Describing Connectivity}

\textbf{Def:} Let $G$ be a graph. An edge $e \in E(G)$ is a \emph{cut-edge} if there are more connected components in $G-e$ than in $G$. (Hence, $e$ is \emph{required} for connecting some pair of vertices in $G$.)

A cut-edge would not be good in a computer network, since if that wire is cut or compromised, then communication will fail between computers that expect to talk to each other!

\textbf{Def:} Let $G$ be a graph. A vertex $v \in V(G)$ is a \emph{cut-vertex} if there are more connected components in $G-v$ than in $G$. (Hence, $v$ is \emph{required} for connecting some pair of vertices in $G$.)

A cut-vertex would not be good in a computer network, since if that computer fails or is turned off, then communication will fail between computers that expect to talk to each other!

We can generalize these concepts:

\textbf{Def:} A set $S \subseteq V(G)$ is a \emph{vertex cut} if $G - S$ has more connected components than $G$.

\textbf{Def:} If $S \subseteq V(G)$, then the \emph{edge cut} $[S,\overline{S}]$ is the set 
\[
	[S,\overline{S}] = \{ xy \in E(G) : x \in S, y \notin S\}.
\]

\textbf{Def:} The \emph{(vertex) connectivity} of $G$, denoted $\kappa(G)$, is the minimum size of a vertex cut $S$ such that $G-S$ is disconnected or a single vertex.

If $G$ is disconnected, then $\kappa(G) = 0$.

If $G$ is connected and has a cut-vertex, then $\kappa(G) = 1$.

For all $n \geq 3$, note that $\kappa(C_n) = 2$.

For all $n \geq 2$, $\kappa(K_n) = n-1$, since deleting any number of vertices will not make $K_n$ disconnected, but deleting $n-1$ vertices results in a single vertex.

\textbf{Def:} The \emph{edge connectivity} of $G$, denoted $\kappa'(G)$ (or sometimes $\lambda(G)$), is the minimum size of an edge cut $[S,\overline{S}]$ for $S \subseteq V(G)$ with $S \neq \varnothing$ and $S \neq V(G)$.

If $G$ is disconnected, then $\kappa'(G) = 0$.

If $G$ is connected and has a cut-edge, then $\kappa'(G) = 1$.

For all $n \geq 3$, not that $\kappa'(C_n) = 2$.

For all $n \geq 2$, $\kappa'(K_n) = n-1$, since we can let $S = \{v\}$ for any vertex $v$.

\textbf{Def:} Let $\delta(G) = \min_{v\in V(G)} d(v)$ be the \emph{minimum degree of $G$} and $\Delta(G) = \max_{v\in V(G)}d(v)$ be the \emph{maximum degree of $G$}.

\textbf{Thm:} Let $G$ be a graph.
\[
	\kappa(G) \leq \kappa'(G) \leq \delta(G) \leq \frac{2|E(G)|}{|V(G)|}.
\]





\clearpage
\subsection{Path Finding}

A \emph{path} is a sequence of vertices $v_1, \dots, v_k$ such that $v_iv_{i+1}$ is a (directed) edge for each $i$ where $0 \leq i < k$.
We discuss an algorithm to find a path from $v$ to $u$ in a directed graph.
It is given in detail in Algorithm~\ref{alg:bfs} on Page~\pageref{alg:bfs}.

\begin{algorithm}[htp]
\caption{\label{alg:bfs}Breadth-First Search -- Given a directed graph and vertices $v, u$, return the length of a shortest path from $v$ to $u$. Returns $\infty$ if no path exists.}
\begin{algorithmic}
\STATE // Create data structures
\STATE $n \leftarrow |V|$
\STATE $S \leftarrow$ new int[$n$]
\STATE $p \leftarrow$ new int[$n$]
\STATE $Q \leftarrow$ new Queue();

\STATE
\STATE // Initialize data structures
\STATE $p[v] \leftarrow v$
\STATE $S[v] \leftarrow 1$
\STATE $Q$.push\_front($v$)

\STATE
\STATE // Perform BFS Loop
\WHILE{$Q$.size() $> 0$}
    \STATE $x \leftarrow Q$.front()
    \STATE $Q$.pop\_front()
    \FOR{\textbf{all} $y \in N(x)$}
        \IF{$S[y] == 0$}
            \STATE $S[y] \leftarrow 1$
            \STATE $p[y] \leftarrow x$
            \STATE $Q$.push\_front($y$)
        \ENDIF
    \ENDFOR
\ENDWHILE
\STATE
\STATE // Determine the result
\IF{$S[u] == 0$}
    \RETURN $\infty$
\ELSE
    \STATE count $\leftarrow 0$
     \STATE $x \leftarrow u$
    \WHILE{$x \neq v$}
        \STATE $x\leftarrow p[x]$
        \STATE count $\leftarrow$ count $+ 1$
    \ENDWHILE
    \RETURN count
\ENDIF
\end{algorithmic}
\end{algorithm}

The basic idea is this: Keep a list of where you have been (this is what $S$ is doing), how you got there (this is what $p$ is doing), and which vertices should be ``expanded'' (this is what $Q$ is doing). 
By using a queue, we are visiting the vertices that are closest to $v$ \emph{first}, and so we will always be traveling along shortest paths.
This will not find \emph{all} shortest paths!




\clearpage
\section{Wednesday, April 8}


\subsection{Rosen 10.7: Planar Graphs}

\textbf{Reading:} Rosen 10.7


\textbf{Q:} Say we have three utilities (Electric, Water, Gas) that need to lay connections to three houses. Can we design routes for these connections such that no connections cross (and risk issues during digging)?

\textbf{A:} NO! Why not? (Short version: $K_{3,3}$ is not planar.)

\textbf{Def:} A graph is called \emph{planar} if it can be drawn in the plane without any edges crossing (where a crossing is two edges intersecting other than at a common endpoint). Such a drawing is called a \emph{planar representation} of a graph.

\textbf{Ex:} Is $K_3$ planar? $K_4$? $K_5$?

\textbf{Ex:} Is $K_{2,2}$ planar? $K_{2,3}$? $K_{2,4}$? $K_{3,3}$?

\textbf{Ex:} Is $Q_2$ planar? $Q_3$? $Q_4$?

\textbf{Note:} There are many representations when one exists! And some can be qualitatively ``different''! Thus, we will usually discuss a specific embedding.

\textbf{Prop:} If $G$ is planar and $H \subseteq G$, then $H$ is planar.

($H$ ``inherits'' the planar embedding from $G$!)

\textbf{Def:} In a planar representation of a graph, the plane is divided by the edges into regions, called \emph{faces}.
The \emph{length} of a face is the length of its boundary.

\textbf{Euler's Formula:} Let $G$ be a connected planar graph with a given planar representation.
Let $n = |V(G)|$, $e = |E(G)|$, and let $f$ be the number of faces in this representation.
Then,
\[
	n - e + f = 2.
\]

\textbf{Ex:} We can build planar graphs by adding vertices.
Let $G$ be a connected planar graph with $n = |V(G)|$, $e = |E(G)|$, and let $f$ be the number of faces in this representation.
At each step, we select a face, place a vertex $v$ in that region, then add some number ($d(v)$) of edges to vertices on the boundary of that face.
The face splits into $d(v)$ parts.
Let $G'$ be the resulting graph with $n' = |V(G')|$, $e' = |E(G')|$, and let $f'$ be the number of faces in this representation of $G'$. 
Hence:
\[
	n'= n + 1, \qquad
	e'= e + d(v), \qquad
	f' = f + d(v) - 1,
\]
and hence the value of $n' - e' + f' = (n+1)-(e+d(v))+(f+d(v)-1) = n - e + f = 2$.

\textbf{Cor:} If $G$ is a connected planar (simple) graph with $e$ edges and $n$ vertices, then $e \leq 3n-6$.

\textbf{Cor:} If $G$ is a connected planar (simple)  graph, then at least one vertex in $V(G)$ has degree at most five.

\textbf{Cor:} If $G$ is a connected planar (simple) graph with $e$ edges and $n$ vertices and $G$ does not contain a cycle of length three, then $e \leq 2n-4$.

\textbf{Cor:} If $G$ is a connected planar (simple) graph with $e$ edges and $n$ vertices and $G$ is bipartite, then $e \leq 2n-4$.

\textbf{Cor:} $K_{3,3}$ is not planar.

\vspace{-0.5em}
\begin{proof}
$K_{3,3}$ has 6 vertices and 9 edges.
But $9 \not\leq 8 = 2(6)-4$, so $K_{3,3}$ is not planar.
\end{proof}

One may ask: ok, $K_{3,3}$ and $K_{5}$ are not planar. 
Are there any other obstructions to being planar?

\textbf{Ex:} $Q_4$ is not planar.

Why? It does not contain $K_{3,3}$ as a subgraph, but it \emph{does} contain something that \emph{looks like} $K_{3,3}$ but with some extensions!

\textbf{Def:} Let $G$ be a graph and $e = xy \in E(G)$. The graph $G*e$ is the graph that results by removing $e$ from $G$, adding a new vertex $v_e$, and adding the edges $xv_e$ and $yv_e$. This process to build $G*e$ from $G$ is called \emph{subdividing $G$ by $e$}.
A graph $H$ is a \emph{subdivision of $G$} if $H$ is attained by subdividing $G$ some number of times.

\textbf{Prop:} If $G$ contains a subdivision of $H$, then $\Delta(G) \geq \Delta(H)$, where $\Delta(G) = \max_{v\in V(G)} d(v)$, the maximum degree of a graph. 

(In general, all vertices of $H$ are mapped to distinct vertices of $G$ and then we connect adjacent vertices of $H$ by vertex-disjoint paths.)

\textbf{Ex:} $Q_4$ contains a subdivision of $K_{3,3}$.

\textbf{Prop:} If $H$ is a subdivision of $K_{3,3}$, then $H$ is not planar.

\textbf{Prop:} If $H$ is a subdivision of $K_{5}$, then $H$ is not planar.



\clearpage
\section{Friday, April 10}

\textbf{Kuratowski's Thm:} A graph $G$ is planar if and only if $G$ does not contain a subdivision of $K_{3,3}$ or a subdivision of $K_5$.

\textbf{Def:} A \emph{platonic solid} is a 3D polytope where every face is a regular, convex polygon with $k$ sides, and every vertex has degree $d$.

We can represent platonic solids as planar graphs by ``flattening'' them.

\textbf{Def:} If $G$ is a planar graph with a planar embedding, the \emph{planar dual of $G$}, denoted $G^*$, is the graph where every face in $G$ is a vertex in $V(G^*)$, and for every edge $e$ in $E(G)$, there is an edge in $G^*$ between the two faces with $e$ on their boundary. (Note: if a face in $G$ has a boundary that is not a simple cycle, then $G^*$ can be a multigraph with loops.)



A typical homework/exam problem from this section has the form ``Consider the graph $G$ (defined or drawn). Show that $G$ is planar, or demonstrate $G$ is not planar.'' (Showing $G$ is planar is just a picture! Embedding a photo in your homework assignment is sufficient. You can use any method to show $G$ is not planar, such as Kuratowski's theorem, or using the inequalities $e \leq 3n-6$ or $e\leq 2n-4$ when $G$ is bipartite.) 


\subsection{Rosen 10.8: Coloring}

\textbf{Reading:} Rosen 10.8,  Ducks , LLM 

Get out your colored pencils! Your crayons! Your markers! Your sidewalk chalk! 

\textbf{Def:} Let $G$ be a graph an $k$ be an integer.
A \emph{$k$-coloring} is a function $c : V(G) \to \{1,\dots,k\}$.
A \emph{proper} $k$-coloring is a $k$-coloring $c$ such that $c(u) \neq c(v)$ for all edges $uv \in E(G)$.

If we think of the edges of a graph as a set of ``conflicts'' then a coloring is a way of placing vertices into boxes without conflict!

\textbf{Def:} If there exists a proper $k$-coloring of $G$, then $G$ is \emph{$k$-colorable}.

\textbf{Note:} A graph is 1-colorable if and only if there are no edges.

\textbf{Note:} A graph is 2-colorable if and only if it is bipartite.

\textbf{Def:} The \emph{chromatic number} of a graph $G$, denoted $\chi(G)$, is the minimum $k$ such that $G$ is $k$-colorable.

To prove $\chi(G) = k$, you must (1) demonstrate a proper $k$-coloring, and (2) prove there is no proper $(k-1)$-coloring.

Here are some helpful things:

\textbf{Prop:} $\chi(K_n) = n$.

There exists a proper $n$-coloring by giving each vertex a distinct color.
Suppose that $c$ is an $(n-1)$-coloring of $K_n$.
By the pigeonhole principle two vertices have the same color, but those vertices are adjacent to $c$ is not proper.

\textbf{Prop:} $\chi(C_n) = \begin{cases}2 & \text{if $n$ is even} \\3 & \text{if $n$ is odd}\end{cases}$.

[$n$ even] $C_n$ is bipartite, so $\chi(C_n) \leq 2$. 
Since $K_2 \subseteq C_n$ and $\chi(K_2) = 2$, $\chi(C_n) \geq 2$.

[$n$ odd] Define $c : V(C_n) \to \{1,2,3\}$ as $c(2i-1) = 1$ for $i \in \{1,\dots,\frac{n-1}{2}\}$, $c(2i) = 2$ for $i \in \{1,\dots,\frac{n-1}{2}\}$, and $c(n) = 3$. 
Observe that $c$ is a proper 3-coloring.
$C_n$ is not bipartite, so no proper 2-coloring exists.

\textbf{Prop:} If $H \subseteq G$, then $\chi(H) \leq \chi(G)$.

(If $c : V(G) \to \{1,\dots,k\}$ is a proper $k$-coloring, then $c$ is also a proper $k$-coloring of $H$.)


\textbf{Ex:} Determine the chromatic number of these graphs:

\begin{center}
\begin{tikzpicture}[scale=1]
\node[below] at (0,-1) {$G$};
\node[shape=coordinate] (a) at (0:1) {};
\node[shape=coordinate] (b) at (60:1) {};
\node[shape=coordinate] (c) at (120:1) {};
\node[shape=coordinate] (d) at (180:1) {};
\node[shape=coordinate] (e) at (240:1) {};
\node[shape=coordinate] (f) at (300:1) {};


\draw (a)--(b)--(c)--(d)--(e)--(f)--(a);
\draw (a)--(d)
(b)--(f)
(c)--(e);

\foreach \p in {a,b,c,d,e,f}
{
	\draw (\p) node[insep]{};
}
\end{tikzpicture}
\qquad
\begin{tikzpicture}[scale=1]

\node[below] at (0,-1) {$H$};
\node[shape=coordinate] (a) at (0:1) {};
\node[shape=coordinate] (b) at (60:1) {};
\node[shape=coordinate] (c) at (120:1) {};
\node[shape=coordinate] (d) at (180:1) {};
\node[shape=coordinate] (e) at (240:1) {};
\node[shape=coordinate] (f) at (300:1) {};


\draw (a)--(b)--(c)--(d)--(e)--(f)--(a);
\draw (a)--(d)
(b)--(e)
(c)--(f);

\foreach \p in {a,b,c,d,e,f}
{
	\draw (\p) node[insep]{};
}
\end{tikzpicture}
\end{center}

\textbf{Ex:} Determine the chromatic number of these graphs: (answers are on next page)

\begin{center}
\begin{tikzpicture}[scale=1]
\node[below] at (0,-1.5) {$A$};
\node[shape=coordinate] (a) at (0:1) {};
\node[shape=coordinate] (b) at (45:1) {};
\node[shape=coordinate] (c) at (90:1) {};
\node[shape=coordinate] (d) at (135:1) {};
\node[shape=coordinate] (e) at (180:1) {};
\node[shape=coordinate] (f) at (225:1) {};
\node[shape=coordinate] (g) at (270:1) {};
\node[shape=coordinate] (h) at (315:1) {};


\draw (a)--(b)--(c)--(d)--(e)--(f)--(g)--(h)--(a);
\draw (a)--(e);
\draw (b)--(f);
\draw (c)--(g);
\draw (d)--(h);

\foreach \p in {a,b,c,d,e,f,g,h}
{
	\draw (\p) node[insep]{};
}
\node at (0:1.25) {$a$};
\node at (45:1.25) {$b$};
\node at (90:1.25) {$c$};
\node at (135:1.25) {$d$};
\node at (180:1.25) {$e$};
\node at (235:1.25) {$f$};
\node at (270:1.25) {$g$};
\node at (325:1.25) {$h$};
\end{tikzpicture}
\qquad
\begin{tikzpicture}[scale=1]
\node[below] at (0,-1.5) {$B$};
\node[shape=coordinate] (a) at (0:1) {};
\node[shape=coordinate] (b) at (45:1) {};
\node[shape=coordinate] (c) at (90:1) {};
\node[shape=coordinate] (d) at (135:1) {};
\node[shape=coordinate] (e) at (180:1) {};
\node[shape=coordinate] (f) at (225:1) {};
\node[shape=coordinate] (g) at (270:1) {};
\node[shape=coordinate] (h) at (315:1) {};


\draw (a)--(c)--(e)--(g)
(b)--(d)--(f)--(h)--(a);
\draw (a)--(e);
\draw (b)--(f);
\draw (c)--(g);
\draw (d)--(h);

\foreach \p in {a,b,c,d,e,f,g,h}
{
	\draw (\p) node[insep]{};
}
\node at (0:1.3) {$x_1$};
\node at (45:1.3) {$x_2$};
\node at (90:1.3) {$x_3$};
\node at (135:1.3) {$x_4$};
\node at (180:1.3) {$x_5$};
\node at (235:1.3) {$x_6$};
\node at (270:1.3) {$x_7$};
\node at (325:1.3) {$x_8$};
\end{tikzpicture}
\end{center}
\begin{center}
\begin{tikzpicture}[scale=1]
\node[below] at (0,-1.5) {$C$};

\node[shape=coordinate] (x00) at (0,0) {};
\node[shape=coordinate] (x10) at (2,0) {};
\node[shape=coordinate] (x20) at (4,0) {};
\node[shape=coordinate] (x30) at (6,0) {};
\node[shape=coordinate] (x40) at (8,0) {};
\node[shape=coordinate] (x50) at (10,0) {};
\node[shape=coordinate] (x01) at (1,2) {};
\node[shape=coordinate] (x11) at (3,2) {};
\node[shape=coordinate] (x21) at (5,2) {};
\node[shape=coordinate] (x31) at (7,2) {};
\node[shape=coordinate] (x41) at (9,2) {};
\node[shape=coordinate] (x51) at (11,2) {};

\draw (x00)--(x01)--(x10)--(x11)--(x20)--(x21)--(x30)--(x31)--(x40)--(x41)--(x50)--(x51)--(x41)--(x31)--(x21)--(x11)--(x01);

\draw (x00) to[out=-45,in=-135] (x20) to[out=-45,in=-135] (x40) to[out=-90,in=-90] (x00);
\draw (x10) to[out=-45,in=-135] (x30) to[out=-45,in=-135] (x50) to[out=-90,in=-90] (x10);
\draw (x01) to[out=45,in=135] (x21) to[out=45,in=135] (x41);
\draw (x11) to[out=45,in=135] (x31) to[out=45,in=135] (x51);
\draw (x00)--(x11);

\foreach \p in {x00,x10,x20,x30,x40,x50,x01,x11,x21,x31,x41,x51}
{
	\draw (\p) node[insep]{};
}
\end{tikzpicture}
\end{center}



\textbf{Prop:} Let $G$ be a graph with maximum degree $\Delta(G)$. Then $\chi(G) \leq \Delta(G) + 1$.

\vspace{-0.5em}
\begin{proof}
Let $V(G) = \{v_1,\dots,v_n\}$.
We will define a coloring $c$ using a \emph{greedy strategy}.
For each $i \in \{1,\dots,n\}$, assign $c(v_i)$ to be the smallest positive integer that does not already appear on $N(v_i) \cap \{v_1,\dots,v_{i-1}\}$.
The coloring is proper as for every edge $v_iv_j$ with $i < j$ the color on $v_i$ will not be selected for $v_j$.
Since at most $d(v_i)$ colors appear in this list, and $d(v_i) \leq \Delta(G)$, the largest color that may ever be used is $\Delta(G) + 1$.
\end{proof}

Note that $\chi(K_n) = n = \Delta(K_n) + 1$ and $\chi(C_{2n+1}) = 3 = \Delta(C_{2n+1}) + 1$ so this bound is \emph{sharp}! (We say a bound is \emph{sharp} when it cannot be improved since it is met with equality in some cases.) 
However, we can say that these are the ONLY connected graphs where this happens!

\textbf{Brooks' Thm:} Let $G$ be a connected graph with maximum degree $\Delta(G)$.
Then $\chi(G) \leq \Delta(G)$ unless $G$ is isomorphic to $K_n$ or an odd cycle.


\emph{The following simple statement is a very famous result that was very difficult to prove and all known proofs require the use of computer assistance.}

\textbf{Four Color Theorem:} If $G$ is planar, then $\chi(G) \leq 4$.

Thus, possibly the most complicated proof that $K_5$ is not planar is to say: $\chi(K_5) = 5 > 4$, so $K_5$ is not planar.

\textbf{Ex:} Determine the chromatic number of these graphs: (answers are on next page)

\begin{center}\begin{tikzpicture}[scale=1]
\node[below] at (0,-1.5) {$A$};
\node[shape=coordinate] (a) at (0:1) {};
\node[shape=coordinate] (b) at (45:1) {};
\node[shape=coordinate] (c) at (90:1) {};
\node[shape=coordinate] (d) at (135:1) {};
\node[shape=coordinate] (e) at (180:1) {};
\node[shape=coordinate] (f) at (225:1) {};
\node[shape=coordinate] (g) at (270:1) {};
\node[shape=coordinate] (h) at (315:1) {};


\draw (a)--(b)--(c)--(d)--(e)--(f)--(g)--(h)--(a);
\draw (a)--(e);
\draw (b)--(f);
\draw (c)--(g);
\draw (d)--(h);

\foreach \p in {a,b,c,d,e,f,g,h}
{
	\draw (\p) node[insep]{};
}
\node at (0:1.25) {$a$};
\node at (45:1.25) {$b$};
\node at (90:1.25) {$c$};
\node at (135:1.25) {$d$};
\node at (180:1.25) {$e$};
\node at (235:1.25) {$f$};
\node at (270:1.25) {$g$};
\node at (325:1.25) {$h$};
\end{tikzpicture}
\qquad
\begin{tikzpicture}[scale=1]
\node[below] at (0,-1.5) {$A$};
\node[shape=coordinate] (a) at (0:1) {};
\node[shape=coordinate] (b) at (45:1) {};
\node[shape=coordinate] (c) at (90:1) {};
\node[shape=coordinate] (d) at (135:1) {};
\node[shape=coordinate] (e) at (180:1) {};
\node[shape=coordinate] (f) at (225:1) {};
\node[shape=coordinate] (g) at (270:1) {};
\node[shape=coordinate] (h) at (315:1) {};


\draw (a)--(b)--(c)--(d)--(e)--(f)--(g)--(h)--(a);
\draw (a)--(e);
\draw (b)--(f);
\draw (c)--(g);
\draw (d)--(h);

\foreach \p in {a,b,c,d,e,f,g,h}
{
	\draw (\p) node[insep]{};
}
\node at (0:1.25) {$1$};
\node at (45:1.25) {$2$};
\node at (90:1.25) {$1$};
\node at (135:1.25) {$2$};
\node at (180:1.25) {$3$};
\node at (235:1.25) {$1$};
\node at (270:1.25) {$2$};
\node at (325:1.25) {$3$};
\end{tikzpicture}
\end{center}

See the coloring above and to the right to see that $\chi(A) \leq 3$.

To see that $\chi(A) \geq 3$, notice that $A[\{a,b,c,d,e\}] \cong C_5$, and $\chi(C_5) = 3$.


\begin{center}
\begin{tikzpicture}[scale=1]
\node[below] at (0,-1.5) {$B$};
\node[shape=coordinate] (a) at (0:1) {};
\node[shape=coordinate] (b) at (45:1) {};
\node[shape=coordinate] (c) at (90:1) {};
\node[shape=coordinate] (d) at (135:1) {};
\node[shape=coordinate] (e) at (180:1) {};
\node[shape=coordinate] (f) at (225:1) {};
\node[shape=coordinate] (g) at (270:1) {};
\node[shape=coordinate] (h) at (315:1) {};


\draw (a)--(c)--(e)--(g)
(b)--(d)--(f)--(h)--(a);
\draw (a)--(e);
\draw (b)--(f);
\draw (c)--(g);
\draw (d)--(h);

\foreach \p in {a,b,c,d,e,f,g,h}
{
	\draw (\p) node[insep]{};
}
\node at (0:1.3) {$x_1$};
\node at (45:1.3) {$x_2$};
\node at (90:1.3) {$x_3$};
\node at (135:1.3) {$x_4$};
\node at (180:1.3) {$x_5$};
\node at (235:1.3) {$x_6$};
\node at (270:1.3) {$x_7$};
\node at (325:1.3) {$x_8$};
\end{tikzpicture}
\qquad
\begin{tikzpicture}[scale=0.8]
\node[below] at (0,-1.5) {$B$};
\node[shape=coordinate] (a) at (-0.5,0) {};
\node[shape=coordinate] (b) at (3,0) {};
\node[shape=coordinate] (c) at (-2,1) {};
\node[shape=coordinate] (d) at (2,-1) {};
\node[shape=coordinate] (e) at (-2,-1) {};
\node[shape=coordinate] (f) at (2,1) {};
\node[shape=coordinate] (g) at (-3,0) {};
\node[shape=coordinate] (h) at (0.5,0) {};


\draw (a)--(c)--(e)--(g)
(b)--(d)--(f)--(h)--(a);
\draw (a)--(e);
\draw (b)--(f);
\draw (c)--(g);
\draw (d)--(h);

\foreach \p in {a,b,c,d,e,f,g,h}
{
	\draw (\p) node[insep]{};
}
\node at (-0.5,0.3) {$x_1$};
\node at (3.3,0) {$x_2$};
\node at (-2,1.3) {$x_3$};
\node at (2,1.3) {$x_4$};
\node at (-2,-1.3) {$x_5$};
\node at (2,-1.3) {$x_6$};
\node at (-3.3,0) {$x_7$};
\node at (0.5,0.3) {$x_8$};
\end{tikzpicture}
\qquad
\begin{tikzpicture}[scale=0.8]
\node[below] at (0,-1.5) {$B$};
\node[shape=coordinate] (a) at (-0.5,0) {};
\node[shape=coordinate] (b) at (3,0) {};
\node[shape=coordinate] (c) at (-2,1) {};
\node[shape=coordinate] (d) at (2,-1) {};
\node[shape=coordinate] (e) at (-2,-1) {};
\node[shape=coordinate] (f) at (2,1) {};
\node[shape=coordinate] (g) at (-3,0) {};
\node[shape=coordinate] (h) at (0.5,0) {};


\draw (a)--(c)--(e)--(g)
(b)--(d)--(f)--(h)--(a);
\draw (a)--(e);
\draw (b)--(f);
\draw (c)--(g);
\draw (d)--(h);

\foreach \p in {a,b,c,d,e,f,g,h}
{
	\draw (\p) node[insep]{};
}
\node at (-0.5,0.3) {$1$};
\node at (3.3,0) {$3$};
\node at (-2,1.3) {$2$};
\node at (2,1.3) {$2$};
\node at (-2,-1.3) {$3$};
\node at (2,-1.3) {$1$};
\node at (-3.3,0) {$1$};
\node at (0.5,0.3) {$2$};
\end{tikzpicture}
\end{center}

Above and in the middle, I redrew $B$ to make the adjacencies more clear. Above and to the right is a proper 3-coloring.

To show that $\chi(B) \geq 3$, note that $x_1x_3x_5$ form a 3-cycle (or a $K_3$) so $\chi(B) \geq 3$.


\clearpage
\begin{center}
\begin{tikzpicture}[scale=1]
\node[below] at (0,-1.5) {$C$};

\node[shape=coordinate] (x00) at (0,0) {};
\node[shape=coordinate] (x10) at (2,0) {};
\node[shape=coordinate] (x20) at (4,0) {};
\node[shape=coordinate] (x30) at (6,0) {};
\node[shape=coordinate] (x40) at (8,0) {};
\node[shape=coordinate] (x50) at (10,0) {};
\node[shape=coordinate] (x01) at (1,2) {};
\node[shape=coordinate] (x11) at (3,2) {};
\node[shape=coordinate] (x21) at (5,2) {};
\node[shape=coordinate] (x31) at (7,2) {};
\node[shape=coordinate] (x41) at (9,2) {};
\node[shape=coordinate] (x51) at (11,2) {};

\draw (x00)--(x01)--(x10)--(x11)--(x20)--(x21)--(x30)--(x31)--(x40)--(x41)--(x50)--(x51)--(x41)--(x31)--(x21)--(x11)--(x01);

\draw (x00) to[out=-45,in=-135] (x20) to[out=-45,in=-135] (x40) to[out=-90,in=-90] (x00);
\draw (x10) to[out=-45,in=-135] (x30) to[out=-45,in=-135] (x50) to[out=-90,in=-90] (x10);
\draw (x01) to[out=45,in=135] (x21) to[out=45,in=135] (x41);
\draw (x11) to[out=45,in=135] (x31) to[out=45,in=135] (x51);
\draw (x00)--(x11);

\foreach \p in {x00,x10,x20,x30,x40,x50,x01,x11,x21,x31,x41,x51}
{
	\draw (\p) node[insep]{};
}

\node[left] at (x00) {4};
\node[above left] at (x01) {1};
\node[above left] at (x11) {2};
\node[above] at (x21) {3};
\node[above] at (x31) {1};
\node[above right] at (x41) {2};
\node[above right] at (x51) {3};
\node[above] at (2,0.2) {3};
\node[above] at (4,0.2) {1};
\node[above] at (6,0.2) {2};
\node[above] at (8,0.2) {3};
\node[above] at (10,0.2) {1};
\end{tikzpicture}
\end{center}

The coloring above demonstrates $\chi(C) \leq 4$.

To show $\chi(C)  > 3$, we will suppose there exists a proper 3-coloring of $C$ and then show a contradiction.
This contradiction is found using a more \emph{ad-hoc} technique: Suppose there is a proper 3-coloring; we learn something about how those colors MUST be placed; we find a vertex that is adjacent to all of the colors!

Consider the six vertices in the top row.
Without loss of generality (by permuting the colors) these vertices \emph{must} be colored 1,2,3,1,2,3 (as shown) since each set of three consecutive vertices form a $K_3$.
Then considering the second-to-last triangle (that spans the top and the bottom), the lower vertex must be colored 3 as the top two are colored 1 and 2.
Therefore, the bottom-left vertex is adjacent to vertices with color 1, 2, and 3 and hence no matter what color is used (in the set $\{1,2,3\}$) the coloring will not be proper.

In the picture below, I have highlighted the edges that we needed for this proof!

\begin{center}
\begin{tikzpicture}[scale=1]
\node[below] at (0,-1.5) {$C$};

\node[shape=coordinate] (x00) at (0,0) {};
\node[shape=coordinate] (x10) at (2,0) {};
\node[shape=coordinate] (x20) at (4,0) {};
\node[shape=coordinate] (x30) at (6,0) {};
\node[shape=coordinate] (x40) at (8,0) {};
\node[shape=coordinate] (x50) at (10,0) {};
\node[shape=coordinate] (x01) at (1,2) {};
\node[shape=coordinate] (x11) at (3,2) {};
\node[shape=coordinate] (x21) at (5,2) {};
\node[shape=coordinate] (x31) at (7,2) {};
\node[shape=coordinate] (x41) at (9,2) {};
\node[shape=coordinate] (x51) at (11,2) {};

\draw (x00)--(x01)--(x10)--(x11)--(x20)--(x21)--(x30)--(x31)--(x40)--(x41)--(x50)--(x51)--(x41);
\draw[very thick] (x41)--(x31)--(x21)--(x11)--(x01);

\draw (x00) to[out=-45,in=-135] (x20) to[out=-45,in=-135] (x40);
\draw[very thick] (x40) to[out=-90,in=-90] (x00);
\draw (x10) to[out=-45,in=-135] (x30) to[out=-45,in=-135] (x50) to[out=-90,in=-90] (x10);
\draw[very thick] (x01) to[out=45,in=135] (x21) to[out=45,in=135] (x41);
\draw[very thick] (x11) to[out=45,in=135] (x31);
\draw (x31) to[out=45,in=135] (x51);
\draw[very thick] (x00)--(x11);
\draw[very thick] (x00)--(x01);
\draw[very thick] (x31)--(x40)--(x41);

\foreach \p in {x00,x10,x20,x30,x40,x50,x01,x11,x21,x31,x41,x51}
{
	\draw (\p) node[insep]{};
}

\node[left] at (x00) {4};
\node[above left] at (x01) {1};
\node[above left] at (x11) {2};
\node[above] at (x21) {3};
\node[above] at (x31) {1};
\node[above right] at (x41) {2};
\node[above right] at (x51) {3};
\node[above] at (2,0.2) {3};
\node[above] at (4,0.2) {1};
\node[above] at (6,0.2) {2};
\node[above] at (8,0.2) {3};
\node[above] at (10,0.2) {1};
\end{tikzpicture}
\end{center}

This is not the only way! In fact we can use one fewer edge in order to prove $\chi(C) > 3$!


\begin{center}
\begin{tikzpicture}[scale=1]
\node[below] at (0,-1.5) {$C$};

\node[shape=coordinate] (x00) at (0,0) {};
\node[shape=coordinate] (x10) at (2,0) {};
\node[shape=coordinate] (x20) at (4,0) {};
\node[shape=coordinate] (x30) at (6,0) {};
\node[shape=coordinate] (x40) at (8,0) {};
\node[shape=coordinate] (x50) at (10,0) {};
\node[shape=coordinate] (x01) at (1,2) {};
\node[shape=coordinate] (x11) at (3,2) {};
\node[shape=coordinate] (x21) at (5,2) {};
\node[shape=coordinate] (x31) at (7,2) {};
\node[shape=coordinate] (x41) at (9,2) {};
\node[shape=coordinate] (x51) at (11,2) {};

\draw (x00)--(x01)--(x10)--(x11)--(x20)--(x21)--(x30)--(x31)--(x40)--(x41)--(x50)--(x51)--(x41);
\draw[very thick] (x41)--(x31)--(x21)--(x11)--(x01);

\draw (x00) to[out=-45,in=-135] (x20) to[out=-45,in=-135] (x40);
\draw[very thick] (x40) to[out=-90,in=-90] (x00);
\draw (x10) to[out=-45,in=-135] (x30) to[out=-45,in=-135] (x50) to[out=-90,in=-90] (x10);
\draw[very thick] (x01) to[out=45,in=135] (x21) to[out=45,in=135] (x41);
\draw (x11) to[out=45,in=135] (x31);
\draw (x31) to[out=45,in=135] (x51);
\draw[very thick] (x00)--(x11);
\draw[very thick] (x00)--(x01);
\draw[very thick] (x31)--(x40)--(x41);

\foreach \p in {x00,x10,x20,x30,x40,x50,x01,x11,x21,x31,x41,x51}
{
	\draw (\p) node[insep]{};
}

\node[left] at (x00) {x};
\node[above left] at (x01) {a};
\node[above left] at (x11) {b};
\node[above] at (x21) {w};
\node[above] at (x31) {u};
\node[above right] at (x41) {v};
\node[above] at (8,0.2) {y};
\end{tikzpicture}
\end{center}

Consider the vertex labels above and let $c$ be a 3-coloring of $C$.
Without loss of generality, $c(w) = 1$.
Since $wab$ and $wuv$ are copies of $K_3$, we have that $\{ c(a), c(b) \} = \{ c(u), c(v)\} = \{ 2, 3\}$.
Thus, if $c$ is proper then $c(x) = 1$ and $c(y) = 1$, but since $xy$ is an edge this coloring is not proper!


\textbf{Aside:} If any one thick edge in the above argument is deleted, then we can color these vertices with three colors! Thus, the thick edges form a graph that is called \emph{4-critical}: $\chi(G) = 4$, but $\chi(G-e) \leq 3$ for any edge $e \in E(G)$. If a graph is not 3-colorable, then it \emph{must} contain a 4-critical graph! Unfortunately, there are an infinite number of these graphs so you cannot use that as an easy way to check for 3-colorability!


\end{document} 
