B at bottom

Computational Democracy:
Algorithms, Game Theory, and Elections
Steven Wolfman
2011/10/27
A voting system is software.
2001 BC
General Election
Liberal
NDP
Green
Seats
77
2
0
Popular
Vote
57.62%
21.56%
12.39%
Some other oddities:
- 1926 MB Federal
- 1992 and 2000 US Presidential
- 2008 Vancouver Municipal
Liberal
NDP
Green
Seats
77
2
0
Popular
Vote
57.62%
21.56%
12.39%
MANY Other Algorithms
Approval (hand-raising in class, often),
Range (IMDB), Party List Proportional
(Germany), Cumulative (??), Block
(Vancouver municipal), Condorcet (UBC
AMS, “ranked pairs” flavour), ...
But.. what do we really want out of a voting
system?
“Independence of Irrelevant Alternatives”
(Intuition. Thanks to Sidney Morgenbesser.)
We have apple and blueberry.
I’ll take the apple.
Oh, wait! We have cherry, too!
In that case, I’ll take the blueberry
Formally:
Independence of Irrelevant Alternatives
If under one set of votes, A beats B, then...
A still beats B under another set of votes
with the same relative rankings of A and B.
1
C
A
D
E
B
2
B
A
D
C
E
3
A
C
D
E
B
4
A
E
B
C
D
5
D
E
C
B
A
S
A
.
.
.
B
1
E
A
C
B
D
2
C
E
B
A
D
3
A
B
C
D
E
4
C
A
E
B
D
5
D
B
E
C
A
S
.
A
.
.
B
General Definition:
“Pareto (In)Efficient”
If a change in the solution can make
everyone better off, then the solution is
“Pareto inefficient”.
Question: Which of these is Pareto Inefficient?
Candidate (“option”)
Key:
A
B
C
D
Voter
E
F
G
Formal: Pareto Efficient
For any two candidates A and B, if all voters
prefer A to B, A must beat B.
Key:
Candidate (“option”)
Voter
A
B
Formal: Dictator
d is a dictator iff for any set of votes, the
outcome precisely matches d’s vote.
1
C
A
D
E
B
2
B
A
D
C
E
3
A
C
D
E
B
4
A
E
B
C
D
5
D
E
C
B
A
S
A
E
B
C
D
1
E
A
C
B
D
2
C
E
B
A
D
3
A
B
C
D
E
4
C
A
E
B
D
5
D
B
E
C
A
S
C
A
E
B
D
All hail 4!
Arrow’s Impossibility Theorem
(Kenneth Arrow, 1951  Nobel Prize)
IIA
+
Dictatorship
PE
Let’s prove it.
We assume: no ties in votes or outcome.
This assumption is unnecessary.
We assume: finite #voters, at least three candidates, election is a function.
All three are necessary.
Let’s play with votes.
1. Run the election.
2. Go back in time and change the votes.
3. Rerun the election.
(AKA: explore the result of the election function on various inputs.)
Scenario: move all B votes to the top
1 2 3 4 5
S
1 2 3 4 5
S
A
C
D
E
B
A
C
D
B
E
B
C
A
D
E
B
A
C
D
E
C
A
D
E
B
B
A
D
C
E
A
E
B
C
D
D
E
C
B
A
B
A
D
C
E
B
A
C
D
E
B
A
E
C
D
B
D
E
C
A
PE and all B at top  B wins top
Scenario: all B at bottom
1. Run election
2. Change votes
3. Rerun election
1 2 3 4 5
S
1 2 3 4 5
A
C
D
E
B
A
C
D
B
E
C
A
D
E
B
C
A
D
E
B
B
A
D
C
E
A
E
B
C
D
D
E
C
B
A
A
D
C
E
B
A
C
D
E
B
A
E
C
D
B
D
E
C
A
B
S
A
C
D
E
B
PE and all B at bottom  B “wins” bottom
Scenario: B at top or bottom
Here, A > B and B > C.
Generally, if B is in the middle, something beats B and
some-thing loses to B. (Key results will always apply to the
general case.)
1 2 3 4 5
S
1 2 3 4 5
S
A
C
D
E
B
A
C
D
B
E
C
A
D
E
B
A
C
D
E
B
A
B
C
D
E
C
A
D
E
B
B
A
D
C
E
A
E
B
C
D
D
E
C
B
A
B
A
D
C
E
A
E
C
D
B
B
D
E
C
A
Can B end up in the middle like this? Let’s play!
Scenario: C just above A
PE  C beats A
IIA  A (still) beats B
IIA  B (still) beats C
CONTRADICTION
Remember:
A beats B
B beats C
1 2 3 4 5
S
1 2 3 4 5
S
C
A
D
E
B
A
B
C
D
E
C
A
D
E
B
A
B
C
D
E
B
A
D
C
E
A
C
D
E
B
A
E
C
D
B
B
D
E
C
A
B
C
A
D
E
C
A
D
E
B
C
A
E
D
B
B
D
E
C
A
B at top or bottom in all votes  B wins top or bottom
Scenario: find who moves B up
Reminder: if every voter puts B at top or bottom,
B wins top or bottom.
1 2 3 4 5
C
A
D
E
B
A
D
C
E
B
A
C
D
E
B
A
E
C
D
B
D
E
C
A
B
S
1 2 3 4 5
S
A
C
D
E
B
B
C
A
D
E
B
A
C
D
E
B
A
D
C
E
B
A
C
D
E
B
A
E
C
D
B
D
E
C
A
PE  left side has B at bottom, right side has B at top
Scenario: find who moves B up
Reminder: if every voter puts B at top or bottom,
B wins top or bottom.
1 2 3 4 5
C
A
D
E
B
A
D
C
E
B
A
C
D
E
B
A
E
C
D
B
D
E
C
A
B
S
1 2 3 4 5
A
C
D
E
B
B
C
A
D
E
A
D
C
E
B
A
C
D
E
B
A
E
C
D
B
D
E
C
A
B
S
A
C
D
E
B
At some point as we flip B up, it will move to the top.
Scenario: find who moves B up
Reminder: if every voter puts B at top or bottom,
B wins top or bottom.
1 2 3 4 5
B
C
A
D
E
A
D
C
E
B
A
C
D
E
B
A
E
C
D
B
D
E
C
A
B
S
1 2 3 4 5
S
A
C
D
E
B
B
C
A
D
E
A
C
D
E
B
A
C
D
E
B
B
A
D
C
E
A
E
C
D
B
D
E
C
A
B
At some point as we flip B up, it will move to the top.
Scenario: find who moves B up
Reminder: if every voter puts B at top or bottom,
B wins top or bottom.
1 2 3 4 5
S
1 2 3 4 5
A
C
D
E
B
A
C
D
E
B
B
C
A
D
E
B
C
A
D
E
B
A
D
C
E
A
E
C
D
B
D
E
C
A
B
B
A
D
C
E
B
A
C
D
E
A
E
C
D
B
D
E
C
A
B
S
B
A
C
D
E
At some point as we flip B up, it will move to the top.
Scenario: find who moves B up
Reminder: if every voter puts B at top or bottom,
B wins top or bottom.
Let’s focus on the voter who “controls” B.
(3 in this case, but someone in general.)
Starting with the right side.
1 2 3 4 5
S
1 2 3 4 5
A
C
D
E
B
A
C
D
E
B
B
C
A
D
E
B
C
A
D
E
B
A
D
C
E
A
E
C
D
B
D
E
C
A
B
B
A
D
C
E
B
A
C
D
E
A
E
C
D
B
D
E
C
A
B
S
B
A
C
D
E
At some point as we flip B up, it will move to the top.
Scenario: 3 moves A above B
1 2 3 4 5
B
C
A
D
E
B
A
D
C
E
A
B
C
D
E
A
E
C
D
B
D
E
C
A
B
S
1 2 3 4 5
A
B
C
D
E
B
C
A
D
E
B
A
D
C
E
B
A
C
D
E
A
E
C
D
B
D
E
C
A
B
S
B
A
C
D
E
Why is A at the top? Compare to when we discovered 3...
Scenario: find who moves B up
Reminder: if every voter puts B at top or bottom,
B wins top or bottom.
Let’s focus on the voter who “controls” B.
(3 in this case, but someone in general.)
This time we want the left side.
1 2 3 4 5
S
1 2 3 4 5
A
C
D
E
B
A
C
D
E
B
B
C
A
D
E
B
C
A
D
E
B
A
D
C
E
A
E
C
D
B
D
E
C
A
B
B
A
D
C
E
B
A
C
D
E
A
E
C
D
B
D
E
C
A
B
S
B
A
C
D
E
At some point as we flip B up, it will move to the top.
Look at the A/B rankings here versus...
our “3 puts A above B” scenario.
IIA, left says A > B  A > B
1 2 3 4 5
S
1 2 3 4 5
A
C
D
E
B
A
C
D
E
B
B
C
A
D
E
B
C
A
D
E
B
A
D
C
E
A
E
C
D
B
D
E
C
A
B
B
A
D
C
E
A
B
C
D
E
A
E
C
D
B
D
E
C
A
B
S
A
B
C
D
E
In fact, all but 3 can rearrange their votes, if they don’t move B...
Scenario: free up all but B and 3’s A
As long as we keep voters’ A/B ordering the same,
A > B, by IIA.
1 2 3 4 5
S
1 2 3 4 5
S
B
D
E
A
C
A
B
D
E
C
B
C
A
D
E
A
B
C
D
E
B
C
D
E
A
A
B
E
D
C
A
C
E
D
B
D
A
C
E
B
B
A
D
C
E
A
B
C
D
E
A
E
C
D
B
D
E
C
A
B
B beats C. Must it? Compare to when we discovered 3...
Scenario: find who moves B up
Reminder: if every voter puts B at top or bottom,
B wins top or bottom.
Let’s focus on the voter who “controls” B.
(3 in this case, but someone in general.)
Back to the right side.
1 2 3 4 5
S
1 2 3 4 5
A
C
D
E
B
A
C
D
E
B
B
C
A
D
E
B
C
A
D
E
B
A
D
C
E
A
E
C
D
B
D
E
C
A
B
B
A
D
C
E
B
A
C
D
E
A
E
C
D
B
D
E
C
A
B
S
B
A
C
D
E
At some point as we flip B up, it will move to the top.
Scenario: free up all but B and 3’s A
1 2 3 4 5
S
1 2 3 4 5
A
B
E
D
C
A
B
D
E
C
B
C
A
D
E
B
D
E
A
C
B
C
D
E
A
A
C
E
D
B
D
A
C
E
B
But, must B > C?
B
A
D
C
E
B
A
C
D
E
A
E
C
D
B
D
E
C
A
B
S
B
A
C
D
E
Yes, by IIA, since B/C rankings match.
Scenario: free up the B’s
Reminder: As long as we keep voters’ A/B ordering
the same, A > B and B > C by IIA.
Now, everyone moves their Bs around, and
3 moves its A around but keeps it above C.
1 2 3 4 5
S
1 2 3 4 5
S
B
D
E
A
C
A
B
D
E
C
D
E
B
A
C
B
D
A
C
E
B
C
D
E
A
A
B
E
D
C
A
C
E
D
B
D
A
C
E
B
C
D
E
A
B
B
A
E
D
C
A
C
E
D
B
B
D
A
C
E
IIA  A > C, but the only fixed ranking is 3’s A > C!
Brief pause for formality:
In general, A and C are arbitrary options other than B.
So, 3 is a dictator with respect to all relative orderings
except those involving B.
All (but B) hail 3!
1 2 3 4 5
S
1 2 3 4 5
S
B
D
E
A
C
A
B
D
E
C
D
E
B
A
C
B
D
A
C
E
B
C
D
E
A
A
B
E
D
C
A
C
E
D
B
D
A
C
E
B
C
D
E
A
B
B
A
E
D
C
A
C
E
D
B
B
D
A
C
E
Rest of proof is a repeat with different candidate for B; skipping...
Arrow’s Impossibility Theorem
(Kenneth Arrow, 1951  Nobel Prize)
IIA
+
PE
Dictatorship
More algorithms/game theory
rangevoting.org
Ka-Ping Yee
zesty.ca
Some Other Contexts of Use
• Usability and interface design
• Security and voter verifiability
• District creation and member allocation
(and gerrymandering)
• Design specifications and standards
• Election auditing and fraud detection
• Voter files/databases
• Voter registration systems
Extra Slides
(just in case)
Scenario: what about B
Repeat proof, except with C at top/bottom rather than B.
We find a dictator over B vs A (and B vs all but C), but
remember...
1 2 3 4 5
B
A
D
E
C
A
D
B
E
C
A
B
D
E
C
A
E
B
D
C
D
E
B
A
C
S
1 2 3 4 5
S
A
B
D
E
C
C
B
A
D
E
C
A
B
D
E
C
A
D
B
E
C
A
B
D
E
C
A
E
B
D
C
D
E
B
A
Scenario: 3 moves A above B
Because 3 moves A to the top, A > B.
So, 3 is that dictator as well.
And any candidate but B can “play” A.
So, 3 is the dictator. All hail 3!
1 2 3 4 5
B
C
A
D
E
B
A
D
C
E
A
B
C
D
E
A
E
C
D
B
D
E
C
A
B
S
1 2 3 4 5
A
B
C
D
E
B
C
A
D
E
B
A
D
C
E
B
A
C
D
E
A
E
C
D
B
D
E
C
A
B
S
B
A
C
D
E
Canada’s Algorithm, Roughly
1. Start counts for each candidate and for
“rejected” at 0.
2. For each ballot:
a) If the ballot does not show a single candidate
choice or has stray marks that might identify the
voter, add one to the “rejected” total.
b) Else, add one to the marked candidate’s total.
3. Report the results of all counts.
After recounts, ties are do-overs: “deemed by-election” for
the “deemed vacant” seat.
Based on the Canada Elections Act.
(Ties specified in the Parliament of Canada Act.)
A Harder Case: STV
In Single-Transferable Voting, voters rank
the candidates, a single election results in
multiple candidates elected, and votes are
transferred among candidates during the
count based on preference order...