CGP Grey
Recursive geometric formulas split voter populations strictly by mathematical ratios, eliminating partisan human manipulation from electoral district design.
AI-assisted summary of The Shortest-Splitline Algorithm: a Gerrymandering Solution [Bonus Video] — original source. Check the original for full context.
Source published:
Key ideas
- The shortest-splitline algorithm provides an objective, geometric method to partition a territory into voting districts without partisan manipulation. (0:00)
- When the district count is odd, dividing by two and rounding up and down establishes the precise population ratio needed for the split line (such as a 4:3 ratio for seven districts). (1:00)
- The Center for Range Voting (RangeVoting.org) created the algorithm and offers side-by-side comparisons of algorithmic maps versus existing gerrymandered US congressional districts. (3:10)
Detailed notes
## Background This bonus video was published on YouTube by CGP Grey on July 12, 2011. According to the page description, it offers a brief explanation of the shortest split-line redistricting method as a geometric solution to gerrymandering.
## TL;DR CGP Grey breaks down the mechanics of the shortest-splitline algorithm, an objective mathematical approach to redistricting that eliminates partisan boundary manipulation. For even powers of two, the algorithm recursively divides populations in half using the shortest possible straight lines until the desired number of equal-sized districts is reached. When handling odd district counts, it divides the target by two and rounds both up and down to create an exact population ratio, repeating this recursion until every sector is properly allocated. Grey concludes by pointing viewers to RangeVoting.org to view real-world comparisons of actual U.S. congressional maps against algorithmically generated districts.
## Atmosphere & style The presentation has the crisp, brisk, and intellectually tidy feel characteristic of early CGP Grey educational shorts. Delivered with focused, rapid narration, it unpacks an intricate geometric problem step-by-step with clean, methodical diagrams that make the recursive logic click effortlessly into place. The tone is practical, rational, and quietly triumphant, leaving the viewer with a satisfying sense of clarity about how simple math can circumvent convoluted political manipulation.
## Bulletin - [00:00](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=0s) The shortest-splitline algorithm provides an objective, geometric method to partition a territory into voting districts without partisan manipulation. - [01:00](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=60s) When the district count is odd, dividing by two and rounding up and down establishes the precise population ratio needed for the split line (such as a 4:3 ratio for seven districts). - [03:10](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=190s) The Center for Range Voting (RangeVoting.org) created the algorithm and offers side-by-side comparisons of algorithmic maps versus existing gerrymandered US congressional districts.
## Key takeaways - [00:00](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=0s) The shortest-splitline method replaces political boundary drawing with an objective, recursive mathematical formula. - [00:00](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=0s) When dividing into a power of two, the algorithm cuts the population into equal halves using the geometrically shortest straight line available. - [00:35](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=35s) Sub-regions are treated as independent areas and repeatedly bisected until reaching single-district allocations. - [01:00](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=60s) Odd numbers of districts are handled by dividing the target count by two and rounding both up and down to form an integer ratio. - [01:00](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=60s) The derived integer ratio dictates both the proportion of population allocated to each side and the count of congressional seats assigned. - [01:20](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=80s) In a 42-voter, 7-district example, the first split creates a 4:3 ratio of 24 voters to 18 voters. - [02:00](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=120s) Each sub-region recursively repeats the rounding and shortest-line rule until all districts contain equal numbers of voters. - [02:50](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=170s) The algorithm produces contiguous, mathematically balanced districts completely free of human political interference. - [03:10](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=190s) RangeVoting.org developed the algorithm and provides real-world models applying official census data to all 50 US states.
## Detailed walkthrough ### [00:00](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=0s) The Basics of the Shortest-Splitline Method
In his primary video on gerrymandering, CGP Grey touched upon the shortest-splitline algorithm only in passing due to strict time constraints, but he returns in this bonus video to explore the mechanics behind this geometric approach to boundary drawing. The method serves as an objective, mathematical solution for carving a territory into separate voting districts without partisan manipulation. To illustrate how it works under straightforward conditions, Grey uses a sample population of 40 voters that needs to be partitioned into eight distinct, equal-sized voting districts.
When the target number of districts is an easily divisible power of two, the procedure is simple and recursive. The algorithm first identifies a straight line across the region that cuts the total population into two exactly equal halves of 20 voters each; if multiple lines can accomplish this 20-to-20 split, it selects whichever line is geometrically shortest. Next, the algorithm treats each half as an independent area and repeats the procedure, finding the shortest line that cuts each 20-voter group into two sub-groups of 10. A third and final iteration divides each group of 10 in half, leaving eight distinct voting ranges containing five voters apiece. As Grey summarizes: “And that's the basics of the shortest split line method: just always use the shortest line you can to divide the two groups.”
- Sample population: 40 voters partitioned into 8 equal districts. - First division: One shortest line divides 40 voters into two groups of 20. - Second division: Shortest lines divide each group of 20 into groups of 10. - Third division: Shortest lines divide each group of 10 into final districts of 5 voters each.
---
[01:00](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=60s) Handling Odd Numbers of Districts
The core challenge arises when a mapmaker must divide a region into an odd number of districts, such as seven instead of eight. Grey explains that this scenario highlights the true mathematical ingenuity of the technique: “This is where the cleverness of the shortest split line method comes up is if you take 7 divided by 2 you don't get a round number you get 3.5 but what you do is you take that 3.5 and you round it up to get 4 and down to get 3 and this tells you the ratio that you want to draw the line at for the population.” This 4:3 split dictates both the population balance across the initial cut and the exact number of congressional seats assigned to each side.
Applying this rule to a map of 42 voters, the algorithm locates the shortest possible line that splits the electorate into a 4:3 ratio. This places 24 voters on the left and 18 on the right, matching the target proportion exactly (24 divided by 18 yields 1.333, just as 4 divided by 3 yields 1.333). From there, the two sectors are resolved independently based on their allocated district counts:
```mermaid flowchart TD accTitle: Shortest-Splitline Algorithm for 7 Districts accDescr: Flowchart showing how 42 voters are split into 7 districts of 6 voters each using recursive shortest split lines.
subgraph Step1 ["Initial Split: 7 Districts (42 Voters)"] A["Total: 42 Voters<br/>Target: 7 Districts"] -->|"Round 7 / 2 = 3.5<br/>Ratio 4:3"| B["Left: 24 Voters<br/>(4 Districts)"] A -->|"Ratio 4:3"| C["Right: 18 Voters<br/>(3 Districts)"] end
subgraph Step2 ["Left Sub-Region: 4 Districts"] B -->|"Split 2:2"| D["Two Groups of 12"] D -->|"Split 1:1"| E["4 Districts<br/>(6 Voters Each)"] end
subgraph Step3 ["Right Sub-Region: 3 Districts"] C -->|"Round 3 / 2 = 1.5<br/>Ratio 2:1"| F["Top: 12 Voters<br/>(2 Districts)"] C -->|"Ratio 2:1"| G["Bottom: 6 Voters<br/>(1 District - Complete)"] F -->|"Split 1:1"| H["2 Districts<br/>(6 Voters Each)"] end ```
The left region requires four districts. Because four is an even number, it is halved with a shortest split line into two sections of 12 voters, and each of those is bisected again into groups of six. For the right region, which requires three districts, the rounding trick is applied once more: dividing 3 by 2 gives 1.5, which rounds up to 2 and down to 1. The shortest line is drawn to divide the 18 voters in a 2:1 ratio, placing 12 voters in the upper section and 6 voters in the lower section (12 divided by 6 equals 2). The single-district region of 6 voters is finished immediately, while the two-district region of 12 voters is bisected with one final shortest line into two districts of 6. The process concludes with seven contiguous, equally populated districts of six voters each, generated purely by geometric optimization without human political interference.
- Initial calculation: 7 ÷ 2 = 3.5, rounding up to 4 and down to 3 (a 4:3 target ratio). - Initial division: 42 total voters split into 24 on the left and 18 on the right (24 ÷ 18 = 1.333; 4 ÷ 3 = 1.333). - Left-side recursion: 24 voters divided by halving (4 → 2 and 2 → 1, 1, 1, 1), creating 4 districts with 6 voters each. - Right-side recursion: 3 ÷ 2 = 1.5, rounding to a 2:1 ratio, splitting 18 voters into 12 (top) and 6 (bottom). - Final right-side resolution: The bottom group of 6 is complete as 1 district; the top group of 12 is split in half into 2 districts of 6 voters each.
---
[03:10](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=190s) Resources and Applications at RangeVoting.org
Grey directs viewers interested in fair representation to the original proponents of the concept, pointing them toward RangeVoting.org (the Center for Range Voting). He notes that the group developed the algorithm and maintains detailed real-world demonstrations of how the formula behaves when applied to actual geography: “If you're interested in this and other stuff relating to electoral fairness I highly recommend you go to range voting org they're the group that as far as I can tell came up with a split line method and they have a lot of really interesting information there such as maps of all of the states in America drawn using this method and comparing them to the districts that currently exist.”
By inputting official census population data into the algorithm, the site showcases side-by-side comparisons of all fifty U.S. states, contrasting bizarrely shaped, gerrymandered congressional districts with clean, algorithmically generated borders. Grey closes the bonus explanation by thanking the audience for watching.
## Notable quotes > [00:00](https://www.youtube.com/watch?v=kUS9uvYyn3A&t=0s) And that's the basics of the shortest split line method: just always use the shortest line you can to divide the two groups. — CGP Grey
## Mentioned CGP Grey, Center for Range Voting, RangeVoting.org, United States
## Video description A brief description of the shortest split-line redistricting method.
[Source](https://www.youtube.com/watch?v=kUS9uvYyn3A)