# Is it possible to gerrymander Maryland's congressional districts such that all eight lean Democratic?

I was thinking about what a gerrymandered map of Maryland's congressional districts would look like if the gerrymanderer tried to ensure that all eight districts would be represented by Democrats.

The current boundaries in use since 2013 result in seven of the districts leaning Democratic, with one leaning Republican. Has a configuration which would result in all eight districts leaning Democratic been drawn? If not, is it possible?

FiveThirtyEight's Atlas of Redistricting is a good resource for this, which has compiled a set of seven alternate congressional district configurations for each US state, in the following categories:

1. Gerrymander districts to favor Republicans
2. Gerrymander districts to favor Democrats
3. Match the partisan breakdown of seats to the electorate
4. Promote highly competitive elections
5. Maximize the number of majority-minority districts
6. Make district shapes compact (using an algorithm)
7. Make districts compact while following county borders

We are interested in this case in redrawing Maryland's eight congressional districts so that all eight favour the Democratic party, defined as having better than a 5-in-6 chance of returning a Democratic representative. FiveThirtyEight's reconfiguration can be found here, reproduced below. Under this configuration, according to their analysis, the most Republican favoring district would only have a 13.8% chance of returning a Republican representative.

If we allow arbitrary gerrymandering (i.e., with arbitrarily convoluted shapes) then we could take it to the mathematical extreme and assign every single voter to one of the n = 8 districts individually (and with our knowledge of their voting preferences). With a total of a voters for party A and b voters for party B (we can ignore any non-voters; and since this is the USA, we ignore any additional parties), we can partition these into n districts where each has more voters of the first party than the second if and only if a is at least b+n: Simply assign approximately b/n B-voters to each of the districts and exactly one more A-voters, and finally distribute any remaining A-voters arbitrarily.

If a<b+n, we clearly cannot make all districts favour A. But we can do it with n-1 districts (as long as a is at least n-1 and n is at least 2): Partition the a A-voters into n-1 parts (so perhaps you take approximately a/(n-1) per district). For good measure, add the same number minus one of B-voters to each of these n-1 districts (so that each is won by A with one marginal vote). Finally make the nth district from the remaining b-a+n-1 B-voters.

So much for the mathematical limitations on what is possible. We run into practical problems such as

• In the second case, if A-voters are in a significant minority, the last district with the left-over B-voters may need to be much larger than the other districts. Such discrepancy may perhaps be legally ruled out.

• Assigning voters individually leads to shapes that are not only weird, but in fact highly disconnected. This may be ruled out

• Aiming for only one marginal vote to win a district risks failure of the attempt in case of a single person forgetting to vote

• We do not actually know the exact voting behaviour of everyone

Nevertheless, every step towards a more realistic/practical gerrymandering strategy merely requires a larger "safety gap" between the a and b than the mathematical minimum of n in order make all n districts favour party A. Depending on local demographic circumstances, a voting population of millions may still allow a "valid" solution even when the difference of a and b is only in the order of about 1%.