159. Graph coloring

Some very difficult questions arise concerning labeling the node of a simple graph.

159.1 Definition: coloring

A coloring of a simple graph $G$ is a labeling $L:G_{0}\to S$ (where $S$ is some finite set) with the property that if nodes $p$ and $q$ are adjacent, then $L(p)\neq L(q)$. In this context the elements of $S$ are called colors.

159.1.1 Remark This terminology arises from the problem of coloring a map of countries in such a way that countries with a common border are colored with different colors. In the (very large) literature on coloring problems, two states or countries that have only a point on their borders in common, such as Arizona and Colorado in the U.S.A., are regarded as not bordering each other. The common border must have a nonzero length.

159.1.2 Example The state of Kentucky in the U.S.A., and the seven states bordering it, require four colors to color them in such a way that adjoining states do not have the same color. This is turned into a problem of graph theory by drawing a graph with one node for each state and an edge between two nodes if the corresponding states border each other:

Graph of Kentucky and the states bordering it: IN, OH, WV, IL, KY, VA, MO, TN (159.1)

159.2 Definition: chromatic number

The smallest number of colors needed to color a simple graph $G$ is called the chromatic number of $G$, denoted $\chi(G)$.

Warning: Note that we have already used $\chi$ for the characteristic function of a subset of a set.

159.2.1 Example The chromatic number of the graph in Figure (159.1) is 4, and the chromatic number of the right graph in Figure (152.1) is 3.

159.2.2 Exercise Show that a graph with at least one edge is bipartite if and only if its chromatic number is 2.

159.2.3 Exercise Show that a graph has chromatic number 2 if and only if it has no cycles of odd length.

159.2.4 Remark It is in general a nontrivial question to determine the chromatic number of a graph. However, some things can be said.

a) The complete graph on $n$ nodes has chromatic number $n$, since every node is adjacent to every other one.

b) A bipartite graph has chromatic number 2 (if it has any edges): since none of the nodes in one of the moieties are adjacent to each other, they can all be colored the same color, and the nodes in the other moiety can be colored another color.

c) It is known that any planar graph has chromatic number $\leq 4$. This fact is called the Four Color Theorem and is difficult to prove.

159.2.5 Example As an indication of the problems involved in proving the Four Color Theorem, observe that the graph of states in Figure (159.1) has chromatic number 4, although it does not contain the complete graph $K_{4}$ as a subgraph. In other words, although there is no four-element subset of the states involved in Figure (159.1) that all border each other (thus turning into a copy of $K_{4}$ in (159.1)), it nevertheless takes four colors to color the whole graph. It follows that you can’t use Kuratowski’s Theorem to prove the Four Color Theorem: the fact that no planar graph contains $K_{5}$ as a subgraph does not rule out the possibility that a planar graph needs five colors to color it.

159.2.6 Exercise Give an example of a graph with chromatic number 3 that does not contain a subgraph isomorphic to $K_{3}$.

159.2.7 Exercise Find a place in the world with four political subdivisions that all border each other. (There are no four states in the U.S.A. like this, although you will observe that North Carolina, South Carolina, Georgia and the Atlantic Ocean all “border” each other.)

159.2.8 Exercise A Kempe graph is a graph with $n+1$ nodes, consisting of $n$ nodes in a cycle and another node connected to each node in the cycle, and no other edges. Figure (159.1), page 241, is a Kempe graph.

a) Show that a Kempe graph is planar.

b) Find the chromatic number of a Kempe graph. (It will depend on $n$.)

159.2.9 Garbage routes The effort to prove the Four Color Theorem resulted in the discovery of fast coloring algorithms and of a lot of detailed information about graph coloring. This has other applications besides coloring maps. For example, consider the following problem: A city is divided into a number of garbage pickup routes. Some of the routes overlap, because businesses must be picked up more often than residences and therefore are assigned to two or more routes. What is the best way to distribute the routes among the five working days of the week, with each route traveled once a week?

If each route is regarded as a node, with two routes adjacent if they overlap, the result is a graph. A scheduling of the routes that avoids scheduling overlapping routes on the same day is a five-coloring of this graph. An efficient way of coloring the graph would be a start towards finding a good schedule. Note that this problem has nothing to do with planarity or the Four Color Theorem.

Pages 241–242 of the book (PDF).