Why it happens
Why Four Colors Are Enough for Any Map of Connected Countries
Color a flat map so countries that share a border get different colors, and four colors are always enough, as long as each country is one connected piece and touching at a single point doesn't count. Francis Guthrie noticed it in 1852. Kenneth Appel and Wolfgang Haken proved it in 1976, with computers checking cases no person could.
One random map, colored two ways
- CH1 color 1
- CH2 color 2
- CH3 color 3
- CH4 color 4
How to read the stage
- Objective
- Follow both colorings of one map and spot the step where greedy needs a fifth color.
- How this step gets you there
- The text names the map's size, the country where greedy runs out, and backtracking's undos.
The map has 20 random countries, each grown from one cell, with 43 borders between them. Greedy colors the countries in order, each with the lowest color its neighbours lack. Country 12 finds all four taken and gets a fifth. Backtracking then colors the same map with four, after 5 undos.
Why greedy runs out
- Objective
- Explain why a fifth color from greedy says nothing about the map, and what backtracking does instead.
- How this step gets you there
- The text traces the undos the stage shows at country 12 and ties a full search to the theorem.
Greedy never revisits a choice. When country 12 comes up, its five colored neighbours already use all four colors, though the map didn't force that. Backtracking clears country 12, changes country 11, then country 10, and four colors fit. It searches every possibility in turn, so if four colors can work, it finds them. The theorem says that for maps like these, they always can.
200 maps, measured
- Objective
- Compare how often greedy needs a fifth color with what each map needs.
- How this step gets you there
- The stage counts both colorings over 200 maps; the text gives the default run's totals.
The second stage colors 200 random maps of 20 countries both ways. Greedy used five or more colors on 42 of them, 21.0%, and six on one. Backtracking also found the fewest colors each map needs: 3 for 2 maps and 4 for the other 198, and none needed more. Random maps can't prove the theorem, since a proof has to cover every map, but none of these broke it.
200 random maps, colored both ways
From a guess to a flawed proof
- Objective
- Know where the four color problem came from and why its first proof failed.
- How this step gets you there
- The text follows MacTutor's and Robin Thomas's histories, quoting De Morgan's letter.
In 1852 Francis Guthrie, coloring a map of the counties of England, noticed four colors sufficed. His brother Frederick took the question to his teacher De Morgan, who wrote to Hamilton that day: "A student of mine asked me today to give him a reason for a fact which I did not know was a fact - and do not yet." Kempe published a proof in 1879. In 1890 Heawood found its flaw and proved that five colors always suffice.
The computer proof
- Objective
- Describe what the 1976 proof checked by computer, and how later work made it easier to trust.
- How this step gets you there
- The text gives the proof's shape and the sizes of its case lists from the sources.
Appel and Haken, at the University of Illinois, built a list of more than 1,800 configurations, small patches of map, later trimmed to under 1,500. A smallest map needing five colors would have to contain one of them, yet computers checked that it can't contain any. So no such map exists. In the 1990s Robertson, Sanders, Seymour and Thomas found a new, shorter list of 633. Georges Gonthier later had the whole proof checked by the Coq proof assistant.
What the model leaves out
- Objective
- State the theorem's conditions exactly, and keep the model's failure rate apart from the theorem.
- How this step gets you there
- The text lists each condition with what goes wrong without it, then names the model's own assumptions.
The rules matter. If a country may be in several pieces, as the United States is with Alaska, maps can need more than four colors. If countries meeting at one point counted as neighbours, more than four could be needed too; the stage's square cells meet that way and don't count. The outside can be counted as a region or not. Greedy's failure rate depends on the order it colors in and on how the random maps grow.
Practice the pattern
- Objective
- Recognize coloring with undo as the backtracking pattern.
- How this step gets you there
- The text maps the stage's steps onto choose, recurse and undo, and links a problem that drills them.
The four-color search is the backtracking pattern: choose a color for the next country, move on, and undo the last choice when a country has none left. Combination Sum drills the same loop of choose, recurse and undo, dropping a branch the moment it can't work.
Questions
- Why do some maps need four colors?
- One way it happens: some groups of four countries all border each other, so each needs its own color. In the stage's default map, countries 1, 4, 8 and 9 do. Three colors are never enough for such a map, and the theorem says four always are.
- Can any map need five colors?
- Not if every country is one connected piece and a single shared point isn't a border. Drop either rule and five or more can be needed: Georges Gonthier notes that maps whose regions come in two or more separate pieces can require more than four colors.
- Who proved the four color theorem?
- Kenneth Appel and Wolfgang Haken, in 1976. Their proof leaned on computers to check cases no one could check by hand, and it was met with suspicion. A second computer proof by Robertson, Sanders, Seymour and Thomas in the 1990s cleared up most doubts, and Georges Gonthier and Benjamin Werner later had the whole proof checked by machine.
- Does the sea count as a country?
- Either way works. Robin Wilson notes it doesn't matter whether the outside region is included, so four colors are enough with or without the sea. The stage's maps fill their frame and leave the outside out.
Practice the pattern
The four-color search is the backtracking pattern: choose a color for the next country, move on, and undo the last choice when a country has none left. Combination Sum drills the same loop of choose, recurse and undo, dropping a branch the moment it can't work.