Four colours are enough. Can you make the computer use six?

Change the order the computer colours in. Can you make it need six colours on a map that only needs four? The computer is greedy: it takes the regions in your order and gives each the smallest colour no coloured neighbour has used. The map never changes, only the order. Step 1: push regions up or down the order until greedy needs five colours. Then load the Challenge map and go for six (the small map tops out at five). Step 2: switch to Repair and colour the very same map with four.

Colouring order. Use the arrows to move a region earlier or later.

What's going on

The Four Colour Theorem says that every flat map can be coloured with four colours so that neighbours never match. It is an existence statement: a good colouring is out there. It says nothing about how to find it, and nothing at all about what happens if you colour in a careless order.

Greedy is an algorithm: a recipe that always finishes. Take the regions in order, give each the smallest colour its already-coloured neighbours have not used. It never produces a clash, because it checks the neighbours every time. But it can box itself in. If a region's neighbours have already been handed colours 1, 2, 3, 4 and 5, that region gets colour 6, even though a cleverer plan would have shared colours earlier.

So two things can both be true: four colours exist for this map, and greedy in your order used six. The theorem is about the map. The six is about the method. Finding an order that makes greedy fail is you supplying a counterexample to the claim "greedy always does well". Repairing the map with four is you showing the theorem was right all along.

The Show me a four-colouring button does not use greedy. It searches: try a colour, go on, and if it gets stuck it backs up and tries the next colour. On small maps that is quick. The fact that it always succeeds here is the theorem at work, not a property of the search.

Every colouring on this page is checked against every shared border before it is reported, so the counts you see are the true counts.

Sheet: Four colours are always enough. Colour maps by hand in Colour the map.