Separated at birth? Slaying the Jabberwock/Gerrymander

Over the years, people have remarked on the similarity of John Tenniel's illustration of the Jabberwock from Lewis Carroll's 1872 Through the Looking Glass to the 1812 political cartoon satirizing the drawing of election district lines in Gov. Elbridge Gerry's Massachusetts.  When I was sitting at the League of Women Voters' presentation on redistricting back in January in Ithaca and listening to the clearly partisan complaints about gerrymandered election districts, the number-crunching side of my brain was thinking that there must be some geometric algorithm or linear programming something-or-other that will slay this beast—it can't be that hard.

Well, in some sense it's not.  In words, the objective standard is this:

...The degree of contrivance behind the design of a set of districts is directly related to the oddness of the shapes employed to reach the election-rigging objective.

Mathematically, that translates to this:

...if you take the square of the perimeter of any shape, and divide it by the shape’s area, you arrive at a number, which can be called its irregularity. For example the irregularity of any square, regardless of its size, equals 16 (because (4s)2/s2 = 16.) On the other hand, the irregularity of a rectangle whose long side is 10 times the length of its short side is 48.4 (because (22s)2/10s2 = 48.4.) The odder and more contrived the shape, the higher will be its irregularity.

So it's mathematically possible to create (nearly) equal population districts with a minimum total irregularity.

There are other considerations, of course, which have to be addressed. And let's face it: "Many politicians will resist such reform, as it will cost them their ability to fix elections in their own favor."  No kidding.  But it's not as though gerrymandering is a problem whose solution is so arcane that mere mortals can't possibly wrap their minds around it. So do it already.

"And hast thou slain the Jabberwock?

Come to my arms, my beamish boy!

O frabjous day! Callooh! Callay!"

He chortled in his joy.