Algorithm Search⌘K

Theoremadvanced

Hardness of computing power indices

Also called Prasad-Kelly theorem.

Computing the Shapley-Shubik or Banzhaf index of a player in a weighted voting game is #P-complete, and deciding if it is positive is NP-complete.

The Shapley-Shubik and Banzhaf indices of a weighted voting game are easy to define, and a dynamic program computes them in time polynomial in nn and the quota. This theorem says that the dependence on the size of the weights cannot be removed: with weights written in binary, computing either index exactly is #P-complete, and even the yes or no question "does this player have any power?" is NP-complete. The reason is that a swing of a player is a set of the other players whose total weight lies in a narrow window, and finding or counting such sets is the subset sum problem.

Statement

Let a weighted voting game [q;w1,…,wn][q; w_1, \ldots, w_n] have nonnegative integer weights and quota written in binary. For a player ii, let ηi\eta_i be the number of its swings, the sets S⊆N∖{i}S \subseteq N \setminus \{i\} with w(S)<q≤w(S)+wiw(S) < q \le w(S) + w_i, where w(S)=∑j∈Swjw(S) = \sum_{j \in S} w_j. Recall that #P is the class of functions that count the accepting paths of a nondeterministic polynomial-time machine, that is, the number of certificates of an NP problem.

Theorem.

  1. (Prasad and Kelly 1990.) Computing ηi\eta_i, and so the raw Banzhaf index ηi/2n−1\eta_i / 2^{n-1}, is #P-complete.
  2. (Deng and Papadimitriou 1994.) Computing the Shapley-Shubik index φi\varphi_i is #P-complete.
  3. (Prasad and Kelly 1990.) Deciding whether ηi>0\eta_i > 0 is NP-complete. Since φi>0\varphi_i > 0, βi′>0\beta'_i > 0 and ηi>0\eta_i > 0 are the same condition, this holds for both indices.
  4. Deciding whether player ii is a dummy (ηi=0\eta_i = 0, which is index 0 for both indices) is coNP-complete.

For the Shapley-Shubik index, "#P-complete" is meant under polynomial-time Turing reductions, since φi\varphi_i is a fraction and not a count.

In plain words

A player has power when some group of the other players is just short of the quota, and the player's vote lifts the group over it. To check this, we must find a group of players whose votes add up to an amount in a narrow range. That is the classic hard problem of finding numbers that add up to a target. So no fast method can tell whether a player has any power at all, unless a large class of hard problems is easy. Counting the groups, which is what the indices need, is harder still. The hardness needs large weights: when the weights are small numbers, a simple table counts the groups quickly.

Proof

Membership. For part 3, a swing SS is a certificate of polynomial size, and the test w(S)<q≤w(S)+wiw(S) < q \le w(S) + w_i takes polynomial time. So the problem is in NP, and part 4, its complement, is in coNP. For part 1, ηi\eta_i is the number of certificates of this NP problem, so it is in #P. For part 2, n! φin!\,\varphi_i is the number of orders of the players in which ii is the pivot. An order is a certificate of polynomial size that is checked in polynomial time, so this number is a #P function, and φi\varphi_i follows from it by one division.

Hardness of the decision problem. Reduce from subset sum: given positive integers a1,…,ama_1, \ldots, a_m and a target tt, is there a set T⊆{1,…,m}T \subseteq \{1, \ldots, m\} with a(T)=∑j∈Taj=ta(T) = \sum_{j \in T} a_j = t? Let A=a1+⋯+amA = a_1 + \cdots + a_m. Build the game with the players 1,…,m1, \ldots, m of weights a1,…,ama_1, \ldots, a_m, one more player xx of weight 1, and the quota q=t+1q = t + 1. A set SS of the other players is a swing of xx exactly when w(S)<t+1≤w(S)+1w(S) < t + 1 \le w(S) + 1, that is, when w(S)=tw(S) = t. So the swings of xx are exactly the solutions of the subset sum instance, ηx\eta_x equals the number of solutions, and xx has positive power if and only if a solution exists. (If t>At > A the answer is no, and we output a fixed game with a dummy, so that q≤w(N)q \le w(N) holds.) The reduction takes polynomial time, and subset sum is NP-complete, so part 3 follows. Part 4 follows by taking complements.

Hardness of the Banzhaf count. The reduction above is parsimonious (parsimonious reduction): it keeps the number of solutions, since ηx\eta_x equals the number of solutions of the subset sum instance. The counting version #SUBSET-SUM is #P-complete, because the standard reduction from exact cover by 3-sets to subset sum writes each set as a number in a large base, so that each exact cover gives exactly one subset with the target sum, and #X3C is #P-complete. So ηx\eta_x, and βx′=ηx/2n−1\beta'_x = \eta_x / 2^{n-1}, are #P-hard, which proves part 1.

Hardness of the Shapley-Shubik index. The index weighs the swings by their sizes, so we force all solutions to have the same size and read off their number. Counting the solutions of subset sum with exactly kk elements, where kk is part of the input, is #P-hard by a Turing reduction from #SUBSET-SUM: let M=A+1M = A + 1, and for each k=0,…,mk = 0, \ldots, m ask for the number of subsets of size kk with sum tt in the instance with the numbers aj+Ma_j + M and the target t+kMt + kM. A subset of size k′k' has the sum a(T)+k′Ma(T) + k'M, and since a(T)<Ma(T) < M, the sum is t+kMt + kM only if k′=kk' = k and a(T)=ta(T) = t. The sum over kk of these counts is the total number of solutions.

Now take the instance with the numbers aj′=aj+Ma'_j = a_j + M and the target t′=t+kMt' = t + kM, and build the game of the decision reduction: the players 1,…,m1, \ldots, m with weights aj′a'_j, the player xx with weight 1, and q=t′+1q = t' + 1. The swings of xx are the sets with w(S)=t′w(S) = t', and by the choice of MM all of them have size exactly kk. So

φx=k! (m−k)!(m+1)!⋅ηx,\varphi_x = \frac{k!\,(m - k)!}{(m+1)!} \cdot \eta_x,

and ηx\eta_x, the number of solutions of size kk, follows from φx\varphi_x by a multiplication. One query to the index for each kk gives all these counts, so computing φx\varphi_x is #P-hard under Turing reductions, which proves part 2.

Consequences

  • No polynomial exact algorithm. Unless P = NP, no algorithm computes either index in time polynomial in the binary input length, and none even decides whether an index is 0.
  • No multiplicative approximation. A polynomial-time algorithm that approximates ηi\eta_i or φi\varphi_i within any factor would output 0 exactly when the index is 0, and so decide the NP-complete problem of part 3. So no FPRAS or other multiplicative approximation exists unless P = NP (or NP = RP for randomized algorithms).
  • Additive approximation is easy. Sampling estimates each index within an additive error ε\varepsilon with high probability from O(log⁡(n/δ)/ε2)O(\log(n/\delta)/\varepsilon^2) random orders or coalitions. This does not contradict the theorem, because an additive error cannot tell a tiny positive index from 0.
  • The dummy test. Deciding whether a member of a council has any power at all is coNP-complete in general, although the veto test w(N)−wi<qw(N) - w_i < q takes linear time.

Tightness

  • The weights must be large. The dynamic program takes O(n2q)O(n^2 q) arithmetic operations per player, which is polynomial when the weights are bounded by a polynomial in nn or written in unary. So the problem is NP-hard only in the weak sense (weak NP-hardness), and the reduction must use exponentially large weights, as it does through the large-base numbers of the reduction from exact cover by 3-sets.
  • Few distinct weights. When the players have only a constant number of distinct weights, the coalitions are described by how many players of each weight they hold, and the indices take polynomial time.
  • The exact counting class. Faliszewski and Hemaspaandra (2009) show that the raw Banzhaf index is #P-parsimonious-complete and that the raw Shapley-Shubik index is complete for #P under metric reductions, a reduction with one query and polynomial-time pre- and post-processing.

History

Prasad and Kelly (1990) proved that deciding whether a player of a weighted voting game is a swing for some coalition is NP-complete and that counting the swings, the Banzhaf index, is #P-complete. Deng and Papadimitriou (1994), in a paper on the complexity of solution concepts for cooperative games, proved the #P-completeness of the Shapley value of weighted voting games and noted that it has a pseudo-polynomial algorithm. Matsui and Matsui (2000) gave a survey of the hardness results and the algorithms for both indices. Faliszewski and Hemaspaandra (2009) fixed the exact type of completeness and showed that comparing the power of two players is PP-complete.

References

  1. Kislaya Prasad and Jerry S. Kelly, NP-completeness of some problems concerning voting games, International Journal of Game Theory 19(1) (1990), 1-9, the
  2. Xiaotie Deng and Christos H. Papadimitriou, On the complexity of cooperative solution concepts, Mathematics of Operations Research 19(2) (1994), 257-266, the
  3. Piotr Faliszewski and Lane A. Hemaspaandra, The complexity of power-index comparison, Theoretical Computer Science 410(1) (2009), 101-107, the exact form of the completeness of the raw Banzhaf and Shapley-Shubik indices under parsimonious and metric reductions
  4. Tomomi Matsui and Yasuko Matsui, A survey of algorithms for calculating power indices of weighted majority games, Journal of the Operations Research Society of Japan 43(1) (2000), 71-86, the hardness results for both indices and the pseudo-polynomial algorithms
  5. Georgios Chalkiadakis, Edith Elkind and Michael Wooldridge, Computational Aspects of Cooperative Game Theory, Morgan and Claypool, 2011, Chapter 4, Weighted voting games (the hardness of the power indices and of the dummy test)

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/328G7A/text.yaml