SlideShare a Scribd company logo
1 of 49
Download to read offline
Practical and Worst-Case Efficient Apportionment
Raphael Reitzig @ Theorietage 2015
worked with Sebastian Wild
FACHBEREICH
INFORMATIK
FACHBEREICH
INFORMATIK
&Algorithmen
Komplexität
Apportionment
Votes
19777721
12843458
3585178
3180299 →
?
311
193
63
64
Seats
Apportionment
Wishes:
Pairwise Vote
Monotonicity
House
Monotonicity
Quota
Rule
Apportionment
Wishful thinking:
Pairwise Vote
Monotonicity
House
Monotonicity
Quota
Rule
Apportionment
Wishful thinking:
Pairwise Vote
Monotonicity
House
Monotonicity
Quota
Rule
⇐=
Apportionment
Wishful thinking:
Pairwise Vote
Monotonicity
House
Monotonicity
Quota
Rule
⇐=
Divisor Methods
⇐⇒
Divisor Methods
Input
Votes v of n parties for k seats, k n.
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.
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.
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
Divisor Methods
dj = j + 1, k = 7
j A B C D
0 58 132 40 72
Divisor Methods
dj = j + 1, k = 7
j A B C D
0 58 132 40 72
1 66
Divisor Methods
dj = j + 1, k = 7
j A B C D
0 58 132 40 72
1 66 36
Divisor Methods
dj = j + 1, k = 7
j A B C D
0 58 132 40 72
1 66 36
2 44
Divisor Methods
dj = j + 1, k = 7
j A B C D
0 58 132 40 72
1 66 36
2 44
29
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
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
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
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
Reduction to Rank Selection
Observations
Knowing the value a selected last is sufficient.
We select the kth largest value last.
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”.
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”.
Finding Good Cutoffs
i
j
1 2 3 4 5 6 7 8
0
1
2
3
4
5
...
...
...
...
...
...
...
...
...
A :
Finding Good Cutoffs
i
j
1 2 3 4 5 6 7 8
0
1
2
3
4
5
...
...
...
...
...
...
...
...
...
A :
Finding Good Cutoffs
i
j
1 2 3 4 5 6 7 8
0
1
2
3
4
5
...
...
...
...
...
...
...
...
...
k
A :
Finding Good Cutoffs
i
j
1 2 3 4 5 6 7 8
0
1
2
3
4
5
...
...
...
...
...
...
...
...
...
k
A :
Θ(kn) algorithm.
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.
Finding Good Cutoffs
i
j
1 2 3 4 5 6 7 8
0
1
2
3
4
5
...
...
...
...
...
...
...
...
...
A :
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
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
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
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
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
.
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
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!
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!
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.
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) .
An Aside: Applicability
Does anybody use d with suitable δ?
An Aside: Applicability
Does anybody use d with suitable δ?
Method Divisor Sequence δ(x) Sandwich
Smallest divisors 0, 1, 2, 3, . . . x —
Greatest divisors 1, 2, 3, 4, . . . x + 1 —
Sainte-Lagu¨e 1, 3, 5, 7, . . . 2x + 1 —
Modified S-L 1.4, 3, 5, 7, . . . 2x+1
1.6x+1.4
x≥1
x<1 2x + 6
5 ± 1
5
Equal Proportions 0,
√
2,
√
6,
√
12, . . . x(x + 1) x + 1
4 ± 1
4
Harmonic Mean 0, 4
3, 12
5 , 24
7 , . . . 2x(x+1)
2x+1 x + 1
4 ± 1
4
Imperiali 2, 3, 4, 5, . . . x + 2 —
Danish 1, 4, 7, 10, . . . 3x + 1 —
Yes, they all do.
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).
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!
In Context
Puk CE14 RW15
WC O(n)
In Context
Puk CE14 RW15
WC O(n)   
Implementable
Advantage: Code Complexity
CE14: ≈ 250 loc PukPQ: ≈ 80 loc RW15: ≈ 50 loc DMPQ: ≈ 25 loc
plus library and shared code
In Context
Puk CE14 RW15
WC O(n)   
Implementable   
Simple
Advantage: Runtime Cost
2 4 6 8 10
0
1
2
3
4
n
Averagerunningtimeinµs/n
(α, β) = (2, 1) and k = 100n
0 50 100 150 200
0
0.2
0.4
0.6
n
(α, β) = (1, 3/4) and k = 10n
PukPQ CE14 RW15 DMPQ
In Context
Puk CE14 RW15
WC O(n)   
Implementable   
Simple   
Fast
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

More Related Content

What's hot

Chapter 18 solutions_to_exercises(engineering circuit analysis 7th)
Chapter 18 solutions_to_exercises(engineering circuit analysis 7th)Chapter 18 solutions_to_exercises(engineering circuit analysis 7th)
Chapter 18 solutions_to_exercises(engineering circuit analysis 7th)
Maamoun Hennache
 
Factorise quadratic equations 2
Factorise quadratic equations 2Factorise quadratic equations 2
Factorise quadratic equations 2
Angela Phillips
 
Engineering circuit-analysis-solutions-7ed-hayt [upload by r1-lher
Engineering circuit-analysis-solutions-7ed-hayt [upload by r1-lherEngineering circuit-analysis-solutions-7ed-hayt [upload by r1-lher
Engineering circuit-analysis-solutions-7ed-hayt [upload by r1-lher
cristhian cabrera
 
Dynamic1
Dynamic1Dynamic1
Dynamic1
MyAlome
 

What's hot (17)

Πρόσθεση και Αφαίρεση κλασμάτων
Πρόσθεση και Αφαίρεση κλασμάτωνΠρόσθεση και Αφαίρεση κλασμάτων
Πρόσθεση και Αφαίρεση κλασμάτων
 
PAC-Bayesian Bound for Deep Learning
PAC-Bayesian Bound for Deep LearningPAC-Bayesian Bound for Deep Learning
PAC-Bayesian Bound for Deep Learning
 
Animashree Anandkumar, Electrical Engineering and CS Dept, UC Irvine at MLcon...
Animashree Anandkumar, Electrical Engineering and CS Dept, UC Irvine at MLcon...Animashree Anandkumar, Electrical Engineering and CS Dept, UC Irvine at MLcon...
Animashree Anandkumar, Electrical Engineering and CS Dept, UC Irvine at MLcon...
 
Big data matrix factorizations and Overlapping community detection in graphs
Big data matrix factorizations and Overlapping community detection in graphsBig data matrix factorizations and Overlapping community detection in graphs
Big data matrix factorizations and Overlapping community detection in graphs
 
Anti-differentiating approximation algorithms: A case study with min-cuts, sp...
Anti-differentiating approximation algorithms: A case study with min-cuts, sp...Anti-differentiating approximation algorithms: A case study with min-cuts, sp...
Anti-differentiating approximation algorithms: A case study with min-cuts, sp...
 
Chapter 18 solutions_to_exercises(engineering circuit analysis 7th)
Chapter 18 solutions_to_exercises(engineering circuit analysis 7th)Chapter 18 solutions_to_exercises(engineering circuit analysis 7th)
Chapter 18 solutions_to_exercises(engineering circuit analysis 7th)
 
DISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEMDISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEM
 
Factorise quadratic equations 2
Factorise quadratic equations 2Factorise quadratic equations 2
Factorise quadratic equations 2
 
Introduction about Geometric Algebra
Introduction about Geometric AlgebraIntroduction about Geometric Algebra
Introduction about Geometric Algebra
 
Solucionario teoria-electromagnetica-hayt-2001
Solucionario teoria-electromagnetica-hayt-2001Solucionario teoria-electromagnetica-hayt-2001
Solucionario teoria-electromagnetica-hayt-2001
 
Non-exhaustive, Overlapping K-means
Non-exhaustive, Overlapping K-meansNon-exhaustive, Overlapping K-means
Non-exhaustive, Overlapping K-means
 
Engineering circuit-analysis-solutions-7ed-hayt [upload by r1-lher
Engineering circuit-analysis-solutions-7ed-hayt [upload by r1-lherEngineering circuit-analysis-solutions-7ed-hayt [upload by r1-lher
Engineering circuit-analysis-solutions-7ed-hayt [upload by r1-lher
 
Chapter0 reviewofalgebra-151003150137-lva1-app6891
Chapter0 reviewofalgebra-151003150137-lva1-app6891Chapter0 reviewofalgebra-151003150137-lva1-app6891
Chapter0 reviewofalgebra-151003150137-lva1-app6891
 
Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...
Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...
Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...
 
Talk iccf 19_ben_hammouda
Talk iccf 19_ben_hammoudaTalk iccf 19_ben_hammouda
Talk iccf 19_ben_hammouda
 
Dynamic1
Dynamic1Dynamic1
Dynamic1
 
math m1
math m1math m1
math m1
 

Viewers also liked (15)

Pulmad: Great Gatsby
Pulmad: Great GatsbyPulmad: Great Gatsby
Pulmad: Great Gatsby
 
mejoras
mejorasmejoras
mejoras
 
Coffee.etc Presentation
Coffee.etc PresentationCoffee.etc Presentation
Coffee.etc Presentation
 
Aporte consolidacion
Aporte consolidacionAporte consolidacion
Aporte consolidacion
 
Teoria general de la prueba judicial tomo i hernando devis echandia
Teoria general de la prueba judicial tomo i   hernando devis echandiaTeoria general de la prueba judicial tomo i   hernando devis echandia
Teoria general de la prueba judicial tomo i hernando devis echandia
 
Informática
Informática Informática
Informática
 
Arthur Vinnitsky Poster 4 [Autosaved]
Arthur Vinnitsky Poster 4 [Autosaved]Arthur Vinnitsky Poster 4 [Autosaved]
Arthur Vinnitsky Poster 4 [Autosaved]
 
Ph
Ph Ph
Ph
 
Declaración Juramentada
Declaración JuramentadaDeclaración Juramentada
Declaración Juramentada
 
Riello ups-powerbox-containerised-ups
Riello ups-powerbox-containerised-upsRiello ups-powerbox-containerised-ups
Riello ups-powerbox-containerised-ups
 
EL medio Ambiente :D
EL medio Ambiente :D EL medio Ambiente :D
EL medio Ambiente :D
 
Actividad tutoria
Actividad tutoriaActividad tutoria
Actividad tutoria
 
презентація великоозерянської зош і ііі ступенів
презентація великоозерянської зош і ііі ступенівпрезентація великоозерянської зош і ііі ступенів
презентація великоозерянської зош і ііі ступенів
 
Sparta pps
Sparta ppsSparta pps
Sparta pps
 
Disain instruksional
Disain instruksionalDisain instruksional
Disain instruksional
 

Similar to Practical and Worst-Case Efficient Apportionment

Integral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewerIntegral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewer
JoshuaAgcopra
 
Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...
Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...
Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...
DenmarkSantos3
 
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docxDivide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
jacksnathalie
 
Skiena algorithm 2007 lecture15 backtracing
Skiena algorithm 2007 lecture15 backtracingSkiena algorithm 2007 lecture15 backtracing
Skiena algorithm 2007 lecture15 backtracing
zukun
 

Similar to Practical and Worst-Case Efficient Apportionment (20)

Integral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewerIntegral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewer
 
Dynamic Programming Matrix Chain Multiplication
Dynamic Programming Matrix Chain MultiplicationDynamic Programming Matrix Chain Multiplication
Dynamic Programming Matrix Chain Multiplication
 
Bayesian inference on mixtures
Bayesian inference on mixturesBayesian inference on mixtures
Bayesian inference on mixtures
 
QMC: Operator Splitting Workshop, Projective Splitting with Forward Steps and...
QMC: Operator Splitting Workshop, Projective Splitting with Forward Steps and...QMC: Operator Splitting Workshop, Projective Splitting with Forward Steps and...
QMC: Operator Splitting Workshop, Projective Splitting with Forward Steps and...
 
Lecture6 svdd
Lecture6 svddLecture6 svdd
Lecture6 svdd
 
02 basics i-handout
02 basics i-handout02 basics i-handout
02 basics i-handout
 
Low Complexity Regularization of Inverse Problems - Course #2 Recovery Guaran...
Low Complexity Regularization of Inverse Problems - Course #2 Recovery Guaran...Low Complexity Regularization of Inverse Problems - Course #2 Recovery Guaran...
Low Complexity Regularization of Inverse Problems - Course #2 Recovery Guaran...
 
Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...
Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...
Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...
 
Antidifferentiation.ppt
Antidifferentiation.pptAntidifferentiation.ppt
Antidifferentiation.ppt
 
module4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdfmodule4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdf
 
Design and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesDesign and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture Notes
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docxDivide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
 
Definite Integrals 8/ Integration by Parts
Definite Integrals 8/ Integration by PartsDefinite Integrals 8/ Integration by Parts
Definite Integrals 8/ Integration by Parts
 
Design and Implementation of Parallel and Randomized Approximation Algorithms
Design and Implementation of Parallel and Randomized Approximation AlgorithmsDesign and Implementation of Parallel and Randomized Approximation Algorithms
Design and Implementation of Parallel and Randomized Approximation Algorithms
 
Type and proof structures for concurrency
Type and proof structures for concurrencyType and proof structures for concurrency
Type and proof structures for concurrency
 
Low Complexity Regularization of Inverse Problems
Low Complexity Regularization of Inverse ProblemsLow Complexity Regularization of Inverse Problems
Low Complexity Regularization of Inverse Problems
 
Slides: Jeffreys centroids for a set of weighted histograms
Slides: Jeffreys centroids for a set of weighted histogramsSlides: Jeffreys centroids for a set of weighted histograms
Slides: Jeffreys centroids for a set of weighted histograms
 
CLIM Fall 2017 Course: Statistics for Climate Research, Spatial Data: Models ...
CLIM Fall 2017 Course: Statistics for Climate Research, Spatial Data: Models ...CLIM Fall 2017 Course: Statistics for Climate Research, Spatial Data: Models ...
CLIM Fall 2017 Course: Statistics for Climate Research, Spatial Data: Models ...
 
Skiena algorithm 2007 lecture15 backtracing
Skiena algorithm 2007 lecture15 backtracingSkiena algorithm 2007 lecture15 backtracing
Skiena algorithm 2007 lecture15 backtracing
 

Recently uploaded

Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
MohamedFarag457087
 
CYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptxCYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptx
Cherry
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
NazaninKarimi6
 
LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.
Cherry
 
COMPOSTING : types of compost, merits and demerits
COMPOSTING : types of compost, merits and demeritsCOMPOSTING : types of compost, merits and demerits
COMPOSTING : types of compost, merits and demerits
Cherry
 
The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptx
seri bangash
 
Lipids: types, structure and important functions.
Lipids: types, structure and important functions.Lipids: types, structure and important functions.
Lipids: types, structure and important functions.
Cherry
 
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
Scintica Instrumentation
 

Recently uploaded (20)

Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
 
CYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptxCYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptx
 
GBSN - Microbiology (Unit 3)Defense Mechanism of the body
GBSN - Microbiology (Unit 3)Defense Mechanism of the body GBSN - Microbiology (Unit 3)Defense Mechanism of the body
GBSN - Microbiology (Unit 3)Defense Mechanism of the body
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
 
LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.
 
COMPOSTING : types of compost, merits and demerits
COMPOSTING : types of compost, merits and demeritsCOMPOSTING : types of compost, merits and demerits
COMPOSTING : types of compost, merits and demerits
 
Use of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptxUse of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptx
 
Genome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptxGenome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptx
 
Taphonomy and Quality of the Fossil Record
Taphonomy and Quality of the  Fossil RecordTaphonomy and Quality of the  Fossil Record
Taphonomy and Quality of the Fossil Record
 
Understanding Partial Differential Equations: Types and Solution Methods
Understanding Partial Differential Equations: Types and Solution MethodsUnderstanding Partial Differential Equations: Types and Solution Methods
Understanding Partial Differential Equations: Types and Solution Methods
 
The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptx
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
 
Lipids: types, structure and important functions.
Lipids: types, structure and important functions.Lipids: types, structure and important functions.
Lipids: types, structure and important functions.
 
Dr. E. Muralinath_ Blood indices_clinical aspects
Dr. E. Muralinath_ Blood indices_clinical  aspectsDr. E. Muralinath_ Blood indices_clinical  aspects
Dr. E. Muralinath_ Blood indices_clinical aspects
 
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
 
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
 
ABHISHEK ANTIBIOTICS PPT MICROBIOLOGY // USES OF ANTIOBIOTICS TYPES OF ANTIB...
ABHISHEK ANTIBIOTICS PPT MICROBIOLOGY  // USES OF ANTIOBIOTICS TYPES OF ANTIB...ABHISHEK ANTIBIOTICS PPT MICROBIOLOGY  // USES OF ANTIOBIOTICS TYPES OF ANTIB...
ABHISHEK ANTIBIOTICS PPT MICROBIOLOGY // USES OF ANTIOBIOTICS TYPES OF ANTIB...
 
Cyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxCyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptx
 
Terpineol and it's characterization pptx
Terpineol and it's characterization pptxTerpineol and it's characterization pptx
Terpineol and it's characterization pptx
 
Energy is the beat of life irrespective of the domains. ATP- the energy curre...
Energy is the beat of life irrespective of the domains. ATP- the energy curre...Energy is the beat of life irrespective of the domains. ATP- the energy curre...
Energy is the beat of life irrespective of the domains. ATP- the energy curre...
 

Practical and Worst-Case Efficient Apportionment

  • 1. Practical and Worst-Case Efficient Apportionment Raphael Reitzig @ Theorietage 2015 worked with Sebastian Wild FACHBEREICH INFORMATIK FACHBEREICH INFORMATIK &Algorithmen Komplexität
  • 7. Divisor Methods Input Votes v of n parties for k seats, k n.
  • 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
  • 11. Divisor Methods dj = j + 1, k = 7 j A B C D 0 58 132 40 72
  • 12. Divisor Methods dj = j + 1, k = 7 j A B C D 0 58 132 40 72 1 66
  • 13. Divisor Methods dj = j + 1, k = 7 j A B C D 0 58 132 40 72 1 66 36
  • 14. Divisor Methods dj = j + 1, k = 7 j A B C D 0 58 132 40 72 1 66 36 2 44
  • 15. Divisor Methods dj = j + 1, k = 7 j A B C D 0 58 132 40 72 1 66 36 2 44 29
  • 16. 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
  • 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”.
  • 23. Finding Good Cutoffs i j 1 2 3 4 5 6 7 8 0 1 2 3 4 5 ... ... ... ... ... ... ... ... ... A :
  • 24. Finding Good Cutoffs i j 1 2 3 4 5 6 7 8 0 1 2 3 4 5 ... ... ... ... ... ... ... ... ... A :
  • 25. Finding Good Cutoffs i j 1 2 3 4 5 6 7 8 0 1 2 3 4 5 ... ... ... ... ... ... ... ... ... k A :
  • 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.
  • 28. Finding Good Cutoffs i j 1 2 3 4 5 6 7 8 0 1 2 3 4 5 ... ... ... ... ... ... ... ... ... A :
  • 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) .
  • 39. An Aside: Applicability Does anybody use d with suitable δ?
  • 40. An Aside: Applicability Does anybody use d with suitable δ? Method Divisor Sequence δ(x) Sandwich Smallest divisors 0, 1, 2, 3, . . . x — Greatest divisors 1, 2, 3, 4, . . . x + 1 — Sainte-Lagu¨e 1, 3, 5, 7, . . . 2x + 1 — Modified S-L 1.4, 3, 5, 7, . . . 2x+1 1.6x+1.4 x≥1 x<1 2x + 6 5 ± 1 5 Equal Proportions 0, √ 2, √ 6, √ 12, . . . x(x + 1) x + 1 4 ± 1 4 Harmonic Mean 0, 4 3, 12 5 , 24 7 , . . . 2x(x+1) 2x+1 x + 1 4 ± 1 4 Imperiali 2, 3, 4, 5, . . . x + 2 — Danish 1, 4, 7, 10, . . . 3x + 1 — Yes, they all do.
  • 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!
  • 43. In Context Puk CE14 RW15 WC O(n)
  • 44. In Context Puk CE14 RW15 WC O(n) Implementable
  • 45. Advantage: Code Complexity CE14: ≈ 250 loc PukPQ: ≈ 80 loc RW15: ≈ 50 loc DMPQ: ≈ 25 loc plus library and shared code
  • 46. In Context Puk CE14 RW15 WC O(n) Implementable Simple
  • 47. Advantage: Runtime Cost 2 4 6 8 10 0 1 2 3 4 n Averagerunningtimeinµs/n (α, β) = (2, 1) and k = 100n 0 50 100 150 200 0 0.2 0.4 0.6 n (α, β) = (1, 3/4) and k = 10n PukPQ CE14 RW15 DMPQ
  • 48. In Context Puk CE14 RW15 WC O(n) Implementable Simple Fast
  • 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