{"id":63,"date":"2013-03-05T08:48:49","date_gmt":"2013-03-05T13:48:49","guid":{"rendered":"http:\/\/www.jsylvest.com\/blog\/?p=63"},"modified":"2015-04-30T11:40:47","modified_gmt":"2015-04-30T15:40:47","slug":"computational-cartography-gerrymandering","status":"publish","type":"post","link":"https:\/\/www.jsylvest.com\/blog\/2013\/03\/computational-cartography-gerrymandering\/","title":{"rendered":"Computational Cartography &#038; Gerrymandering"},"content":{"rendered":"<p>My brief recent dabbling with computational cartography (see <a href=\"http:\/\/www.jsylvest.com\/blog\/2013\/02\/computational-cartography-part-1\/\">Part 1<\/a> & <a href=\"http:\/\/www.jsylvest.com\/blog\/2013\/02\/computational-cartography-part-2\/\">Part 2<\/a>) was inspired by <a href=\"http:\/\/fakeisthenewreal.org\/reform\/\">Neil Freeman<\/a>. His project was initiated as a (speculative) reform to the Electoral College.<\/p>\n<hr \/>\n<p>Incidentally, this is a great idea. Every four years when whichever party looses the White House starts complaining about how silly the Electoral College is I feel compelled to point out that it's actually an excellent way to maximize the expected impact of any one voter's vote.\u00a0The catch is that this requires states to have equally-weighted populations, which obviously we don't.<\/p>\n<p>I just ran a quick Monte Carlo to check the numbers on this. Let's say you voted in 10 million elections in your life, and in each one there were 100 million voters. (This is obviously way too many elections, but I wanted something that didn't require me to report the results in scientific notation.) Let's further stipulate that every one of those races was close: a dead heat with a standard deviation of 1%. In this idealized case\u00a0you could expect to be the tie-breaking vote \u2014 thus having your vote \"matter\" \u2014 in less than four of them. <em>Four in ten million<\/em>.<\/p>\n<pre>cnt = 10000000;\r\npop = 100000000;\r\nfor i=1:1000,\r\n  results = round(random('normal',n\/2,pop*.01,[cnt 1]));\r\n  ties=[ties;sum(results==n\/2)];\r\nend;\r\nmean(ties)    <span style=\"color: #008800;\"> =&gt; ans = 3.9160<\/span><\/pre>\n<p><a style=\"font-size: 16px;\" href=\"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/03\/boston-red-sox-world-series-trophy.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignright  wp-image-133\" alt=\"boston-red-sox-world-series-trophy\" src=\"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/03\/boston-red-sox-world-series-trophy.jpg?resize=160%2C240\" width=\"160\" height=\"240\" srcset=\"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/03\/boston-red-sox-world-series-trophy.jpg?resize=200%2C300&amp;ssl=1 200w, https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/03\/boston-red-sox-world-series-trophy.jpg?w=268&amp;ssl=1 268w\" sizes=\"auto, (max-width: 160px) 100vw, 160px\" \/><\/a><\/p>\n<p>If, on the other hand, there were 51 states of 1,960,784 voters each, you would be the tie-breaker for your state 203 times. This would only matter if the other 50 states were tied 25\/25. You can expect this to happen 11.2% of the time. Which means <em>your chance of being the deciding vote goes from 4-in-10,000,000 to 23-in-10,000,000<\/em> which means your vote \"matters\" more than five times as much in the (modified) Electoral College system than it does in the winner-take-all system.<\/p>\n<p>All of this is far too numerical to explain to someone in casual conversation, so my standard defense of the Electoral College is to agree that we should abolish it as soon as the winner of the World Series is decided by whichever teams scores the most runs in 63 innings rather than the team which wins four of seven games. The reasons to prefer both the Electoral College and best-of-seven champions are the same, but I'm already way too far off track to cover that now.<\/p>\n<hr \/>\n<p>Okay, back to the point. Equally-sized states would be cool. But the chances of us redrawing state boundaries is zero.<\/p>\n<p>Despite this, I think an automated system to draw boundaries for equally populated regions is far more than just an exercise. Why? Because while our state boundaries are effectively carved in stone by tradition \u2014 or in the case of my home of Maryland, literally carved in stone \u2014\u00a0there are political borders that are re-drawn with regularity: congressional districts.<\/p>\n<p>That's how we end up with absurdity like this:<\/p>\n<figure id=\"attachment_141\" aria-labelledby=\"figcaption_attachment_141\" class=\"wp-caption aligncenter\" style=\"width: 494px\"><a href=\"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/03\/Maryland3rd-gerrymander.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-141 \" alt=\"Maryland 3rd\" src=\"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/03\/Maryland3rd-gerrymander.jpg?resize=484%2C314\" width=\"484\" height=\"314\" srcset=\"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/03\/Maryland3rd-gerrymander.jpg?w=484&amp;ssl=1 484w, https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/03\/Maryland3rd-gerrymander.jpg?resize=300%2C194&amp;ssl=1 300w\" sizes=\"auto, (max-width: 484px) 100vw, 484px\" \/><\/a><figcaption id=\"figcaption_attachment_141\" class=\"wp-caption-text\">Maryland's (totally reasonable, not at all farcical) 3rd Congressional District<\/figcaption><\/figure>\n<p>Gerrymandering was one of the chief complaints than <a href=\"http:\/\/www.econtalk.org\/archives\/2013\/02\/glenn_reynolds.html\">Glenn Reynolds made in his recent EconTalk appearance<\/a>:<\/p>\n<blockquote><p>I'm also pretty much agnostic on term limits. I used to be opposed to them. And as I see how effective gerrymandering is, which I think is one of the reasons people hate Congress but love their Congressmen, or at least tolerate their Congressmen, because of gerrymandering, I think that's something that is difficult to deal with and probably wouldn't be helped that much by term limits. If you've got a gerrymandered district, especially with modern gerrymandering technology, the new guy who gets elected in it is likely to look an awful lot like the old guy because the district is so one-dimensional.<\/p><\/blockquote>\n<p>Taking the \"especially with modern gerrymandering technology\" as a given, how can we use technology to pre-empt this trend? It's usually best to address technical problems with technical solutions rather than social ones.<\/p>\n<p>One option is to draw the boundaries the same way we do now, but reject them if their score on some measure falls below a certain acceptable level. For example, <a href=\"http:\/\/uxblog.idvsolutions.com\/2010\/10\/everything-you-ever-wanted-to-know.html\">IDV Solutions has ranked districts by<\/a> <code>perimeter\/sqrt(area)<\/code>. This is, by their own admission, a crude way to do things. To name just one problem, it favors districts that fall on state borders like the Mason-Dixon Line over those that fall on borders like the Potomac River.<\/p>\n<p>Other measures are possible, obviously. One that I think would be useful is based on nearest neighbors. In a non-gerrymandered map the vast majority of addresses will have all of their <em>k<\/em> nearest neighbors in the same district. As districts become more complex, more people will be have large proportions of their neighbors in other districts. If you limit the neighbors to those within the state, which is reasonable, you minimize the Mason-Dixon\/Potomac problem.<\/p>\n<p>Another measure, which I've thought out less fully, would be to measure the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Kolmogorov_complexity\">Kolmogorov Complexity<\/a> of the map. The descriptive length of the Maryland 3rd is... well \"long\" doesn't cut it. Compare that to the former definition of the Maryland 1st: \"the Eastern Shore up to the Susquehanna River.\" The Kolmogorov Complexity itself is incomputable, but I think we have very good proxies in this case. Whoever draws the maps must be able to present in writing, with no graphics, an unambiguous definition of the districts in less than <em>k<\/em> words. Or alternately, must be able to present them orally to a judge, spoken and without visual aids, in <em>c<\/em> minutes.<\/p>\n<p>There's a general principle here: <em>If you can't explain it succinctly, it's a bad rule.<\/em><\/p>\n<p>Another approach might be to measure the curvature or the fractal dimension of boundaries between districts. I've thought even less about this though.<\/p>\n<p>The approach of capping some metric has the option of being simple, objective, and easily implementable. Whatever partisan committee which now draws the borders presents their map to an adjudicator, who passes it through an established, preferably open-source, program which calculates the metrics. If they're above some pre-established threshold the map is rejected. This is already an improvement over the subjective way we do things now.<\/p>\n<p>A second option,\u00a0suggested\u00a0by David Friedman, is to <a href=\"http:\/\/daviddfriedman.blogspot.com\/2012\/11\/redistricting-geek-proposal.html\">have the partisan committee submit not a finished map, but a program to generate a map<\/a>. The inputs to the program could contain population data, municipal boundaries, etc. but no information about party affiliation or past voting records, or any proxies for them. There would also be a cap on program length to keep anyone from submitting what is essentially just a precomputed lookup table.<\/p>\n<p>Given the low numeracy I see in most legislators, I think it would be a hard sell to get them produce such a program, but the idea has tremendous appeal to me. The whole problem is to remove subjectivity and make the decision on the basis only of explicitly acceptable criteria, which is exactly what computers do: they're entirely dispassionate and the only know what you tell them.<\/p>\n<p>We could take this one step further and simply codify the program to be used rather than having partisan committees writing their own after every census. I find a technocratic Bureau of Districting Algorithms much easier to imagine than local politicians wrestling with GIS algorithms.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My brief recent dabbling with computational cartography (see Part 1 &#038; Part 2) was inspired by Neil Freeman. His project was initiated as a (speculative) reform to the Electoral College. Incidentally, this is a great idea. Every four years when &hellip; <a href=\"https:\/\/www.jsylvest.com\/blog\/2013\/03\/computational-cartography-gerrymandering\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[10],"tags":[3,27],"class_list":["post-63","post","type-post","status-publish","format-standard","hentry","category-cs","tag-computer-science","tag-government","wpautop"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3sddF-11","jetpack-related-posts":[{"id":62,"url":"https:\/\/www.jsylvest.com\/blog\/2013\/02\/computational-cartography-part-2\/","url_meta":{"origin":63,"position":0},"title":"Computational Cartography (Part 2)","author":"jsylvest","date":"20 February 2013","format":false,"excerpt":"In the previous post I talked a bit about how one might build a system which would algorithmically divide the US into 50 states of approximately equal populations. I've messed around with the problem a bit and developed a very rough approximation. Actually, I don't even feel comfortable calling this\u2026","rel":"","context":"In &quot;CS \/ Science \/ Tech \/ Coding&quot;","block_context":{"text":"CS \/ Science \/ Tech \/ Coding","link":"https:\/\/www.jsylvest.com\/blog\/category\/cs\/"},"img":{"alt_text":"auto sized states - after","src":"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/02\/auto-sized-states-after-1024x768.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/02\/auto-sized-states-after-1024x768.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/02\/auto-sized-states-after-1024x768.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/02\/auto-sized-states-after-1024x768.png?resize=700%2C400 2x"},"classes":[]},{"id":34,"url":"https:\/\/www.jsylvest.com\/blog\/2013\/02\/computational-cartography-part-1\/","url_meta":{"origin":63,"position":1},"title":"Computational Cartography (Part 1)","author":"jsylvest","date":"17 February 2013","format":false,"excerpt":"In the sixth grade my Social Studies teacher lent me a book which had a whole section devoted to alternative maps of the US. What would it look like with a dozen states? Or 200? What if state lines were drawn according to climate and vegetation patterns, or ancestral ethnicities,\u2026","rel":"","context":"In &quot;CS \/ Science \/ Tech \/ Coding&quot;","block_context":{"text":"CS \/ Science \/ Tech \/ Coding","link":"https:\/\/www.jsylvest.com\/blog\/category\/cs\/"},"img":{"alt_text":"The United States redrawn as Fifty States with Equal Population","src":"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/02\/map-50-equal-states-1024x789.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/02\/map-50-equal-states-1024x789.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/02\/map-50-equal-states-1024x789.jpg?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/02\/map-50-equal-states-1024x789.jpg?resize=700%2C400 2x"},"classes":[]},{"id":1046,"url":"https:\/\/www.jsylvest.com\/blog\/2017\/07\/what-ive-been-reading\/","url_meta":{"origin":63,"position":2},"title":"What I've Been Reading","author":"jsylvest","date":"25 July 2017","format":false,"excerpt":"Banana: The Fate of the Fruit That Changed the World, Dan Koeppel Not bad. I'm a sucker for this type of history of a single commodity or common household object. It did make we want to try to get my hands on one of the few non-Cavendish cultivars of bananas\u2026","rel":"","context":"In &quot;Book List&quot;","block_context":{"text":"Book List","link":"https:\/\/www.jsylvest.com\/blog\/category\/book-list\/"},"img":{"alt_text":"Banana, Dan Koeppel","src":"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2017\/06\/71K3llKhVL-200x300.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":234,"url":"https:\/\/www.jsylvest.com\/blog\/2013\/04\/manfred-mohr\/","url_meta":{"origin":63,"position":3},"title":"Manfred Mohr","author":"jsylvest","date":"9 April 2013","format":false,"excerpt":"I saw this post on Manfred Mohr's (very!) early digital art literally minutes after picking up a book about Mohr's work from the library yesterday. Total coincidence. I like a lot of the pioneering digital artists' work. I think the restraints gave them a lot of focus. (Limits boost creativity.)\u2026","rel":"","context":"In &quot;Art&quot;","block_context":{"text":"Art","link":"https:\/\/www.jsylvest.com\/blog\/category\/art\/"},"img":{"alt_text":"p231, Manfred Mohr","src":"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/04\/Mohr-p231.gif?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":406,"url":"https:\/\/www.jsylvest.com\/blog\/2013\/05\/reading-list-for-28-may-2013\/","url_meta":{"origin":63,"position":4},"title":"Reading List for 28 May 2013","author":"jsylvest","date":"28 May 2013","format":false,"excerpt":"For Science! Patrick Morrison & Emerson Murphy-Hill :: Is Programming Knowledge Related To Age? An Exploration of Stack Overflow [pdf] As a CS guy who's tip-toed into psychology here and there I would offer Morrison & Murphy-Hill this advice: tread very, very lightly when making claims regarding the words \"knowledge\"\u2026","rel":"","context":"In &quot;Reading Lists&quot;","block_context":{"text":"Reading Lists","link":"https:\/\/www.jsylvest.com\/blog\/category\/reading-lists\/"},"img":{"alt_text":"busy_sciencing","src":"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2013\/05\/busy_sciencing.jpeg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1144,"url":"https:\/\/www.jsylvest.com\/blog\/2017\/12\/malconv\/","url_meta":{"origin":63,"position":5},"title":"MalConv: Lessons learned from Deep Learning on executables","author":"jsylvest","date":"8 December 2017","format":false,"excerpt":"I don't usually write up my technical work here, mostly because I spend enough hours as is doing technical writing. But a co-author, Jon Barker, recently wrote\u00a0a post on the NVIDIA Parallel For All blog about one of our papers on neural networks for detecting malware, so I thought I'd\u2026","rel":"","context":"In &quot;CS \/ Science \/ Tech \/ Coding&quot;","block_context":{"text":"CS \/ Science \/ Tech \/ Coding","link":"https:\/\/www.jsylvest.com\/blog\/category\/cs\/"},"img":{"alt_text":"The MalConv architecture","src":"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2017\/12\/malconv.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2017\/12\/malconv.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2017\/12\/malconv.png?resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/posts\/63","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/comments?post=63"}],"version-history":[{"count":46,"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/posts\/63\/revisions"}],"predecessor-version":[{"id":372,"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/posts\/63\/revisions\/372"}],"wp:attachment":[{"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/media?parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/categories?post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/tags?post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}