THE LAST TWO GRID-COLOURING CASES GET EFFICIENT RANDOM SAMPLERS
Give each point of a square grid one of q colours, so that two neighbouring points never share a colour. Physicists know these “proper colourings” as the zero-temperature limit of the antiferromagnetic Potts model, a model of statistical physics, and sample them to estimate correlations and other thermodynamic quantities. Computer scientists care because drawing one colouring at random and counting them all go hand in hand: an efficient way to do one gives an efficient way to approximate the other. Counting them exactly is out of reach in general.
Recolour one point at a time
The standard tool is a random walk among colourings. The simplest, called Glauber dynamics, picks a point and a colour at random, and recolours the point if the result is still proper. After enough steps, the current colouring is close to a fair draw. The question is how many steps are enough: if the number grows no faster than a fixed power of the grid’s size, the walk is said to mix rapidly.
On rectangular grids with nothing fixed along the border, this was known for three colours, thanks to their special structure, which links them to configurations of “square ice”. It was known for six colours or more, thanks to other arguments. In 2004, Achlioptas, Molloy, Moore and Van Bussel noted four and five colours as the only remaining cases. Both have stayed open for about two decades.
Why four and five are stubborn
With five colours, a point whose other three neighbours carry three different colours can be forced to change as soon as its fourth neighbour does, so a single change can ripple on with certainty. With four colours, it is worse: a point whose four neighbours carry the three other colours cannot change at all. On a grid wrapped into a torus whose side is a multiple of 4, colouring each point (x, y) with the remainder of x + 2y divided by 4 freezes every single point, and the simple walk cannot move.
In high enough dimensions, such local walks can become exponentially slow. So an efficient method has to use what is special about a flat grid: for four colours, the fact that it can be drawn without crossings; for five, the geometry of the square grid itself.
Four colours: two hues, two shades
Jacob Platnick and Dana Randall, at the Georgia Institute of Technology, handle four colours without running any walk on colourings. Their trick is to group the four colours into two hues, red and blue, each in a dark and a light shade. Inside a connected patch of one hue, dark and light must alternate along every edge, and on a grid there are exactly two ways to do that. So a pattern of hues with k patches gives exactly 2^k proper colourings.

On this 4 × 5 grid, the teal edges (left), which join neighbours of the same hue, form four hue regions, giving 16 shade assignments. The right panel shows one of the 16 shade assignments: dark and light shades alternate inside each red or blue region. — Figure 3 (top row), Platnick and Randall (2026), arXiv:2611.35288.
Through a correspondence borrowed from physics, the hue patterns then become configurations of a six-vertex model, an ice-type model drawn on a related graph. The number of four-colourings equals 2^(N − M) times that model’s partition function, a weighted count of all its configurations, where N counts points and M connections. A recent algorithm by Chen and Liu, which solved a long-standing open problem on matroids, approximates exactly this kind of partition function.
The result works for every bipartite planar graph: rectangles, but also grid regions with holes. It is polynomial, though heavy: on N points, the count to relative error δ takes on the order of N¹³ δ⁻² log²(2N/δ) operations.
Five colours: two rows at a time
For five colours, the authors prove that the simple walk itself mixes rapidly on rectangles. The key is a single estimate: if one colour just outside a strip of two rows changes, the random colourings of the strip before and after the change can be paired so that they differ at fewer than 0.99997 points on average, however long the strip. Staying below 1 is what matters: each disagreement then creates fewer than one new one, so a change dies out instead of spreading. Each column of such a strip has only 20 possible states, and the estimate reduces to a finite certificate: a table of bounds that a computer checks.
That certificate is checked by a short C++ program, in integer arithmetic with every number rounded the safe way, so that each accepted value is a rigorous upper bound. It runs in about nine minutes on a laptop; the largest bound it accepts is 0.999962, just under the 0.99997 needed. A walk that resamples two adjacent rows at a time then mixes quickly, and so does the one-point walk.
The question left behind
For four colours, the paper goes around the simple walk rather than through it: whether recolouring one point at a time mixes rapidly on rectangles is still unknown. The exponent 13 may well come down, triangular grids are not covered, and it remains open whether five colours mix as fast as six or more.
