Districts and Gerrymandering
How Voting Systems Work
Chapter 8 ยท Districts and Gerrymandering
How Voting Systems Work 7 shared a fixed number of seats between regions. This chapter asks the follow-up question: once a region is entitled to several seats and elects them from single-member districts, who decides where the district lines go? The answer matters more than most people expect, because the same voters can produce very different results depending on how they are grouped. Drawing lines to tilt the result on purpose is called gerrymandering. The maths stays at counting, percentages and one area-over-perimeter formula; the Python does the bookkeeping and, in the last example, tries every possible map.
Why Lines Matter
Under plurality voting in single-member districts (How Voting Systems Work 2), each district is a separate little election, and only the winner counts. Votes for a loser, and votes for a winner beyond what was needed, change nothing. A mapmaker who knows roughly where each party’s voters live can therefore choose lines that make one party’s votes count for more than the other’s. Two techniques do almost all of the work:
- Packing: cram the opponent’s voters into a few districts they win by huge margins, wasting their surplus.
- Cracking: split the opponent’s voters across many districts so that they are a narrow minority in each and win none.
The word itself dates from 1812 in Massachusetts. The sources I found agree it was coined in connection with state senate districts redrawn under Governor Elbridge Gerry, and that one district was said to look like a salamander, giving “Gerry-mander”. They also note the coiner may never be firmly established. The practice is older than the word and has not gone away.
Counting Wasted Votes
A wasted vote is any vote that did not help elect anyone: every vote for the loser in a district, plus the winner’s votes beyond a bare majority. The efficiency gap, proposed by Stephanopoulos and McGhee (per the sources I found), compares the two parties’ wasted votes: take party A’s wasted total minus party B’s, and divide by the total votes cast. If A wastes more than B, the map favours B. The same sources report that its authors suggested a gap of about 8% or more as a flag for possible partisan gerrymandering; I could not confirm the exact threshold in a primary source (check).
The experiment below uses fifty invented voters in five districts of ten, with party A holding 26 votes (52%) in every plan. Only the lines change.
Look at the second row of the output: A wins 4 of 5 seats with 52% of the votes, because B’s 24 voters are packed into one district (8 B to 2 A) and A holds a comfortable margin elsewhere. In the third row the roles flip: A’s voters are packed into two districts (9 to 1 each) and cracked across the other three (3, 3 and 2 out of 10), so A wins only 2 of 5 seats with the majority of votes. The efficiency gap moves with the outcome: negative when the map favours A, positive when it favours B.
| Plan (A has 26 of 50 votes) | A votes per district | A seats | Efficiency gap |
|---|---|---|---|
| Even spread | 6, 6, 6, 4, 4 | 3 of 5 | −0.08 (mild tilt to A) |
| B packed | 6, 6, 6, 6, 2 | 4 of 5 | −0.32 (strong tilt to A) |
| A packed and cracked | 9, 9, 3, 3, 2 | 2 of 5 | +0.16 (tilt to B) |
Measuring Shape: Compactness
A second family of tests ignores votes and looks at the shape of each district. A fair-looking district is usually blob-like; a tentacled one invites suspicion. The Polsby–Popper score, introduced in 1991 according to the sources I found, is 4π × area ÷ perimeter². A perfect circle scores 1 and thin or ragged shapes score near 0. Real maps measure area and perimeter from boundary data; the code below uses shapes built from unit squares, where the perimeter is just the number of cell edges that face the outside.
The 4x4 square scores 0.785 (the best a grid of squares can do for this area, since a square is not a circle). The same 16 cells stretched into a 1x16 strip drop to 0.174, and the tentacled plus-shape to 0.126. Area is identical in all four, so the score is measuring perimeter, which is why compactness is easy to compute and easy to argue about: it says nothing about who the voters are, and a real coastline or river border can make a perfectly innocent district look ragged.
| Measure | Looks at | Strength | Blind spot |
|---|---|---|---|
| Polsby–Popper | area and perimeter of each district | simple, needs no election data | natural borders; a compact map can still be biased |
| Efficiency gap | wasted votes in an actual election | measures the outcome, not the look | depends on that election’s turnout and swing; sources differ on its normalisation |
| Seats vs votes | share of seats against share of votes | easy to explain | some mismatch is normal under plurality |
How Much Power Does the Mapmaker Have?
The final experiment removes all judgement: it takes a 4x4 grid of voting blocks, with party A holding 9 of the 16 (56%) clustered on the left, and tries every way to cut the grid into four connected districts of four blocks each. A district counts for A only with at least 3 of its 4 blocks; a 2-2 split goes to neither party in this simplified model. The function builds each connected piece by growing it one neighbouring cell at a time, then fills in the rest recursively.
There are 117 valid maps. Proportional shares would give A about 2.25 seats, and 84 of the maps give exactly 2. But 7 maps hand A only 1 seat and 26 give it 3: the mapmaker’s choice spans a range, and a mapmaker who wants a particular outcome simply picks from the end of the list that suits them. This is the heart of the problem. Nothing in the layout of voters forces one answer; the lines are a free choice, and free choices can be made with an agenda. Exercise 3 repeats the experiment on random layouts.
What the Law and the Maths Say
In the United States, the sources I found report that the Supreme Court held in Rucho v. Common Cause (2019), by a 5-4 majority, that federal courts cannot decide partisan gerrymandering claims because they are political questions, leaving the matter to states; racial gerrymandering claims remain actionable. One result I found was a blog post describing a later decision, which I could not confirm against a second source, so I leave it out. Other countries handle the problem differently: some give boundary drawing to independent commissions (check which, and when), and systems with proportional representation (How Voting Systems Work 7 covered the seat-sharing step) largely avoid the problem because seats follow votes across whole regions rather than single districts (check).
A paper on arXiv titled “An impossibility theorem for gerrymandering” argues, as the search summary put it, that districting cannot always satisfy all three of one person one vote, Polsby–Popper compactness and a low efficiency gap at once. I did not read the paper’s full argument, so take that as a pointer rather than a result I verified (check). It echoes the theme of How Voting Systems Work 6: every fairness measure is a value choice, and no one number settles the question.
Six invented districts have the vote tallies A:B of 5200:4800, 4100:5900, 3300:6700, 6100:3900, 4600:5400 and 4400:5600. Print each district’s wasted votes for both parties, then the efficiency gap, which party it favours, and whether it passes an 8% flag.
๐ View solutionBuild three 12-cell shapes (a 3x4 block, an L shape and a staircase) and rank them by Polsby–Popper score. Do any two tie? What does that tell you about the score?
๐ View solutionPlace 9 A blocks at random (seeded) on the 4x4 grid for eight layouts, enumerate all 117 maps for each, and report the range of seats A can win. Print the layout where the mapmaker has the widest range.
๐ View solutionQuick Reference
- Packing: concentrate the opponent’s voters in a few districts
- Cracking: split the opponent’s voters so they lose everywhere narrowly
- Wasted votes: all of the loser’s votes, plus the winner’s votes beyond a bare majority
- Efficiency gap: (wasted A − wasted B) ÷ total votes; positive favours B in this chapter’s convention
- Polsby–Popper: 4π × area ÷ perimeter²; 1 is a circle, near 0 is thin or ragged
- Mapmaker’s power: many valid maps, many possible seat counts
- Always state: the election used, the sign convention and the normalisation when quoting a gap