(Bloomberg) -- State judges bedeviled by weirdly shaped and obviously partisan congressional district maps can now get expert help from an unusual source: math nerds.

Using sophisticated techniques drawn from statistics and geometry, mathematicians have developed tools that could play a huge role in a gerrymandering lawsuit filed in Ohio and during court fights expected in Georgia, Texas and Oregon. The algorithms can determine whether a map benefits one party or another, with the aim of providing courts and citizens with an objective gauge rather than relying on partisan arguments.

While both mapmakers and their critics have long used software to draw the lines, this year will be the first redistricting cycle in which opponents will have the mathematical measures to objectively show that a map is gerrymandered as the maps are being approved for the next decade. That could potentially alter a process that may determine control of the U.S. House in next year’s midterms.

“I’m thrilled to have math nerds and quants of all kinds enlisted in the battle for democracy,” said Dave Daley, author of two books on redistricting. 

Every 10 years, the U.S. Census releases a population count. That drives a once-a-decade process by which state legislatures draw new congressional maps. This year, that process slams into the critical 2022 midterm elections where Democrats will try to maintain their razor thin margins in the U.S. House and Senate. Both political parties see redistricting as an opportunity to bake in electoral advantages to help their numbers in Washington. 

Those maps are routinely challenged by the opposing party -- and that’s where the mathematicians come in. 

If the evidence proves persuasive to judges, Democrats stand to modestly even the playing field in conditions otherwise stacked in Republicans’ favor. Democrats control redistricting in states with just 75 seats, while Republicans control redistricting in states with 184 seats. The remaining 176 are drawn by bipartisan governments and independent commissions, and six states have only a single district.

While the academics do not consider themselves partisan, they have been viewed with more skepticism on the right.

At an annual meeting of the conservative American Legislative Exchange Council in 2019, Republican election lawyer Tom Farr complained that Democrats now have “a legion of expert witnesses who come up with all these newfangled theories” while Republicans have “a very thin bench,” according to audio of the event published by Slate.

Solving ‘Weird’ Questions

But the academics, whose expertise ranges from political science to statistics to geometry, say they were drawn to the topic because it was a practical application of theoretical work they were already doing. 

During the 2011 redistricting cycle, none of these tools were available. They were gradually developed over the last decade. They’ve been used a handful of times, helping to overturn maps drawn up from the last cycle in Pennsylvania and North Carolina, but not at the scale and potential effectiveness as this year.

One method, developed by Carnegie Mellon University math professor Wes Pegden, involves making a series of random changes to an approved map using a type of modeling called Markov chains. If a map is fair, the changes should benefit both parties equally, but if it is gerrymandered, they’ll tend to disproportionately help the disfavored party.

After publishing a paper in 2017 outlining his method, Pegden was called on to serve as an expert witness in gerrymandering cases, but he says his interest is still more in the theoretical side of things than the politics.

“Mostly what we do in math is think about weird abstract questions that nobody cares about, and we try to solve them,” he said. 

Princeton Project

Another method, favored by the Princeton Gerrymandering Project led by neuroscience professor Samuel Wang, generates hundreds of thousands of random congressional maps using the criteria set by that state, then compares the map drawn up by legislators to see if it is an outlier on things like the overall partisan lean or racial makeup of each district.

Other tools look at the shape of the districts. Since many state constitutions require that districts be “compact” but don’t define the term, Harvard social science professor Gary King used a machine learning algorithm on a survey of judges, elected officials, academics, lawyers and voters to develop a statistical model that could predict whether they would consider a particular district to be compact.

The search for new tools came about after then-Supreme Court Justice Anthony Kennedy wrote in a 2004 decision that judges needed some kind of manageable standard for determining when a map was gerrymandered, picking up steam after a hugely successful Republican effort to draw up favorable maps after the 2010 midterms.

In 2014, Harvard law professor Nicholas Stephanopoulos and political scientist Eric McGhee developed the efficiency gap, which measures how many votes each party wasted, either by losing a race or winning by an unnecessarily high margin. 

That standard was cited by a federal judge who ruled that a Wisconsin map was gerrymandered, although the Supreme Court later ruled that federal courts do not have the power to decide partisan gerrymandering cases, only race-based ones. That means most of the legal fights are now in state courts.

Jason Torchinsky, a lawyer who works with the National Republican Redistricting Trust, a GOP group advising state lawmakers, said that the computer-generated maps fail to take into account the human element, such as whether people from one community tend to socialize with each other or where kids go to school.

“I’ve never seen a computer drawing that captures everything that a map drawer for a legislature or a commission would take into consideration,” he said. “Redistricting is such a holistic exercise.”

But Hannah Wheelen, a data and tech lead at the Princeton Gerrymandering Project, said that the goal isn’t for the outside experts to draw the maps themselves but to give advice to the mapmakers who want it and level the playing field for people who think a map has been drawn unfairly.

“It’s going to be a lot harder for legislators to get away with these things,” she said.

©2021 Bloomberg L.P.