# The Mathematics of Redistricting
Redistricting is a partition problem. You are given a set of geographic units — census blocks, precincts, voting districts — each carrying a population count and a bundle of political and demographic attributes. You must sort them into *k* groups that are contiguous, roughly equal in population, and compliant with whatever legal constraints survive. The number of valid ways to do this, for any real state, is astronomically large.
That combinatorial explosion used to be a defense. A human with paper maps could examine perhaps dozens of configurations. A mapmaker with a solver, block-level census data, and precinct-level partisan returns can examine millions, and can rank them by how many seats each delivers. The shift from the first regime to the second is the single most consequential change in American election administration in fifty years, and it is a change in computational capacity rather than in law.
## Why the space is so large
Consider a state divided into a few thousand precincts to be partitioned into a dozen districts. Even after imposing contiguity and population-equality constraints, the number of admissible partitions is large enough that exhaustive enumeration is permanently out of reach — this is not a matter of waiting for faster computers. The problem is closely related to graph partitioning (see Graph Theory) and belongs to the class of combinatorial optimization problems that resist exact solution at scale.
Two consequences follow, and they point in opposite directions.
**For the mapmaker:** you do not need the optimum. You need a map that is *good enough* on your objective and defensible on the legal criteria. Heuristic search finds those easily. Partisan advantage is a smooth, well-behaved objective function; a solver climbs it without difficulty.
**For the challenger:** you cannot prove a map is the worst possible, and you cannot prove it is unusual by inspecting it. A single map, however grotesque, is just one point in an incomprehensibly large space. Establishing that it is an outlier requires characterizing the space — which is what the [[Markov Chain Ensemble Methods]] approach was invented to do.
## The three constraint layers
**Population equality.** *Reynolds v. Sims* (1964) and *Wesberry v. Sanders* (1964) established one-person-one-vote. For congressional districts the tolerance is near zero — deviations of a few people require justification. This is the tightest constraint and the easiest to verify arithmetically, which is precisely why it does almost nothing to prevent manipulation: there are vastly more population-balanced maps than any mapmaker needs.
**Contiguity and compactness.** Contiguity is a graph property and is checkable. Compactness is a geometric notion with no single definition — see [[District Compactness Measures]] — and the multiplicity of definitions is exploitable, since a map can be defended under whichever measure treats it most kindly.
**The Voting Rights Act layer.** Under the [[Thornburg v. Gingles]] framework, Section 2 of the [[Voting Rights Act of 1965]] required majority-minority districts under specified conditions. [[Louisiana v. Callais]] (2026) rewrote that framework to require proof of discriminatory *intent* rather than effect, inverting the constraint: drawing a district that empowers minority voters is now legally harder than drawing one that dilutes their power.
## What the courts did with the math
The mathematics matured faster than the doctrine could absorb it, and then the doctrine closed the door.
*Gill v. Whitford* (2018) reached the Supreme Court with [[The Efficiency Gap]] as its proposed standard. The Court did not evaluate the metric; it remanded on standing grounds, holding that the plaintiffs had not established district-specific injury.
[[Rucho v. Common Cause]] (2019) settled it. Chief Justice Roberts held that partisan gerrymandering claims present nonjusticiable political questions — that there is no judicially manageable standard for how much partisan advantage is too much. The opinion did not say the mathematics was wrong. It said that choosing a threshold was a political judgment courts may not make. The dissent's position was that the ensemble methods supply exactly the manageable standard the majority claimed not to find.
The practical result: **the mathematics of partisan gerrymandering is now largely a state-court and public-argument tool, not a federal constitutional one.** State constitutions with explicit fairness provisions — Pennsylvania, Florida, North Carolina at various points — remain live venues.
## The current phase
The 2025–2026 mid-decade wave documented in [[Redistricting Timeline 2025-2026]] represents something the mathematics did not anticipate: redistricting decoupled from the census cycle entirely. Maps are now redrawn when the seat math becomes favorable rather than when the population data changes. This is not a mathematical development — it is a norm collapse — but it multiplies the value of the computational advantage, because the optimization can be re-run whenever conditions shift.
## Related
[[The Efficiency Gap]] · [[District Compactness Measures]] · [[Markov Chain Ensemble Methods]] · [[Packing and Cracking]] · [[Wasted Votes]] · [[Congressional Apportionment Mathematics]] · [[Gerrymandering]] · [[Minority Rule]] · [[Mathematics and Power Hub]]