15. Planarity and Coloring

1. Introduction

We have been considering the notions of the colorability of a graph and its planarity.

We have seen that a graph can be drawn in the plane if and only it does not have an edge subdivided or vertex separated complete 5 graph or complete bipartite 3 by 3 graph.

By the way the smallest number of colors that you require to color the graph so that there are no edges consisting of vertices of one color is usually called the chromatic number of the graph.

We have also seen how to determine whether the chromatic number of a graph is two. It is much harder to characterize graphs of higher chromatic number.

A natural question, which was raised back in the Nineteenth Century, is: What is the largest chromatic number among planar graphs? Or, what is the largest number of  colors you need to color any graph that can be drawn in the plane?

A man named Kempe published a proof, again back in the Nineteenth Century, that this number is 4. However, this proof was incorrect, and ten years later, someone noticed this, and pointed it out.

As a result, this became a well known problem. Was Kempe right? Can every planar graph be partitioned into four independent sets?

Many mathematicians worked very hard on this problem and produced many partial results of all sorts. Finally, about a hundred years after Kempe’s paper, a computer aided proof was announced by Appel and Haaken. It uses few ideas beyond those used by Kempe, but applies them to thousands of cases using a computer, and provides a proof of his claim.

We will here provide a proof that five colors are enough to color any planar graph, and then give Kempe’s false proof that four colors are enough.

2. Euler’s Formula and a Consequence

Suppose we have a graph G that can be drawn in the plane without crossings. We suppose then that it is so drawn, and observe that when G is drawn in the plane it has new properties that G  previously did not possess.

In particular, the edges of G divide the plane into faces, that are disconnected when the edges and vertices of G are removed from the plane.

If we define the parameters v e and f to be the number of vertices edges and faces of the drawing of G, there is a wonderful relation between these numbers that holds whenever G is  connected, namely

v – e + f = 2.

This relation is called Euler’s formula. (If G has more than one connected component then it becomes v – e + f  = 1 + cc, where cc is the number of connected components of G.

First let’s prove Euler’s formula. It is obviously true for a single vertex with no edges.

Suppose we have  a planar drawing of a graph G and we add a new edge or a new vertex to G so that the new drawing of the resulting graph G’,  has no edge crossings:

There are several possibilities

If we add a new vertex on an edge of G, v and e both increase by 1. If we add a vertex not on any edge then v and cc each increase by 1.

If we add an edge between two vertices, then e and f each increase by 1 if there is a path in G between the ends of the new edge. And if not then e increases by 1 and cc decreases by 1.

All of these actions preserve Euler’s formula, and we can construct any planar graph by introducing vertices and edges in this way.

And that establishes the formula for any planar graph. It holds as well for any multigraph, since the effect of duplicating an edge is to add an edge and a face between the new and an old edge with the same endpoints, which again does not disturb Euler’s formula.

We now ask, what is the largest number of edges that a planar graph G on v vertices can have?

We can deduce the answer from Euler’s formula.

Each region defined by a drawing of G in the plane is bounded by a cycle of the G. If that cycle is not a triangle, we can add an edge between two opposite vertices and increase the number of edges.

We conclude then that a graph G on v vertices with the most edges will have triangles for all its faces.

Then each face has three edges on its boundary, and the number of edge-face pairs with the edge bounding the face will be 3f.

But each edge bounds 2 faces, so that the number of edge-face pairs with the edge bounding the face will also be 2e.

We deduce then that f=2e/3, so that in this case we can write Euler’s formula as

v – e + 2e/3 = 2

or

3v = e + 6.

We notice also that the number of edge-vertex pairs with the vertex in the edge, is 2e and is also the sum of the degrees of all the vertices.

This tells us that the sum of the degrees of the vertices of any edge maximal  planar graph on v vertices obeys:

The sum of the degrees of the vertices of G  is 2e  or 6v –12.

The average degree of a vertex of G is therefore, 6 – 12/v.

Our conclusion here is that a planar graph on v vertices can have at most 3v-6 edges and average degree strictly less than 6.

Notice as well that the average degree of a vertex of a planar graph is something less than 6. This means we can always find a vertex of degree 5 or less in any planar graph.

3. The Five Color Theorem

We now prove we can color any planar graph with 5 colors.

We proceed by induction, and assume that any graph with fewer vertices than G has can be colored with 5 colors.

If G possesses a vertex v of degree 4, then find a coloring of G-{v}. The neighbors of G will have colors say A B C and D. But you have five colors, so you can color G with the fifth color, say E, and can so extend this coloring to v and hence all of G.

If G has no vertex of degree 4 or less, then since the average degree of its vertices is less than 6, there must be a vertex of degree 5.

So suppose v has degree 5. And suppose that again we color all of G but v with 5 colors.

We will be able to extend the coloring to v unless all its neighbors have different colors.

So suppose that the neighbors of v in G in order have colors A B C D and E .

Now we start from the neighbor vertex with color A and mark all its neighbors of color C and all their neighbors of color A and theirs of color C until all vertices that can be reached from that neighbor by going only on vertices of color A and C are marked.

Suppose first that the neighbor of v of color C is not marked. Then we can reverse the colors A and C on all the marked vertices, without harming the coloring, and now the neighbors of G are colored C B  C  D E and we can extend this coloring to v by coloring it with color A.

If, on the other hand, C is marked there is a path between the neighbors of G of colors A and C outside of v.

This means that adding v to this path creates a cycle in G; and the neighbor of G of color B is on one side of this cycle, while the neighbors of G of colors D and E are on the other side of it.

But this means that if we start at the B  neighbor of v and mark all its D colored neighbors and their B colored neighbors, we will not be able to penetrate this A C path, and this means that the neighbor of v with color D  cannot possibly get marked.

And so we can switch the colors B and D on the marked vertices and the neighbors of v will then be colored A D C D E, and we can extend the coloring to all of G by coloring v in color B.

The marked path from A to C here is called a Kempe chain in honor of the originator of this argument.

4. False Proof of the Four Color Theorem

Here is the way Kempe tried to prove the 4 color theorem.

Suppose, again by an induction hypothesis, that G – {v}  can be colored in 4 colors where v has 5 neighbors in G.

Then we can extend the coloring to v unless all 4 colors  appear on its neighbors. This means that starting at some neighbor, the neighbor colors in order are A B A C D.

We will be able to extend the coloring to v if there is no Kempe chain linking the vertices colored B and C, by switching the colors of B and C on all vertices marked starting at B and marking all the vertices of the connected component of B and C vertices containing that neighbor of v.

So there must be such a chain, namely a  B and C colored path between the neighbors of v of colors B and C.

And by the identical argument, there must be a B and D   colored path between the neighbors of v of colors B and D, or again we can extend the coloring to v.

Because of the B C alternating path, we can exchange the colors of the second A neighbor  v of  and D on one side of this path without changing the D colored neighbor at all.

And because of the B D alternating path, we can similarly exchange the colors of the first A and C within it, without changing the color of the C colored neighbor of v.

So Kempe argued, do both of these things. Change the first A to C and the second A to D, and then color v with color A, and you have extended the coloring to v and proven the theorem.

As already noted, this proof was published and not questioned for something like 10 years.

Can you see the bug in it?

5. Brook’s Theorem

There is a nice result that we can prove about coloring graphs that we can really prove, though it is of no use here.

Suppose the maximum degree of a connected graph G is d. Then we can color the vertices of G in d colors, unless G is a complete graph or an odd length chordless cycle, which both require d+1 colors.

We have already noted that the complete graph on d+1 vertices, all of whose degrees are d requires d+1 colors. And we have seen that an odd length chordless cycle whose maximum vertex degree is 2 requires 3 colors.

Here is a proof of this theorem.

Since G   is not complete there are pairs of vertices not joined in any edge and so there must be two vertices whose distance in the graph from each other is 2. Call them v1 and v2 and let vn be a common neighbor (a vertex of distance 1 from each.)

We arrange the vertices in order starting at v1 and v2 and ending at vn in such a way that each vertex vj other than vn has at least one edge joining vj with a vertex of higher index than j.

If we can do this, we can color G  with d colors as follows.

Give v1 and v2 the same color.

Go through the rest of the graph in order of vertex index. When you come to vj, at least one of its neighbors has higher index and has not yet been colored, so at most d-1 of its neighbors have been colored.

We therefore have a color left for vj  that does not appear on a neighbor, and color vj with that color.

When you get to vn, two of its neighbors, v1 and v2 have the same color, so again at most d-1 colors appear on its neighbors and you can color it, and finish coloring G with d colors.

But we will not be able to find the desired ordering of the vertices if removal of v1 and v2 separate the resulting graph into disconnected pieces.

If G is not a 2-cycle or a path, d will be at least 3.

If G is a path or 2 cycle then the result is easy so assume d is at least 3

If the graph G’ obtained from G by removing v1 (or v2) is not connected, then we can color v1 and each of the connected components of G’ separately in d colors by using a suitable induction hypothesis, and glue them together to color G..

(If any of the graphs of connected components and v1 are complete or cycles, then the degree of v1 and hence d will be strictly greater than the maximum degree of each of these subgraphs so they all will be colorable in d colors.)

.

If otherwise, and the graph G’ obtained by removing both v1 and v2 is disconnected, we can color each of the connected components and v1 and v2 with an additional edge containing them in d colors by a suitable induction hypothesis, and glue these together.

This coloring can fail only if one of the graphs for a connected component is complete of degree d and the other is the triangle containing v1 v2 and vn. In that case V is a complete graph on d+1 vertices with one edge replaced by a path of length 2. This can easily be colored in d colors, with v1 and v2 the same color and vn any other color.

If on the other hand the graph G’ obtained by removing v1 and v2 from G is connected, we can obtain an ordering of the vertices such that every final segment is connected by constructing it from the far end first. We can take vn make vn-1 a neighbor of it, vn-2 a neighbor of one of them, and so on until all all vertices are listed.

And that proves Brook’s theorem.

6. Another Form of the Four Color Problem

Suppose we have a coloring of a maximal planar graph in four colors (maximal means you put in as many edges as you can so that all faces are triangles)

Now suppose we switch the names of the faces and vertices.

We then get a graph for which all vertices have degree 3. The faces are the old vertices.

We now look at the boundary between the faces that are color 1 and color 2 and the faces that are color 3 and 4. Since each vertex will see three adjacent faces and hence three colors, this boundary will pass through each vertex.

The complement of the boundary edges in this graph will have degree 1 at each vertex. It will therefore be a matching (or pairing) of the vertices of this graph.

Had we looked at the 1 3 vs 2 4 boundary we would have gotten a different matching, and had we looked at the 1 4 vs  2 3 boundary we would get  a third matching, and all of these are disjoint.

It follows that the boundary edges in each case form even cycles, since they are each the union of two matchings.

This tells us that a maximal planar graph will have a four coloring, if this face graph contains a matching whose complement is bipartite. Or equivalently if the face graph has a collection of even cycles which pass through all its vertices exactly once.

There have been false proofs of this theorem based on this viewpoint. That is, attempts to prove that all planar graphs with all degrees three have such cycles.

In particular you could prove the four color theorem if you could prove that every planar face graph has a single cycle that passes through each of its vertices exactly once.

Such a cycle is called a Hamiltonian cycle, and these have been the subject of much study. Unfortunately there are planar face graphs without Hamiltonian cycles.

Exercise: Find the flaw in the Kempe proof of the four color theorem and describe it