# Gerrymandering Math or How to Steal an Election

This article from Washington Post got me thinking about the math behind Gerrymandering. Gerrymandering is the act of drawing district / political boundaries to give an unfair advantage to one party. Here’s the damning image from the article that illustrates the power of gerrymandering. Particularly interesting is Figure 3 where a party with 40% support actually wins the election!

One particularly interesting question in my mind was: how unpopular can a party be and still win elections given complete freedom to redistrict the population. Let’s try to answer this question in a 2 party system.

Let P be the total voting population and let D be the number of districts that are voting. A is the fraction of voters who are siding with the Good Party. Therefore, A*P is the number of people who will vote for the Good Party no matter what and (1-A)*P is the number of people who will vote for the Bad Party.

For the Good Party to win, they must win (D/2 + 1) districts. If they were to win with the slimmest possible margin, they must get (P/2D + 1) votes in each of these districts. Therefore,

This can be rewritten to an equation that gives us lowest A value:

This equation is a little difficult to interpret, so I decided to plot lowest A for different P and D values to understand the curve.

First, we look at the different % of support required in a population of 8000 voters. It is fascinating to see that at around 100 districts, the Good Party can win with just 0.25 or 25% of the popular vote.

The graph is surprisingly similar for larger populations and under ideal conditions, the party with 25% of the popular vote can win elections. I suspect that the bar will be even lower in multi-party scenarios. Representational democracy doesn’t look so good now does it?