Saramsha

No. 011  ·  27 September 2026

Never a Fifth Colour

However tangled a map is, four colours are enough to paint it so that no two countries sharing a border share a colour. Guessed in 1852, proved in 1976 — by a computer. Click a country to colour it. Drag across several.

Pick a crayon, then click a country

About this piece

A question a mapmaker asked his brother

In October 1852 Francis Guthrie — a young mathematician, later a barrister and a botanist at the Cape — was colouring a map of the counties of England and noticed that he never needed more than four colours to keep neighbours apart. He could not see why. He asked his brother Frederick, who put it to his teacher Augustus De Morgan, who wrote to Hamilton the same day: "if a figure be any how divided and the compartments differently coloured so that figures with any portion of common boundary line are differently coloured — four colours may be wanted, but not more." Hamilton was unmoved: "I am not likely to attempt your quaternion of colours very soon." The question took 124 years to answer, and the answer changed what a proof is allowed to look like.

Two colours are enough only for maps drawn as closed curves crossing each other. Three are not enough: take any country ringed by an odd number of neighbours — five countries around one, say — and the ring alone already needs three, leaving nothing for the middle. So four are sometimes necessary. Press Three and try; then press Could three have done it? and this page will search the whole space and tell you the truth. Most maps here cannot be done in three, and finding out is genuinely hard work — deciding three-colourability is NP-complete, one of the original problems on Karp's 1972 list. Deciding four-colourability, for a map, is trivial: the answer is always yes.

The colours never really cared about geography. A map only says which countries touch which, and Show the graph draws exactly that: a dot per country, a line for every shared border. Colouring the map is colouring the dots. Because the dots sit on the page and the lines between them need never cross, the graph is planar, and that is the whole of the constraint. Five mutually touching countries would sink the theorem instantly — and you cannot draw five such countries on a flat sheet, which is why the four-colour theorem is really a statement about flatness. Colour a map on a doughnut instead and you may need seven.

Alfred Kempe published a proof in 1879 and it was believed for eleven years. His idea — Kempe chains: take a partly coloured map, find a two-colour patch, swap the two colours all through it and see what has been freed up — is still the engine of every later proof. Percy Heawood found the flaw in 1890, in a case where two chains interfere, and salvaged from the wreckage a complete proof that five colours always suffice. The gap between five and four stayed open for another eighty-six years.

It closed in June 1976, at the University of Illinois, when Kenneth Appel and Wolfgang Haken announced that four colours do suffice. Their proof works by contradiction: assume a smallest map needing five colours, then show it must contain one of 1,936 unavoidable configurations, then show that each one is reducible — a smaller map's colouring can always be extended across it. The second half took about 1,200 hours of an IBM 370, and no human has ever checked it by hand. The university postmark read "Four colors suffice". Mathematicians argued for years about whether that counted; the proof has since been rebuilt with 633 configurations by Robertson, Sanders, Seymour and Thomas in 1997, and in 2005 Georges Gonthier checked the whole thing, configurations and all, inside the Coq proof assistant. It counts.

Watch the solver and you are watching the ordinary, hopeless way: try a colour, move right, and when a country has no colour left, walk backwards and try again. That is backtracking, and the counter tells you how often it had to undo itself. It always finds an answer here, but only because the maps are small — the search it performs is exponential, and it knows nothing at all of why four will be enough. The theorem is the promise that the search can never come home empty.

One caveat the theorem insists on, and this page obeys: every country must be a single connected piece. Allow exclaves — a scrap of one country stranded inside another, both needing the same colour — and four is no longer enough, which is why real political atlases sometimes cheat. Each country here is checked for connectedness and, if the borders happened to strand a fragment, the fragment is quietly handed to a neighbour before you see the map.

Everything is generated and solved in your browser; nothing is uploaded. Capitals are scattered by best-candidate sampling, each point of land joins its nearest capital through a warped distance field, and the coastline is a noisy ellipse. Names are invented from syllables. Tab to the map, then arrow keys to move between countries, 1–4 to colour, 0 to rub out, N for a new map.