An Anytime Approximation Method for the Inverse Shapley Value Problem

8
An Anytime Approximation Method for the Inverse Shapley Value Problem Shaheen Fatima Department of Computer Science, Loughborough University Loughborough LE11 3TU, UK. [email protected] Michael Wooldridge Department of Computer Science, University of Liverpool Liverpool L69 3BX, UK. [email protected] Nicholas R. Jennings School of Electronics and Computer Science University of Southampton Southampton SO17 1BJ, UK. [email protected] ABSTRACT Coalition formation is the process of bringing together two or more agents so as to achieve goals that individuals on their own cannot, or to achieve them more efficiently. Typically, in such situations, the agents have conflicting preferences over the set of possible joint goals. Thus, before the agents realize the benefits of cooperation, they must find a way of resolving these conflicts and reaching a consensus. In this context, cooperative game theory offers the vot- ing game as a mechanism for agents to reach a consensus. It also offers the Shapley value as a way of measuring the influence or power a player has in determining the outcome of a voting game. Given this, the designer of a voting game wants to construct a game such that a player’s Shapley value is equal to some desired value. This is called the inverse Shapley value problem. Solving this prob- lem is necessary, for instance, to ensure fairness in the players’ vot- ing powers. However, from a computational perspective, finding a player’s Shapley value for a given game is #P-complete. Con- sequently, the problem of verifying that a voting game does in- deed yield the required powers to the agents is also #P-complete. Therefore, in order to overcome this problem we present a compu- tationally efficient approximation algorithm for solving the inverse problem. This method is based on the technique of ‘successive ap- proximations’; it starts with some initial approximate solution and iteratively updates it such that after each iteration, the approximate gets closer to the required solution. This is an anytime algorithm and has time complexity polynomial in the number of players. We also analyze the performance of this method in terms of its approx- imation error and the rate of convergence of an initial solution to the required one. Specifically, we show that the former decreases after each iteration, and that the latter increases with the number of players and also with the initial approximation error. Categories and Subject Descriptors I.2.11 [Distributed Artificial Intelligence]: Multiagent Systems General Terms Anytime algorithms, Experimentation Keywords Game-theory, Mechanism Design, Coalitions, Shapley Value. Cite as: An Anytime Approximation Method for the Inverse Shapley Value Problem, Shaheen Fatima, Michael Wooldridge, and Nicholas R. Jen- nings, Proc. of 7th Int. Conf. on Autonomous Agents and Multiagent Systems (AAMAS 2008), Padgham, Parkes, Müller and Parsons (eds.), May,12-16.,2008,Estoril,Portugal,pp.935-942. Copyright c 2008, International Foundation for Autonomous Agents and Multiagent Systems (www.ifaamas.org). All rights reserved. 1. INTRODUCTION Coalition formation is the process of bringing together two or more agents so as to achieve goals that individuals on their own can- not, or to achieve them more efficiently [12]. However, before the agents can realize the benefits of such cooperation, they must solve two key problems. The first is to find a way of reaching consensus between the agents. The second is to decide how to split the gains from cooperation between the members of the coalition. In more detail, the problem of reaching consensus arises in situa- tions where there is more than one joint goal that a group of agents may achieve together. In such situations, the agents must decide which of these goals they will actually achieve. Now, this decision- making becomes difficult especially when different agents have dif- ferent preferences over the joint goals. Moreover, the agents must also decide how to share the gains from cooperation between them- selves. To tackle both these problems, we turn to cooperative game theory [12]. Specifically, it provides the voting game as a mecha- nism for modeling situations that require a group of players to reach a consensus and the Shapley value as a way of dividing joint gains between the players. In yet more detail, the voting game gives different amounts of in- fluence (or power) over decision making to different players [12]. For example consider a joint stock company where each share- holder is given a number of votes (or shares) in proportion to his ownership of stock. Here, each share has equal influence, but dif- ferent shareholders have different numbers of shares (in game the- oretic terms, the number of shares an agent has is referred to as his weight) and hence different powers. Another example is federal political bodies such as the European Union council of ministers and the US Presidential Electoral College where the weights reflect populations, rather than contributions, and the individual votes are cast as blocks of different sizes. Although the voting mechanism has so far mostly been used in human contexts, it is now being in- creasingly studied in the context of multi-agent systems where the agents must reach consensus on what joint goals they will accom- plish [15, 18, 4]. In what follows, we will analyze voting games in the abstract without reference to their different contexts. A voting game can be analyzed from two different perspectives: from that of the individual players, and from that of the designer of a voting game. From the former perspective, the analysis deals with finding how much power a player has in changing the outcome of a voting game. Here an agent’s power can be viewed as being analo- gous to his gains from cooperation; the more his power, the greater are his gains. To this end, cooperative game theory offers a number of ways of measuring a player’s voting power including the Shap- ley value [17]. Thus, analyzing a game from a player’s perspective involves taking the parameters of the game as input and finding 935

Transcript of An Anytime Approximation Method for the Inverse Shapley Value Problem

Page 1: An Anytime Approximation Method for the Inverse Shapley Value Problem

An Anytime Approximation Methodfor the Inverse Shapley Value Problem

Shaheen FatimaDepartment of

Computer Science,Loughborough University

Loughborough LE11 3TU, [email protected]

Michael WooldridgeDepartment of

Computer Science,University of Liverpool

Liverpool L69 3BX, [email protected]

Nicholas R. JenningsSchool of Electronics and

Computer ScienceUniversity of Southampton

Southampton SO17 1BJ, [email protected]

ABSTRACTCoalition formation is the process of bringing together two or moreagents so as to achieve goals that individuals on their own cannot,or to achieve them more efficiently. Typically, in such situations,the agents have conflicting preferences over the set of possible jointgoals. Thus, before the agents realize the benefits of cooperation,they must find a way of resolving these conflicts and reaching aconsensus. In this context, cooperative game theory offers the vot-ing game as a mechanism for agents to reach a consensus. It alsooffers the Shapley value as a way of measuring the influence orpower a player has in determining the outcome of a voting game.Given this, the designer of a voting game wants to construct a gamesuch that a player’s Shapley value is equal to some desired value.This is called the inverse Shapley value problem. Solving this prob-lem is necessary, for instance, to ensure fairness in the players’ vot-ing powers. However, from a computational perspective, findinga player’s Shapley value for a given game is #P-complete. Con-sequently, the problem of verifying that a voting game does in-deed yield the required powers to the agents is also #P-complete.Therefore, in order to overcome this problem we present a compu-tationally efficient approximation algorithm for solving the inverseproblem. This method is based on the technique of ‘successive ap-proximations’; it starts with some initial approximate solution anditeratively updates it such that after each iteration, the approximategets closer to the required solution. This is an anytime algorithmand has time complexity polynomial in the number of players. Wealso analyze the performance of this method in terms of its approx-imation error and the rate of convergence of an initial solution tothe required one. Specifically, we show that the former decreasesafter each iteration, and that the latter increases with the number ofplayers and also with the initial approximation error.

Categories and Subject DescriptorsI.2.11 [Distributed Artificial Intelligence]: Multiagent Systems

General TermsAnytime algorithms, Experimentation

KeywordsGame-theory, Mechanism Design, Coalitions, Shapley Value.Cite as: An Anytime Approximation Method for the Inverse ShapleyValue Problem, Shaheen Fatima, Michael Wooldridge, and Nicholas R. Jen-nings, Proc. of 7th Int. Conf. on Autonomous Agents and MultiagentSystems (AAMAS 2008), Padgham, Parkes, Müller and Parsons (eds.),May,12-16.,2008,Estoril,Portugal,pp.935-942.Copyright c© 2008, International Foundation for Autonomous Agents andMultiagent Systems (www.ifaamas.org). All rights reserved.

1. INTRODUCTIONCoalition formation is the process of bringing together two or moreagents so as to achieve goals that individuals on their own can-not, or to achieve them more efficiently [12]. However, before theagents can realize the benefits of such cooperation, they must solvetwo key problems. The first is to find a way of reaching consensusbetween the agents. The second is to decide how to split the gainsfrom cooperation between the members of the coalition.

In more detail, the problem of reaching consensus arises in situa-tions where there is more than one joint goal that a group of agentsmay achieve together. In such situations, the agents must decidewhich of these goals they will actually achieve. Now, this decision-making becomes difficult especially when different agents have dif-ferent preferences over the joint goals. Moreover, the agents mustalso decide how to share the gains from cooperation between them-selves. To tackle both these problems, we turn to cooperative gametheory [12]. Specifically, it provides the voting game as a mecha-nism for modeling situations that require a group of players to reacha consensus and the Shapley value as a way of dividing joint gainsbetween the players.

In yet more detail, the voting game gives different amounts of in-fluence (or power) over decision making to different players [12].For example consider a joint stock company where each share-holder is given a number of votes (or shares) in proportion to hisownership of stock. Here, each share has equal influence, but dif-ferent shareholders have different numbers of shares (in game the-oretic terms, the number of shares an agent has is referred to ashis weight) and hence different powers. Another example is federalpolitical bodies such as the European Union council of ministersand the US Presidential Electoral College where the weights reflectpopulations, rather than contributions, and the individual votes arecast as blocks of different sizes. Although the voting mechanismhas so far mostly been used in human contexts, it is now being in-creasingly studied in the context of multi-agent systems where theagents must reach consensus on what joint goals they will accom-plish [15, 18, 4]. In what follows, we will analyze voting games inthe abstract without reference to their different contexts.

A voting game can be analyzed from two different perspectives:from that of the individual players, and from that of the designer ofa voting game. From the former perspective, the analysis deals withfinding how much power a player has in changing the outcome of avoting game. Here an agent’s power can be viewed as being analo-gous to his gains from cooperation; the more his power, the greaterare his gains. To this end, cooperative game theory offers a numberof ways of measuring a player’s voting power including the Shap-ley value [17]. Thus, analyzing a game from a player’s perspectiveinvolves taking the parameters of the game as input and finding

935

Page 2: An Anytime Approximation Method for the Inverse Shapley Value Problem

these power indices. In contrast, a game can also be analyzed fromthe designer’s perspective. This involves taking the power indicesof the individual players as input and then finding a voting gamethat gives the required power to the players1. This paper is in thisvein. Specifically, we focus on the Shapley value2. Our objectiveis to solve the inverse Shapley value problem (i.e., find a votinggame that yields some required Shapley values). This problem isimportant because the players’ voting powers are not immediatelyobvious from a casual inspection of a voting game (Section 2.2 il-lustrates this point with an example).

Our approach to solving the inverse Shapley value problem is asfollows. We know that, for a given voting game, finding a player’sShapley value is a #P-complete problem [2]. Consequently, theproblem of verifying that a voting game does indeed yield the re-quired powers to the agents is also #P-complete. Therefore, inorder to overcome this problem we present a computationally ef-ficient approximation algorithm for solving the inverse problem.This method is based on the technique of ‘successive approxima-tions’; it starts with some initial approximate solution and itera-tively updates it such that after each iteration, the approximate getscloser to the required solution. This is an anytime algorithm; theiterative process can be stopped after any number of iterations, butthe more the number of iterations, the better the approximation.For a game of n players, the time complexity of a single iteration isO(n2). We also analyze the performance of this method in termsof its approximation error and the rate of convergence of an initialsolution to the required one. Specifically, we show that the formerdecreases after each iteration, and that the latter increases with thenumber of players and also with the initial approximation error.

In so doing, this paper presents the first such method for solv-ing the inverse Shapley value problem. The inverse problem wasinvestigated in the past, but for the weighted Shapley values of theform given in [3], not for the Shapley values as defined in [17] (seeSection 5 for details). Moreover, this solution has time complex-ity exponential in the number of players. In contrast, this paperpresents an algorithm for solving the inverse problem for the val-ues defined by Shapley in [17]. Furthermore, the proposed methodhas two key advantages: it is an anytime algorithm, and it has timecomplexity polynomial in the number of players.

The rest of the paper is organised as follows. Section 2 providesthe background to the Shapley value and voting games, and intro-duces the inverse Shapely value problem. In Section 3, we presentour approximation method for solving the inverse problem. In Sec-tion 4, we provide an experimental analysis of our method in termsof its error of approximation and its rate of convergence. Section 5discusses related literature, and Section 6 concludes.

2. BACKGROUNDWe begin by introducing coalitional games and the Shapley valueand then define the voting game. A a coalition game, 〈N, v〉, con-sists of:

1. a finite set (N = {1, 2, . . . , n}) of players and

2. a function (v) that associates with every non-empty subset Sof N (i.e., a coalition) a real number v(S) (the worth of S).

For each coalition S, the number v(S) is the total payoff that isavailable for division among the members of S (i.e., the set of jointactions that coalition S can take consists of all possible divisions of1This analysis may be used to ensure, for example, fairness in theplayers’ voting powers.2Future work will deal with the other indices.

v(S) among the members of S). Note that, viewed in this abstractway, a coalitional game gives no indication of how a coalition’svalue might or should be divided amongst coalition members.

In a voting game, the players will only join a coalition if they ex-pect to gain from it. Here, the players are allowed to form bindingagreements, and so there is often an incentive to work together toreceive the largest total payoff. The problem then is how to splitthe total payoff between the players. In this context, Shapley [17]constructed a solution using an axiomatic approach. In particular,he defined a value for games to be a function that assigns to a game〈N, v〉, a number ϕi(N, v) for each i in N . This function satisfiesthree axioms [16]:

1. Symmetry: The names of the players play no role in deter-mining the value. That is, two players who are identical withrespect to what they contribute to a coalition should have thesame Shapley value.

2. Carrier: The sum of ϕi(N, v) for all players i in any car-rier C equals v(C). A carrier C is a subset of N such thatv(S) = v(S ∩ C) for any subset of players S ⊂ N .

3. Additivity: This specifies how the values of different gamesmust be related to one another. It requires that for any games〈N, v〉 and 〈N, v′〉, ϕi(N, v) + ϕi(N, v

′) = ϕi(N, v + v′)for all i in N .

Shapley showed that there is a unique function that satisfies thesethree axioms. He also viewed this value as an index for measuringthe power of players in a game. Like a price index or other marketindices, the value uses averages (or weighted averages in some ofits generalizations) to aggregate the power of players in their vari-ous cooperation opportunities. Alternatively, one can think of theShapley value as a measure of the utility of risk neutral players in agame [16].

Having given these intuitions, we now turn to their formalization.Specifically, we first introduce some notation and then define theShapley value. Let S denote the setN −{i} and fi : S → 2N−{i}

be a random variable that takes its values in the set of all subsets ofN − {i}, and has the probability distribution function (g) definedas:

g(fi(S) = S) =|S|!(n− |S| − 1)!

n!

The random variable fi is interpreted as the random choice of acoalition that player i joins. Then, a player’s Shapley value is de-fined in terms of its marginal contribution. The marginal contribu-tion of player i to coalition S with i /∈ S is a function ∆iv that isdefined as follows:

∆iv(S) = v(S ∪ {i})− v(S)

Thus a player’s marginal contribution to a coalition S is the in-crease in the value of S as a result of i joining it. Given this, theShapley value is defined as follows [17]:

DEFINITION 1. The Shapley value (ϕi) of the game 〈N, v〉 forplayer i is the expectation (E) of its marginal contribution to acoalition that is chosen randomly:

ϕi(N, v) = E[∆iv ◦ fi] (1)

The Shapley value may be interpreted as follows. Suppose thatall the players are arranged in some order, all orderings being equallylikely. Then ϕi(N, v) is the expected marginal contribution, overall orderings, of player i to the set of players who precede him.

936

Page 3: An Anytime Approximation Method for the Inverse Shapley Value Problem

Now, the method for finding a player’s Shapley value depends onthe definition of the value function (v). This function is differentfor different games, but here we focus specifically on the votinggame because it is an important way of modeling situations wherethere are multiple agents that have different preferences and theywant to reach a consensus.

2.1 The Voting GameFor a set N of players, the weighted voting game [12] is a gameG = 〈N, v〉 in which:

v(S) =

1 if w(S) ≥ q0 otherwise

for some q ∈ IR+ and wi ∈ IR+, where:

w(S) =Xi∈S

wi

for any coalition S. Thus wi is the number of votes that playeri has and q is the number of votes needed to win the game (i.e.,the quota). A weighted voting game with quota q is denoted as〈q;w1, . . . , wn〉 and it is said to be a k-majority game if the quotafor the game is q = k × µn where µ denotes the mean weight ofthe n players and 0 < k < 1.

For these games, a player’s marginal contribution is either zeroor one because the value of any coalition is either zero or one. Acoalition with value zero is called a “losing coalition” and withvalue one a “winning coalition”. If a player’s entry to a coalitionchanges it from losing to winning, then the player’s marginal con-tribution for that coalition is one; otherwise it is zero. A coalitionS is said to be a swing for player i if S is losing but S ∪ {i} iswinning.

2.2 The Inverse ProblemA player’s weight in a weighted voting game cannot be interpretedas a measure of his power (i.e., his ability to turn a losing coalitioninto a winning one) [13]. The following example illustrates thispoint.

EXAMPLE 1. A company has three shareholders. Two of themhave 49 percent of the shares and one of them has 2 percent. Thenthese figures (that represent the shareholders weights) do not de-scribe the share of the power a shareholder has in running thecompany. This is because if the voting game requires 51 percentmajority, (i.e., the game {51; 49, 49, 2}), then any two sharehold-ers are sufficient to form a winning coalition. Thus each player hasa Shapley value of 1/3 despite the disparity in their weights. Sinceany shareholder can win by joining together with any other, the onewith 2 percent shares has exactly the same power as the ones with49 percent shares.

The above example illustrates that the relation between the players’weights and their values is not obvious. Given this, the designer ofa voting game wants to know the weights that need to be given tothe individual players such that they yield some desired Shapleyvalues. This problem, of finding the players’ weights given theirShapley values, is called the inverse problem.

As motivated in Section 1, we will now present a new methodfor solving the inverse problem. In more detail, for a game withn players and quota q, let Φ ∈ IRn denote the required Shapleyvalues. Given this, our method takes Φ and q as input and generatesa vector w ∈ IRn such that the Shapley values (ϕ ∈ IRn) for thegame 〈q;w1, . . . , wn〉 are approximately equal to Φ. Here, µ is themean of the n weights in w.

The method we propose works as follows. We start with an ini-tial allocation of weights (w). For w, we compute the Shapleyvalues. Then, using a suitable rule (described in Section 3) to up-date the weights, we iteratively update the players’ weights in wsuch that their Shapley values converge to those required. Now, asmentioned earlier, finding the Shapley values for a voting game isa #P-complete problem. Therefore, in order to overcome this prob-lem, we use the approximation algorithm proposed in [5] to com-pute the Shapley values. This algorithm has time complexity linearin the number of players. For this method, we first prove a keyproperty that shows how the players’ Shapley values change whenwe update the weights inw. Then we use this property to formulatea rule for updating the weights in w such that the Shapley valuesfor w converge to Φ. In the following section, we briefly describethe approximation method proposed in [5] to find the approximateShapley values. Then, in Section 3, we present our method forsolving the inverse problem.

2.3 Finding an approximate Shapley valueWe use the method proposed in [5] to find a player’s approximateShapley value. In this section we give a brief overview of thismethod. The intuition behind it is as follows As per Definition 1,in order to find a player’s Shapley value, we first need to find hismarginal contribution to all possible coalitions. For n players, thereare 2n−1 possible coalitions. Finding a player’s marginal contri-bution to each one of these possible coalitions is computationallyinfeasible. So, instead of finding the marginal contribution to eachpossible coalition, the method samples random coalitions from theset of players. There are n sample coalitions that are drawn fromN . The first sample coalition is of size one, the second sample isof size two, and so on. Let player i’s approximate marginal contri-bution to sample Z ⊆ N of z players be denoted E∆z

i . Then, i’smarginal contribution to each of the n samples (i.e., for 1 ≤ z ≤ n)is found and the average of all these marginal contributions givesthe player’s approximate Shapley value.

Now, the approximate marginal contribution of player i to a ran-dom sample of size z is one if the total weight of the z players inthe sample is greater than or equal to a = q − wi but less thanb = q − ε (where ε is an infinitesimally small quantity). Other-wise, his marginal contribution is zero. This approximate marginalcontribution is determined using the following rule from samplingtheory.

Let the players’ weights in N be defined by a probability distri-bution function. Irrespective of the actual probability distributionfunction, let µ be the mean weight for the set of players and ν bethe variance in the players’ weights. From this set (N ) if we ran-domly draw a sample, then the sum of the players’ weights in thesample is given by the following rule [6]:

Rule A. If w1, w2, . . . , wz is a random sample of sizez drawn from any distribution with mean µ and vari-ance ν, then the sample sum has an approximate Nor-mal distribution,N , with mean zµ and variance ν

z(the

larger the z the better the approximation3).

Given this rule, player i’s approximate marginal contribution toa random coalition is the area under the curve defined byN (zµ, ν

z)

in the interval [a, b]. This area is shown as regionB in Figure 1 (thedotted line in the figure is the mean zµ). Hence i’s approximate

3Also, for large z, any measurement done on a sample drawn withreplacement is the same as that for a sample drawn without replace-ment [6].

937

Page 4: An Anytime Approximation Method for the Inverse Shapley Value Problem

B

aa a Sum of weights2 1 b µz

Figure 1: A normal distribution for the sum of players’ weightsin a coalition of size z.

marginal contribution to Z is:

E∆zi =

1p(2πν/z)

Z b

a

e−z(x−zµ)2

2ν dx. (2)

Player i’s approximate Shapley value (ϕi) is the average of itsaproximate marginal contribution to all possible coalitions:

ϕi =1

n

nXz=1

E∆zi (3)

This method is described in Algorithm 1. Note that this methodonly requires the number of players, the quota, the mean weights,and the variance in the weights – the weights of the individual play-ers are not needed. Also, note that Algorithm 1 is based on the nor-mal approximation given in Rule A; the larger the n, the better theapproximation. The time complexity of Algorithm 1 is O(n).

Algorithm 1 ShapleyValue(n, q, µ, ν, wi)1: Ti ⇐ 0; a⇐ q − wi; b⇐ q − ε2: for z=1 to n do3: E∆z

i ⇐ 1√2Πν/z

R bae−z

(x−zµ)2

2ν dx

4: Ti ⇐ Ti + E∆zi

5: end for6: ϕi ⇐ Ti/n7: return ϕi

3. SOLVING THE INVERSE PROBLEMWe first analyze Algorithm1, and prove a key property of this method.This is done in Theorem 1. We then use this property to solve theinverse Shapley value problem.

THEOREM 1. For a setN of n players, letG1 = {q;w1, . . . , wn}and G2 = {q; w̄1, w̄2, . . . , w̄n} be two voting games such that ifthe mean and variance of the weights for G1 are µ and ν respec-tively, then the mean and variance forG2 are µ and ν̄ where ν ≈ ν̄.Also, for 1 ≤ i ≤ n, let ϕ1

i (ϕ2i ) denote player i’s Shapley value

for G1 (G2). Then, if w̄i > wi, then ϕ2i ≥ ϕ1

i . Also, if w̄i < wi,then ϕ2

i ≤ ϕ1i . Lastly, if w̄i = wi, then ϕ2

i = ϕ1i – the Shapley

values being computed using Algorithm 1.

PROOF. We need to find the relation between ϕ1i and ϕ2

i . Bothϕ1i and ϕ2

i are computed using Equation 3. This equation, inturn, depends on Equation 2 which is used to find i’s approximatemarginal contribution to a random coalition. Recall that Z is arandom coalition of z players drawn from N . Let i’s approximatemarginal contribution to a random coalition (Z) of 1 ≤ z ≤ nplayers be E1∆z

i for G1 and E2∆zi that for G2. Also let µ1

z and

ν1z denote the mean and variance of the sum of the weights of the

coalition Z for G1. Likewise, let µ2z and ν2

z denote the mean andvariance for G2. Then, from Rule A, we have:

µ1z = zµ and µ2

z = zµ (4)

ν1z = ν/z and ν2

z = ν̄/z (5)

Since we are given that ν ≈ ν̄, Equation 4 can be re-written as:

ν1z = ν/u and ν2

z ≈ ν/z (6)

Let w̄i = wi + ∆w. Also, let a1, b1 denote the limits of integra-tion in Equation 2 for G1 and a2, b2 those for G2. Then, from Step1 of Algorithm 1, we get the following:

a1 = q − wi and b1 = q − ε (7)a2 = q − wi −∆w and b2 = q − ε (8)

We know that q > 0 and wi > 0. Hence, the relation betweena1 and a2 depends on whether ∆w is positive (Case 1), negative(Case 2), or zero (Case 3). We analyze each case in turn.

Consider Case 1. For this case, we have q > 0, wi > 0, and∆w > 0. Therefore we have:

a1 > a2 and b1 = b2 (9)

Note that the relation a1 > a2 is true irrespective of the actualposition of a1 on the x-axis of Figure 1. Also, note that the relationsbetween a1, a2 and b1, b2 do not depend on X , the sample size.

Now, as per Equation 2, E1∆zi is the area under the normal

distribution N (zµ1z,ν1zz

) between the limits a1 and b = b1 = b2(see Figure 1), i.e., :

E1∆zi =

1p(2πν1

z/z)

Z b1

a1

e−z (x−zµ1

z)2

2ν1z dx. (10)

Likewise, we get:

E2∆zi =

1p(2πν2

z/z)

Z b2

a2

e−z (x−zµ2

z)2

2ν2z dx. (11)

From Equation 4 we have µ1z = µ2

z , from Equation 6 we haveν1z ≈ ν2

z , and form Equation 9 we have a1 > a2 and b1 = b2. Thussubstituting µ2

z with µ1z , ν2

z with ν1z , and b2 with b1 in Equation 11

and comparing it with Equation 10 we get E2∆zi ≥ E1∆z

i . Giventhis and Equation 3, we get ϕ2

i ≥ ϕ1i . Thus, i’s Shapley value for

G2 is no less than his value for G1.In the same way, for Case 2 (i.e., ∆w < 0) and Case 3 (i.e.,

∆w = 0) we get ϕ2i ≤ ϕ1

i and ϕ2i = ϕ1

i respectively.

As mentioned previously, we use Theorem 1 to solve the inverseShapley value problem as follows. The method starts with an initialallocation of weights in w. For w, we compute the approximateShapley values using Algorithm 1. Then, using a suitable updatingrule (described below), we iteratively update the players’ weightssuch that the Shapley values for w converge to those required. Inmore detail, this is done as follows.

Initial weights. Initially, we assign equal weights to all the play-ers. Let ω denote this weight. This initial weight is chosen suchthat the weights of all the players remain positive even after theyare updated. We first compute the Shapley values for w. We thenupdate the weights in w. For the updated weights, we recomputethe Shapley values (ϕ). This process is repeated until ϕ gets suffi-ciently close to Φ (i.e., ϕ converges to Φ).

938

Page 5: An Anytime Approximation Method for the Inverse Shapley Value Problem

Convergence. Let ∆Φ denote the average percentage differencebetween Φ and ϕ for all the n players:

∆Φ =

nXi=1

100× abs(Φi − ϕi)/Φi (12)

When ∆Φ ≤ ε, we say that ϕ has converged to Φ and stop theiterative processs.

Algorithm 2 InverseShapleyValue(n, q, Φ, δ, ω)1: w ⇐ ω2: µ⇐ Average(w); ν ⇐ Variance(w)3: ∆w ⇐ δ × ω4: ∆Φ ⇐ 05: for i=1 to n do6: ϕi ⇐ ShapleyValue(n, q, µ, ν, wi)7: DVi ⇐ Φi − ϕi8: PEi ⇐ abs

`DVi×100

Φi

´9: ∆Φ ⇐ ∆Φ + PEi

10: end for11: ∆Φ ⇐ ∆Φ/n12: while ∆Φ > ε do13: UpdateWeights(w, ϕ, Φ, δ, PE, Rule)14: ν ⇐ Variance(w)15: ∆w ⇐ δ × ω16: ∆Φ ⇐ 017: for i=1 to n do18: ϕi ⇐ ShapleyValue(n, q, µ, ν, wi)19: DVi ⇐ Φi − ϕi20: PEi ⇐ abs

`DVi×100

Φi

´21: ∆Φ ⇐ ∆Φ + PEi22: end for23: ∆Φ ⇐ ∆Φ/n24: end while25: return w and ∆Φ

Algorithm 3 UpdateWeights(w, ϕ, Φ, δ, PE, Rule)1: P ⇐ 0; N ⇐ 0;2: for i=1 to n do3: if (Φi > ϕi) then4: P ⇐ P + 1;PEPP,1 ⇐ i;PEPP,2 ⇐ PEi5: else6: if (Φi < ϕi) then7: N ⇐ N + 1;PENN,1 ⇐ i;PEPN,2 ⇐ PEi8: end if9: end if

10: end for11: Sort(PEP); Sort(PEN);12: if Rule = Rule1 then13: T ⇐ 114: end if15: if Rule = Rule2 then16: T ⇐Minimum(P,N)17: end if18: for i=1 to T do19: j ⇐ PEPi,1; k ⇐ PENi,120: wj ⇐ wj + ∆w; wk ⇐ wk −∆w

21: end for22: return w

Updating rule. We define two rules (Rule1 and Rule2) for up-dating the player’s weights. Both rules are formulated in such a

way that the conditions given in Theorem 1 are satisfied. That is, ifG1 represents the game before updating andG2 that after updating,then the updating is done in such a way that the mean weight forboth G1 and G2 is µ. Also, the variance in the weights for G1 isapproximately equal to the variance for G2 (i.e., ν ≈ ν̄). Giventhis, we first introduce some notation and then describe the rules.

Assume that the n players are separated into two categories:those for whom the required Shapley values are more than theirvalues from w, and those for whom the required Shapley valuesare less than their values from w. Let the details about the playersin the former (latter) category be stored in PEP (PEN ) wherePEP (PEN ) is a two dimensional array of P (N ) rows and 2 (2)columns. The first column in PEP (PEN ) gives a player’s indexin w, and the second column gives the absolute percentage differ-ence between the player’s required Shapley value and its value fromw. Also, let the rows in PEP (PEN ) be sorted in the decreasingorder of their second column entries. Finally, let T denote the min-imum of P and N . Given this, the two rules are defined as follows:

Rule1: Increment the weight of the first player in PEP by ∆w,and decrement the weight of the first player in PEN by the sameamount. Here ∆w is chosen such that the variance in the weightsfor G1 (i.e., before the update) is approximately equal to the vari-ance in the weights for G2 (i.e., after the update).

Rule2: Increment the weight of the first T players in PEP by∆w, and decrement the weight of the first T players in PEN bythe same amount. Here ∆w is chosen such that the variance in theweights for G1 (i.e., before the update) is approximately equal tothe variance in the weights for G2 (i.e., after the update).

Note that both rules satisfy the conditions of Theorem 1; we in-crement the weights of one set of T players by ∆w and decrementthe weights of another disjoint set of T players by an equal amount.Thus the mean weight remains unchanged after updating. Also, asper the above defined rules, ν ≈ ν̄. Hence, from Theorem 1, weknow that the Shapley values of the first T players in PEP are noless than their values before updating Also, the Shapley values ofthe first T players in PEN are no more than their values before up-dating. Finally, the Shapley values of those players whose weightsare not updated remain unchanged.

The above method is described in Algorithm 2. Specifically, Step1 of the algorithm initializes w to ω. In Step 2, we find the average(µ) and the variance (ν) for the weights inw. In Step 3, we find ∆w

as δ×ω where 0 < δ < 1 is an input parameter4. Step 4 initializesthe average percentage difference (∆Φ) to zero. In the for loop ofStep 5, for each player 1 ≤ i ≤ n, we first use Algorithm 1 to findthe approximate Shapley value (ϕi). Then we find PEi which isthe absolute percentage difference between Φi and ϕi. In Step 9,we find the sum of PEi for all the n players. After exiting the forloop, in Step 11, we find the average absolute percentage difference(∆Φ). If (∆Φ > ε), then we enter the while loop of Step 12. Inthis loop we update the players weights using Algorithm 3. Then,for the updated weights, we recompute the Shapley values and ∆Φ.This is done in Steps 14 to 23 (which are the same as Steps 2 to 11).The while loop in Step 12 is repeated until ∆Φ becomes smallerthan ε. At this stage, Algorithm 2 returns the weights in w and theaverage percentage difference in ∆Φ.

Algorithm 3 works as follows. In Step 1, we initialize P and N .Recall that P (N ) denotes the number of players whose requiredShapley values are more (less) than their values from w. In the for4In Section 4.3, we show the effect of ∆w on the performance ofAlgorithm 2

939

Page 6: An Anytime Approximation Method for the Inverse Shapley Value Problem

0 2 4 6 8 10 120.05

0.06

0.07

0.08

0.09

0.1

0.11

Player

Shap

ley

valu

e

n=12 !w= 0.02 × " !I#

= 20%

RequiredInitialAfter 10 iterationsAfter 20 iterationsAfter 50 iterations

Figure 2: Convergence of the initial Shapley values to the re-quired values.

loop in Step 2, we compare Φi with ϕi (1 ≤ i ≤ n). If (Φi >ϕi), we store i in the first column of PEP and PEi in the secondcolumn. On the other hand, if (Φi < ϕi), we store i in the firstcolumn of PEN and PEi in the second column. Step 11 sorts therows of PEP and PEN in the decreasing order of their secondcolumn entries. Then, if the updating rule is Rule1, then in Step 13we initialize T to 1. However, if the updating rule is Rule2, then,in Step 16, we initialize T to Minimum(P , N ). Finally, in the forloop of Step 18, we increment (decrement) the weights of the firstT players in PEP (PEN ) by ∆w.

As explained earlier, both Rule 1 and Rule 2 ensure convergence.Hence, Algorithm 2 is an anytime algorithm; it can be stopped afterany number of iterations but the more the number of iterations, thesmaller the error ∆Φ.

We now analyze the time complexity of Algorithm 3 and thenthat of Algorithm 2. The time taken by the for loop in Step 2 ofAlgorithm 3 isO(n). The sorting in Step 11 takesO(nlogn) time.The time for the if statement of Step 12 is O(1), and that for theif statement of Step 15 is O(n). Finally, the time taken by the forloop of Step 18 isO(n). Hence the time complexity of Algorithm 3is O(nlogn). Now consider Algorithm 2. The time complexity ofthe for loop of Step 5 is O(n2). This is because the time complex-ity of finding the Shapley value (in Step 6 of Algorithm 2) usingAlgorithm 1 is O(n). Since the for loop of Step 5 is repeated ntimes, its complexity isO(n2). Consequently, the time taken to ex-ecute Steps 1 to 11 is alsoO(n2). We already know that them timetaken by Step 13 (i.e., Algorithm 3) is O(nlogn). The time takento execute Steps 14 to 23 is exactly the same as the time taken bySteps 2 to11 (i.e., O(n2)). Given this, the time taken by a singleiteration of the while loop of Step 12 isO(n2). Thus the time com-plexity of a single iteration of Algorithm 2 (by single iteration ofAlgorithm 2, we mean executing Steps 1 to 11 and then executingthe while loop in Step 12 once) is O(n2).

Since Algorithm 2 is an approximation, in addition to its timecomplexity, we also need to analyze its performance in terms ofthe approximation error ∆Φ. We do this experimentally5 in thefollowing section.

4. EXPERIMENTAL ANALYSISIn order to analyze the performance of Algorithm 2 in terms of itsapproximation error (∆Φ), we conducted experiments in a range ofsettings. The set up for our experiments is as follows. For a game5Future work will determine the bound on approximation error.

0 2 4 6 8 10 128

8.2

8.4

8.6

8.8

9

9.2

9.4

9.6

9.8

10

Player

Weig

hts

n=12 !w= 0.02 × " !I#

= 20%

InitialAfter 10 iterationsAfter 20 iterationsAfter 50 iterations

Figure 3: Variation in the players’ weights with the number ofiterations.

0 50 100 150 200 250 300 3500

10

20

30

40

50

60

70

80

90

Iterations

Aver

age

perc

enta

ge e

rror (

!w)

n=12 !w = 0.01× "

!I#

=15

!I#

=45

!I#

=70

!I#

=90

Figure 4: Effect of the initial error (∆IΦ) on ∆Φ.

of n players, we choose the initial weights ω as ω = 9. We do thisin order to ensure that for all our experiments, the weights of all theplayers are positive even after they are updated. Also, all the gameswe consider are two thirds majority games (i.e., q = (2/3) × n ×ω). For this set up, let ∆I

Φ denote ∆Φ for the initial weights (i.e.,w = ω). From Equation 12, we know that ∆Φ depends on ∆I

Φ,∆w, and n. Hence our objective is to study the effect of each ofthese three parameters on ∆Φ. Before doing so, we first consider asample voting game and show how the players’ Shapley values inϕ converge to those in Φ and how their weights in w vary with thenumber of iterations.

4.1 Convergence of ϕ to Φ for Rule1

For a game of n = 12 players, Figure 2 shows how ϕ convergesto Φ for each player, and Figure 3 shows the players’ weights at theend of each iteration. As seen in Figure 2, initially all the playershave equal values (i.e., ϕi = 1/12 for 1 ≤ i ≤ 12) because they allhave equal weights (i.e., wi = 9 for 1 ≤ i ≤ 12). But after everyiteration, the weights are updated such that the weight of a playerwhose value from w falls short of his required value is increasedby ∆w. Likewise, the weight of a player whose value from w is inexcess of his required value, is decremented by ∆w. For instance,consider player 8 in Figure 2. The initial Shapley value for thisplayer is 0.0825 but his required value is 0.09. Thus in Figure 3,the weight of this player is increased from 9 to 9.3. On the other

940

Page 7: An Anytime Approximation Method for the Inverse Shapley Value Problem

0 20 40 60 80 1000

5

10

15

20

25

30

35

Iteration

Aver

age

perc

enta

ge e

rror (

!"

)

n=12 !I"

= 35%

!w= 0.02 × #

!w= 0.1 × #

!w= 0.2 × #

!w= 0.25 × #

Figure 5: Effect of the weight increment (∆w) on ∆Φ.

hand, consider player 6. The initial Shapley value of this player is0.0825 but his required value is 0.075. Thus in Figure 3, his weightis decreased from 9 to 8.8. Likewise for all other players.

4.2 Effect of ∆IΦ on ∆Φ for Rule1

For a game of n = 12 players and ∆w = 0.01×ω, Figure 4 showshow ϕ converges to Φ for ∆I

Φ = 15%, ∆IΦ = 45%, ∆I

Φ = 70%,and ∆I

Φ = 90%. As can be seen, the number of iterations it takesfor ϕ to converge to Φ increases with ∆I

Φ. For an initial error of∆I

Φ = 15%, the error ∆IΦ drops to 2% within 25 iterations. But

for an initial error of ∆IΦ = 45%, it takes 250 iterations for the

error to drop to 2%, for ∆IΦ = 70% it takes 280 iterations, and for

∆IΦ = 90% it takes 300 iterations. Thus, as ∆I

Φ increases, ϕ getsfurther away from Φ and so the number of iterations it takes for ϕto converge to Φ also increases.

4.3 Effect of ∆w on ∆Φ for Rule1For a game of n = 12 players and an initial error of ∆I

Φ = 35%,Figure 5 shows how ∆Φ varies with the number of iterations. Asshown in the figure, for ∆w = 0.02 × ω the percentage error de-creases from 35% to 2% in 35 iterations. For ∆w = 0.1 × ω, theerror goes down to 10% in 7 iterations but remains constant afterthat. For ∆w = 0.2×ω, after 6 iterations the error remains constantat 15%. Finally, for ∆w = 0.25×ω, the error decreases to 30% intwo iterations but remains constant after that. Thus, for small ∆w,the weights are updated in small increments and so it takes longerfor ϕ to converge to Φ but, in the end, ϕ is closer to Φ. However,as ∆w increases, the weights are updated in bigger increments soinitially, ∆Φ decreases rapidly but it soon stops decreasing any fur-ther. Thus, the error (∆Φ), can be reduced by reducing ∆w.

4.4 Effect of n on ∆Φ for Rule1For a game of n players and ∆I

Φ = 35%, Figure 6 shows how ∆Φ

varies with n. We vary n and for each nwe find ∆Φ. Here, for eachn, we chose the weight increment (∆w) such that ∆Φ is minimum.As shown in the figure, for n = 12, the error ∆Φ decreases to 2%in 35 iterations. For n = 24, it takes 50 iterations, and for n = 36,it takes 65 iterations. This shows that, as n increases, it takes longerfor ϕ to converge to Φ. This is because, for small n, incrementing/decrementing a player’s weight by ∆w has a significant effect onnot only his percentage error but also on the average percentageerror of all the n players. However, as n increases, the effect ofupdating a single player’s weight by ∆w on the average percentageerror (∆Φ) decreases. As a result, convergence takes longer.

0 20 40 60 80 1000

5

10

15

20

25

30

35

Iterations

Aver

age

perc

enta

ge e

rror (

!"

)

!I"

= 35%

n = 12n = 24n = 36

Figure 6: Effect of the number of players (n) on ∆Φ.

0 20 40 60 80 1000

5

10

15

20

25

Iterations

Aver

age

erce

ntag

e er

ror (

!"

)

!I"

= 25% !w= 0.01 × #

n=12 Rule 2n=24 Rule 2n=36 Rule 2n=48 Rule 2n=12 Rule 1n=24 Rule 1n=36 Rule 1n=48 Rule 1

Figure 7: A comparison of convergence for Rule 1 and Rule 2.

4.5 A comparison of Rule1 and Rule2We then conducted experiments to analyze the effect of ∆I

Φ, ∆w,and n on ∆Φ, using Rule2. The results of these experiments weresimilar to those described in Sections 4.2, 4.3, and 4.4 for Rule1.However, a key difference in the performance of Rule1 and Rule2was found to be in terms of the rate of convergence. Figure 7compares the rate of convergence for the two rules. Here the ini-tial percentage error is ∆I

Φ = 25% and the weight increment is∆w = 0.01 × ω. For this set up, we vary the number of playersbetween n = 12 and n = 48, and for each n, we compare theaverage percentage errors (∆Φ) for Rule 1 and Rule 2 at the end ofeach iteration. As shown in the figure, for a game of 12 players, ittakes 5 iterations for ϕ to converge to Φ using Rule 2. For the samenumber of players, it takes 45 iterations using Rule 1. Likewise forother values of n. Since Rule 2 updates the weights of 2T players,it reduces the percentage error for the 2T players in each iteration.In contrast, Rule1 updates the weights of only 2 players in eachiteration. Hence the convergence of ϕ to Φ is faster for Rule2.

5. RELATED WORKThis section discusses the existing literature on methods for findingthe Shapley value and also the literature on methods for solving theinverse Shapley value problem. For the Shapley value, two types ofmethods have been proposed: exact and approximate. These meth-ods vary in their approach and computing requirements. Amongthe exact methods, we have [11, 1, 7, 8]. While they all give theexact Shapley value, they each have disadvantages. These include

941

Page 8: An Anytime Approximation Method for the Inverse Shapley Value Problem

requiring exponential time [11], a large memory space [11], or aspecific representation6 for the voting game [1, 7, 8].

In order to overcome the problem of computational complexity,approximation methods were developed. The earliest such methodwas proposed by Mann and Shapley [10]. This method is basedon Monte Carlo simulation and estimates the Shapley value from arandom sample of coalitions. The advantage of this method is itslinear time complexity. However, its disadvantage is that it doesnot give details of how the samples are to be taken, which has asignificant impact on the method’s effectiveness. The multi-linearextension (MLE) approximation method proposed by Owen [14]uses randomization. Its advantage is that it has time complexitylinear in the number of players. However, in practice, it only givesa good approximation for games with many small weights and nolarge weights. A modified MLE approximation method of [9] hasa lower approximation error than the original version, but it hasexponential time complexity. The method proposed in [5] uses ran-domization to find the approximate Shapley value. Like Owen’s,this method too has linear time complexity. However, as mentionedbefore, Owen’s method, only works well for those game with manysmall weights and no large weights [14]. In contrast, [5] works forall weights. Hence we use it to find an approximate Shapley value.

We now turn to the literature on solving the inverse problem. Forcoalition games in general, and the weighted voting game in partic-ular, the Shapley value [17] provides a measure of a player’s power.But as explained in Section 2.2, a player’s weight in a voting gamecannot be interpreted as his power. Thus the work in [3] uses a dif-ferent weight scheme. For a coalition game 〈N, v〉, this scheme al-lows a player’s weight to be interpreted as his power. However, forthis new scheme, the function v is not the same as that described inSection 2.1. Also, for this new scheme, solving the inverse problemrequires finding the function v for a coalition game 〈N, v〉 such thatit generates some required weighted Shapley values. To this end, analgorithm was proposed in [3]. For a coalition game of n players,this algorithm has time complexity O(2nlog22n), i.e., exponentialin the number of players. There are three key differences betweenthis work and our’s. First, the method we propose is for solvingthe inverse problem for the Shapley value as proposed in [17] andnot for the weight scheme presented in [3]. Second, as shown inSection 3, the time complexity of our method is polynomial in thenumber of players, while that for [3] is exponential. Finally, unlike[3], we present an anytime solution.

6. CONCLUSIONSThis paper presents a computationally efficient approximation methodfor solving the inverse Shapley value problem. The method is basedon the technique of ‘successive approximations’. It starts with aninitial assignment of weights to the players and then iteratively up-dates the weights such that the Shapley values after each iterationget closer to the required values. This is an anytime method; theiterative process can be stopped after any number of iterations, butthe greater the number of iterations, the better the approximation.For a voting game of n players, the time complexity of a singleiteration is O(n2). The paper also presents an analysis of the per-formance of this method in terms of its approximation error andthe rate of convergence of an initial solution to the required one.Specifically, it shows that the approximation error decreases aftereach iteration, and the rate of convergence decreases with the num-ber of players and with the initial percentage error.

In future, we would like to generalise our method so that it works

6Note that transforming a voting game into these specific formsrequires additional computational time.

not just for the Shapley value but also for other power indices suchas the Banzhaf index and the Coleman index. We would also liketo generalize our method so that it solves the inverse problem notjust for the voting game but also for other coalitional games. Fi-nally, our present analysis focused on an experimental analysis ofconvergence. In future, we need to determine the bound for theapproximation error for our method.

7. REFERENCES[1] V. Conitzer and T. Sandholm. Computing Shapley values,

manipulating value division schemes, and checking coremembership in multi-issue domains. In Proceedings of theNational Conference on Artificial Intelligence, pages219–225, San Jose, California, 2004.

[2] X. Deng and C. H. Papadimitriou. On the complexity ofcooperative solution concepts. Mathematics of OperationsResearch, 19(2):257–266, 1994.

[3] I. C. Dragan. The potential basis and the weighted Shapleyvalue. Libertas Mathematica, XI:139–150, 1991.

[4] E. Elkind, L. A. Goldberg, P. Goldberg, and M. Wooldridge.Computational complexity of weighted threshold games. InProceedings of AAAI-2007, pages 718–723, 2007.

[5] S. S. Fatima, M. Wooldridge, and N. R. Jennings. Arandomized method for the Shapley value for the votinggame. In Proc. Sixth Int. Conference on Autonomous Agentsand Multi-agent Systems, pages 955–962, 2007.

[6] A. Francis. Advanced Level Statistics. Stanley ThornesPublishers, 1979.

[7] S. Ieong and Y. Shoham. Marginal contribution nets: Acompact representation scheme for coalitional games. InProceedings of the Sixth ACM Conference on ElectronicCommerce, pages 193–202, Vancouver, Canada, 2005.

[8] S. Ieong and Y. Shoham. Multi-attribute coalition games. InProceedings of the Seventh ACM Conference on ElectronicCommerce, pages 170–179, Ann Arbor, Michigan, 2006.

[9] D. Leech. Computing power indices for large voting games.Management Science, 49(6):831–837, 2003.

[10] I. Mann and L. S. Shapley. Values for large games iv:Evaluating the electoral college by Monte Carlo techniques.Technical report, The RAND Corporation, Santa Monica,1960.

[11] I. Mann and L. S. Shapley. Values for large games iv:Evaluating the electoral college exactly. Technical report,The RAND Corporation, Santa Monica, 1962.

[12] M. J. Osborne and A. Rubinstein. A Course in Game Theory.The MIT Press, 1994.

[13] G. Owen. A note on the Shapley value. ManagementScience, 14:731–732, 1968.

[14] G. Owen. Multilinear extensions of games. ManagementScience, 18(5):64–79, 1972.

[15] J. S. Rosenschein and G. Zlotkin. Rules of Encounter. MITPress, 1994.

[16] A. E. Roth. Introduction to the Shapley value. In A. E. Roth,editor, The Shapley value, pages 1–27. University ofCambridge Press, Cambridge, 1988.

[17] L. S. Shapley. A value for n person games. In A. E. Roth,editor, The Shapley value, pages 31–40. University ofCambridge Press, Cambridge, 1988.

[18] O. Shehory and S. Kraus. Methods for task allocation viaagent coalition formation. Artificial Intelligence Journal,101(2):165–200, 1998.

942