Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Rigging elections with integer linear programming (drmaciver.com)
91 points by DRMacIver on Feb 17, 2017 | hide | past | favorite | 21 comments


While there's nothing overtly political in the post, I'd mention that factors like this are much more likely to enter real world consideration when you have a situation where "right and left have broken down".

In particular, the median voter theorem states: "The median voter theorem states that 'a majority rule voting system will select the outcome most preferred by the median voter'" - IF (big if) "voters can place all election alternatives along a one-dimensional political spectrum."

https://en.wikipedia.org/wiki/Median_voter_theorem


Neither of the two key conditions for median voter theorem tend to hold true in the real world; not only are real political alternatives not unidimensional (even in the US, which has very low dimensionality in political discourse and identity compared to most modern democracies), but distribution of political views tends not to be unimodal, which is also required for median voter theorem.


Distribution of political views doesn't matter. Unimodality is instead a requirement on each individual voter's preferences. You can't have "anti-centrists" that prefer both extreme left or extreme right to center.


You're correct that I misremembered the requirement; but that's also (counterintuitive as it may be) a requirement that fails in reality; the naive intuition that, even when people view policy on a unidimensional spectrum, their preference for any policy is inversely related to the distance on the spectrum between the policy in question and their most-preferred policy turns out to be far from consistently true.

Median voter theorem also, to be relevant other than in the trivial sense (in which a majority-rule election by definition, choses the formal option which was voted for by a majority of voters, which, assuming unimodal preferences but not necessarily unidimensionality, includes the median voter), requires the substantive policy outcomes to be both determined by the majority-rule election and transparent to voters at the time of the election. As substantive policy is usually indirectly set by aggregate results of of multiple elections that would be, in the best case, majority-of-majorities (but usually is less majorities than that at both levels), and because substantive policy outcomes are often not transparent to voters at the time of elections, the theorem is mostly an empty intellectual exercise.

On top of all that, median voter theorem tends to be even more irrelevant in the US because the US doesn't actually use majority-rule systems as much as people seem to think (it uses plurality rule more often for single-winner elections.)

Median voter theorem is most applicable in the real world in systems with strongly proportional representation, no separation of powers (e.g., parliamentary supremacy), high party discipline, and transparent party platforms that make clear both party positions and relative priorities.


Unimodality is only one of the requirements. The other being that the space of political parties is somehow 1-dimensional (probably to avoid people being split between 3 or more parties which are all different from each other).


Sorry, we exist. I can't tell the difference between Coke and Pepsi, but cola tastes like shit, so I'll vote for anything else.


Not directly related to voting, but a while back someone gave a talk or there was a book/lecture that used an example that went something like this:

"Two doctors give you an independent diagnosis: One doctor says there's a 99% chance it's disease A, but there's a 1% chance it's disease B. The other doctor says there's 99% chance it's disease C, but there's a 1% chance it's disease B. Question: What's the most likely outcome? Answer: It's most likely disease B, the point where both doctors/experts agree (even though they both only give it a 1% chance of being true)."

Does anyone recall where that example comes from? I wanted to cite it the other day.


Don't you need some prior to conclude that? Or is this like a frequentist thing?


Assume both doctors are rational and make optimal predictions given the information available to them. Let X represent the information that the first doctor, and Y represent the information that doctor second knows.

We know that there are only P(C | X) = 0, meaning that you cannot have disease C because the first doctor is positive (and therefore has incontrovertible evidence) that it is not C. Similarly, P(A | Y) = 0, meaning that you cannot have disease A. As a result, the only possibility with a non-zero probability is that you have disease B.


Ah, yes. It's the Dempster-Shafer theory example in the case of high conflict.

The complete/original example goes as follows:

"Suppose that one has two equi-reliable doctors and one doctor believes a patient has either a brain tumor, with a probability (i.e. a basic belief assignment—bba's, or mass of belief) of 0.99; or meningitis, with a probability of only 0.01. A second doctor believes the patient has a concussion, with a probability of 0.99, and believes the patient suffers from meningitis, with a probability of only 0.01. Applying Dempster’s rule to combine these two sets of masses of belief, one gets finally m(meningitis)=1 (the meningitis is diagnosed with 100 percent of confidence)."

https://en.wikipedia.org/wiki/Dempster–Shafer_theory#Example...


I understand the math that is going on there, but I think in the real world I would question the reliability of both of the doctors and begin to wonder if I didn't actually have Lupus. In other words, what mechanism is there for questioning the underlying sample space?


That is certainly a possibility. But the situation is much more reasonable if you imagine that the doctors ran different tests.

For example, suppose we have a prior probability of: Tumor - .49, Concussion - .49, meningitis - .02.

The first doctor performs an MRI that conclusively proves that there is no Tumor. He now conludes that there is a 96% chance of concussion, and 4% chance of meningitis.

The second doctor performs a cognitive test that conclusively proves there is no concussion, but a 96% chance of tumor, and 4% chance of menigitis.

If we combine these two tests, we have disproven the two post likely causes, so the less likely cause becomes reasonable.

This doesn't work out quite so nicely in reality because of false negatives and (as you point out) the non 0% chance of an unspecified disease. Also, ideally you would tell the second doctor about the first test.


Well sure if you add information not in the problem (P(C|X)=0) you can get the answer you want.


It is given that P(A | X) = .99 and P(B | X) = .01, because (by assumption) the first doctor gives you perfect predictions given the information X. Clearly P(A or B | X) = 1, so P(C | X) = 0 for any C not in A or B.


The book How Not to Be Wrong: The Power of Mathematical Thinking[1] by Jordan Ellenberg has a segment on this with similar examples (minus the programming bits), tying it in to human psychology and, with surprising insight, the behavior of slime molds. Would definitely recommend reading if you find these kinds of topics interesting.

[1]: http://amzn.to/2kHiROT


An election is easy to rig if the roll relies on two databases for confirmation. I believe, at least in Contra Costa County, that someone tampered with one of the roll DBs, which then caused a large number of people to be given provisional ballots (deduced from noting a high number of names were highlighted in the main roll I signed during voting). If you got a provisional ballot in Contra Costa County during the election, holler at me!


I came up with this one all by myself (which is probably known by some elegant name and has some sophisticated documentation that I'm not aware of) I think it shows representation cant actually work because you cant have boolean logic if multiple "yes" each have to compete with a single "no". Ill keep it simple but the effect gets more dramatical if there are more candidates.

Say, there are 3 candidates and only 1 agenda point: 1 supports the idea and 2 are against it. The later 2 get 33% of the votes each and the first gets 34%. The unpopular idea wins while 66% was against it.

It sure seems like one can get a high degree of control over the results by simply adding candidates until the unpopular idea is sufficiently under represented.

It's like, if you have 100 Bernie Sanders sharing the votes you may never get socialism.


btw, what integer programming solvers are you folks using? A while back I needed integer programming solver in python and options were mostly interfaces to other libraries...

Anything good and free? I understand that commercial solvers are much better, but the price is too high for me.


CBC works reasonably well...and by reasonably I mean within an order of magnitude of (Xpress, Gurobi, Cplex) solve time most of the time.


FYI, some of the < and > symbols in the code are showing up as &lt; and &gt;


I can't believe you're not using Scala there.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: