Skip to content
Knowledge Syndicate
Math Facts

Four color theorem: the problem that had to be handed to a computer

By
Four color theorem: map where four regions all touch each other, and a timeline from 1852 to 2005

Grab a political map and four markers. Color the countries so that neighbors never get the same color. Now try drawing a map that needs five. You can spend all afternoon on it. Nobody has managed, and there’s a reason. The four color theorem is one of those statements anyone can understand that took more than a century to prove. And when it was finally proved, it took a machine.

The four color theorem starts with a letter from 1852

According to a 2012 note by B. D. McKay, the accepted story goes like this. Francis Guthrie put the problem to his brother Frederick, who showed it to his teacher, Augustus De Morgan. The oldest known document is a letter from De Morgan to Hamilton written the same day he heard about the problem: 23 October 1852.

The page on the theorem kept by R. Thomas, one of the authors of the 1990s proof, tells the same story with one more detail: Francis Guthrie noticed it while coloring the map of the counties of England.

McKay adds a find of McKay’s own. The first time the problem appeared in print was thought to be an anonymous review by De Morgan in the magazine The Athenaeum in 1860. But McKay found an earlier letter in the same magazine, dated 10 June 1854 and signed only with the initials “F. G.” It said experience showed that four colors were necessary and sufficient, but that the writer couldn’t prove it unless the map had no more than five regions. According to McKay, it was most likely written by one of the two Guthrie brothers, though there’s no telling which.

Why you need four

That three colors aren’t enough is clear straight away. In a paper from 1879, A. B. Kempe shows it with a drawing: one region surrounded by three others that also touch each other. All four are neighbors of all the rest, so they need four different colors.

The hard part is the other half: proving that four always suffice, for any map, however tangled. Kempe writes that until then this rested on mapmakers’ experience and on De Morgan’s statement that the fact was true. And Kempe adds a sharp observation: a small change in one part of a map can force you to recolor the whole thing.

The proof that wasn’t

In 1879, in the American Journal of Mathematics, Kempe published what was believed to be the solution. Kempe says that after a rather arduous search the weak point of the problem turned up suddenly, and that the mapmakers’ experience hadn’t deceived them: maps on a surface such as the plane or the sphere can always be painted with four colors.

Kempe’s idea was clever. If a map is already colored, say in blue, yellow, red and green, look only at the red and green areas. They form separate clusters. In any one of those clusters you can swap red and green and the map is still properly colored. Those two-color clusters are known as Kempe chains.

According to Thomas’s page, Heawood pointed out the error eleven years later. According to a 2005 report by G. Gonthier, the flaw was in the last step: Kempe went through every way the chains could connect around a pentagon, but missed cases, because Kempe didn’t see that swapping colors in one chain can scramble others. Gonthier sums it up: an error that took ten years to spot and almost a century to fix.

The twelve pentagons of a football

Kempe’s outline, according to Gonthier, is still the outline of every later proof. And it has a lovely step that comes from Euler’s formula. In a map where exactly three borders meet at every corner, faces have almost six sides on average, but overall 12 sides are missing. Gonthier illustrates it with a football: that’s why it takes 12 pentagons, along with the hexagons, to stitch one together.

My own calculation to check it with a classic ball of 12 pentagons and 20 hexagons: 12 times 5 plus 20 times 6 gives 180 sides. With 32 faces, Gonthier’s formula gives 6 times 32 minus 12, which is also 180. It adds up.

The upshot: in such a map there’s always some region with five sides or fewer. If a map needing five colors existed, the smallest one would have to contain such a region, and that’s where the problem gets attacked.

Fifty years of loose pieces

According to Thomas’s page, P. G. Tait proposed another proof in 1880, and Petersen found a gap in 1891. Both failed attempts left useful tools behind. Then G. D. Birkhoff’s work of 1913 allowed Franklin to prove in 1922 that the conjecture held for maps with up to 25 regions.

Two ideas were still missing. The first, reducibility: lists of map fragments that can’t appear in the smallest counterexample. The second, so-called discharging: a method for proving that every map contains at least one of those fragments. According to Thomas, both pieces were developed by H. Heesch, though others studied reducibility too, and it was Heesch who conjectured that a well-developed discharging method would solve the problem.

1976: enter the computer

K. Appel and W. Haken solved it in 1976. According to Gonthier, their proof broke new ground because it used computer programs to carry out a gigantic case analysis that couldn’t, in any real sense, be done by hand: it covered, quite literally, a billion cases. According to Thomas’s page, their list had 1,476 configurations and more than 300 discharging rules.

Not everyone liked it. According to Gonthier, part of the criticism was about style: the statement is simple and elegant, and many expected a simple and elegant proof explaining why it’s true, not opaque assembly language programs. Another part was reasonable skepticism: programming is error-prone. On top of that, the proof included a manual analysis of about 10,000 cases, hard to verify, in which several small errors were found.

Thomas tells it from the inside. Thomas’s team tried to verify the Appel and Haken proof and soon gave up. Checking the computer part would have meant a lot of programming and typing in descriptions of 1,476 graphs by hand. They decided it would be more worthwhile to produce their own proof.

The second proof

N. Robertson, D. P. Sanders, P. D. Seymour and R. Thomas published their proof in the 1990s. According to Thomas’s page, the underlying idea is the same, but with 633 configurations instead of 1,476 and only 32 discharging rules instead of more than 300. It also gave a method for coloring any map in a time that grows with the square of its size.

My own calculation: 633 against 1,476 is a little under half.

And Thomas is frank about the limits. The page concedes it could be argued that theirs isn’t a proof in the traditional sense, because it has steps no human will ever verify: they haven’t proved the compiler or the hardware infallible. Even so, it argues that the chance of a computer making the same mistake in exactly the same way on every run is tiny compared with the chance of human error over the same amount of case-checking.

2005: the machine checks the machine

The last step was Gonthier’s. Gonthier’s report explains that the whole proof was formalized, the mathematical part and the computing part, and run through a program that checks proofs step by step. The work started from that of Robertson and colleagues, with their 633 configurations and 32 rules.

According to Gonthier, correctness still depends on the processor, the operating system, the checker itself and the compiler working properly. But none of those pieces was built for this theorem: they’re general-purpose and get tested constantly on other jobs. And to read the formal statement being proved, about 30 lines of definitions and some 200 more on the real numbers are all you need.

What’s left

My own reading, which is reasoning from the sources: the four color theorem has a double charm. A child can understand the question, and the answer forced mathematicians to argue about what counts as a proof. Since Kempe the plan has stayed the same: look for the smallest map that fails and show it can’t exist. What changed was who checks the cases.

More in Math Facts