Fair redistricting

Posted by piantado on April 08, 2009

A few days ago when I was riding home on the T with John Kraemer, we ran into his friend, Brian Olson, a guy from google who has some neat political-computational ideas. Pretty quickly on the ride home, he sold me on the idea of fair redistricting, which is meant to provide an impartial way to solve problems of gerrymandering (Hilariously, wikipedia tells me that this is a portmanteau of “Gerry” and “Salamander,” the former being the governor of MA and the latter being the shape of the district chosen to help him).

The idea of fair redistricting is really clever: define an objective measure for the best districting scheme, and use that to define the districts, rather than allowing politicians to haggle over them. You can picture having some metric for how “good” a districting scheme is, and then setting them by law to be the best according to goodness. This is clever because it leaves no room to wiggle. I find it hard to argue with.

Brian Olson’s scheme is to pick a districting such that the average distance of people in the district to the center of the district is minimized. Of course, there are others, but that happens to be relatively straightforward to compute (though finding the best is hard). On his webpage, he provides a program (note: requires protobuf) for computing the best districting scheme for each state according to this metric. This scheme produces regions that look quite reasonable, for instance converting the gerrymandered FL districting on the left to the objectively “better” one on the right.

And not only is it objectively better, but it bears no hallmarks–weird shaped regions–of a gross political system.

There are of course a few additional things you want. You want there to be a unique solution (for some reason, I find this plausible when there are so many constraints.. more on that later maybe). You also want the solution to be findable–or at least able to be approximated. Here that doesn’t mean finding a district whose score is close to the best score. It means finding a map whose districting is close to the best one, which is a slightly different problem. A practical way around this search problem might be to have each party submit their preferred districting, and then choose the one with the highest score according to the objective function.

Anyway this looks like the right direction to move in: formalize our political intuitions of goodness, and go by them without letting the grimy politicians get in the way! Thanks Brian!

Perl 6

Posted by piantado on April 02, 2009

Just saw a talk by Larry Wall, the inventor of Perl. I expected him to resemble a stereotype of computer network admins, but he showed up in a surprising form: wearing all brown, an apparently Australian cowboy hat, and a horseshoe mustache (thanks wikipedia!). He gave a bizarre talk consisting mainly of several hundred slides with single words on them, that somehow wove into his attempts to describe programming, science, and whatever.

Larry is an interesting fellow. Wikipedia says he basically started out in linguistics at Berkeley, wanting to translate the Bible into novel written languages. Instead he joined JPL. He is most famous not for winning the obfuscated C context twice, but for inventing the programming language perl. By the way, in case you are interested in doing any kind of corpus work or anything where you need to shuffle around data, I would definitely recommend perl. It is amazing.

Larry talked about the upcoming Perl 6 release. The driving goal behind this, he explained, was to make Perl a better version of X than X is (where X is any other language). This is achieved by making the Perl syntax/parser itself changable within programs. That is, you can change how the syntax of the perl interpreter itself works. For instance, you can use the perl command

use Lisp;

and then write code in Lisp syntax. This is a super cool idea that means perl literally contains every other programming language as a proper subset.

Larry’s linguistics training seems to bleed into his language design, and he described several design choices that were motivated by noticing what types of things people can handle in natural language. For instance, some pieces of perl code look locally ambiguous, which he shook off by saying that people could deal with ambiguity well (which they can). He also described how someone suggested being able to write conditionals of the form X == 1|2|3 (which were called “quantum superpositions”), which would be true if X==1 or X==2 or X==3. At first he didn’t like this idea, until he noted that you can say in english “If X is 1 or 2 or 3.”

Even better, the new Perl 6 looks like it will have great support for functional programming (allowing things like closures, currying, etc.), objects, and multithreading.

I am strangely excited.