- Price of anarchy
The

**price of anarchy**is a concept fromgame theory that describes the difference in maximum socialutility and the utility of an equilibrium point of the game.**Definition**Given a game $G=(N,A,u)$, it is natural to consider the "social welfare", i.e. how to maximize the utility to all players. There are many possible social welfare functions including the following

"Utilitarian" function:$w(a)\; =\; sum\_\{i=1\}^N\; u\_i(a)$

"Egalitarian" function,:$w(a)\; =\; min\_i\; u\_i(a)$

The "social optimum" maximizes $w(a)$ over all possible action profiles, $a\; in\; A$.

Typically, the social optimum is not reached, because each of the players is only interested in their outcome.

The "price of anarchy" (PoA) is a measure of how well people do when they play selfishly (

Nash equilibrium ) versus choosing the social optimum. The PoA is defined as the ratio of the social optimum welfare to the welfare of the worstNash equilibrium . In other words, it is the ratio of the largest social welfare achievable to the least social welfare achieved at any Nash equilibrium.The "pure" price of anarchy considers only "pure" Nash equilibria, i.e., Nash equilibria in which all players play pure strategies (no randomization or mixed strategies). Of course, this equilibrium may not always exist.

The term "price of anarchy" (

**PoA**) was invented by Papadimitriou and has been recognized by computer scientists as an important game theoretic concept. Although it is not inherently acomputer science term, it is one of the recent contributions of computer science to game theory. The price of anarchy provides a new measure for the quality of an equilibrium.**Example: price of anarchy in job scheduling**An example of the price of anarchy is job scheduling. In this setting, there are $N$ jobs (players) and $M$ machines. Each machine has a speed $s\_1,ldots,s\_M>0$. Each job has a weight $w\_1,ldots,w\_N>0$.A player picks a machine to run his or her job on. So, the actions of each player are $A\_i=\{1,2,ldots,M\}$.

Define the "load" on machine $j$ to be:

:$L\_j(a)=frac\{sum\_\{i:a\_i=j\}\; w\_i\}\{s\_j\}.$

The utility for player $i$ is $u\_i(a)=-L\_\{a\_i\}(a)$, i.e., the negative load of the machine she chose. For notational ease, we will define costs $c\_i=-u\_i$ so we can talk about positive costs instead of negative utilities.So $c\_i(a)=L\_\{a\_i\}(a)$. In this case, we will consider the egalitarian welfare, i.e., try to minimize the maximum load. This quantity $mbox\{MS\}(a)=max\_j\; L\_j(a)$ is called the "makespan."

For this problem, which involves costs, we will consider the PoA to be the ratio of the largest MS for any Nash equilibria to the smallest possible MS. 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 $N=2$, $w\_1=w\_2=1$, $M=2$, and $s\_1=s\_2=1$, the mixed strategies $sigma\_1=sigma\_2=(1/2,1/2)$ achieve an average makespan of 1.5, while any pure-strategy PoA in this setting is $leq\; 4/3$). 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 $a^*$. 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 $M$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. Suppose not. Suppose that some player $i$ could strictly improve by moving from machine $j$ to machine $k$. This means that the larger of the two loads must go down, because $i$ must have been using the machine with larger load in both cases. But this violates the lexicographic minimality of $a$.

**"Q.E.D."****Claim**. For each job scheduling game, the pure PoA is at most $M$.**Proof**. It is easy to upper-bound the welfare obtained at any mixed-strategy Nash equilibrium $sigma$ by:$w(sigma)\; leq\; frac\{sum\_i\{w\_i\{max\_j\{s\_j.$

Consider, for clarity of exposition, any pure-strategy action profile $a$: clearly

:$w(a)\; geq\; frac\{sum\_i\{w\_i\{sum\_j\{s\_j\; geq\; frac\{sum\_i\{w\_i\{M\; cdot\; max\_j\{s\_j.$

Since the above holds for the social optimum as well, correlating the ratios $w(sigma)$ and $w(a)$ proves the claim.

**"Q.E.D"****Price of anarchy in routing****Braess' paradox**Consider a road network in which a fixed number of drivers need to move from a common source to a common destination; assume that each driver chooses its route selfishly, and that the time to traverse a road depends linearly on the number of drivers choosing that road. We can formalize this setting as a routing problem in a directed, connected graph $G=(V,\; E)$, in which we want to send one unit of flow from a source node $s\; in\; V$ to a destination node $t\; in\; V$ (imagine the flow to be composed of the travel decisions of the different drivers). In particular, let the flow be a function $f:\; E\; mapsto\; Re$ assigning to each edge a non-negative real number, and consider the set of linear functions $L\; =\; \{\; l\_e(f\_e)\; =\; a\; cdot\; f\_e\; +\; b\; ;\; |\; ;\; e\; in\; E,\; ;\; a\; geq\; 0,\; ;\; b\; geq\; 0\}$ that map the flow traversing each edge to the latency to traverse the edge. Let's also define the social welfare of a flow $f$ as $w(f)\; =\; sum\_e\{f\_e\; cdot\; l\_e(f\_e)\}$

Consider the example in the figure: if the dashed road is not available, the mixed-strategy Nash equilibrium happens when each player chooses the top route and the bottom route with the same probability: this equilibrium has social welfare 1.5, and it takes 1.5 units of time to each driver to go from $s$ to $t$. Hoping to improve the performance of the network, a legislator could decide to make the dashed, low-latency edge available to the drivers: in this case, the only Nash equilibrium would happen when every driver uses the new road, therefore the social welfare would increase to 2 and now it would take 2 units of time to each player to go from $s$ to $t$.

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

**Definition (Generalized flow)**. Let $G=(V,\; E)$, $L$ and $w$ be as defined above, and suppose that we want to route the quantities $R\; =\; \{\; r\_1,\; r\_2,\; dots,\; r\_k,\; ;\; |\; ;\; r\_i\; >\; 0\}$ through each distinct pair of nodes in $Gamma\; =\; \{(s\_1,t\_1),\; (s\_2,t\_2),\; dots,\; (s\_k,t\_k)\; \}\; subseteq\; (V\; imes\; V)$.A "flow" $f\_\{Gamma,\; R\}$ is defined as an assignment $p\; mapsto\; Re$ of a real, nonnegative number to each "path" $p$ going from $s\_i$ to $t\_i$ $in\; Gamma$, with the constraint that:$sum\_\{p:\; ,\; s\_i\; ightarrow\; t\_i\}\{f\_p\}\; =\; r\_i\; ;\; ;\; forall\; (s\_i,t\_i)\; in\; Gamma.$

The flow traversing a specific edge of $G$ is defined as

:$f\_\{e,Gamma,\; R\}=sum\_\{p:\; ,\; e\; in\; p\}\{f\_p\}.$

For succinctness, we write $f\_e$ when $Gamma,R$ are clear from context.

**Definition (Nash-equilibrium flow)**. A flow $f\_\{Gamma,\; R\}$ is a "Nash-equilibrium flow" iff $forall\; (s\_i,\; t\_i)\; in\; Gamma$ and $forall\; p,\; q$ from $s\_i$ to $t\_i$:$f\_\{p\}>0\; Rightarrow\; sum\_\{e\; in\; p\}\{l\_e(f\_e)\}\; leq\; sum\_\{e\; in\; q\}\{l\_e(f\_e)\}.$

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 $f\_\{Gamma,\; R\}$ and $f\_\{Gamma,\; R\}^\{*\}$ be two flows in $G$ associated with the same sets $Gamma$ and $R$. In what follows, we will drop the subscript to make the notation clearer. Assume to fix the latencies induced by $f$ on the graph: the "conditional welfare" of $f^\{*\}$ with respect to $f$ is defined as :$w^\{f\}(f^\{*\})\; =\; sum\_\{e\; in\; E\}\{f^\{*\}\_e\; cdot\; l\_\{e\}(f\_\{e\})\}$**Fact 1**. Given a Nash-equilibrium flow $f$ and any other flow $f^\{*\}$, $w(f)\; =\; w^\{f\}(f)\; leq\; w^\{f\}(f^\{*\})$.**Proof (By contradiction)**. Assume that $w^\{f\}(f^\{*\})\; <\; w^\{f\}(f)$. By definition,:$sum\_\{i=1\}^\{k\}\; sum\_\{p:\; s\_i\; ightarrow\; t\_i\}\; f\_p^\{*\}\; cdot\; sum\_\{e\; in\; p\}\; l\_e(f\_e)\; <\; sum\_\{i=1\}^\{k\}\; sum\_\{p:\; s\_i\; ightarrow\; t\_i\}\; f\_p\; cdot\; sum\_\{e\; in\; p\}\; l\_e(f\_e)$. Since $f$ and $f^\{*\}$ are associated with the same sets $Gamma,\; R$, we know that:$sum\_\{p:\; s\_i\; ightarrow\; t\_i\}f\_p\; =\; sum\_\{p:\; s\_i\; ightarrow\; t\_i\}\; f\_p^\{*\}\; =\; r\_i\; ;\; ;\; forall\; i.$

Therefore, there must be a pair $(s\_i,\; t\_i)$ and two paths $p,\; q$ from $s\_i$ to $t\_i$ such that $f\_p^\{*\}\; >\; f\_p$, $f\_q^\{*\}\; <\; f\_q$, and

:$sum\_\{e\; in\; p\}l\_e(f\_e)\; <\; sum\_\{e\; in\; q\}l\_e(f\_e).$

In other words, the flow $f^\{*\}$ can achieve a lower welfare than $f$ only if there are two paths from $s\_i$ to $t\_i$ having different costs, and if $f^\{*\}$ reroutes some flow of $f$ from the higher-cost path to the lower-cost path. This situation is clearly incompatible with the assumption that $f$ is a Nash-equilibrium flow.

**"Q.E.D."**Note that Fact 1 does not assume any particular structure on the set $L$.

**Fact 2**. Given any two real numbers $x$ and $y$, $x\; cdot\; y\; leq\; x^2\; +\; y^\{2\}/4$.**Proof**. This is another way to express the true inequality $(x-y/2)^2\; geq\; 0$.**"Q.E.D."****Theorem**. The pure PoA of any generalized routing problem $(G,\; L)$ with linear latencies is $leq\; 4/3$.**Proof**. Note that this theorem is equivalent to saying that for each Nash-equilibrium flow $f$, $w(f)\; leq\; (4/3)\; cdot\; min\_\{f^\{*\; \{\; w(f^\{*\})\; \}$, where $f^\{*\}$ is any other flow. By definition,:$w^\{f\}(f^\{*\})\; =\; sum\_\{e\; in\; E\}\; f\_e^\{*\}(a\_e\; cdot\; f\_e\; +\; b\_e)$

:$=\; sum\_\{e\}(a\_\{e\}f\_\{e\}f\_\{e\}^\{*\})\; +\; sum\_\{e\; in\; E\}f\_e^\{*\}b\_e.$

By using Fact 2, we have that

:$w^\{f\}(f^\{*\})\; leq\; sum\_\{e\; in\; E\}\; left(\; a\_e\; cdot\; left(\; (f\_e^\{*\})^2\; +\; (f\_e)^\{2\}/4\; ight)\; ight)\; +\; sum\_\{e\; in\; E\}\; f\_e^\{*\}\; cdot\; b\_e$

:$=\; left(\; sum\_\{e\; in\; E\}\; a\_e(f\_e^\{*\})^2\; +\; f\_e^\{*\}b\_e\; ight)\; +\; sum\_\{e\; in\; E\}\; a\_\{e\}(f\_e)^\{2\}/4$

:$leq\; w(f^\{*\})\; +\; frac\{w(f)\}\{4\},$

since

:$(1/4)\; cdot\; w(f)\; =\; (1/4)\; cdot\; sum\_\{e\; in\; E\}f\_e(a\_\{e\}f\_\{e\}+b\_\{e\})$

:$=\; (1/4)\; cdot\; sum\_\{e\; in\; E\}(f\_\{e\})^2\; +\; underbrace\{(1/4)\; cdot\; sum\_\{e\; in\; E\}f\_\{e\}b\_\{e\_\{geq\; 0\}.$

We can conclude that $w^\{f\}(f^\{*\})\; leq\; w(f^\{*\})\; +\; w(f)/4$, 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 $L$ are linear. Actually, a more general fact holds.

**Theorem**. Given a generalized routing problem with graph $G$ and nonnegative, nondecreasing, polynomial latency functions of degree $d$, the pure PoA is $leq\; d+1$.Note that the PoA can grow with $d$. 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 $x=1-1/\{sqrt\{d+1$, in which case

:$w\; =\; left(\; 1-frac\{1\}\{sqrt\{d+1\; ight)^d\; cdot\; left(\; 1-frac\{1\}\{sqrt\{d+1\; ight)\; +\; 1\; cdot\; frac\{1\}\{sqrt\{d+1$

:$=left(left(\; 1-frac\{1\}\{sqrt\{d+1\; ight)^\{sqrt\{d+1\; ight)^sqrt\{d+1\}+frac\{1\}\{sqrt\{d+1$

:$leq\; e^\{-sqrt\{d+1\; +\; frac\{1\}\{sqrt\{d+1.$

This quantity tends to zero when $d$ tends to infinity.

*Wikimedia Foundation.
2010.*