
Rigging elections with integer linear programming - DRMacIver
http://www.drmaciver.com/2017/02/rigging-elections-with-integer-linear-programming/
======
joe_the_user
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](https://en.wikipedia.org/wiki/Median_voter_theorem)

~~~
dragonwriter
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.

~~~
wnoise
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.

~~~
dragonwriter
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.

------
espeed
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.

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

~~~
gizmo686
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.

~~~
espeed
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...](https://en.wikipedia.org/wiki/Dempster–Shafer_theory#Example_producing_counter-
intuitive_results_in_case_of_high_conflict)

~~~
defen
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?

~~~
gizmo686
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.

------
Smudge
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](http://amzn.to/2kHiROT)

------
kordless
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!

------
dispo001
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.

------
gtt
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.

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

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

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

