Toy Soap Bubble Redistricting Model

This visualization is based upon the paper https://arxiv.org/pdf/2607.05414, where the terms "Path 1" and "Path 2" are as per the paper.

Path 1 — Physical Length L (= cut score on this grid)
Path 2 — Density-Weighted Length L̃
Population Density (fBm) — brighter = denser
Iteration: 0
Number of Districts (K) 3
About the visuals and parameters. The right-hand heat map shows a synthetic population density generated by fractional Brownian motion (fBm) — spatially correlated stochastic noise, then exponentiated to produce a heavy-tailed distribution mimicking real urban/rural contrasts. Brighter pixels are denser. "Generate New fBm Map" redraws the field with a fresh random seed.

The white dots mark "cities" — local maxima of the fBm field, i.e. points of peak population density. They are visual reference markers only; the district optimizer does not treat them specially.
Both path maps start from the same density field and the same random Voronoi seeds, and advance in the same iteration loop. The only difference is the objective:

Path 1 (left) uses uniform line tension — population density enters only through the equal-population constraint — so it minimizes physical boundary length L (the paper's primary objective).

Path 2 (middle) uses density-weighted diffusion, so it minimizes a density-weighted boundary length L̃, penalizing boundaries more heavily in populated areas.

Cut score. On this uniform 4-adjacency grid every shared boundary segment has the same physical length, so the reported L is simply the count of grid edges separating different districts — which is exactly the Duchin–Tenner cut score. Physical length and cut score therefore coincide here up to a constant scale factor (the common edge length): this is the discrete face of Remark 4.3, and it is why a separate "cut" map would reproduce Path 1 exactly. Note that in the 4-adjacency setting L is a Manhattan (staircase) perimeter — a diagonal interface is charged its horizontal-plus-vertical extent, over-measuring true Euclidean length by up to √2. The three weightings separate only once edges carry unequal physical lengths (an irregular census-block mesh, or a richer neighbourhood); Path 2's density weighting is the one genuine departure on this grid.

Each district is shown in its own color (no political lean). The density panel is a heat map — brighter means more people per cell. Click and drag on either map to manually gerrymander that map.