\documentclass[11pt]{article}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{latexsym}
\usepackage{verbatim}
\usepackage{cancel}
\usepackage[pdftex]{graphicx}
\usepackage{url}
\usepackage[table]{xcolor}
\usepackage{multicol}
\usepackage[all,arc]{xy}
\usepackage{color, colortbl}
\usepackage{mathrsfs}
\usepackage{hyperref}
\hypersetup{colorlinks=true}
\setlength{\oddsidemargin}{.25in}
\setlength{\evensidemargin}{.25in}
\setlength{\textwidth}{6in}
\setlength{\topmargin}{-0.4in}
\setlength{\textheight}{8.5in}



\input{preamble.tex}

\begin{document}

\lecture{5: Toroidal Graphs}{Week 10}

(Relevant source material: Chapter 6 of Douglas West's Introduction to Graph Theory; Section V.3 of B\'ela Bollob\'as's Modern Graph Theory; Part IV of Alexander Soifer's Mathematical Coloring Book; various other sources.)

In this set of notes, we examine \textbf{toroidal} graphs, i.e. the torus-version of planar graphs, and create a coloring theorem for such graphs that is analogous to the four-color theorem that we explored last quarter.

We start by reviewing our previous work on \textbf{planar} graphs:
\section{Planar Graphs}
\begin{defn}
Last quarter, we defined a \textbf{planar} graph as a graph $G$ that we can draw on $\mathbb{R}^2$ in the following fashion:
\begin{itemize}
\item Each vertex of $G$ is represented by a point in $\mathbb{R}^2$.
\item Each edge in $G$ is represented by a continuous path in $\mathbb{R}^2$ connecting the points corresponding to its vertices. 
\item These paths do not intersect each other, except for the trivial situation where two paths share a common endpoint.
\end{itemize}
We call such a drawing a \textbf{planar embedding} of $G$ in $\mathbb{R}^2$.
\end{defn}
Many graphs are planar:
\begin{center}
\includegraphics[width=3in]{math137b_s2014_planar1.pdf}
\end{center}
Some graphs are planar even though they may not look so at a first glance:
\begin{center}
\includegraphics[width=2.5in]{math137b_s2014_planar2.pdf}
\end{center}
Sometimes, it will help to think of planarity in the following way:
\begin{defn}
We call a graph $G$ \textbf{planar} if we can draw it on the sphere $S^2$ in the following fashion:
\begin{itemize}
\item Each vertex of $G$ is represented by a point on the sphere.
\item Each edge in $G$ is represented by a continuous path drawn on the sphere connecting the points corresponding to its vertices. 
\item These paths do not intersect each other, except for the trivial situation where two paths share a common endpoint.
\end{itemize}
We call such a drawing a \textbf{planar embedding} of $G$ on the sphere.
\end{defn}
It is not hard to see that this definition is equivalent to our earlier definition of planarity.  Simply use the stereographic projection map (drawn below) to translate any graph on the plane to a graph on the sphere:
\begin{center}
\includegraphics[width=3in]{math137b_s2014_planar3.pdf}\\
\footnotesize By drawing lines from the ``north pole'' (0,0,1) through points either in the $xy$-plane or on the surface of the sphere, we can translate graphs drawn on the sphere (in red) to graphs drawn in the plane (in yellow.) \normalsize
\end{center}

\begin{defn}
For any planar graph $G$, we can define a \textbf{face} of $G$ to be a connected region of $\mathbb{R}$ whose boundary is given by the edges of $G$.  
\end{defn}

For example, the following graph has four faces, as labeled:
\begin{center}
\includegraphics[width=1.5in]{math137b_s2014_planar4.pdf}
\end{center}

Notice that we always have the ``outside'' face in these drawings, which can be easy to forget about when drawing our graphs on the plane.  This is one reason why I like to think about these graphs as drawn on the sphere; in this setting, there is no ``outside'' face, as all of the faces are equally natural to work with.
\begin{center}
\includegraphics[width=4in]{math137b_s2014_planar5.pdf}
\end{center}
This observation has a nice accompanying lemma:
\begin{lem}
Take any planar graph $G$, and any face $F$ of $G$.  Then $G$ can be drawn on the plane in such a way that $F$ is the outside face of $G$.
\end{lem}
\begin{proof}
Take a planar embedding of $G$ on the unit sphere.  Rotate this ``drawn-upon'' sphere so that the face $F$ contains the north pole $(0,0,1)$ of the sphere.  Now, perform stereographic projection to create a planar embedding of $G$ in $\mathbb{R}^2$.  By construction, the face $F$ is now the outside face, which proves our claim.
\end{proof}

It bears noting that not all graphs are planar:
\begin{prop}
The graphs $K_5$ and $K_{3,3}$ are not planar.
\end{prop}
\begin{proof}
Draw a 5-cycle on the sphere.  If the edges of this 5-cycle do not intersect each other, then the resulting pentagon partitions the sphere into two parts, each part of which is bounded by this pentagon.  Take either one of these parts; notice that within that part, we can draw at most two nonintersecting edges connecting nonadjacent vertices in that part.  Consequently, it is impossible to draw the additional 5 edges required to create $K_5$ without using overlapping edges.  Therefore it is impossible to find a planar embedding of $K_5$ on the sphere, as claimed.

$K_{3,3}$ is identical.  First, notice that $K_{3,3}$ can be drawn as a hexagon where opposite points are connected by edges:
\begin{center}
\includegraphics[width=3in]{math137b_s2014_k33hex.pdf}
\end{center}
From here, draw any 6-cycle on the sphere in such a way that its edges do not intersect.  Again, this partitions the sphere into two parts, each bounded by a hexagon; within either part, we can draw at most one edge connecting opposite points on the hexagon without creating edges that intersect.  Therefore, it is impossible to draw the three total edges needed to create $K_{3,3}$.  So $K_{3,3}$ is nonplanar, as claimed.
\end{proof}

We studied properties about planar graphs last quarter!  Two notable results we discussed were the following:
\begin{enumerate}
\item \textbf{Euler characteristic}: If $V$ denotes the number of vertices, $E$ the number of edges, and $F$ the number of faces in any planar graph, then $V-E+F$ is always equal to $2$.
\item \textbf{The four-color theorem}:  The chromatic number of any planar graph is at most 4.
\end{enumerate}

Given these results, a natural question to ask is the following: how does this generalize when we work on other shapes?  I.e. suppose we draw graphs without intersecting edges on things other than spheres; do we get a corresponding notion of the Euler characteristic?  Of the four-color theorem?

These two questions are the focus of this talk!  We start by introducing the \textbf{torus}, the surface we focus on in today's lecture:
\section{Toroidal Graphs}
\begin{defn}
A \textbf{torus}, informally, is the doughnut-shaped surface that you get by taking a square made out of some arbitrarily-stretchy material and gluing together opposite sides.
\begin{center}
\includegraphics[width=5in]{math137b_s2014_torus1.pdf}
\end{center}
More formally, you can think of the torus as the collection of all points $(x,y) \in \mathbb{R}^2$ under the equivalence relation $(x,y) \sim (a,b)$ whenever $x-a, y-b \in \mathbb{Z}$.  In other words, this is simply taking the square $[0,1] \times [0,1]$, ``gluing'' the edge $\{0\} \times [0,1]$ to the edge $\{1\} \times [0,1]$, and finally gluing the edge $[0,1] \times \{0\}$ to th edge $[0,1] \times \{1\}$.

We will call the torus $T^2$ at times, much like how we sometimes call the sphere $S^2$.
\end{defn}

Given a torus, a natural question to ask (given our discussion above) is what kinds of graphs we can draw on it without intersecting edges!  It is relatively easy to see that we can draw any planar graph $G$ on a torus, by simply shrinking $G$ down until it fits within a $1 \times 1$ square and then using our definition of what a torus is.

More interestingly, however, is the observation that there are several graphs that we \textbf{cannot} draw in the plane that \textbf{can} be drawn on a torus.  We draw $K_5, K_{3,3},$ and $K_7$ below to give three such examples of such graphs:  
\begin{center}
\includegraphics[width=4in]{math137b_s2014_torus2.pdf}
\end{center}

Given such an embedding, we might hope for a notion of ``face'' to match the one we had for planar graphs.  However, we need to be careful about what we mean here.  For example, the graph below partitions our torus into three pieces:
\begin{center}
\includegraphics[width=2in]{math137b_s2014_torus3.pdf}
\end{center}
However, not all of those pieces are the ``same,'' topologically speaking.  In particular, the ``outer piece'' is materially different than the two inner ones: for example, we can draw a loop on the outer face that no matter how we move it about, can never be contracted to a point.  This is not something we can do on the inner pieces; any loop on them can always be contracted to a point!
\begin{center}
\includegraphics[width=6in]{math137b_s2014_torus4.pdf}\\
\footnotesize The blue loop in $f_3$ cannot be shrunk to a point, unlike any blue loop in $f_2$.\normalsize
\end{center}
Formally speaking, we distinguish these cases via the following definition:
\begin{defn}
Take a surface $S$ with a graph $G$ drawn on $S$, and a region $R$ of $S$ bounded by the edges of $S$.  We say that this region forms a \textbf{face} of $G$ if there is a continuous bijection with continuous inverse from this map to the unit square $(0,1) \times (0,1)$ in $\mathbb{R}^2$, or equivalently to any connected open subset of $\mathbb{R}^2$.  For shorthand, we say that this region is \textbf{homeomorphic} to an open subset of $\mathbb{R}^2$.
\end{defn}
We will never use this formal definition in this class, as this is not a topology class.  (Related: take topology classes!)  Instead, we will typically work with examples where the distinction is clear; faces will be regions that look like pieces of $\mathbb{R}^2$ like triangles or $n$-gons.  But it is worth noting that there is a lot of formalism that can buttress the graph theory we are doing here.

We use this definition to finally describe the torus-version of planar, which we call \textbf{toroidal}:
\begin{defn}
We call a graph \textbf{toroidal} if we can draw it on the torus $T^2$ in the following fashion:
\begin{itemize}
\item Each vertex of $G$ is represented by a point on the torus.
\item Each edge in $G$ is represented by a continuous path drawn on the torus connecting the points corresponding to its vertices. 
\item These paths do not intersect each other, except for the trivial situation where two paths share a common endpoint.
\item Moreover, take any region in the torus whose boundary is given by a collection of paths corresponding to edges in $G$. This region should be a \textbf{face}, as defined above; i.e. it should look like a connected open subset of $\mathbb{R}^2$.
\end{itemize}
\end{defn}


Just like how we established a notion of Euler characteristic for planar graphs, and a four-color theorem for planar graphs, we can do the same thing for toroidal graphs:

\begin{thm}
(The Euler characteristic of the torus.)  Suppose that $G$ is a toroidal graph, and that $G$ has $V$ vertices, $E$ edges and $F$ faces.  Then $V-E+F = 0$.
\end{thm}
\begin{proof}
We do our proof by reducing any graph $G$ to a simpler multigraph (i.e.\ a graph where we allow loops and multiple edges between vertices,) in such a way that does not change the quantity $V-E+F$.  First, notice that if our graph has more than one face, we can perform the following operation to decrease the number of faces by 1, without changing $V-E+F$:
\begin{center}
\includegraphics[width=3in]{math137b_s2014_euler.pdf}
\end{center}
This is because (if $F$ has $n$ vertices and edges on its boundary) we have decreased the total number of edges by $n$, the total number of faces by 1, and the total number of vertices by $n-1$ (we collapsed the $n$ vertices of the face to one single vertex.)  Moreover this operation does not break the toroidal nature of our graph, as we can still draw our edges without intersections and our faces are still faces.

Perform the above operation until we cannot do so any more.  Then our graph consists of exactly one face.

Now, suppose that we have any leaf-nodes in our graph.  We can delete these nodes and their attached edges without changing $V-E+F$, as each deletion lowers both $V$ and $E$ by 1.   Finally, notice that if we have any edge in our graph that is not a loop, we can collapse this edge to a point without changing $V-E+F$, as we will have decreased both $V$ and $E$ by one.  This gives us a graph that consists only of loops all centered at one vertex, with one face.

Take any loop in our graph.  Notice that because our graph has only one face, cutting along this loop does not separate our torus into two parts (as that would imply that we had two faces.)  

Up to a very plausible-sounding but heavy bit of topological machinery, then, we can draw this loop as some path that wraps around our torus a number of times.  If we cut along that loop, we will get something that (up to an even number of twists) looks like a cylinder:
\begin{center}
\includegraphics[width=5in]{math137b_s2014_torus5.pdf}
\end{center}

Now, take any other edge in our graph.  (There must be some other edge, because a cylinder does not ``look like'' a region of $\mathbb{R}^2$: i.e. we can draw a circle around the cylinder that cannot be drawn to a point, which illustrates that this shape is distinct, topologically speaking, from a disk in $\mathbb{R}^2$.)  Again, because our torus only has one face, cutting along this edge does not break our cylinder into two parts.  As well, because our graph is toroidal, it does not intersect the path we cut along to get this cylinder; so we can draw it on the cylinder without having to ``cross over'' the parts we cut along.  

Again, up to a bit of topology, we can draw this edge as some path that wraps around our cylinder a number of times:
\begin{center}
\includegraphics[width=6in]{math137b_s2014_torus6.pdf}
\end{center}


Cutting along this edge gives us a face! Therefore, we have no more loops that we can draw, and thus we know that our graph is actually just a pair of loops linked at a single common point.  This gives us $2$ edges, $1$ vertex (because they are linked at a common point) and one face, which in particular means that $V-E+F = 0$ for this graph.  Because the operations that we have performed in this proof did not change $V-E+F$, we can conclude that this property holds for our original toroidal graph as well.

\end{proof}


\begin{thm}
(The seven-color theorem for the torus.)  Suppose that $G$ is a toroidal graph.  Then $\chi(G) \leq 7$.
\end{thm}
\begin{proof}
Take any toroidal graph.  Notice that in this graph,
\begin{itemize}
\item $2E \geq 3F$.  You can derive this identity by taking the sum over every face of the number of edges in each face.  There are at least 3 edges in a face in any graph, so this sum is bounded below by $3F$; on the other hand, because each edge shows up in exactly two faces, this sum is precisely $2E$.
\item $2E \geq \delta(G) \cdot V,$ where $\delta(G)$ is the smallest degree of any vertex in our graph.  You can derive this identity in a similar way to the above, by summing the degree of each vertex over all of the vertices; on one hand this sum is clearly greater than $\delta(G) V$ by the definition of $\delta(G)$, and on the other it is equal to $2E$ by the vertex-sum formula.
\end{itemize}
Consequently, if we apply the Euler characteristic, we get
\begin{align*}
0 = V-E+F \geq \frac{2}{\delta(G)}E - E + \frac{2}{3}E.
\end{align*}
This tells us that $\delta(G) \leq 6$ for any toroidal graph $G$!

From here, it is easy to prove that $\chi(G) \leq 7$ for any toroidal graph.  Proceed by contradiction; assume that there is a toroidal graph that needs at least eight colors to be properly colored, and pick $G$ to be a vertex-minimal example of such a graph.  (That is, amongst all counterexamples, pick a graph $G$ with the smallest number of vertices possible.) 

Let $v$ be the vertex in $G$ with $\deg(v) \leq 6$ that we have proven must exist, and look at the graph $G \setminus \{v\}$; by assumption, because $G$ was minimal, $G \setminus \{v\}$ is 7-colorable.  7-color this graph, and add $v$ back in.  $v$ has at most 6 neighbors, so there is some color currently not used on its neighbors; assign $v$ this color.  This creates a 7-coloring of $G$, which contradicts our assumption; therefore no such graph can exist.  In other words, $\chi(G) \leq 7$ for any toroidal graph $G$, as claimed!
\end{proof}
Notice that 7 is the is the best bound we can hope for; as we proved earlier in these notes, $K_7$ is a toroidal graph!  The ease of this proof contrasts dramatically with the four-color theorem, whose only known proofs require computer-aided search and are extremely ponderous.  (Even to create a proof that \textbf{didn't} work took us a day and some interesting switching arguments using Kempe chains!)  Torii: they're pretty cool!

Perhaps surprisingly, we can actually extend these proof methods to studying not just a torus, but much stranger shapes!  For instance, consider a ``two-hole torus,'' constructible via the gluing map drawn below:
\begin{center}
\includegraphics[width=5in]{math137b_s2014_twotorus.pdf}
\end{center}
In general, you can create $g$-holed torii for any $g$ (and are asked to do so on the homework!)

Given any such shape, a natural question to ask is whether there are appropriate coloring results for those surfaces as well.

There are!  Specifically, we have Heawood's formula:
\begin{thm}
We say that a graph $G$ is \textbf{$g$-toroidal} if it can be drawn on a $g$-holed torus in such a way that no edges cross and all of its faces are homeomorphic to disks in $\mathbb{R}^2$.  

Given any such graph $G$, we have
\begin{align*}
\chi(G) \leq \left\lfloor \frac{7 + \sqrt{ 1 + 48g}}{2} \right\rfloor_.
\end{align*}
\end{thm}
\begin{proof}
For $g = 0$, this is the four-color theorem; for $g=1$ this is the result we just proved for a torus!  The generalization to $g$-hole shapes is very similar to the proof we did earlier.  

We proceed by contradiction, and take (as in our false proof of the four-color theorem and our successful proof of the toroidal seven-color theorem) a vertex-minimal counterexample $G$.  Let $\delta(G)$ denote the smallest degree of any vertex in our graph.  Note that if $\delta(G) \leq \frac{5 + \sqrt{1 + 48g}}{2}$, then our claim holds: simply take any vertex $v$ of degree at most $\frac{5 + \sqrt{1 + 48g}}{2}$ in this graph and delete that vertex. The resulting graph is smaller than this smallest graph, and thus can be colored with $\left\lfloor \frac{7 + \sqrt{ 1 + 48g}}{2} \right\rfloor$ colors.  Now look at the total number of neighbors of $v$: this is less than the number of colors available, as $5 < 7$, and so a color is still available for us to use on $v$ itself!  This creates a proper coloring of our graph, which contradicts our claim that such a coloring could not exist.

So it suffices to prove that $\delta(G) \leq \frac{5 + \sqrt{1 + 48g}}{2}$.  For the exact same reasons as before,
\begin{itemize}
\item Because every face in our graph contains at least 3 edges, we know that if we sum up over every face the number of edges in each face, we get at least three times the number of edges.  Also, this sum counts each edge at most twice, because each edge is in at most two faces.  This tells us $2E \geq 3F$.
\item As well, if we let $\delta(G)$ denote the smallest degree of any vertex in our graph, we have that the degree of any vertex is (by definition) bounded below by $\delta(G)$.  Therefore, if we sum the degrees of all of the vertices in our graph together, this sum is bounded below by $\delta(G) \cdot V$, and is equal to twice the number of edges in our graph (as each edge shows up twice in this sum.)  In other words, we have $2E \geq \delta(G) V$.
\end{itemize}
On the homework, you're asked to prove the following extension of the Euler characteristic: for any $g$-toroidal graph, we have
\begin{align*}
V-E+F = 2-2g.
\end{align*}




Assume this holds!  If we use $F = 2 - 2g - V +E$ in our first equation, we get
\begin{align*}
2E &\geq 3F \\
\Rightarrow 2E &\geq 3E - 3V + 6  -6g \\
\Rightarrow E &\leq 3V - 6 + 6g.\\
\end{align*}

If we apply this to our second equation, then, we get
\begin{align*} 
\delta(G) V &\leq 2E \\
\Rightarrow \delta(G) V &\leq 6V - 12 + 12g \\
\Rightarrow (\delta(G)-6)V &\leq 12g - 12.
\end{align*}

Now, notice that $\delta(G) + 1 \leq V$, because any vertex with degree $\delta(G)$ must have $\delta(G)$ distinct neighbors in addition to itself.  This gives us the following:
\begin{align*}
&(\delta(G) - 6)(\delta(G) + 1) \leq 12g - 12\\
\Rightarrow & \delta(G)^2 - 5\delta(G) - 6 \leq 12g - 12\\
\Rightarrow & \delta(G)^2 - 5\delta(G) + (6 - 12g) \leq 0\\
\end{align*}
If we solve for the roots of the right-hand side polynomial, we get 
\begin{align*}
\delta(G) &= \frac{ 5 \pm \sqrt{25 - 4(6 - 12g)}}{2}\\
\Rightarrow 2\delta(G) &= 5 \pm \sqrt{1 + 48g}.
\end{align*}

Therefore, if we want to satisfy the inequality $\delta(G)^2 - 5\delta(G) + (6 - 12g) \leq 0$ , we need to keep $\delta(G)$ between the two roots of this polynomial; that is, we need
\begin{align*}
5 - \sqrt{1 + 48g} \leq 2\delta(G) \leq 5 + \sqrt{1+48g}.
\end{align*}

In particular, this gives us the desired claim that
\begin{align*}
\delta(G) \leq \frac{5 + \sqrt{1+48g}}{2}.
\end{align*}


\end{proof}

Fun fact: the proof above looks like it might work for $g=0$, i.e. the four-color theorem, but doesn't!  

Fun homework problem: why?

\end{document}