Proportional apportionment is the problem of assigning seats to parties according to their relative share of votes. Divisor methods are the de-facto standard solution, used in many countries.
In recent literature, there are two algorithms that implement divisor methods: one by Cheng and Eppstein (ISAAC, 2014) has worst-case optimal running time but is complex, while the other (Pukelsheim, 2014) is relatively simple and fast in practice but does not offer worst-case guarantees.
This talk presents the ideas behind a novel algorithm that avoids the shortcomings of both. We investigate the three contenders in order to determine which is most useful in practice.
Read more over here: http://reitzig.github.io/publications/RW2015b
8. Divisor Methods
Input
Votes v of n parties for k seats, k n.
Method
DivisorMethod(v, k) :
1. s ← 0n.
2. For k, . . . , 1:
2.1 I ← arg maxn
i=1 vi /(si + 1).
2.2 sI ← sI + 1.
3. Return s.
9. Divisor Methods
Input
Votes v of n parties for k seats, k n.
Increasing divisor sequence d = (dj )j∈N0 .
Method
DivisorMethodd (v, k) :
1. s ← 0n.
2. For k, . . . , 1:
2.1 I ← arg maxn
i=1 vi /dsi
.
2.2 sI ← sI + 1.
3. Return s.
10. Divisor Methods
Input
Votes v of n parties for k seats, k n.
Increasing divisor sequence d = (dj )j∈N0 .
Method
DivisorMethodd (v, k) :
1. s ← 0n.
2. For k, . . . , 1:
2.1 I ← arg maxn
i=1 vi /dsi
.
2.2 sI ← sI + 1.
3. Return s. Θ
(k
logn)
using
priority
queues
17. Divisor Methods
dj = j + 1, k = 7
j A B C D
0 58 132 40 72
1 66 36
2 44
29
3 33
20
18. Divisor Methods
dj = j + 1, k = 7
j A B C D
0 58 132 40 72
1 66 36
2 44
29
3 33
20
24
=: a
19. Divisor Methods
dj = j + 1, k = 7
j A B C D
0 58 132 40 72
1 66 36
2 44
29
3 33
20
24
=: a
A := {132, 72, 66, 58, 44, 40, 36, 33, . . . }
≤ a > a
20. Reduction to Rank Selection
Observations
Knowing the value a selected last is sufficient.
We select the kth largest value last.
21. Reduction to Rank Selection
Observations
Knowing the value a selected last is sufficient.
We select the kth smallest value last.
Idea
Use a selection algorithm on multiset
A = ai,j =
dj
vi
i ∈ [1..n], j ∈ N0
and obtain a = A(k) “directly”.
22. Reduction to Rank Selection
Observations
Knowing the value a selected last is sufficient.
We select the kth smallest value last.
Idea
Use a selection algorithm on a finite subset of multiset
A = ai,j =
dj
vi
i ∈ [1..n], j ∈ N0
and obtain a = A(k) “directly”.
26. Finding Good Cutoffs
i
j
1 2 3 4 5 6 7 8
0
1
2
3
4
5
...
...
...
...
...
...
...
...
...
k
A :
Θ(kn) algorithm.
27. Finding Good Cutoffs
Given (dj )j≥−1 with [technical details], we assume δ : R≥0 → R≥d0
with [technical details] so that
ai,j =
δ(j)
vi
and
δ−1
(y) = max{j ∈ Z≥−1 | dj ≤ y}
is the (zero-based) rank function of d.
29. Finding Good Cutoffs
i
j
1 2 3 4 5 6 7 8
0
1
2
3
4
5
...
...
...
...
...
...
...
...
...
A :
δ−1(vi a ) = si − 1
30. Finding Good Cutoffs
i
j
1 2 3 4 5 6 7 8
0
1
2
3
4
5
...
...
...
...
...
...
...
...
...
[
[
[
[
[
]
]
]
]
]
]
]
]
A :
δ−1(vi a ) = si − 1
δ−1(vi a)
δ−1(vi a)
a ≤ a ≤ a
31. Finding Good Cutoffs
i
j
1 2 3 4 5 6 7 8
0
1
2
3
4
5
...
...
...
...
...
...
...
...
...
ˆA :
δ−1(vi a ) = si − 1
δ−1(vi a)
δ−1(vi a)
a ≤ a ≤ a
32. Finding Good Cutoffs
i
j
1 2 3 4 5 6 7 8
0
1
2
3
4
5
...
...
...
...
...
...
...
...
...
ˆA :
δ−1(vi a ) = si − 1
δ−1(vi a) =: ji
δ−1(vi a) =: ji
a ≤ a ≤ a
33. Finding Good Cutoffs
i
j
1 2 3 4 5 6 7 8
0
1
2
3
4
5
...
...
...
...
...
...
...
...
...
ˆA :
δ−1(vi a ) = si − 1
δ−1(vi a) =: ji
δ−1(vi a) =: ji
a = A(k) = ˆA(ˆk) with ˆk = k − i ji
.
34. Finding Good Cutoffs
i
j
1 2 3 4 5 6 7 8
0
1
2
3
4
5
...
...
...
...
...
...
...
...
...
ˆA :
δ−1(vi a ) = si − 1
δ−1(vi a) =: ji
δ−1(vi a) =: ji
i ji
< k ≤ i ji
35. Finding Good Cutoffs
i
j
1 2 3 4 5 6 7 8
0
1
2
3
4
5
...
...
...
...
...
...
...
...
...
ˆA :
δ−1(vi a ) = si − 1
δ−1(vi a) =: ji
δ−1(vi a) =: ji
i ji
< k ≤ i ji
Make tight!
36. Finding Good Cutoffs
In the Article
Observation:
k ≤ rank(a , A) ≤ k + n.
Ansatz:
rank(a, A) < k and k + n ≤ rank(a, A).
Express rank in terms of bounds on δ−1.
Make tight!
37. Good Bounds On a
If
αx + β ≤ δ(x) ≤ αx + β
with β ≤ α and [technical details], then
a := max 0,
αk − (α − β) · n)
n
i=1 vi
and
a :=
αk + βn
n
i=1 vi
work.
38. Good Bounds On a
If
αx + β ≤ δ(x) ≤ αx + β
with β ≤ α and [technical details], then
a := max 0,
αk − (α − β) · n)
n
i=1 vi
and
a :=
αk + βn
n
i=1 vi
work.
Furthermore,
| ˆA| ≤ 2(1 + (β − β)/α) · n ∈ Θ(n) .
41. The Algorithm
RW15d (v, k) :
1. Compute a and a.
2. Initialize ˆA := ∅ and ˆk := k.
3. For each i ∈ [1..n] do:
3.1 Compute ji
and ji .
3.2 Add all dj/vi to ˆA for which ji
≤ j ≤ ji .
3.3 Update ˆk ← ˆk − ji
.
4. Select and return ˆA(ˆk).
42. The Algorithm
RW15d (v, k) :
1. Compute a and a.
2. Initialize ˆA := ∅ and ˆk := k.
3. For each i ∈ [1..n] do:
3.1 Compute ji
and ji .
3.2 Add all dj/vi to ˆA for which ji
≤ j ≤ ji .
3.3 Update ˆk ← ˆk − ji
.
4. Select and return ˆA(ˆk).
Θ
(n)
runtim
e!
49. Details
Literature
Michel L. Balinski und H. Peyton Young. Fair Representation. Meeting the
Ideal of One Man, One Vote. 2nd. Brookings Institution Press, 2001. isbn:
978-0-8157-0111-8
Friedrich Pukelsheim. Proportional Representation. Apportionment Methods
and Their Applications. 1. Aufl. Springer, 2014. isbn: 978-3-319-03855-1. doi:
10.1007/978-3-319-03856-8
Zhanpeng Cheng und David Eppstein. “Linear-time Algorithms for Proportional
Apportionment”. In: International Symposium on Algorithms and Computation
(ISAAC) 2014. Springer, 2014. doi: 10.1007/978-3-319-13075-0_46
Raphael Reitzig und Sebastian Wild. A Practical and Worst-Case Efficient
Algorithm for Divisor Methods of Apportionment. 2015. arXiv: 1504.06475
Code
github.com/reitzig/2015 apportionment