Percolation explained

Fill the cells of a grid at random and ask a simple question: is there a path of filled cells from the top to the bottom? With few cells filled the answer is almost always no, with many it is almost always yes, and in between the answer flips surprisingly fast, around one sharp critical share. That flip is percolation, one of the simplest models in which order appears out of pure chance, and it describes coffee, oil, forest fires, epidemics and the internet alike.

A 60 by 60 grid with 55% of its cells filled, each cluster in its own colour and none yet joining the top to the bottom, next to the chance curve that rises steeply near 59%
A 60 by 60 grid with 55% of its cells filled, each cluster in its own colour and none yet joining the top to the bottom, next to the chance curve that rises steeply near 59%

Gas masks and the birth of a theory

Percolation theory began in 1957 with a paper by the statistician Simon Broadbent and the mathematician John Hammersley, "Percolation processes". Broadbent had worked on the carbon granules of gas masks: gas gets through only where the pores happen to link up into channels. The two men modelled the material as a lattice whose sites or links are open at random, each with the same chance p, and asked when a fluid poured in on one side can reach the other. Unlike diffusion, where the randomness is in the moving particle, in percolation the randomness is in the medium, and the question is purely about its geometry. The name comes from the coffee percolator.

Site and bond percolation

There are two classic versions. In site percolation every cell (site) of the lattice is filled with chance p, and filled neighbours belong to the same cluster; that is the model in the app. In bond percolation every site is present but each link between two neighbours is open with chance p. Bond percolation is a special case of site percolation on another lattice (put a site on the middle of each link), so the two share the same behaviour, but their thresholds differ. Which cells count as neighbours matters too: with the 4 side neighbours of the square grid a path cannot slip through a corner, with all 8 neighbours it can, and the threshold drops a long way.

The critical threshold p_c

On an endless lattice there is a sharp threshold p_c. Below it every cluster is finite and the chance that a cell belongs to a cluster of size s or more falls off exponentially in s. Above it there is, with certainty, an infinite cluster, and it is unique (Aizenman, Kesten and Newman 1987; Burton and Keane 1989). For site percolation on the square grid with 4 neighbours p_c ≈ 0.592746, known only from simulation; with 8 neighbours it is 1 − 0.592746 ≈ 0.407254, because the two lattices are each other's matching lattice: a filled 4-path from top to bottom exists exactly when there is no empty 8-path from left to right. A few thresholds are known exactly. Square bond percolation has p_c = 1/2, conjectured by Sykes and Essam in 1964 and proved by Harry Kesten in 1980. Site percolation on the triangular lattice also has p_c = 1/2, and triangular bond percolation 2 sin(π/18) ≈ 0.3473. On a tree in which every node has z neighbours, p_c = 1/(z − 1).

Finding a grid's own threshold

Give every cell a random number u between 0 and 1 and fill it when u < p. Raising p then fills the cells one at a time in the order of their numbers, so every grid has one exact threshold: the u of the cell whose arrival first links the top row to the bottom row. The app finds it in a single pass with a union-find structure, the method of Newman and Ziff (2000): it adds the cells in increasing u, merges each new cell with its filled neighbours, and keeps two extra nodes, one joined to every top-row cell and one to every bottom-row cell. The moment those two nodes fall into the same set, the grid connects. The same pass records the size of the largest cluster for every p, which is the orange curve in the chart.

Finite grids: the curve gets steeper

A finite grid does not switch at exactly p_c. Each grid has its own threshold, and the chance that a grid at p connects is the share of grids whose threshold lies below p. In the app 200 grids of the same size give that share. For a 20 × 20 grid the thresholds spread with a standard deviation of about 5.4 percentage points; for 60 × 60 about 2.4 and for 250 × 250 about 0.75. The spread shrinks like L^(−1/ν), with the correlation-length exponent ν = 4/3 in two dimensions, so the curve sharpens into a step at p_c as the grid grows. At p_c itself the chance that a square grid connects top to bottom tends to 1/2, as John Cardy's crossing formula (1992) predicts; Stanislav Smirnov proved that formula for the triangular lattice in 2001.

Clusters and fractals

At p_c the clusters come in every size, with no typical scale: the number of clusters of s cells falls like s^(−187/91), a power law. The cluster that first spans the grid at p_c is a fractal full of holes and dead ends. Its mass grows like L^D with D = 91/48 ≈ 1.896, a little less than 2, so the spanning cluster fills a smaller and smaller share of a bigger grid. Above p_c the share of cells in the infinite cluster grows like (p − p_c)^β with β = 5/36, a very steep rise, which is why the largest-cluster curve shoots up near the threshold. On an endless square grid at p_c there are about 0.0276 clusters per cell (Ziff, Finch and Adamchik 1997); a 60 × 60 grid at 55% has roughly 180 of them.

Where percolation shows up

Water through ground coffee or a paper filter, and oil or gas through the pores of sandstone, are the textbook cases; petroleum engineers use percolation to estimate how much oil a field can give up. A forest fire spreads from tree to tree only when the trees stand denser than a threshold, which is why firebreaks work. An epidemic in which each contact passes on the disease with a fixed chance is bond percolation on the contact network (Grassberger 1983): it can only become large above a threshold, and vaccination pushes the network below it. Conducting particles in plastic make the composite conduct once they percolate, polymers set into a gel when their bonds do (Flory 1941), and the robustness of power grids and the internet to random failures is a percolation question on networks.

Explore it

Open the percolation app with a 60 × 60 grid and slide Filled slowly from 50% to 65%: the blue connecting cluster appears suddenly, and the Threshold tile shows exactly where this grid connects. Press Find threshold to watch Filled rise until the path forms, then Pour water to see the water spread from the top step by step; Skip shows where it ends and the yellow line is the shortest path. Switch Neighbours to 8 and the threshold drops to about 41%. Set Grid size to 10 and then 250 and compare the chance curves: the small grid's curve is wide, the large one almost a step at 59.27%. New run draws a new grid, Colour clusters shows every cluster in its own colour, and the pencil opens the picture in the photo editor with the grid, the clusters, the water and the chart on layers of their own.

Frequently asked questions

What is the percolation threshold of a square grid?

For site percolation with 4 neighbours (sides only) it is about 0.592746, so about 59.27% of the cells must be filled. With 8 neighbours (corners too) it is about 0.407254. For bond percolation on the square grid it is exactly 1/2, proved by Harry Kesten in 1980.

Why does a small grid sometimes connect at 50% and sometimes only at 70%?

Because a finite grid's threshold is random. Only on an endless grid is the switch sharp. The thresholds of grids of size L spread around p_c with a width that shrinks like L^(−3/4), so a 10 × 10 grid varies a lot and a 250 × 250 grid hardly at all.

What is the difference between site and bond percolation?

In site percolation the cells (sites) are filled at random and neighbouring filled cells connect. In bond percolation every site is there but the links between neighbours are open at random. They behave alike near the threshold but have different threshold values.

Who invented percolation theory?

Simon Broadbent and John Hammersley, in a paper published in 1957. They were thinking about gas flowing through the porous carbon of gas masks.

Ready to try it?

Open PictorX in your browser — no install, no credit card required to start.

Open the percolation app