You are on page 1of 33

Some Results for Kemeny Score

Complexity:
NP-complete (even for four votes)
[Bartholdi, Tovey and Tick, SCW 1989], [Dwork, Kumar, Naor, and Sivakumar, WWW 2001]
[Biedl, Brandenburg, and Deng, Discr. Math. 2009]

Robert Bredereck Computational Social Choice


29
Some Results for Kemeny Score
Complexity:
NP-complete (even for four votes)
[Bartholdi, Tovey and Tick, SCW 1989], [Dwork, Kumar, Naor, and Sivakumar, WWW 2001]
[Biedl, Brandenburg, and Deng, Discr. Math. 2009]

Algorithms:
factor 8/5-approximation, randomized: factor 11/7
[van Zuylen and Williamson, WAOA 2007.] [Ailon, Charikar, and Newman, JACM 2008]

polynomial-time approximation scheme (PTAS)


[Kenyon-Mathieu and Schudy, STOC 2007]

exact algorithms, heuristics, branch and bound, and experiments


[Davenport and Kalagnanam, AAAI 2004,] [Conitzer, Davenport, and Kalagnanam, AAAI 2006,]
[Schalekamp and van Zuylen, ALENEX 2009,] [Ali and Meilă, Mathematical Social Sciences, 2012]
Robert Bredereck Computational Social Choice
29
Kemeny Winner Determination is NP-hard
Theorem
Kemeny Score is
NP-hard even for
four votes.

Robert Bredereck Computational Social Choice


30
Kemeny Winner Determination is NP-hard
Idea: Reduction from Feedback Arc Set.
Theorem Feedback Arc Set
Kemeny Score is Input: An directed graph G = (U, A) and a positive integer h.
NP-hard even for Question: Are there at most h arcs whose deletion makes G
four votes. acyclic?

Robert Bredereck Computational Social Choice


30
1) Formal correctness both
directions (math...)
Kemeny Winner Determination is NP-hard
Idea: Reduction from Feedback Arc Set.
Theorem Feedback Arc Set 2) Idea in pictures.
Kemeny Score is Input: An directed graph G = (U, A) and a positive integer h.
NP-hard even for Question: Are there at most h arcs whose deletion makes G
four votes. acyclic?
Homework:
Proof Sketch : Create one candidate for each vertex and each arc.
−−−−→ −−−−→ −−−−→ How to set
v1 : u1 � out(u1 ) � u2 � out(u2 ) � · · · � un � out(un )
←−−−− ←−−−− ←−−−− the Kemeny
v2 : un � out(un ) � · · · � u2 � out(u2 ) � u1 � out(u1 )
−−−→ −−−→ −−−→ score k?
v3 : in(u1 ) � u1 � in(u2 ) � u2 � · · · � in(un ) � un
←−−− ←−−− ←−−−
v4 : in(un ) � un � · · · � in(u2 ) � u2 � in(u1 ) � u1
−−−−−−−→
Where out / in(ui ) denotes some fixed ordering of the candidates representing out/ingoing arc
←−−−−−−−
of vertex ui and out / in(ui ) denotes its reverse ordering.
Robert Bredereck Computational Social Choice
30
Observe: Every acliclic graph induces a topological odering of the vertices without backarcs.

Claim: G has a feedback arc set of size h iff the Kemeny score is k+2h,
where k is a lower bound of the score which holds for any ranking.

1) Any pair of vertex alternatives contributes 2 to the score (one among v and v
and one among v and v ).
2) Analogously, any pair of arc alternatives contributes by 2.
3) Consider an edge e=(u,v) and some vertex w=u: alternative pair {e,w} contributes by 1,
analogously for an edge e=(u,v) and some vertex w=v: pair {e,w} also contributes by 1.

=> Given a feedback arc set of size at most h, remove this from the graph and take the topoligical
ordering (outgoing arcs following vertices) as ranking. Reinsert feedback arcs right behing sources.
Observe that each reinserted arc alternatives contributes by 2 (v and v ) => score is k+2h
<= Assume a ranking with score k+2h. Contribution of k as discussed cannot be avoided.
Moreover, alternative pairs {e,w} with e=(u,v) and w=u or w=v contribute altogehter by at most 2h.
Each such pair, however, contributes by either 0 or 2. Thus, the set of all arcs contributing more
than 0 corresponds to a feedback arc set of size at most h.
Kemeny Voting: Score Decision vs. Winner Search
Kemeny Score
Input: An election (C , V ) and a positive integer k.
Question: Is there a ranking r with Kemeny score at most k, that is, the sum of
KT-distances of r to all input rankings is at most k?

Robert Bredereck Computational Social Choice


31
Kemeny Voting: Score Decision vs. Winner Search
Kemeny Score
Input: An election (C , V ) and a positive integer k.
Question: Is there a ranking r with Kemeny score at most k, that is, the sum of
KT-distances of r to all input rankings is at most k?
Kemeny Winner
Input: An election (C , V ) and an alternative c ∈ C .
Question: Is there a ranking r with minimum Kemeny score where candidate c is
ranked first?

Robert Bredereck Computational Social Choice


31
Kemeny Voting: Score Decision vs. Winner Search
Kemeny Score
Input: An election (C , V ) and a positive integer k.
Question: Is there a ranking r with Kemeny score at most k, that is, the sum of
KT-distances of r to all input rankings is at most k?
Kemeny Winner
Input: An election (C , V ) and an alternative c ∈ C .
Question: Is there a ranking r with minimum Kemeny score where candidate c is
ranked first?

Theorem
Kemeny Winner is ΘP2 -complete.
ΘP2 contains all problems that can be decided in polynomial time by parallel access to
an oracle for NP.
Robert Bredereck Computational Social Choice
31
Parameterized Complexity of Kemeny Score I
parameter compl. comment
the number of votes n NP-c 1 for n = 4

number of candidates m FPT 3 O ∗ (2m )



Kemeny score k FPT 4 O ∗ (2O( k) )

max. range of cand. pos. rm FPT 1 O ∗ (32rm )

avg. range of cand. pos. ra NP-c 3 for ra ≥ 2 √


avg. KT-distance da FPT 2 O ∗ (5.823da ), 4 O ∗ (2O( da ) )

partial kernel: 5 16 d candidates


3 a √
max. KT-distance dm FPT 2 O ∗ (4.829dm ), 4 O ∗ (2O( dm ) )

1 [Dwork, Kumar, Naor, Sivakumar, WWW 2001], 2 [Simjour, IWPEC 2009]


3 [Betzler, Fellows, Guo, Niedermeier, Rosamond, TCS 2009]
4 [Fernau, Fomin, Lokshtanov, Mnich, Philip, Saurabh, IWOCA 2010], [Karpinski and Schudy, ISAAC 2010]
5 [Betzler, Guo, Komusiewicz, Niedermeier, JCSS 2011; Betzler, Bredereck, Niedermeier, AAMAS 2014]
Robert Bredereck Computational Social Choice
32
Kemeny Score: Dynamic Program
Theorem
Kemeny Score is fixed-parameter tractable with respect to m, where m denotes the
number of candidates.
Brute-Force Approach:
Try all m! rankings of candidates and compute the Kemeny scores.

Robert Bredereck Computational Social Choice


33
Kemeny Score: Dynamic Program
Theorem
Kemeny Score can be solved in O(2m · nm2 ) time, where m denotes the number of
candidates.
Algorithmic idea: Which candidate is at the first position?

Robert Bredereck Computational Social Choice


33
Kemeny Score: Dynamic Program
Theorem
Kemeny Score can be solved in O(2m · nm2 ) time, where m denotes the number of
candidates.
Algorithmic idea: Which candidate is at the first position?

Dynamic Program

Robert Bredereck Computational Social Choice


33
Kemeny Score: Dynamic Program
Theorem
Kemeny Score can be solved in O(2m · nm2 ) time, where m denotes the number of
candidates.
Algorithmic idea: Which candidate is at the first position?

Dynamic Program
Table entry T [C � ] contains for each subset C � ⊆ C the Kemeny score of the given
election restricted to C � .

Robert Bredereck Computational Social Choice


33
Kemeny Score: Dynamic Program
Theorem
Kemeny Score can be solved in O(2m · nm2 ) time, where m denotes the number of
candidates.
Algorithmic idea: Which candidate is at the first position?

Dynamic Program
Table entry T [C � ] contains for each subset C � ⊆ C the Kemeny score of the given
election restricted to C � .
The recurrence for a given subset C � is to consider every subset C �� ⊆ C � where C ��
is obtained by deleting a single candidate c from C � .

intuition: c is the top candidate in ranking

Robert Bredereck Computational Social Choice


33
Kemeny Score: Dynamic Program
Theorem
Kemeny Score can be solved in O(2m · nm2 ) time, where m denotes the number of
candidates.
Algorithmic idea: Which candidate is at the first position?
Homework: How do adapt to compute rankings?
Dynamic Program
Table entry T [C � ] contains for each subset C � ⊆ C the Kemeny score of the given
election restricted to C � .
The recurrence for a given subset C � is to consider every subset C �� ⊆ C � where C ��
is obtained by deleting a single candidate c from C � .
Let π �� be a Kemeny consensus for the election restricted to C �� . Compute the score
of the permutation π � of C � obtained from π �� by putting c in first position. Take
the minimum score over all π � obtained from subsets of C � .
Robert Bredereck Computational Social Choice
33
Parameterized Complexity of Kemeny Score II
parameter compl. comment
the number of votes n NP-c 1 for n = 4

number of candidates m FPT 3 O ∗ (2m )



Kemeny score k FPT 4 O ∗ (3O( k) )

max. range of cand. pos. rm FPT 1 O ∗ (32rm )

avg. range of cand. pos. ra NP-c 3 for r ≥ 2


a √
avg. KT-distance da FPT 2 O ∗ (5.823da ), 4 O ∗ (2O( da ) )

partial kernel: 5 16 d candidates


3 a √
max. KT-distance dm FPT 2 O ∗ (4.829dm ), 4 O ∗ (2O( dm ) )

1 [Dwork, Kumar, Naor, Sivakumar, WWW 2001], 2 [Simjour, IWPEC 2009]


3 [Betzler, Fellows, Guo, Niedermeier, Rosamond, TCS 2009]
4 [Fernau, Fomin, Lokshtanov, Mnich, Philip, Saurabh, IWOCA 2010], [Karpinski and Schudy, ISAAC 2010]
5 [Betzler, Guo, Komusiewicz, Niedermeier, JCSS 2011; Betzler, Bredereck, Niedermeier, JAAMAS 2014]
Robert Bredereck Computational Social Choice
34
Kemeny Score: Search Tree Algorithm I
Pareto efficiency: If all voters agree on a > b, then every Kemeny consensus also has
a > b.

Robert Bredereck Computational Social Choice


35
Kemeny Score: Search Tree Algorithm I
Pareto efficiency: If all voters agree on a > b, then every Kemeny consensus also has
a > b.
Critical candidate pair: A pair {a, b} of candidates is called critical, if there is a voter
with a > b and also a voter with b > a. Otherwise, the pair is clean.

Robert Bredereck Computational Social Choice


35
Kemeny Score: Search Tree Algorithm I
Pareto efficiency: If all voters agree on a > b, then every Kemeny consensus also has
a > b.
Critical candidate pair: A pair {a, b} of candidates is called critical, if there is a voter
with a > b and also a voter with b > a. Otherwise, the pair is clean.
Critical candidate: A candidate that is involved in at least one critical pair is called
critical candidate. Otherwise, the candidate is clean.
By Pareto efficiency, we know the positions of all clean
candidates in all consensus rankings.

Robert Bredereck Computational Social Choice


35
Kemeny Score: Search Tree Algorithm I
Pareto efficiency: If all voters agree on a > b, then every Kemeny consensus also has
a > b.
Critical candidate pair: A pair {a, b} of candidates is called critical, if there is a voter
with a > b and also a voter with b > a. Otherwise, the pair is clean.
Critical candidate: A candidate that is involved in at least one critical pair is called
critical candidate. Otherwise, the candidate is clean.
Algorithmic idea: Branch on the relative ordering of the critical pairs. Example:
a ? b

a>b b>a
a ? c a ? c

a>c c>a a>c c>a


Robert Bredereck Computational Social Choice
35
Kemeny Score: Search Tree Algorithm I
Pareto efficiency: If all voters agree on a > b, then every Kemeny consensus also has
a > b.
Critical candidate pair: A pair {a, b} of candidates is called critical, if there is a voter
with a > b and also a voter with b > a. Otherwise, the pair is clean.
Critical candidate: A candidate that is involved in at least one critical pair is called
critical candidate. Otherwise, the candidate is clean.
Algorithmic idea: Branch on the relative ordering of the critical pairs. Example:
a ? b

a>b b>a O(2#critical pairs


)
a ? c a ? c

a>c c>a a>c c>a O(2 Kemeny score


)
Decisive for running time: #leaves and #nodes reached.
Robert Bredereck Computational Social Choice
35
Kemeny Score: Search Tree Algorithm II
Branching on critical pairs:
{a, b}

a>b b>a

{a, c} {a, c}

a>c c >a a>c c >a

{b, c} {b, c} {b, c} {b, c}

b>c c >b b>c c >b b>c c >b b>c c >b

a>b>c a>c>b � c >a>b b>a>c � b>c>a c >b>a

Robert Bredereck Computational Social Choice


36
Kemeny Score: Search Tree Algorithm III
Branching on critical triples:
{a, b, c}

a>b>c a>c>b b>a>c c >a>b b>c>a c >b>a

Robert Bredereck Computational Social Choice


37
Kemeny Score: Search Tree Algorithm III
Branching on critical triples:
{a, b, c}

a>b>c a>c>b b>a>c c >a>b b>c>a c >b>a

Running Time Improvements:


Branching into pairs: � O ∗ (2k )

Robert Bredereck Computational Social Choice


37
Kemeny Score: Search Tree Algorithm III
Branching on critical triples:
{a, b, c}

a>b>c a>c>b b>a>c c >a>b b>c>a c >b>a

Running Time Improvements:


Branching into pairs: � O ∗ (2k )
Branching into triples: � O ∗ (1.53k )

Robert Bredereck Computational Social Choice


37
Kemeny Score: Search Tree Algorithm III
Branching on critical triples:
{a, b, c}

a>b>c a>c>b b>a>c c >a>b b>c>a c >b>a

Running Time Improvements:


Branching into pairs: � O ∗ (2k )
Branching into triples: � O ∗ (1.53k )
Branching into 4-tuples: � O ∗ (1.508k )

Robert Bredereck Computational Social Choice


37
Kemeny Score: Search Tree Algorithm III
Branching on critical triples:
{a, b, c}

a>b>c a>c>b b>a>c c >a>b b>c>a c >b>a

Running Time Improvements:


Branching into pairs: � O ∗ (2k )
Branching into triples: � O ∗ (1.53k )
Branching into 4-tuples: � O ∗ (1.508k )

Color coding: O ∗ (2O( k) )
Robert Bredereck Computational Social Choice
37
Experimental Results: Meta Search Engines
Four votes: Google, Lycos, MSN Live Search, and Yahoo!
top 1000 hits each, candidates that appear in all four rankings
search term cand. sec. red. inst. solved/unsol.
aff. action 127 0.41 [27] > 41 > [59]
alcoholism 115 0.21 [115]
architecture 122 0.47 [36] > 12 > [30] > 17 > [27]
blues 112 0.16 [74] >9> [29]
cheese 142 0.39 [94] >6> [42]
class. guitar 115 1.12 [6] > 7 > [50] > 35 > [17]
Death Valley 110 0.25 [15] > 7 > [30] > 8 > [50]
field hockey 102 0.21 [37] > 26 > [20] > 4 > [15]
gardening 106 0.19 [54] > 20 > [2] > 9 > [8] > 4 > [9]
HIV 115 0.26 [62] > 5 > [7] > 20 > [21]
lyme disease 153 2.61 [25] > 97 > [31]
mutual funds 128 3.33 [9] > 45 > [9] > 5 > [1] > 49 > [10]
rock climbing 102 0.12 [102]
Shakespeare 163 0.68 [100] > 10 > [25] > 6 > [22]
telecomm. 131 2.28 [9] > 109 > [13]
Robert Bredereck Computational Social Choice
38
Kemeny: ILP Formulation
Idea (ordered)
Introduce a binary variable for each pair of candidate a variable that encodes the
relative ordering:

x(a,b) = 1 if a is ranked above b in the consensus.

Robert Bredereck Computational Social Choice


39
Kemeny: ILP Formulation
Idea
Introduce a binary variable for each pair of candidate a variable that encodes the
relative ordering:

x(a,b) = 1 if a is ranked above b in the consensus.


Minimize (a,b) x(a,b) · w(a,b) , where w(a,b) is the number of voters that do not
rank a above b.

Robert Bredereck Computational Social Choice


39
Kemeny: ILP Formulation
Idea
Introduce a binary variable for each pair of candidate a variable that encodes the
relative ordering:

x(a,b) = 1 if a is ranked above b in the consensus.


Minimize (a,b) x(a,b) · w(a,b) , where w(a,b) is the number of voters that do not
rank a above b.
Ensure x(a,b) + x(b,a) ≥ 1, that is, each pair is ranked.

Robert Bredereck Computational Social Choice


39
Kemeny: ILP Formulation
Idea
Introduce a binary variable for each pair of candidate a variable that encodes the
relative ordering:

x(a,b) = 1 if a is ranked above b in the consensus.


Minimize (a,b) x(a,b) · w(a,b) , where w(a,b) is the number of voters that do not
rank a above b.
Ensure x(a,b) + x(b,a) ≥ 1, that is, each pair is ranked.
Ensure x(a,b) + x(b,c) + x(c,a) ≤ 2, that is, transitivity holds.

Robert Bredereck Computational Social Choice


39

You might also like