Every decade, the US re-draws its voting districts, and in states where politicians set the boundaries, political games can often hijack impartiality.

When politicians manipulate the boundaries of voting districts to favor one party or class, we call this gerrymandering. Obviously, this isn't how the whole process is supposed to work, and in 1986 the Supreme Court ruled that partisan gerrymandering, if extreme enough, is unconstitutional.

Pennsylvania is just the latest state to get busted for this surprisingly common phenomenon.

In early 2018, the state's Supreme Court ruled that the latest redistricting plan was created with an extreme political bias. In other words, the redistricting made it much easier for one party to win the majority vote.

These sorts of verdicts have been made possible by the hard work of mathematicians, who have created algorithms that can identify which districts have been purposefully gerrymandered.

In Pennsylvania, for instance, an algorithm identified the districts that divided counties. This sort of mapping is in violation of court rules because it makes it much easier for one side to win seats in the state.

So even though the popular vote was basically equal between Republicans and Democrats in both elections that used this map, the Republicans in Pennsylvania won more than twice the number of seats in Congress.

Now that this information has come to light, Pennsylvania has been ordered to re-draw their maps. Even still, Republicans are expected to counter-sue, no doubt by arguing that the new map gives an advantage to Democrats.

When it comes to deciding these cases, mathematics will be the true judge.

Science AF is ScienceAlert's new editorial section where we explore society's most complex problems using science, sanity and humor.