← Adversarial Mathematics: From First Principles

Maps, Graphs and Colourings

How a map becomes a graph, why Euler's formula guarantees a region with at most five neighbours, what a Kempe chain is and why swapping its colours is safe, why two safe swaps can still collide, and how the same idea proves that five colours always suffice.

Chapter 7 — The Proof That Lasted Eleven Years (Part I, Chapter 6) ran Kempe’s 1879 recolouring step on a map Heawood printed in 1890, and watched it fail. That chapter used several ideas without stopping to explain them: why every map has a region with at most five neighbours, what a “chain” of two colours is, why swapping colours along one is safe, and how Heawood rescued the argument for five colours. This chapter supplies them.

From maps to graphs

A map’s colouring depends only on which regions share a boundary, not on their shapes. So replace the map by a graph: one vertex for each region, and an edge between two vertices whose regions share a stretch of boundary. (Regions that meet at a single point do not count, by the usual convention.)

A proper colouring gives each vertex a colour so that the two ends of every edge differ. Colouring a map so that neighbours differ is exactly colouring its graph properly.

A map drawn in the plane gives a graph that can itself be drawn in the plane with no edges crossing: put a dot in each region and join neighbouring dots through their shared boundary. Such a graph is planar. The four-colour theorem is a statement about planar graphs.

Heawood’s map, as transcribed in Part I, has 25 regions and 69 shared boundaries, so its graph has 25 vertices and 69 edges.

Euler’s formula and its consequence

Euler’s formula. A connected graph drawn in the plane without crossings, with V vertices and E edges, divides the plane into F faces (counting the outside), and V − E + F = 2.

A cube’s skeleton gives a quick check: 8 vertices, 12 edges, 6 faces, and 8 − 12 + 6 = 2. The standard proof deletes edges one at a time, keeping track of the count, until a tree remains, for which the formula is easy. That proof uses the fact that a closed curve in the plane separates inside from outside, the Jordan curve theorem, which is harder than it looks. We cite both.

The formula limits how many edges a planar graph can have. Suppose the graph is simple (no loops, no repeated edges) with at least 3 vertices. Every face is bounded by at least 3 edges, and every edge borders at most 2 faces, so 3F ≤ 2E. Substituting F = 2 − V + E gives

$$E \le 3V - 6 .$$

Heawood’s graph meets this bound exactly: 3 × 25 − 6 = 69. Equality in $E \le 3V - 6$ means every face of this graph is a triangle. In the dual reading, a face of the graph is a meeting point of regions in the map, so the transcription is a full triangulation: at each such meeting point exactly three regions come together. That is the map-to-graph convention at work, not a separate computation.

Now the consequence Kempe needed. The degrees of the vertices (their numbers of neighbours) add up to 2E, since each edge is counted at both ends. So

$$\text{average degree} = \frac{2E}{V} \le \frac{6V - 12}{V} < 6 .$$

An average below 6 means some vertex has degree at most 5. Every planar map has a region with at most five neighbours. In Heawood’s graph the degrees add to 138, the average is 5.52, and 17 of the 25 regions have exactly five neighbours, including the uncoloured region X.

Kempe chains

Fix a proper colouring and two of its colours, say red and blue. Keep only the red and blue vertices and the edges between them. This smaller graph falls into separate pieces, its connected components: within a piece, any vertex can be reached from any other along edges; between pieces, no edge runs. Each piece is a Kempe chain.

Swapping a chain is safe. Exchange red and blue on every vertex of one red-blue chain. The colouring stays proper.

Proof. Take any edge. If neither end is in the chain, nothing changed. If both are, both swapped, and they still differ. If exactly one end, say u, is in the chain, then the other end w is not. If w were red or blue, the edge uw would join it to the chain, so w would be in the chain. So w is green or yellow, and u, now red or blue, still differs from it. ∎

Kempe’s induction, and where it breaks

Remove a region of degree at most 5, colour the rest by induction, and put it back. If its neighbours use at most three colours, the fourth is free.

Four neighbours using all four colours. Number them 1 to 4 in the order their boundaries meet the removed region, coloured red, blue, green, yellow. Look at the red-green chain through 1. If it does not contain 3, swap it: 1 becomes green, 3 stays green, and red is free. If it does contain 3, there is a path of red and green regions from 1 to 3. That path, together with the removed region, forms a closed loop. Neighbour 2 lies on one side of the loop and 4 on the other, and every region on the loop is red, green or the removed region itself, so the blue-yellow chain through 2 cannot reach 4. Swap it: blue is free. This case is sound. It uses planarity at one point, that the loop separates, which is the same argument as in the five-colour proof below, where it is spelled out.

Five neighbours. Here Kempe made two swaps, each safe on its own, and assumed they could be made together. Part I describes the configuration: neighbours 1 and 3 red, and a swap in 1’s red-green chain and another in 3’s red-yellow chain, each removing one red. Either swap alone keeps the colouring proper. But the first swap changes the colouring, and with it the chains. A region that was green before the first swap may be red after it, and then the second chain is not the chain Kempe thought it was. On Heawood’s map the two swaps recolour two outer regions red that share a boundary, so the colouring breaks. The safe-swap theorem is about one swap. It says nothing about two made from the same starting colouring.

Five colours suffice

Heawood saw that the same ideas, with one more colour, do work.

Five-colour theorem (Heawood, 1890). Every simple planar graph has a proper colouring with five colours. In particular, every planar map can be coloured with five colours.

Here is the proof with every assumption visible. Fix a drawing of the graph in the plane in which edges meet only at their ends.

Induction. A graph with at most five vertices is five-coloured by giving each vertex its own colour. Suppose G has more, and that every simple planar graph with fewer vertices can be five-coloured. By the consequence of Euler’s formula above, G has a vertex v of degree at most 5. Delete v. What remains is still simple and planar (keep the same drawing), so it has a proper five-colouring. We now colour v, changing the colouring of the rest if necessary.

Easy case. If v’s neighbours use at most four colours, give v the fifth.

Hard case. Otherwise v has exactly five neighbours, and they have five different colours. Because G is simple they are five different vertices. Number them v₁, …, v₅ in the order in which their edges leave v, going round v in the drawing, and name the colours so that vᵢ has colour i.

Consider the vertices of colours 1 and 3, and the Kempe chain K of colours 1 and 3 that contains v₁. (All chains are taken in the graph without v.)

  • If v₃ is not in K, swap colours 1 and 3 on K. By the safe-swap theorem the colouring stays proper. Now v₁ has colour 3, v₃ still has colour 3, and v₂, v₄, v₅ are unchanged. No neighbour of v has colour 1, so give v colour 1.
  • If v₃ is in K, there is a path P from v₁ to v₃ whose vertices all have colour 1 or 3. The edge v–v₁, the path P and the edge v₃–v together form a cycle C, drawn as a closed curve that does not cross itself. By the Jordan curve theorem, C separates the plane into an inside and an outside. The two arcs of C from v₁ to v₃ are the path P and the two-edge route through v. Going round v, the edge to v₂ leaves v on one side of C and the edge to v₄ leaves v on the other, so v₂ and v₄ lie in different components of the plane minus C. Any path from v₂ to v₄ must therefore meet C, and since edges do not cross, it meets C at a vertex. Every vertex of C is v or has colour 1 or 3. A path of colours 2 and 4 that avoids v can use none of them. So the Kempe chain of colours 2 and 4 that contains v₂ does not contain v₄. Swap colours 2 and 4 on it. Now v₂ has colour 4, v₄ still has colour 4, and colour 2 is free for v.

Either way v receives a colour, and G is five-coloured. ∎

Schematic of the hard case in the five-colour proof. The left panel shows five neighbours v1 to v5 in cyclic order, with the dashed 1-3 chain K containing v3 and the cycle C through v separating v2 from v4. The right-hand cards state both cases: if v3 is not in K, swap 1 and 3; if v3 is in K, swap the 2-4 chain containing v2.

The hard case of the five-colour proof, drawn schematically. Five neighbours surround $v$ in cyclic order. When the 1–3 chain $K$ contains $v_3$, the cycle $C$ formed by $v$, the path in $K$ from $v_1$ to $v_3$, and the two edges from $v$ separates $v_2$ from $v_4$; a 2–4 chain cannot cross it. Swapping the chain that contains $v_2$ frees colour 2. The figure follows the paper argument: it is a drawing, not a machine-checked proof, and it makes no claim about Heawood’s map.

Three things in this proof are easy to lose in a shorter version. The graph must be simple, so that the five neighbours are five distinct vertices. The neighbours must be numbered in the cyclic order of the drawing, because the separation argument needs v₂ and v₄ to fall between v₁ and v₃ on opposite sides. And the chain argument is made in the graph without v, so that the only vertex of C not coloured 1 or 3 is v itself, which no 2-4 chain can use.

Only one swap is ever made, which is exactly what Kempe’s five-neighbour case lacked.

Four colours suffice, but not like this

The four-colour theorem is true. Appel and Haken proved it in 1976–77, by showing that every planar map contains one of a large but finite list of configurations, each of which can be reduced, and checking the list by computer. Robertson, Sanders, Seymour and Thomas gave a simpler computer proof in 1997, and Gonthier and Werner checked a complete formal proof in the Coq proof assistant (now Rocq) in 2005. None of these proofs is short, and none is checked in this book. Heawood’s 1890 objection to Kempe stood for 86 years.

Evidence note

The counts for Heawood’s map (25 vertices, 69 edges, degree sum 138, 17 regions of degree 5) were computed from the Part I transcription, whose reading has not been independently checked; the failed double swap is computed there. Euler’s formula, the Jordan curve theorem and the four-colour theorem are cited, not checked. The edge bound, the safe-swap theorem, the four-neighbour case and the five-colour theorem are proved in the text from those cited results; none is machine-checked, and the five-colour proof is a paper argument that depends on the cited theorems. Full standing: Part IV, evidence tables.

Exercises

  1. Check Euler’s formula for a square pyramid and for a triangular prism.
  2. Use E ≤ 3V − 6 to show that the complete graph on five vertices, K₅, is not planar.
  3. Draw a map that needs four colours. (Four regions, each touching the other three, will do.)
  4. In Heawood’s graph, how many faces does Euler’s formula give? Explain why that is the number of points where three regions meet.
  5. In the safe-swap proof, where is it used that w is not in the chain? Give an example of a colouring that breaks if you swap only half of a chain.
  6. A planar graph has every vertex of degree at least 5. Show that it has at least 12 vertices of degree exactly 5. (Hint: the sum of (6 − degree) over all vertices is at least 12.)

Worked answers: Chapter 35 — Appendix A: Solutions to the Exercises (Part IV, Appendix A)#chapter-5-maps-graphs-and-colourings.

Further Reading

For deeper study; not sources for the chapter’s claims.

  1. Reinhard Diestel. Graph Theory (Springer, 2017). DOI. Why read it: A standard modern graph-theory text covering planar graphs, Euler’s formula, colouring and the structural ideas behind Kempe chains.
  2. Robin Wilson. Four Colors Suffice: How the Map Problem Was Solved (Princeton University Press, 2014). DOI. Why read it: An accessible history of the four-colour problem from Kempe and Heawood to the computer-assisted proofs, with the mathematical ideas kept in view.
  3. Georges Gonthier. “Formal Proof — The Four-Color Theorem.” Notices of the American Mathematical Society 55(11) (2008), 1382–1393. link. Why read it: Shows how the theorem was fully formalized in Coq, connecting the chapter’s graph-colouring argument to a machine-checked proof and to the specification questions that remain.

Next in Part II: Chapter 15, what a formal proposition says.