Price of anarchy

From HandWiki
Revision as of 21:33, 8 February 2024 by WikiG (talk | contribs) (correction)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Price of Anarchy (PoA) [1] is a concept in economics and game theory that measures how the efficiency of a system degrades due to selfish behavior of its agents. It is a general notion that can be extended to diverse systems and notions of efficiency. For example, consider the system of transportation of a city and many agents trying to go from some initial location to a destination. Let efficiency in this case mean the average time for an agent to reach the destination. In the 'centralized' solution, a central authority can tell each agent which path to take in order to minimize the average travel time. In the 'decentralized' version, each agent chooses its own path. The Price of Anarchy measures the ratio between average travel time in the two cases. Usually the system is modeled as a game and the efficiency is some function of the outcomes (e.g. maximum delay in a network, congestion in a transportation system, social welfare in an auction, etc.). Different concepts of equilibrium can be used to model the selfish behavior of the agents, among which the most common is the Nash equilibrium. Different flavors of Nash equilibrium lead to variations of the notion of Price of Anarchy as Pure Price of Anarchy (for deterministic equilibria), Mixed Price of Anarchy (for randomized equilibria), and Bayes–Nash Price of Anarchy (for games with incomplete information). Solution concepts other than Nash equilibrium lead to variations such as the Price of Sinking.[2]

The term Price of Anarchy was first used by Elias Koutsoupias and Christos Papadimitriou,[1][failed verification] but the idea of measuring inefficiency of equilibrium is older.[3] The concept in its current form was designed to be the analogue of the 'approximation ratio' in an approximation algorithm or the 'competitive ratio' in an online algorithm. This is in the context of the current trend of analyzing games using algorithmic lenses (algorithmic game theory).

Mathematical definition

Consider a game [math]\displaystyle{ G=(N,S,u) }[/math], defined by a set of players [math]\displaystyle{ N }[/math], strategy sets [math]\displaystyle{ S_i }[/math] for each player and utilities [math]\displaystyle{ u_i: S \rightarrow \mathbb{R} }[/math] (where [math]\displaystyle{ S = S_1 \times ... \times S_n }[/math] also called set of outcomes). We can define a measure of efficiency of each outcome which we call welfare function [math]\displaystyle{ \operatorname{Welf}: S \rightarrow \mathbb{R} }[/math]. Natural candidates include the sum of players utilities (utilitarian objective) [math]\displaystyle{ \operatorname{Welf}(s) = \sum_{i \in N} u_i(s), }[/math] minimum utility (fairness or egalitarian objective) [math]\displaystyle{ \operatorname{Welf}(s) = \min_{i \in N} u_i(s), }[/math] ..., or any function that is meaningful for the particular game being analyzed and is desirable to be maximized.

We can define a subset [math]\displaystyle{ Equil \subseteq S }[/math] to be the set of strategies in equilibrium (for example, the set of Nash equilibria). The Price of Anarchy is then defined as the ratio between the 'worst equilibrium' and the optimal 'centralized' solution:

[math]\displaystyle{ PoA = \frac{\max_{s \in S} \operatorname{Welf}(s)}{\min_{s \in Equil} \operatorname{Welf}(s)} }[/math]

If, instead of a 'welfare' which we want to 'maximize', the function measure efficiency is a 'cost function' [math]\displaystyle{ \operatorname{Cost} : S \rightarrow \mathbb{R} }[/math] which we want to 'minimize' (e.g. delay in a network) we use (following the convention in approximation algorithms):

[math]\displaystyle{ PoA = \frac{\max_{s \in Equil} \operatorname{Cost}(s)}{\min_{s \in S} \operatorname{Cost}(s)} }[/math]

A related notion is that of the Price of Stability (PoS) which measures the ratio between the 'best equilibrium' and the optimal 'centralized' solution:

[math]\displaystyle{ PoS = \frac{\max_{s \in S} \operatorname{Welf}(s)}{\max_{s \in Equil} \operatorname{Welf}(s)} }[/math]

or in the case of cost functions:

[math]\displaystyle{ PoS = \frac{\min_{s \in Equil} \operatorname{Cost}(s)}{\min_{s \in S} \operatorname{Cost}(s)} }[/math]

We know that [math]\displaystyle{ 1 \leq PoS \leq PoA }[/math] by the definition. It is expected that the loss in efficiency due to game-theoretical constraints is somewhere between 'PoS' and 'PoA'.

Both the PoS and the PoA have been calculated for various types of games. Some examples are presented below.


Prisoner's dilemma

Consider the 2x2 game called prisoner's dilemma, given by the following cost matrix:

Cooperate Defect
Cooperate 1, 1 7, 0
Defect 0, 7 5, 5

and let the cost function be [math]\displaystyle{ C(s_1, s_2) = u_1(s_1,s_2) + u_2(s_1,s_2). }[/math] Now, the worst (and only) Nash Equilibrium would be when both players defect and the resulting cost is [math]\displaystyle{ C_{equil} = 5 + 5 = 10 }[/math]. However, the highest social welfare occurs when both cooperate, in which case the cost is [math]\displaystyle{ C_{min} = 1 + 1 = 2 }[/math]. Thus the PoA of this game will be [math]\displaystyle{ C_{equil}/C_{min} = 10/2 = 5 }[/math].

Since the game has a unique Nash equilibrium, the PoS is equal to the PoA and it is 5 too.

Job scheduling

A more natural example is the one of job scheduling. There are [math]\displaystyle{ N }[/math] players and each of them has a job to run. They can choose one of [math]\displaystyle{ M }[/math] machines to run the job. The Price of Anarchy compares the situation where the selection of machines is guided/directed centrally to the situation where each player chooses the machine that will make its job run fastest.

Each machine has a speed [math]\displaystyle{ s_1,\ldots,s_M\gt 0. }[/math] Each job has a weight [math]\displaystyle{ w_1,\ldots,w_N\gt 0. }[/math] A player picks a machine to run his or her job on. So, the strategies of each player are [math]\displaystyle{ A_i=\{1,2,\ldots,M\}. }[/math] Define the load on machine [math]\displaystyle{ j }[/math] to be:

[math]\displaystyle{ L_j(a)=\frac{\sum_{i:a_i=j} w_i}{s_j}. }[/math]

The cost for player [math]\displaystyle{ i }[/math] is [math]\displaystyle{ c_i(a)=L_{a_i}(a), }[/math] i.e., the load of the machine they chose. We consider the egalitarian cost function [math]\displaystyle{ \mbox{MS}(a)=\max_j L_j(a) }[/math], here called the makespan.

We consider two concepts of equilibrium: pure Nash and mixed Nash. It should be clear that mixed PoA ≥ pure PoA, because any pure Nash equilibrium is also a mixed Nash equilibrium (this inequality can be strict: e.g. when [math]\displaystyle{ N=2 }[/math], [math]\displaystyle{ w_1=w_2=1 }[/math], [math]\displaystyle{ M=2 }[/math], and [math]\displaystyle{ s_1=s_2=1 }[/math], the mixed strategies [math]\displaystyle{ \sigma_1=\sigma_2=(1/2,1/2) }[/math] achieve an average makespan of 1.5, while any pure-strategy PoA in this setting is [math]\displaystyle{ \leq 4/3 }[/math]). First we need to argue that there exist pure Nash equilibria.

Claim. For each job scheduling game, there exists at least one pure-strategy Nash equilibrium.

Proof. We would like to take a socially optimal action profile [math]\displaystyle{ a^* }[/math]. This would mean simply an action profile whose makespan is minimum. However, this will not be enough. There may be several such action profiles leading to a variety of different loads distributions (all having the same maximum load). Among these, we further restrict ourselves to one that has a minimum second-largest load. Again, this results in a set of possible load distributions, and we repeat until the [math]\displaystyle{ M }[/math]th-largest (i.e., smallest) load, where there can only be one distribution of loads (unique up to permutation). This would also be called the lexicographic smallest sorted load vector.

We claim that this is a pure-strategy Nash equilibrium. Reasoning by contradiction, suppose that some player [math]\displaystyle{ i }[/math] could strictly improve by moving from machine [math]\displaystyle{ j }[/math] to machine [math]\displaystyle{ k }[/math]. This means that the increased load of machine [math]\displaystyle{ k }[/math] after the move is still smaller than the load of machine [math]\displaystyle{ j }[/math] before the move. As the load of machine [math]\displaystyle{ j }[/math] must decrease as a result of the move and no other machine is affected, this means that the new configuration is guaranteed to have reduced the [math]\displaystyle{ j }[/math]th-largest (or higher ranked) load in the distribution. This, however, violates the assumed lexicographic minimality of [math]\displaystyle{ a }[/math]. Q.E.D.

Claim. For each job scheduling game, the pure PoA is at most [math]\displaystyle{ M }[/math].

Proof. It is easy to upper-bound the welfare obtained at any mixed-strategy Nash equilibrium [math]\displaystyle{ \sigma }[/math] by

[math]\displaystyle{ w(\sigma) \leq \frac{\sum_i{w_i}}{\max_j{s_j}}. }[/math]

Consider, for clarity of exposition, any pure-strategy action profile [math]\displaystyle{ a }[/math]: clearly

[math]\displaystyle{ w(a) \geq \frac{\sum_i{w_i}}{\sum_j{s_j}} \geq \frac{\sum_i{w_i}}{M \cdot \max_j{s_j}}. }[/math]

Since the above holds for the social optimum as well, comparing the ratios [math]\displaystyle{ w(\sigma) }[/math] and [math]\displaystyle{ w(a) }[/math] proves the claim. Q.E.D

Selfish Routing

Braess's paradox

Main page: Braess's paradox
Braess paradox road example.svg

Consider a road network as shown in the adjacent diagram on which 4000 drivers wish to travel from point Start to End. The travel time in minutes on the Start–A road is the number of travelers (T) divided by 100, and on Start–B is a constant 45 minutes (likewise with the roads across from them). If the dashed road does not exist (so the traffic network has 4 roads in total), the time needed to drive Start–A–End route with [math]\displaystyle{ a }[/math] drivers would be [math]\displaystyle{ \tfrac{a}{100} + 45 }[/math]. The time needed to drive the Start–B–End route with [math]\displaystyle{ b }[/math] drivers would be [math]\displaystyle{ \tfrac{b}{100} + 45 }[/math]. As there are 4000 drivers, the fact that [math]\displaystyle{ a + b = 4000 }[/math] can be used to derive the fact that [math]\displaystyle{ a = b = 2000 }[/math] when the system is at equilibrium. Therefore, each route takes [math]\displaystyle{ \tfrac{2000}{100} + 45 = 65 }[/math] minutes. If either route took less time, it would not be a Nash equilibrium: a rational driver would switch from the longer route to the shorter route.

Now suppose the dashed line A–B is a road with an extremely short travel time of approximately 0 minutes. Suppose that the road is opened and one driver tries Start–A–B–End. To his surprise he finds that his time is [math]\displaystyle{ \tfrac{2000}{100} + \tfrac{2001}{100} = 40.01 }[/math] minutes, a saving of almost 25 minutes. Soon, more of the 4000 drivers are trying this new route. The time taken rises from 40.01 and keeps climbing. When the number of drivers trying the new route reaches 2500, with 1500 still in the Start–B–End route, their time will be [math]\displaystyle{ \tfrac{2500}{100} + \tfrac{4000}{100} = 65 }[/math] minutes, which is no improvement over the original route. Meanwhile, those 1500 drivers have been slowed to [math]\displaystyle{ 45 + \tfrac{4000}{100} = 85 }[/math] minutes, a 20-minute increase. They are obliged to switch to the new route via A too, so it now takes [math]\displaystyle{ \tfrac{4000}{100} + \tfrac{4000}{100} = 80 }[/math] minutes. Nobody has any incentive to travel A-End or Start-B because any driver trying them will take 85 minutes. Thus, the opening of the cross route triggers an irreversible change to it by everyone, costing everyone 80 minutes instead of the original 65. If every driver were to agree not to use the A–B path, or if that route were closed, every driver would benefit by a 15-minute reduction in travel time.

Generalized routing problem

The routing problem introduced in the Braess's paradox can be generalized to many different flows traversing the same graph at the same time.

Definition (Generalized flow). Let [math]\displaystyle{ G=(V, E) }[/math], [math]\displaystyle{ L }[/math] and [math]\displaystyle{ w }[/math] be as defined above, and suppose that we want to route the quantities [math]\displaystyle{ R = \{ r_1, r_2, \dots, r_k, \; | \; r_i \gt 0\} }[/math] through each distinct pair of nodes in [math]\displaystyle{ \Gamma = \{(s_1,t_1), (s_2,t_2), \dots, (s_k,t_k) \} \subseteq (V \times V) }[/math]. A flow [math]\displaystyle{ f_{\Gamma, R} }[/math] is defined as an assignment [math]\displaystyle{ p \mapsto \Re }[/math] of a real, nonnegative number to each path [math]\displaystyle{ p }[/math] going from [math]\displaystyle{ s_i }[/math] to [math]\displaystyle{ t_i }[/math] [math]\displaystyle{ \in \Gamma }[/math], with the constraint that

[math]\displaystyle{ \sum_{p: \, s_i \rightarrow t_i}{f_p} = r_i \; \; \forall (s_i,t_i) \in \Gamma. }[/math]

The flow traversing a specific edge of [math]\displaystyle{ G }[/math] is defined as

[math]\displaystyle{ f_{e,\Gamma, R}=\sum_{p: \, e \in p}{f_p}. }[/math]

For succinctness, we write [math]\displaystyle{ f_e }[/math] when [math]\displaystyle{ \Gamma,R }[/math] are clear from context.

Definition (Nash-equilibrium flow). A flow [math]\displaystyle{ f_{\Gamma, R} }[/math] is a Nash-equilibrium flow iff [math]\displaystyle{ \forall (s_i, t_i) \in \Gamma }[/math] and [math]\displaystyle{ \forall p, q }[/math] from [math]\displaystyle{ s_i }[/math] to [math]\displaystyle{ t_i }[/math]

[math]\displaystyle{ f_{p}\gt 0 \Rightarrow \sum_{e \in p}{l_e(f_e)} \leq \sum_{e \in q}{l_e(f_e)}. }[/math]

This definition is closely related to what we said about the support of mixed-strategy Nash equilibria in normal-form games.

Definition (Conditional welfare of a flow). Let [math]\displaystyle{ f_{\Gamma, R} }[/math] and [math]\displaystyle{ f_{\Gamma, R}^{*} }[/math] be two flows in [math]\displaystyle{ G }[/math] associated with the same sets [math]\displaystyle{ \Gamma }[/math] and [math]\displaystyle{ R }[/math]. In what follows, we will drop the subscript to make the notation clearer. Assume to fix the latencies induced by [math]\displaystyle{ f }[/math] on the graph: the conditional welfare of [math]\displaystyle{ f^{*} }[/math] with respect to [math]\displaystyle{ f }[/math] is defined as

[math]\displaystyle{ w^{f}(f^{*}) = \sum_{e \in E}{f^{*}_e \cdot l_{e}(f_{e})} }[/math]

Fact 1. Given a Nash-equilibrium flow [math]\displaystyle{ f }[/math] and any other flow [math]\displaystyle{ f^{*} }[/math], [math]\displaystyle{ w(f) = w^{f}(f) \leq w^{f}(f^{*}) }[/math].

Proof (By contradiction). Assume that [math]\displaystyle{ w^{f}(f^{*}) \lt w^{f}(f) }[/math]. By definition,

[math]\displaystyle{ \sum_{i=1}^{k} \sum_{p: s_i \rightarrow t_i} f_p^{*} \cdot \sum_{e \in p} l_e(f_e) \lt \sum_{i=1}^{k} \sum_{p: s_i \rightarrow t_i} f_p \cdot \sum_{e \in p} l_e(f_e) }[/math].

Since [math]\displaystyle{ f }[/math] and [math]\displaystyle{ f^{*} }[/math] are associated with the same sets [math]\displaystyle{ \Gamma, R }[/math], we know that

[math]\displaystyle{ \sum_{p: s_i \rightarrow t_i}f_p = \sum_{p: s_i \rightarrow t_i} f_p^{*} = r_i \; \; \forall i. }[/math]

Therefore, there must be a pair [math]\displaystyle{ (s_i, t_i) }[/math] and two paths [math]\displaystyle{ p, q }[/math] from [math]\displaystyle{ s_i }[/math] to [math]\displaystyle{ t_i }[/math] such that [math]\displaystyle{ f_p^{*} \gt f_p }[/math], [math]\displaystyle{ f_q^{*} \lt f_q }[/math], and

[math]\displaystyle{ \sum_{e \in p}l_e(f_e) \lt \sum_{e \in q}l_e(f_e). }[/math]

In other words, the flow [math]\displaystyle{ f^{*} }[/math] can achieve a lower welfare than [math]\displaystyle{ f }[/math] only if there are two paths from [math]\displaystyle{ s_i }[/math] to [math]\displaystyle{ t_i }[/math] having different costs, and if [math]\displaystyle{ f^{*} }[/math] reroutes some flow of [math]\displaystyle{ f }[/math] from the higher-cost path to the lower-cost path. This situation is clearly incompatible with the assumption that [math]\displaystyle{ f }[/math] is a Nash-equilibrium flow. Q.E.D.

Note that Fact 1 does not assume any particular structure on the set [math]\displaystyle{ L }[/math].

Fact 2. Given any two real numbers [math]\displaystyle{ x }[/math] and [math]\displaystyle{ y }[/math], [math]\displaystyle{ x \cdot y \leq x^2 + y^{2}/4 }[/math].

Proof. This is another way to express the true inequality [math]\displaystyle{ (x-y/2)^2 \geq 0 }[/math]. Q.E.D.

Theorem. The pure PoA of any generalized routing problem [math]\displaystyle{ (G, L) }[/math] with linear latencies is [math]\displaystyle{ \leq 4/3 }[/math].

Proof. Note that this theorem is equivalent to saying that for each Nash-equilibrium flow [math]\displaystyle{ f }[/math], [math]\displaystyle{ w(f) \leq (4/3) \cdot \min_{f^{*}} \{ w(f^{*}) \} }[/math], where [math]\displaystyle{ f^{*} }[/math] is any other flow. By definition,

[math]\displaystyle{ w^{f}(f^{*}) = \sum_{e \in E} f_e^{*}(a_e \cdot f_e + b_e) }[/math]
[math]\displaystyle{ = \sum_{e}(a_{e}f_{e}f_{e}^{*}) + \sum_{e \in E}f_e^{*}b_e. }[/math]

By using Fact 2, we have that

[math]\displaystyle{ w^{f}(f^{*}) \leq \sum_{e \in E} \left( a_e \cdot \left( (f_e^{*})^2 + (f_e)^{2}/4 \right) \right) + \sum_{e \in E} f_e^{*} \cdot b_e }[/math]
[math]\displaystyle{ = \left( \sum_{e \in E} a_e(f_e^{*})^2 + f_e^{*}b_e \right) + \sum_{e \in E} a_{e}(f_e)^{2}/4 }[/math]
[math]\displaystyle{ \leq w(f^{*}) + \frac{w(f)}{4}, }[/math]

since

[math]\displaystyle{ (1/4) \cdot w(f) = (1/4) \cdot \sum_{e \in E}f_e(a_{e}f_{e}+b_{e}) }[/math]
[math]\displaystyle{ = (1/4) \cdot \sum_{e \in E}(f_{e})^2 + \underbrace{(1/4) \cdot \sum_{e \in E}f_{e}b_{e}}_{\geq 0}. }[/math]

We can conclude that [math]\displaystyle{ w^{f}(f^{*}) \leq w(f^{*}) + w(f)/4 }[/math], and prove the thesis using Fact 1. Q.E.D.

Note that in the proof we have made extensive use of the assumption that the functions in [math]\displaystyle{ L }[/math] are linear. Actually, a more general fact holds.

Theorem. Given a generalized routing problem with graph [math]\displaystyle{ G }[/math] and polynomial latency functions of degree [math]\displaystyle{ d }[/math] with nonnegative coefficients, the pure PoA is [math]\displaystyle{ \leq d+1 }[/math].

Note that the PoA can grow with [math]\displaystyle{ d }[/math]. Consider the example shown in the following figure, where we assume unit flow: the Nash-equilibrium flows have social welfare 1; however, the best welfare is achieved when [math]\displaystyle{ x=1-1/{\sqrt{d+1}} }[/math], in which case

[math]\displaystyle{ w = \left( 1-\frac{1}{\sqrt{d+1}} \right)^d \cdot \left( 1-\frac{1}{\sqrt{d+1}} \right) + 1 \cdot \frac{1}{\sqrt{d+1}} }[/math]
[math]\displaystyle{ =\left(\left( 1-\frac{1}{\sqrt{d+1}} \right)^{\sqrt{d+1}}\right)^\sqrt{d+1}+\frac{1}{\sqrt{d+1}} }[/math]
[math]\displaystyle{ \leq e^{-\sqrt{d+1}} + \frac{1}{\sqrt{d+1}}. }[/math]

This quantity tends to zero when [math]\displaystyle{ d }[/math] tends to infinity.

See also

References

  1. 1.0 1.1 Koutsoupias, Elias; Papadimitriou, Christos (May 2009). "Worst-case Equilibria". Computer Science Review 3 (2): 65–69. doi:10.1016/j.cosrev.2009.04.003. http://www.cs.berkeley.edu/~christos/nash.ps. Retrieved 2010-09-12. 
  2. M. Goemans, V. Mirrokni, A. Vetta, Sink equilibria and convergence, FOCS 05
  3. P. Dubey. Inefficiency of Nash equilibria. Math. Operat. Res., 11(1):1–8, 1986

Further reading