Algorithmic Game Theory · Lecture Notes

Chapter 9: The Price of Anarchy

In traffic every driver chooses his or her own route, in a server cluster every job chooses its own machine, in a network every user rents his or her own link. None of them thinks about the total cost of the system. How much worse can the outcome of these selfish choices be than the best arrangement a central planner could build? The Price of Anarchy measures this loss with a single ratio; the Price of Stability asks the same question from the optimistic side. Starting from their definitions, these notes go step by step through Pigou's network, the 4/3 bound for linear latency and the smoothness method, the Braess network, the load balancing game, the Hn bound for fair cost sharing, and the congestion tolls that reduce the loss.

Learning outcomes

Defining
Define the Price of Anarchy (PoA) and the Price of Stability (PoS); show the difference between them with an example.
Computing
Find the equilibrium and optimum costs in the Pigou, Braess and load balancing examples and compute the ratio.
Explaining the bound
Explain the intuitive proof of the bound PoA ≤ 4/3 for linear latency and why it is tight.
Improving
Show how a congestion toll turns the optimum into an equilibrium, in the two-route network and in Pigou's network.

9.1Basic concepts

Nash equilibrium, the basic equilibrium concept of game theory, is a definition of stability: at equilibrium nobody wants to change his or her choice alone. The definition does not say that the equilibrium is a good outcome. In the Prisoner's Dilemma both players defect and end up worse off than if they had both stayed silent. This chapter turns the question “How bad can an equilibrium be?” into a number. The question first becomes concrete in a small game, and the measure is defined afterwards.

9.1.1A first game: load balancing

A server cluster has three servers: A, B and C. The servers have different speeds: A has speed 2, B and C have speed 1. Jobs arrive one after another and each job is placed on one of the servers. The completion time of a job is the total load of the server it is placed on divided by the server's speed. For example, if A holds 4 units of work, every job on A finishes in 4 / 2 = 2 time units. If B holds 2 units, the jobs on B finish in 2 / 1 = 2, and if C holds 1 unit, the job on C finishes in 1 / 1 = 1.

A (speed 2)time 4 / 2 = 2B (speed 1)time 2 / 1 = 2C (speed 1)time 1 / 1 = 1new job: A, B or C?Completion time = total load of the server ÷ its speed
Figure 9.1: A moment in the load balancing game. A holds 4 units of work, B holds 2 and C holds 1; the completion times are 4/2 = 2, 2/1 = 2 and 1/1 = 1 respectively. The newly arrived job will choose one of the three servers.

In Figure 9.1 a new job has arrived. The job thinks only of its own completion time. If it goes to A, A's load becomes 5 and the job finishes in 5/2 = 2.5. If it goes to B, it finishes in 3/1 = 3; if it goes to C, in 2/1 = 2. The selfish job picks C. This choice is best for that job but may not be best for the total cost of the system. The game asks two questions:

  • If every job minimizes its own completion time, is the total cost of the system also minimized?
  • If not, how much worse than the best assignment can the equilibrium reached by selfish jobs be, at most?

The answer to the first question is generally “no”. The answer to the second is a number that varies from game to game; this number is the real subject of the chapter. The same game is solved in detail in 9.4.8: the total time of the worst equilibrium turns out to be 13 and that of the best assignment 12.5, and the ratio is 1.04.

9.1.2The Price of Anarchy: the bill for selfishness

The Price of Anarchy (PoA) measures the efficiency loss between the worst equilibrium produced by selfish behavior and the social optimum. The two concepts in this definition are:

  • The social optimum is the best outcome with respect to the common goal of the system. In cost problems the social optimum is the state that minimizes the total cost. In traffic this is the distribution in which the total travel time of all drivers is smallest.
  • An equilibrium is a state in which everyone chooses by looking at his or her own cost and nobody wants to change the choice alone.

A traffic network shows the tension between the two concepts well. Every driver tries to reduce his or her own travel time. But a driver entering a road slows everyone on that road a little, and the driver does not take this effect into account. As a result, while everyone acts sensibly from his or her own point of view, the total delay can be larger than necessary.

The history of the concept is short. In 1999 Elias Koutsoupias and Christos Papadimitriou, studying selfish players who distribute jobs over parallel machines, defined the ratio of the worst equilibrium to the optimum under the name “coordination ratio” (Koutsoupias and Papadimitriou, 1999). The name “price of anarchy” was given by Papadimitriou in 2001 (Papadimitriou, 2001). The name describes a comparison: the price of everybody deciding for himself or herself, that is, of anarchy, instead of a central “dictator” who decides everything.

Two numerical examples come up often in this chapter. The first is a two-route network: 3,000 cars split between two routes; the total delay is 75,000 car-min at the selfish equilibrium and 71,250 car-min in the best distribution. The ratio is 75,000 / 71,250 ≈ 1.053; that is, selfishness raises the total delay by about 5%. The second is the Braess network: when a new road is added to a network used by 4,000 cars, everyone's travel time rises from 65 minutes to 80 minutes. The Price of Anarchy measures such gaps with a single number and, more importantly, puts an upper bound on this number for a whole class of games.

9.1.3Nash equilibrium and the social optimum

The ratio compares two different outcomes. Table 9.1 puts these two outcomes side by side.

Table 9.1: Nash equilibrium compared with the social optimum.
Nash equilibrium (individual)Social optimum (system)
DefinitionNo player can improve his or her own outcome by changing strategy unilaterally.Minimizes the total cost or maximizes the social welfare.
RepresentsIndividual incentivesThe common goal of the system
How many?There can be several (good and bad equilibria).Its value is unique; several states can give the same value.
Stable?Yes, by definition.Often not: somebody wants to deviate.

Let us briefly recall the definition of Nash equilibrium. There are n players. Each player i chooses a strategy si; the collection of all the choices s = (s1, …, sn) is a strategy profile. Player i's cost in this profile is written Ci(s). s−i denotes the strategies of the players other than i. A profile s is a Nash equilibrium if Ci(s) ≤ Ci(si′, s−i) holds for every player i and every alternative si′. In words: while the others stay put, no player can lower his or her cost by changing his or her own choice. In this chapter the players carry costs, not payoffs; that is why the inequality points in the “less than or equal” direction.

There are three typical reasons why an equilibrium differs from the optimum:

  1. Individual rationality. Everybody looks at his or her own benefit. The total cost of the system appears in no player's objective function.
  2. Externalities. One player's choice changes the cost of others, but the player does not take this effect into account. A driver entering a road slows the others; this slowdown does not appear on the driver's own bill. This cost, which is imposed on others and not taken into account by the decision maker, is called an externality.
  3. Lack of information. Players may not see the whole system; even if they knew the best arrangement, there is no guarantee that they would follow it.

The Price of Anarchy takes the ratio of these two outcomes: the equilibrium is in the numerator and the optimum in the denominator.

9.1.4Definitions: PoA and PoS

A game can have several Nash equilibria. Then “the cost of the equilibrium” is not a single number. There are two natural choices: look at the worst equilibrium, or look at the best one. The first gives the Price of Anarchy, the second the Price of Stability. The notation is as follows: NE is the set of Nash equilibria of the game; C(s) is the total cost in state s; OPT is the state with the smallest total cost (the social optimum).

Definition 9.1

The Price of Anarchy of a cost game is the ratio of the cost of the worst Nash equilibrium to the cost of the optimum:

PoA = maxs ∈ NE C(s) / C(OPT)

The Price of Stability is the ratio of the cost of the best Nash equilibrium to the cost of the optimum:

PoS = mins ∈ NE C(s) / C(OPT)

For the ratios to be defined, the optimum cost is assumed to be positive (C(OPT) > 0).

The two definitions differ in a single word: max or min. The PoA is a pessimistic guarantee: whichever equilibrium the players go to, the loss is at most this much. The PoS is an optimistic scenario: if somebody can steer the players to the best equilibrium, the loss drops to this much. The “stability” in the name of the PoS comes from the requirement that the outcome be stable (an equilibrium): if the optimum itself is not stable, how far from the optimum is the best of the stable outcomes?

OPTsocial optimumbest NE→ PoSworst NE→ PoAcost →
Figure 9.2: The optimum and the equilibria on the cost axis. The optimum (OPT) is on the far left; the ratio of the best Nash equilibrium to the optimum gives the PoS, and the ratio of the worst Nash equilibrium to the optimum gives the PoA.

Figure 9.2 shows the definition on an axis. The cost increases to the right. By definition the optimum is on the far left, because no state can be cheaper than it. The equilibria lie to the right of the optimum or exactly on it. The leftmost equilibrium determines the PoS and the rightmost determines the PoA. The following result can be read directly from this picture:

Theorem 9.1 (Order of the ratios)

In every cost game that has an equilibrium and whose optimum cost is positive (C(OPT) > 0), 1 ≤ PoS ≤ PoA. If the game has a single equilibrium, PoS = PoA.

Every equilibrium is a state, and the optimum is the cheapest of all states; hence C(s) ≥ C(OPT) for every equilibrium s. Since the costs are positive, both sides can be divided by C(OPT), and the ratio of every equilibrium is at least 1; this includes the best equilibrium, so PoS ≥ 1. The smallest element of a set cannot exceed its largest element; so min C(s) ≤ max C(s) and PoS ≤ PoA. If there is a single equilibrium, the smallest and the largest element are the same element and the two ratios are equal. □

Example 9.1

Four jobs of sizes 2, 2, 1 and 1 are to be placed on two identical machines; the social cost is the maximum load. The equilibria of this game are found one by one in 9.4.4. Let us use the result here: the maximum loads of the equilibria are 3 and 4, and the optimum is 3.

  1. Worst equilibrium: the equilibrium with maximum load 4. PoA = 4 / 3 ≈ 1.333.
  2. Best equilibrium: the equilibrium with maximum load 3. PoS = 3 / 3 = 1.
  3. Check: 1 ≤ 1 ≤ 4/3; the ordering theorem holds. PoS = 1 says that the optimum itself is also an equilibrium.

In payoff problems the ratio is inverted. In some games the players carry payoffs, not costs, and the goal of the system is to maximize the social welfare (SW for short). Then the worst equilibrium is the one with the smallest welfare. The ratio is written SW(OPT) / SW(equilibrium) (the equilibrium welfare must be positive: SW(equilibrium) > 0); that is, the optimum moves to the numerator. The ratio is again at least 1, and the rule “a larger value means worse efficiency” is preserved. For example, if the optimum's welfare is 100 and the worst equilibrium's welfare is 80, the PoA is 100/80 = 1.25.

9.1.5Efficiency measures and how to read the ratio

The meaning of the ratio depends on how the social cost is defined. Two measures are used in this chapter:

  • Total cost: the sum of the delay or resource usage costs of all users. This is the measure in the traffic examples; its unit is car-min (the minutes of every car are added up).
  • Makespan: in a job assignment, the load of the most heavily loaded machine, that is, the time at which all jobs are finished. This is the classical measure used in load balancing.

In cost problems the PoA is the ratio of the worst equilibrium cost to the social optimum cost. A PoA of 1 shows that there is no efficiency loss: even the worst equilibrium is as good as the optimum. As the ratio grows, the loss caused by strategic behavior grows. The ratio converts easily to a percentage: if PoA = 1.25, the worst equilibrium is 25% more expensive than the optimum.

Table 9.2: Reading PoA values. All the examples are worked out in detail in this chapter.
PoAMeaningExample
1no lossThe Braess network, before the new road is opened
4/333% extra costPigou's network; the bound for linear latency
2 − 2/(m + 1)less than a factor of 2load balancing, m identical machines
unboundedno guaranteesteep latency (xp)

Why the worst case? At first sight looking at the worst equilibrium may seem too pessimistic. But this is exactly where the value of the PoA comes from. We often cannot know which equilibrium the players will go to: it depends on the starting state, the order of moves and chance. The PoA gives a guarantee that needs no such knowledge: “Whatever happens, the loss is at most this much.” A network designer who knows that the PoA is small can be confident that the system will perform reasonably even without investing in central control. This idea is the game-theoretic counterpart of the approximation ratio in algorithms.

9.1.6Two worst-case ratios: PoA and the approximation ratio

Algorithms courses study approximation algorithms for NP-hard problems. For these problems no method is known that finds the optimum in polynomial time; instead a fast algorithm looks for a good solution. The quality of the algorithm is measured by the approximation ratio: the worst-case ratio between the cost of the solution the algorithm finds and the cost of the optimum. The Price of Anarchy is also a worst-case ratio. The difference between the two lies in what prevents reaching the optimum.

Table 9.3: Two worst-case ratios. Both have the form “found / optimum”; what is missing is different.
RatioWhat prevents reaching the optimumNumerator / denominator
Approximation ratiocomputational power: a problem that cannot be solved in polynomial time (NP-hard)the solution found by a fast algorithm ÷ optimum
Price of Anarchycoordination: there is no central authority and everyone looks after his or her own interestworst equilibrium ÷ optimum

The two ratios can be compared on the same problem. Distributing jobs over m identical machines to minimize the makespan is an NP-hard problem. The greedy list scheduling algorithm studied by Ronald Graham in 1966 takes the jobs in the given order and puts each job on the machine that is currently least loaded (Graham, 1966). The makespan this algorithm finds is at most 2 − 1/m times the optimum. If the jobs in the same problem are selfish players, the makespan of the pure Nash equilibria is at most 2 − 2/(m + 1) times the optimum (Finn and Horowitz, 1979). For m = 2 the two numbers are 3/2 and 4/3.

Example 9.2

Let there be two identical machines and three jobs of sizes 1, 1, 2 in this order. The list scheduling algorithm places the jobs in this order.

  1. The first job of size 1: both machines are empty, so it goes to M1. Loads (1, 0).
  2. The second job of size 1: the least loaded machine is M2. Loads (1, 1).
  3. The job of size 2: both machines are equally loaded, so it goes to M1. Loads (3, 1); the makespan is 3.
  4. The optimum: the job of size 2 alone on one machine and the two jobs of size 1 on the other: (2, 2); the makespan is 2.

The ratio is 3 / 2 = 2 − 1/2; Graham's bound is attained exactly in this example. Moreover, the assignment (3, 1) is not a Nash equilibrium: if a job of size 1 on M1 moves to M2, it waits 1 + 1 = 2 < 3 and gains. Selfish jobs do not stay in this bad assignment. The loss of the list scheduling algorithm comes from a computational restriction, and the loss of the selfish equilibrium from a lack of coordination.

The limits of the analysis. The PoA assumes players to be completely selfish and rational. Real players are not only selfish: trust, social norms, reputation and repeated interaction can increase cooperation. The PoA is therefore not a prediction but a pessimistic guarantee. The loss observed is often smaller than the bound the PoA gives; but it is known that the bound will not be exceeded.

9.1.7Common mistakes in the definitions

Common mistakes
  • Confusing PoA with PoS: The PoA looks at the worst equilibrium, the PoS at the best. “The ratio of an equilibrium to the optimum” is not always the PoA; only that of the worst equilibrium is.
  • Writing the ratio upside down: In a cost problem the optimum is in the denominator; the ratio is never below 1. If a value like 0.75 was found, the ratio has been inverted.
  • Confusing a difference with a ratio: “Worst equilibrium − optimum” is a difference and depends on the unit (car-min, seconds). The PoA is a unitless ratio; this is what makes systems of different scales comparable.
  • Assuming PoS = 1 whenever there is a single equilibrium: A single equilibrium can be bad. Pigou's network has a single equilibrium and PoA = PoS = 4/3.
  • Taking the PoA to be a prediction: The PoA does not say what will happen in a particular example but what can happen in the worst case.

9.2Pigou's network

The smallest example that shows the Price of Anarchy is the two-route network given by the English economist Arthur Cecil Pigou in 1920 (Pigou, 1920). The example is so simple that the whole calculation fits on a sheet of paper. Yet it captures exactly the worst case in networks with linear latency.

9.2.1Setup: nonatomic traffic and Wardrop equilibrium

Traffic networks are modeled by a graph: the nodes are intersections and the edges (links) are roads. Each edge has a latency function ℓe(x): the time each driver using edge e spends when the traffic on it is x. Latency rises with traffic or stays constant; a busy road is slow. Drivers go from a source node s to a destination node t and each chooses a path (a sequence of consecutive edges). The latency of a path is the sum of the latencies of the edges on it.

In Pigou's network and in most traffic examples the number of drivers is very large, and the effect of a single driver is so small that it can be neglected. In this case the traffic is taken to be nonatomic (divisible): 1 unit of traffic is thought of as a “fluid” made of countless very small drivers and can be divided in any proportion. For example 0.3 of the traffic can be on one route and 0.7 on the other. When a single driver changes routes, the latencies of the routes do not change, because one driver's share is close to zero.

Definition 9.2

In nonatomic traffic, a flow distribution is a Wardrop equilibrium if the latency of every route carrying traffic is no greater than the latency of any available route. Equivalently: all used routes have equal latency and no unused route is shorter.

This definition is the counterpart of Nash equilibrium in nonatomic traffic. A driver on a slower route would gain by switching to a faster one; at equilibrium there is no such driver. The definition takes its name from the principle stated in 1952 by the British transport engineer John Glen Wardrop. Wardrop's second principle is the system optimum: the distribution in which the total latency is smallest. In this chapter the system optimum and the social optimum are the same thing.

The total latency is computed as follows. Let fe be the traffic on edge e. Each driver on this edge spends ℓe(fe), and there is fe traffic on the edge; the contribution of the edge to the total cost is “traffic × latency”:

C(f) = Σe ℓe(fe) · fe

9.2.2The equilibrium in Pigou's network

In Pigou's network 1 unit of traffic goes from s to t and there are two routes. Let the share of traffic on the upper route be x and on the lower route 1 − x.

  • Upper route: latency ℓ(x) = x. It is fast when empty and slows down as it fills; if everyone is on top the latency is 1. Think of a narrow city street.
  • Lower route: the latency is always 1. However many cars enter, the time does not change. Think of a wide but long ring road.

To find the equilibrium, let us look through a driver's eyes. On the lower route the time is 1. On the upper route the time is x, and since x is a share it never exceeds 1. So the upper route is never slower than the lower one. If there is a driver on the lower route and x < 1, that driver switches to the upper route and gains. These switches continue until x = 1. At x = 1 the latency of the upper route is 1 and equals that of the lower route; now nobody can gain by switching.

Example 9.3
  1. Candidate: x = 1/2. 1/2 min on top, 1 min on the bottom. A driver on the bottom who switches to the top waits about 1/2 min and gains. Not an equilibrium.
  2. Candidate: x = 0.9. 0.9 min on top, 1 min on the bottom. Those on the bottom gain again. Not an equilibrium.
  3. Candidate: x = 1. Everyone is on top, the time is 1 min. A driver on top who switched to the bottom would also wait 1 min; there is no gain. The lower route is empty but no shorter than the upper route. The Wardrop condition holds: an equilibrium.
  4. Cost: C(equilibrium) = 1 · 1 + 0 · 1 = 1. Everyone waits 1 min.

That the equilibrium is unique also follows from this reasoning: in every distribution with x < 1 the drivers on the bottom leave.

9.2.3The social optimum: minimizing total cost

A central planner looks at the question differently. The planner chooses x and wants to minimize the total latency. On the upper route there is x traffic, each waiting x min; on the lower route there is 1 − x traffic, each waiting 1 min:

C(x) = x · x + (1 − x) · 1 = x2 − x + 1

The smallest value of this function is found with the help of the derivative. The derivative is the slope of a curve at each point. At the lowest point of a trough the slope is zero: to the left of the point the curve descends (negative slope) and to the right it rises (positive slope). The derivative rules needed in this chapter are these: the derivative of xk is k · xk−1 (for example the derivative of x2 is 2x); the derivative of c · x is c; the derivative of a constant is 0; the derivative of a sum is the sum of the derivatives. The derivative is written C′(x).

Example 9.4
  1. Differentiate. C(x) = x2 − x + 1; the derivative of x2 is 2x, that of −x is −1, that of 1 is 0. Result: C′(x) = 2x − 1.
  2. Set to zero. 2x − 1 = 0 ⇒ x = 1/2.
  3. Trough or peak? For x < 1/2, C′(x) < 0 (the curve descends); for x > 1/2, C′(x) > 0 (the curve rises). The point is a trough.
  4. Compute the value. C(1/2) = 1/4 − 1/2 + 1 = 3/4. The same result comes from summing “traffic × latency”: 1/2 · 1/2 = 1/4 on top, 1/2 · 1 = 1/2 on the bottom; the total is 3/4.
  5. Check the endpoints. C(0) = 1 (everyone on the bottom) and C(1) = 1 (everyone on top). Both are larger than 3/4 ✓.

At the optimum half of the traffic is “sacrificed” to the lower route. These drivers wait 1 min, while those on top wait only 1/2 min. The optimum is not fair and not stable: the drivers on the bottom want to switch to the top, because they would wait half a minute there. Without central coercion this distribution does not arise by itself.

stℓ(x) = xℓ(x) = 1top: 1bottom: 00.50.75100.250.50.751x (share on the upper route)total cost C(x)C(x) = x² − x + 1equilibrium: 1optimum: 3/4
Figure 9.3: Pigou's network. On the left the network: the latency of the upper route is ℓ(x) = x, that of the lower route 1; line thickness shows the traffic at equilibrium (everyone on top). On the right the total cost C(x) = x2 − x + 1: the cost is 1 at the equilibrium x = 1 and 3/4 at the optimum x = 1/2.

Figure 9.3 shows the two results on the same graph. The right end of the parabola on the right is the equilibrium (red dot, cost 1); its lowest point is the optimum (blue dot, cost 3/4). The equilibrium sits at one of the worst points of the curve.

9.2.4The ratio: PoA = 4/3

Pigou's network has a single equilibrium; so the worst equilibrium and the best equilibrium coincide, and the PoA and the PoS are equal:

PoA = C(equilibrium) / C(optimum) = 1 / (3/4) = 4/3 ≈ 1.33

Selfish routing produces 33% more total delay than central planning. This number came out of a small example, but its importance is great: it has been proved that in every network with linear latencies, at every traffic volume, the ratio does not exceed 4/3 (9.3.4). Pigou's network is the worst example of this class.

9.2.5Private cost and marginal cost

Why do the equilibrium and the optimum fall in different places? The answer is that the cost the driver looks at differs from the cost society looks at.

  • The driver looks at private cost. On the upper route his or her own latency is x; the driver compares this with the 1 of the lower route. As long as x < 1 the driver picks the upper route. The result is x = 1.
  • Society looks at marginal cost. The total cost of the upper route is x · x = x2. By how much does this total grow when a little traffic is added to the upper route? By its derivative: 2x. The total cost of the lower route is (1 − x) · 1, and every unit added there raises the total by exactly 1. The planner equates the two increases: 2x = 1 ⇒ x = 1/2.
Definition 9.3

The marginal cost of an edge with latency function ℓ(f) carrying traffic f is the derivative of the edge's total cost f · ℓ(f):

(f · ℓ(f))′ = ℓ(f) + f · ℓ′(f)

The first term is the added driver's own latency (the private cost). The second term f · ℓ′(f) is the delay that driver adds to everyone else on the edge (the externality).

The formula in the definition comes from the product rule, but it can also be understood in words. When there are f cars on an edge, one more car enters. This car itself waits ℓ(f). In addition the latency of the edge rises by ℓ′(f), and this rise is passed on to each of the f cars on the edge; the total extra burden is f · ℓ′(f).

00.511.5200.51x (share on the upper route)minequilibriumoptimum2x (marginal)x (private)lower route: 1
Figure 9.4: Private and marginal cost in Pigou's network. The solid blue line is the private cost x of the upper route, the dashed blue line its marginal cost 2x, the red horizontal line the cost 1 of the lower route. The private cost meets 1 at x = 1 (equilibrium) and the marginal cost meets 1 at x = 1/2 (optimum).

Figure 9.4 shows the two crossings. Where the red line crosses the solid blue line is the equilibrium; where it crosses the dashed line is the optimum. The vertical distance between the two blue lines is x · ℓ′(x) = x · 1 = x: the delay one driver imposes on the others. The driver does not see this difference; that is why more drivers than necessary enter the upper route.

This observation generalizes:

  • At equilibrium the latencies of the used routes are equal.
  • At the optimum the marginal costs of the used routes are equal; that is, “my own latency + the latency added to others because of me” is equal.

The difference between the two conditions is exactly the term f · ℓ′(f). The congestion toll, the most direct tool for reducing the PoA, rests on this difference. If the driver is charged an amount equal to this externality, the cost the driver sees equals the marginal cost, and the selfish choice coincides with the optimum (9.6.2).

9.2.6The two-route network: 3,000 cars

The same two conditions can be applied in a more realistic network. 3,000 cars split between two routes. Route 1 is short but narrow: ℓ1 = 5 + x1/100 min. Route 2 is long but wide: ℓ2 = 20 + x2/200 min. Here x1 + x2 = 3,000. Both latencies have the form ax + b, that is, they are linear: b is the time on the empty road and a is the slowdown each extra car brings.

Example 9.5

Equilibrium (equal latencies).

  1. Substitute x2 = 3,000 − x1: 5 + x1/100 = 20 + (3,000 − x1)/200.
  2. To get rid of the fractions, multiply both sides by 200: 1,000 + 2x1 = 4,000 + 3,000 − x1.
  3. 3x1 = 6,000 ⇒ x1 = 2,000, x2 = 1,000.
  4. Latencies: ℓ1 = 5 + 20 = 25, ℓ2 = 20 + 5 = 25 ✓. Everyone waits 25 min: C(equilibrium) = 3,000 · 25 = 75,000 car-min.

Optimum (equal marginal costs). The marginal cost of Route 1 is ℓ1 + x1 · ℓ1′ = 5 + x1/100 + x1/100 = 5 + x1/50; that of Route 2 is 20 + x2/100.

  1. 5 + x1/50 = 20 + (3,000 − x1)/100. Multiply both sides by 100: 500 + 2x1 = 2,000 + 3,000 − x1.
  2. 3x1 = 4,500 ⇒ x1 = 1,500, x2 = 1,500.
  3. Latencies: ℓ1 = 5 + 15 = 20, ℓ2 = 20 + 7.5 = 27.5. The optimum is again not fair: those on Route 2 wait 7.5 min longer.
  4. Total: 1,500 · 20 + 1,500 · 27.5 = 30,000 + 41,250 = 71,250 car-min.

Ratio: PoA = 75,000 / 71,250 = 20/19 ≈ 1.053. Selfishness raises the total delay by about 5%; this is far below the 4/3 bound.

This example shows two things. First, in realistic networks the loss is often smaller than the worst-case bound. Second, in this example the optimal distribution forces some users (those on Route 2) to wait longer than at equilibrium. These drivers cannot be expected to follow the optimum voluntarily; an incentive such as a toll is needed to steer them. The toll computation for the same network is done in 9.6.1.

9.2.7Common mistakes in Pigou's network

Common mistakes
  • Splitting the routes equally at equilibrium: The thought “there are two routes, so the traffic splits half and half” is wrong. The equilibrium is where the latencies are equalized; in Pigou's network this is x = 1, with everyone on top. The half-and-half split is the optimum.
  • Thinking the driver looks at marginal cost: The driver sees only his or her own latency. It is the planner, thinking about the total, who looks at marginal cost.
  • Summing only the latencies in the total cost: Writing C = ℓ1 + ℓ2 is wrong. The latency of each route is multiplied by the traffic on that route: C = x1ℓ1 + x2ℓ2. At Pigou's equilibrium the lower route is empty and its contribution is 0, not 1.
  • Taking the optimum to be an equilibrium: At x = 1/2 those on the bottom want to switch to the top; the optimum is not stable.

9.3Linear latency and Braess

In Pigou's network the ratio came out as 4/3. Is this number a coincidence or part of a general law? The question splits into three subquestions. How does the ratio change when the latency function changes? Why does the ratio never exceed 4/3 in any network with linear latency? How does the same proof idea carry over to other games?

9.3.1PoA grows as the latency gets steeper

In Pigou's network let us take the latency of the upper route to be ℓ(x) = xp instead of ℓ(x) = x; p ≥ 1 is an integer. The latency of the lower route is again 1. As p grows the curve gets “steeper”: while x is below 1, xp is very small, and as x approaches 1 it suddenly jumps to 1. For example 0.51 = 0.5, but 0.54 = 0.0625. This kind of latency describes a road that behaves almost as if empty until it nears its capacity and then suddenly jams.

00.5100.51xℓ(x)xx¹⁶
Figure 9.5: The latency of the upper route ℓ(x) = xp; the blue line is p = 1, the red curves are intermediate values, the gray curve is p = 16. All the curves reach the value 1 at x = 1, but as p grows they stay very low until that point.

The equilibrium does not change. For 0 ≤ x ≤ 1, xp ≤ 1; the upper route is again never slower than the lower one. Everyone moves to the top and everyone waits 1 min: C(equilibrium) = 1.

The optimum improves. The total cost is C(x) = x · xp + (1 − x) · 1 = xp+1 + 1 − x. To find the optimum the derivative is set to zero:

  1. The derivative of xp+1 is (p + 1)xp and that of 1 − x is −1: C′(x) = (p + 1)xp − 1.
  2. (p + 1)xp = 1 ⇒ xp = 1/(p + 1).
  3. Take the p-th root of both sides: xOPT = (p + 1)−1/p. A negative exponent means “one over”; a fractional exponent 1/p is the p-th root. For example for p = 2, 3−1/2 = 1/√3 ≈ 0.577.
  4. The optimum cost simplifies: since xp = 1/(p + 1), xp+1 = x/(p + 1) and C(OPT) = x/(p + 1) + 1 − x = 1 − x · p/(p + 1).
Table 9.4: The optimum share, the optimum cost and the PoA in Pigou's network when ℓ = xp. The equilibrium cost is 1 in every row.
pxOPTC(OPT)PoA = 1 / C(OPT)
10.50.751.333
20.5770.6151.626
40.6690.4652.151
80.760.3253.081
160.8380.2124.727

Table 9.4 shows a trend. As the latency gets steeper the planner can put more traffic on the upper route, because the upper route is very fast until it nears its capacity. At the optimum the share on the upper route grows (from 0.5 to 0.838) and the optimum cost falls (from 0.75 to 0.212). The equilibrium stays where it is: everyone on top, everyone 1 min. The ratio therefore grows.

The growth is slow but unbounded. As p goes to infinity xOPT approaches 1 and C(OPT) falls to zero; as the denominator approaches zero the ratio grows without bound. Numerically, at p = 10 the PoA is about 3.51 and at p = 100 about 18.3. The ratio grows roughly at the rate p / ln p. The lesson is this: 4/3 is not a universal constant; it is specific to linear latency. What determines the bound is not the shape of the network but how “steep” the latency functions can be.

9.3.2Interactive: latency exponent and PoA

Figure 9.6 does the same computation live. The slider changes the exponent p from 1 to 10. The graph on the left shows how the PoA grows with p; the bars on the right show how the traffic splits between the two routes at the equilibrium and at the optimum. Four numbers are written below: x* = (p + 1)−1/p, C(OPT), C(equilibrium) = 1 and the PoA.

Figure 9.6: Interactive Pigou network. Upper route xp, lower route 1; C(x) = xp+1 + (1 − x), C′(x) = 0 ⇒ x* = (p + 1)−1/p, PoA = 1 / C(x*). The default value is p = 1: at the optimum 50% of the traffic is on top, C(OPT) = 0.75, PoA = 4/3.

In the graph the 4/3 level is marked with a dashed line. Only the point p = 1 falls exactly on this line; all the other points stay above it. As the slider is pulled to the right the equilibrium bar does not change (100% of the traffic on top), while the upper route's share in the optimum bar grows. The difference between the “rigidity” of the equilibrium and the “flexibility” of the optimum is the source of the growth of the ratio.

9.3.3Code trace: pigou_poa(p)

The numbers in the table are produced by a short Python function. The function takes p and returns the PoA of Pigou's network.

def pigou_poa(p):          # top x**p, bottom 1
  x = (p + 1) ** (-1 / p)  # where C'(x) = 0
  opt = x ** (p + 1) + (1 - x)
  return 1 / opt           # eq. cost is 1

for p in [1, 2, 4, 8, 16]:
  print(p, round(pigou_poa(p), 3))

The code works line by line as follows:

  • x = (p + 1) ** (-1 / p): the point where the derivative is zero, that is, the upper-route share at the optimum. In Python ** is the exponentiation operator; -1 / p is a fractional exponent.
  • opt = x ** (p + 1) + (1 - x): the total cost at this point. The first term is the contribution of the upper route (x · xp), the second that of the lower route.
  • return 1 / opt: since the equilibrium cost is 1 for every p, the ratio is 1 / C(OPT).
  • The last two lines call the function for p = 1, 2, 4, 8, 16 and print the result rounded to three digits.
Table 9.5: Trace of pigou_poa(p). Intermediate values are rounded to four digits.
px = (p+1)−1/pxp+11 − xoptoutput
12−1 = 0.50.250.50.751,333
23−1/2 ≈ 0.57740.19250.42260.61511,626
45−1/4 ≈ 0.66870.13370.33130.46502,151
89−1/8 ≈ 0.75980.08440.24020.32463,081
1617−1/16 ≈ 0.83770.04930.16230.21164,727

The identity xp+1 = x/(p + 1) can also be checked in each row. For example for p = 4, 0.6687 / 5 ≈ 0.1337 ✓.

00.5100.51x →C(x) = x^17 + (1 − x)equilibriump = 16xOPT = 0.838C(OPT) = 0.212PoA = 1 / C(OPT) = 4.727
Figure 9.7: The total cost curve C(x) = x17 + (1 − x) for p = 16. The curve falls for a long time like 1 − x, reaches its minimum 0.212 at x ≈ 0.838, and then rises quickly to the equilibrium (x = 1, cost 1). PoA = 4.727.

9.3.4The 4/3 upper bound for linear latency

We saw that in Pigou's network the ratio is exactly 4/3. In 2002 Tim Roughgarden and Éva Tardos showed that this is no coincidence: in no network with linear latency does the ratio exceed 4/3 (Roughgarden and Tardos, 2002).

Theorem 9.2 (Roughgarden–Tardos, 2002)

If the latencies are linear, that is, ℓe(x) = aex + be with ae, be ≥ 0 for every edge, then in every network and for every traffic demand, the equilibrium of nonatomic traffic satisfies

C(equilibrium) ≤ 4/3 · C(optimum)

The bound is tight: equality holds in Pigou's network.

The proof has three steps, and each step rests on a small idea. The notation is as follows: fe is the traffic on edge e at equilibrium and feOPT the traffic at the optimum. The total latency is the sum over edges of “traffic × latency”: C(f) = Σe ℓe(fe) · fe.

Step 1: the equilibrium condition. At equilibrium everyone uses the shortest path under the current latencies. Let us run a thought experiment: “freeze” the latencies at their equilibrium values and move the drivers to their optimum routes. With frozen latencies no driver can find a path shorter than his or her equilibrium path, because the equilibrium path is already the shortest. So the optimum's distribution, measured with the frozen latencies, cannot be cheaper than the equilibrium itself:

Σe ℓe(fe) · fe ≤ Σe ℓe(fe) · feOPT

The left side is the true cost C(f) of the equilibrium. The right side is a thought experiment: the routes are as slow as at equilibrium, but the traffic is distributed as at the optimum. What remains is to bound this right side by the true cost C(fOPT) of the optimum. Step 2 does this edge by edge.

Example 9.6

In Pigou's network the equilibrium is f = (1, 0) (top, bottom) and the optimum is fOPT = (1/2, 1/2). The latencies at equilibrium: upper route ℓ(1) = 1, lower route 1.

  1. Left side: 1 · 1 + 1 · 0 = 1, the cost of the equilibrium.
  2. Right side: the frozen latencies (1 and 1) are multiplied by the traffic at the optimum: 1 · 1/2 + 1 · 1/2 = 1.
  3. 1 ≤ 1 ✓. Since the latencies of the two routes are equal at equilibrium, how the traffic is distributed does not change the frozen cost.

9.3.5The edge inequality and summation

Step 2: the edge inequality. For every edge with linear latency the following inequality holds:

ℓe(fe) · feOPT ≤ ℓe(feOPT) · feOPT + ¼ · ℓe(fe) · fe

In words: the cost in the thought experiment (left side) exceeds the optimum's own cost on that edge by at most a quarter of the equilibrium's cost on that edge.

Why is it true? Drop the edge index, write simply f and fOPT, and substitute ℓ(x) = ax + b. The expressions split into two groups:

  • The terms with b. On the left there is b · fOPT, on the right b · fOPT + ¼ · b · f. The extra term on the right cannot be negative (b, f ≥ 0); the right side is not smaller.
  • The terms with a. On the left there is a · f · fOPT, on the right a · (fOPT)2 + a · f2/4. The inequality needed is a · f · fOPT ≤ a · (fOPT)2 + a · f2/4. Collecting everything on the right gives 0 ≤ a · ((fOPT)2 − f · fOPT + f2/4) = a · (fOPT − f/2)2. It suffices that a square is nonnegative and a ≥ 0.

The perfect square in the last step can be checked by expansion: (u − v)2 = u2 − 2uv + v2; taking u = fOPT and v = f/2 gives 2uv = f · fOPT and v2 = f2/4. Equality holds only when fOPT = f/2 (or when a = 0 and b · f = 0). The constant ¼ comes from the coefficient of this perfect square.

Example 9.7

Pigou's upper route (ℓ = x, that is, a = 1, b = 0): f = 1, fOPT = ½.

  1. Left: ℓ(1) · ½ = 1 · ½ = ½.
  2. Right: ℓ(½) · ½ + ¼ · ℓ(1) · 1 = ½ · ½ + ¼ = ½.
  3. The two sides are equal, because fOPT = f/2. Pigou's network uses the inequality right at its limit; this is why 4/3 is tight.

An edge without equality (a = 1, b = 0, f = 2, fOPT = ½): left 2 · ½ = 1; right ½ · ½ + ¼ · 2 · 2 = ¼ + 1 = 5/4. 1 ≤ 5/4 ✓; the difference is (½ − 1)2 = ¼.

Step 3: sum up. The inequality of Step 2 is summed over all edges. The sum of the left sides is the right side of Step 1. The sum of the right sides is C(fOPT) + ¼ · C(f). Combined with Step 1:

C(f) ≤ Σe ℓe(fe) feOPT ≤ C(fOPT) + ¼ · C(f)

Move ¼ · C(f) to the left: ¾ · C(f) ≤ C(fOPT). Divide both sides by ¾ · C(fOPT): C(f) / C(fOPT) ≤ 4/3. □

Since equality holds in Pigou's network, the bound is tight: no number smaller than 4/3 can be written. In 2003 Roughgarden showed a stronger result: in a class of latency functions that includes the constant functions, the worst example is always a network with two parallel links like Pigou's (Roughgarden, 2003). So the complexity of the network does not enlarge the PoA; only the class of latency functions determines the PoA. For the linear class this is 4/3, and for polynomials such as xp it is the values in Table 9.4.

9.3.6Testing the bound numerically

What a bound says is best understood by comparing it with known examples. Table 9.6 brings together the examples of this chapter.

Table 9.6: Observed ratios and theoretical upper bounds.
ExampleEquilibriumOptimumObserved in this exampleTheoretical upper bound
Pigou (x and 1)13/44/3 (equal to the bound)4/3
Braess (4,000 cars)320,000258,75080 / 64.69 ≈ 1.2374/3
Braess, normalized (x, 1, 1, x, 0)23/24/3 (equal to the bound)4/3
Two routes, 3,000 cars75,00071,2501.0534/3
20,000 random linear parallel networks——largest 1.334/3
Load balancing, 7 jobs, speeds 2, 1, 1 (total time)1312.51.045/2 (atomic players)

A theoretical upper bound is the worst case over a class (for example over all networks with linear latencies). The ratio observed in a particular example is often smaller. In the random experiment in the table, a script computed the equilibrium and the optimum in 20,000 networks with 2–4 parallel links, randomly chosen latency coefficients a, b and a randomly chosen traffic demand. The ratio exceeded 4/3 in no example; in examples resembling Pigou's (one link almost constant, the other linear starting from zero) it came close to 4/3. The experiment repeated for the computations of this chapter also found the largest ratio to be about 1.333.

The example in the last row belongs to a different class. The players there are individual jobs, not nonatomic traffic; the bound for such games is 5/2 and is treated in 9.3.9.

9.3.7A single recipe: smoothness

The 4/3 proof uses only two ingredients: the definition of equilibrium and an inequality that holds on every edge. In 2009 Roughgarden turned this structure into a recipe (Roughgarden, 2009). The recipe is called smoothness, and the PoA bounds of many games can be proved with the same pattern.

The thought experiment. Let s be a state (every player has a strategy) and sOPT the optimum. While the others stay at s, what would player i pay if only he or she switched to the strategy in sOPT? This is player i's deviation cost.

Notation. s−i: the strategies of the players other than i. Ci(siOPT, s−i): the deviation cost of i. C(s) = Σi Ci(s): the total cost.

Definition 9.4

Let λ > 0 and 0 ≤ μ < 1 be two constants. If for every s and sOPT

Σi Ci(siOPT, s−i) ≤ λ · C(sOPT) + μ · C(s)

holds, the game is (λ, μ)-smooth.

In words: the sum of the deviation costs does not exceed λ times the cost of the optimum plus μ times the cost of s. The inequality is required for every state s, not only for equilibria. The condition is therefore strong, but it is exactly this generality that is useful in the proof. As λ and μ get smaller, the bound obtained improves.

The edge inequality in the 4/3 proof is exactly a smoothness condition. Its left side is “the cost of the optimum's traffic at the equilibrium's latencies”; in nonatomic traffic this is the sum of the deviation costs. Its right side is 1 · C(fOPT) + ¼ · C(f). So nonatomic routing with linear latencies is (1, ¼)-smooth.

9.3.8From smoothness to a PoA bound

Theorem 9.3 (The smoothness bound)

In a (λ, μ)-smooth cost game, every Nash equilibrium s satisfies C(s) ≤ λ / (1 − μ) · C(sOPT); that is, PoA ≤ λ / (1 − μ).

1. Equilibrium. s is a Nash equilibrium: nobody gains by deviating alone. In particular no player gains by switching to his or her strategy in the optimum either: Ci(s) ≤ Ci(siOPT, s−i) for every i.

2. Sum. These inequalities are summed over all players. The sum of the left sides is the total cost: C(s) ≤ Σi Ci(siOPT, s−i).

3. Apply smoothness. By definition the right side is at most λ · C(sOPT) + μ · C(s). Thus C(s) ≤ λ · C(sOPT) + μ · C(s).

4. Rearrange. Move μ · C(s) to the left: (1 − μ) · C(s) ≤ λ · C(sOPT). Since μ < 1, 1 − μ is positive and both sides can be divided by (1 − μ) · C(sOPT): C(s) / C(sOPT) ≤ λ / (1 − μ). Since s is an arbitrary equilibrium, the bound holds for the worst equilibrium too: PoA ≤ λ / (1 − μ). □

Familiar examples. The edge inequality of the 4/3 proof means λ = 1, μ = ¼: 1 / (1 − ¼) = 1 / (3/4) = 4/3. For atomic (indivisible-player) linear congestion games one can take λ = 5/3, μ = 1/3: (5/3) / (2/3) = 5/2.

Example 9.8

A game is known to be (1, ½)-smooth. The bound is 1 / (1 − ½) = 2. With the same λ and μ = ¼ the bound would be 4/3. The effect of μ is large: as μ approaches 1, 1 − μ approaches zero and the bound explodes. That is why the definition requires μ < 1; with μ = 1 Step 4 would require dividing by zero and no bound would result.

Why does it matter? The proof uses only the condition “nobody deviates alone”, and only for a single deviation (the switch to the strategy in the optimum). This condition also holds on average in looser kinds of equilibrium. For example in mixed equilibria, where players choose probabilistically, Step 1 can be written with expected values and the same bound results. The bound that follows from smoothness and is carried over in this way to broad kinds of equilibrium is called the robust Price of Anarchy.

9.3.9Atomic congestion games: PoA ≤ 5/2

In nonatomic traffic the effect of a single driver is neglected. In many systems, however, the number of players is small and each player loads the resource noticeably: a few large data transfers, a few server jobs. Such games are called atomic congestion games. The model is as follows:

  • Each player carries one unit of load and chooses a set of edges (a path).
  • The edge cost is linear: if x players use an edge, each pays ce(x) = aex + be.
  • ze: the number of people using edge e at equilibrium; ye: the number using it at the optimum.

The difference is at a single point. In nonatomic traffic a driver who changes routes does not change the latency of the new route. In an atomic game a player who alone switches to his or her optimum route finds at most ze + 1 people on edge e: the ze who are there at equilibrium and himself or herself. This “+1” is the delay the player adds himself or herself.

The key inequality. For an edge with c(x) = x the sum of the deviation costs is at most y(z + 1): each of the y players using the edge at the optimum pays at most z + 1. The optimum's cost on that edge is y · y = y2 and the equilibrium's is z2. The smoothness inequality needed, for all integers y, z ≥ 0, is:

y(z + 1) ≤ 5/3 · y2 + 1/3 · z2

z (load at equilibrium)y(sOPT)01234500149162512002612214965693362822181616468574841363351109684746660
Figure 9.8: The table of the key inequality. Rows are y (load at the optimum), columns z (load at equilibrium); a cell is 3 × (right side − left side), so that no fractions appear. There is no negative cell; at the orange 0s the two sides are equal.

Figure 9.8 tests the inequality at small values one by one. The cell value is 3 · (5/3 · y2 + 1/3 · z2 − y(z + 1)) = 5y2 + z2 − 3y(z + 1). No cell is negative; a script tried all the values for y, z ≤ 60 and found no negative value. The orange 0s are the equality points: (y, z) = (0, 0), (1, 1) and (1, 2).

Example 9.9
  1. (y, z) = (1, 2): left 1 · 3 = 3; right 5/3 · 1 + 1/3 · 4 = 5/3 + 4/3 = 3. Equality; cell value 0.
  2. (y, z) = (2, 3): left 2 · 4 = 8; right 5/3 · 4 + 1/3 · 9 = 20/3 + 3 = 29/3 ≈ 9.67. It holds; the difference is 5/3, cell value 3 · 5/3 = 5.
  3. (y, z) = (1, 0): left 1 · 1 = 1; right 5/3. It holds; cell value 5 − 3 = 2.
  4. Conclusion: the inequality holds on every edge; summing over the edges, the game is (5/3, 1/3)-smooth and PoA ≤ (5/3)/(2/3) = 5/2.

The same result holds for a general linear cost a x + b: the part with a is a times the inequality above, and the part with b holds by itself in the form b · y ≤ 5/3 · b · y (since a constant cost is unaffected by crowding). The 5/2 bound is also tight; this was shown independently by Awerbuch, Azar and Epstein and by Christodoulou and Koutsoupias in 2005 (Awerbuch et al., 2005; Christodoulou and Koutsoupias, 2005).

The comparison is instructive: the bound is 4/3 for nonatomic traffic and 5/2 for indivisible players. The source of the difference is the “+1” in z + 1: the delay the player adds himself or herself. At (y, z) = (1, 1) the left side is 2; with a smaller λ, for example (1, 1/3), the right side would be 1 + 1/3 = 4/3 < 2 and the inequality would fail. So in games with large players the loss can be larger.

9.3.10PoA in the Braess network

Braess's paradox is the most surprising result of selfish routing: adding a new road to a network can raise everyone's travel time. The German mathematician Dietrich Braess demonstrated this phenomenon in 1968. Here the paradox is viewed through the PoA.

In the network 4,000 cars go from s to t. There are four old links: s→A and B→t depend on traffic (x/100 min), A→t and s→B are constant (45 min). Before the new road opens there are two routes, and by symmetry the traffic splits evenly: 2,000 cars on each route, time 2,000/100 + 45 = 65 min. This distribution is both the equilibrium and the optimum; PoA = 1.

Let a road with latency 0 (A→B) open between A and B. A third route is born: s→A→B→t (the zigzag).

x/1004,000 cars450 cars450 carsx/1004,000 cars04,000 carssABtEquilibrium in the network with the new roadeveryone s→A→B→t: 80 minC(equilibrium) = 4,000 · 80= 320,000 car-min
Figure 9.9: The equilibrium in the Braess network with the new road. All 4,000 cars use the zigzag route (s→A→B→t, red); the time per person is 40 + 0 + 40 = 80 min, the total 320,000 car-min.

The equilibrium. In Figure 9.9 everyone is on the zigzag. Let us check: there are 4,000 cars each on s→A and B→t, each taking 4,000/100 = 40 min. The zigzag takes 40 + 0 + 40 = 80 min. A driver who switches to an old route waits 40 + 45 = 85 min; since 85 > 80 nobody switches. The equilibrium cost is 4,000 · 80 = 320,000 car-min. The new road has raised everyone's time from 65 to 80 minutes.

A common comparison: 80/65 ≈ 1.23. This ratio compares the equilibrium of the new network with the equilibrium of the old network and measures the Braess loss. But the denominator of the PoA is the optimum of the same network. The question is: in the network with the new road, can the planner achieve an average better than 65 minutes?

Does the planner use the zigzag? Look at the marginal costs in the old distribution (2,000 on each old route, zigzag empty). There are 2,000 cars on s→A and the latency is 20 min. The marginal cost is ℓ + x · ℓ′ = 20 + 2,000 · (1/100) = 40 min. The zigzag uses two such edges: 40 + 0 + 40 = 80. The old route is 40 + 45 = 85 (the marginal cost of a constant edge equals its own latency). 80 < 85: even the planner sends a few cars onto the zigzag.

Example 9.10

By symmetry, assume that at the optimum there are a cars on each old route and z = 4,000 − 2a cars on the zigzag.

  1. Edge loads. Edge s→A is used by the a cars on the route s→A→t and the z cars on the zigzag: a + z = 4,000 − a. By symmetry the same holds for B→t.
  2. Total cost. Each of the two variable edges contributes (4,000 − a) cars × (4,000 − a)/100 min; each of the two constant edges contributes a · 45; the new road contributes 0: C(a) = 2(4,000 − a)2/100 + 90a.
  3. Derivative. The derivative of (4,000 − a)2 with respect to a is −2(4,000 − a). C′(a) = −4(4,000 − a)/100 + 90 = 0 ⇒ 4,000 − a = 2,250 ⇒ a = 1,750, z = 500.
  4. Cost. C(1,750) = 2 · 2,2502/100 + 90 · 1,750 = 101,250 + 157,500 = 258,750 car-min. The average time is 258,750 / 4,000 ≈ 64.69 min; slightly better than 65.
  5. Check: are the marginal costs equal? On s→A there are 2,250 cars, the latency is 22.5 min, the marginal cost 22.5 + 22.5 = 45. Zigzag: 45 + 0 + 45 = 90. Old route: 45 + 45 = 90. Equal ✓. A script scanned all distributions, including nonsymmetric ones, and found the same optimum.
  6. Ratio. PoA = 320,000 / 258,750 ≈ 1.237 ≤ 4/3.
x/1002,250 cars451,750 cars451,750 carsx/1002,250 cars0500 carssABtSymmetric: a cars on each old roadC(a) = 2(4000 − a)²/100 + 90aC′ = 0 → a = 1,750, z = 500C(opt) = 258,750
Figure 9.10: The optimum in the Braess network with the new road: 1,750 cars on each old route and 500 on the zigzag. C(OPT) = 258,750 car-min.

Figure 9.10 shows the optimal distribution. The new road has improved the optimum slightly (from 260,000 to 258,750) but made the equilibrium much worse (from 260,000 to 320,000). The PoA measures these two effects within the same network.

The normalized Braess network. In textbooks the network is usually given with 1 unit of traffic and simple latencies: s→A: x, A→t: 1, s→B: 1, B→t: x, A→B: 0. At equilibrium everyone is on the zigzag: 1 + 0 + 1 = 2; a driver who switches to an old route waits 1 + 1 = 2 and does not gain. The optimum is to close the zigzag and split the traffic half and half: each driver waits 1/2 + 1 = 3/2. The ratio is 2 / (3/2) = 4/3: this network also reaches the 4/3 bound exactly. In the 4,000-car network the times of the constant and variable edges are not so well matched; that is why the ratio stays below the bound, at 1.237.

9.3.11Common mistakes with the bounds

Common mistakes
  • Taking 4/3 to be universal: The bound is for linear latency and nonatomic traffic. With latency xp the PoA grows without bound; for atomic players the bound is 5/2.
  • Assuming the ratio grows in complicated networks: By Roughgarden's result the worst example always has two parallel links; the network structure does not enlarge the ratio.
  • Putting the old network in the denominator in Braess: 80/65 is the Braess loss, not the PoA. The denominator of the PoA is the optimum of the same network (258,750).
  • Checking smoothness only at equilibrium: The definition requires it for every state s; the proof uses this generality.
  • Taking μ to be 1 or larger: If 1 − μ ≤ 0 the division cannot be done or the sign flips; no bound results.

9.4Load balancing

The Price of Anarchy was first defined not in traffic networks but in a model of distributing jobs over parallel machines (Koutsoupias and Papadimitriou, 1999). Today this model appears in server clusters, in task placement in the cloud and in distributing work over processor cores. It differs from traffic in two ways: the players are indivisible (each job goes to a single machine) and the social cost is often not the total but the maximum load.

9.4.1The load balancing game

Definition 9.5

In the load balancing game there are n jobs (players) and m identical machines; the size of job j is wj. Each job chooses a machine. The load of a machine is the sum of the sizes of the jobs placed on it. The cost of a job is the load of the machine it chose (all the jobs on that machine finish in a time equal to the machine's load). The social cost is the maximum load of the machines (the makespan), that is, the time at which all jobs finish.

In this model, if job j moves from machine k to machine h, its new cost is load(h) + wj, because it adds its own size to the current load on h. If this number is smaller than the present cost load(k), the move is profitable. An assignment is a Nash equilibrium if there is no profitable move for any job:

for every j and h: load(h) + wj ≥ load(kj)

Here kj is the current machine of j. A “move” to its own machine is meaningless: for h = kj the left side is load(kj) + wj, which is always larger than the right side.

i1: 2i2: 2i3: 1i4: 1M1: 4M2: 2makespan = 4cost of i3, i4: 2
Figure 9.11: Four jobs on two identical machines: i1 and i2 of size 2 on M1 (load 4), i3 and i4 of size 1 on M2 (load 2). The makespan is 4; the cost of the jobs on M2 is 2.

In this game a pure Nash equilibrium always exists. This is not true in every game; in Rock–Paper–Scissors, for example, there is no pure equilibrium. In load balancing the following argument shows that an equilibrium exists. Start from any assignment. If the assignment is not an equilibrium there is a profitable move: job j moves from k to h and load(h) + wj < load(k). After the move the load of k falls and the load of h rises; but the new load of h is smaller than the old load of k. If the machine loads are sorted from largest to smallest into a list, this list “decreases” after the move: comparing the two lists from the left, at the first place where they differ the new list has a smaller number. In this comparison, which resembles dictionary order, the list cannot decrease forever, because the ways of distributing jobs over machines are finite in number and no list can repeat. So the profitable moves end somewhere; where they end is a Nash equilibrium.

Example 9.11

Let jobs of sizes 2, 2, 1, 1 be initially all on M1. The loads are (6, 0), the sorted list [6, 0].

  1. i1 (size 2) moves to M2: 0 + 2 = 2 < 6. The loads are (4, 2), the sorted list [4, 2]. The first element fell from 6 to 4: the list decreased.
  2. i3 (size 1) moves to M2: 2 + 1 = 3 < 4. The loads are (3, 3), the list [3, 3]. It decreased again.
  3. Now no job can gain: a job of size 2 would wait 3 + 2 = 5 on the other machine, a job of size 1 would wait 3 + 1 = 4. The process stops at the equilibrium (3, 3).

9.4.2Step by step: the {2, 2, 1, 1} example

Four jobs of sizes 2, 2, 1 and 1 are to be distributed over two identical machines. Each job wants to minimize its own completion time, that is, the total load of its machine. The social cost is the maximum load.

Example 9.12
  1. Social optimum. The total work is 2 + 2 + 1 + 1 = 6. Since there are two machines, the maximum load is at least 6/2 = 3. The assignment {2, 1} | {2, 1} gives loads 3 and 3 and reaches this lower bound. OPT = 3.
  2. Another assignment. The two large jobs on M1 (load 4), the two small jobs on M2 (load 2). The maximum load is 4. Can this be an equilibrium?
  3. A large job deviates. If i1 (size 2) moves to M2 it waits 2 + 2 = 4; it now waits 4. No gain. The same holds for i2.
  4. A small job deviates. If i3 (size 1) moves to M1 it waits 4 + 1 = 5; it now waits 2. Worse. The same for i4.
  5. Conclusion. Nobody gains: {2, 2} | {1, 1} is a Nash equilibrium and its maximum load is 4.
  6. Ratios. The optimum is also an equilibrium (at 3 | 3, a job of size 2 that moves waits 5 and a job of size 1 that moves waits 4). The worst equilibrium is 4, the best is 3: PoA = 4/3, PoS = 1.
i1: 2i2: 2i3: 1i4: 1M1: 4M2: 2makespan 4if i1 (2) moves to M2:2 + 2 = 4, now 4→ no gainif i3 (1) moves to M1: 4 + 1 = 5 > 2
Figure 9.12: Deviation check in the assignment {2, 2} | {1, 1}. If i1 moves to M2 it waits 2 + 2 = 4, and it already waits 4: no gain. If i3 moves to M1 it waits 4 + 1 = 5 > 2.

Why the bad equilibrium arises in this example can be seen in Figure 9.12. M1 is overloaded, but the jobs there are large; if they move to M2 they wait 4 again because of their own size. The small jobs on M2 see no reason to go to M1. Nobody sacrifices himself or herself to “balance the load”. With a tie (4 < 4 is false) the job stays where it is; this rule comes from the strict inequality in the definition.

9.4.3Code trace: is_nash()

The function that checks whether an assignment is an equilibrium is as follows. sizes is the list of job sizes, assign is the machine index of each job (0 = M1, 1 = M2), and m is the number of machines.

def is_nash(sizes, assign, m):
  load = [0] * m
  for j, k in enumerate(assign):
    load[k] += sizes[j]
  for j, k in enumerate(assign):
    for h in range(m):
      if load[h] + sizes[j] < load[k]:
        return False      # j moves
  return True             # nobody moves

The function works in two stages:

  • Compute the loads. load = [0] * m builds a list of m zeros. In the first loop enumerate(assign) gives each job's index j and its machine k; the size of the job is added to the load of that machine.
  • Try the deviations. The second loop tests the condition load[h] + sizes[j] < load[k] for every job j and every machine h. If the condition is true, job j gains by moving to h, and the function returns False at once. If no deviation is profitable it returns True.

The trace of the call is_nash([2, 2, 1, 1], (0, 0, 1, 1), 2) is given in Table 9.7. For h = k (its own machine) the condition is always false, because load[k] + sizes[j] < load[k] is impossible; the table shows only the steps with h ≠ k.

Table 9.7: Trace of is_nash([2, 2, 1, 1], (0, 0, 1, 1), 2).
StepVariablesOperationResult
1—load = [0, 0][0, 0]
2j = 0, k = 0i1 (size 2) to M1[2, 0]
3j = 1, k = 0i2 (size 2) to M1[4, 0]
4j = 2, k = 1i3 (size 1) to M2[4, 1]
5j = 3, k = 1i4 (size 1) to M2[4, 2]
6j = 0, h = 12 + 2 < 4?no
7j = 1, h = 12 + 2 < 4?no
8j = 2, h = 04 + 1 < 2?no
9j = 3, h = 04 + 1 < 2?no
10—loop finishedTrue

No job could move to a profitable machine; the function returns True: {2, 2} | {1, 1} is a Nash equilibrium. Had the same function been called with the assignment (0, 0, 0, 1), the loads would be [5, 1] and it would return False at the first deviation test (1 + 2 = 3 < 5 for i1). The cost of the function is O(nm) comparisons for n jobs and m machines.

9.4.4Brute force: all 16 assignments

Since each of the four jobs can choose one of two machines, there are 24 = 16 assignments. Because the machines are identical, swapping M1 and M2 gives the same split; the 16 assignments therefore fall into five splits.

Table 9.8: All splits of the jobs {2, 2, 1, 1} over two machines (swapping M1 and M2 is counted in the same row).
Split (M1 | M2)Number of assignmentsMaximum loadNash?
{2, 1} | {2, 1}43✓ equilibrium
{2, 1, 1} | {2}44✗
{2, 2} | {1, 1}24✓ equilibrium
{2, 2, 1} | {1}45✗
{2, 2, 1, 1} | { }26✗

The numbers of assignments are found as follows. For {2, 1} | {2, 1}, one of the jobs of size 2 (2 ways) and one of the jobs of size 1 (2 ways) go to M1: 2 · 2 = 4. For {2, 2} | {1, 1} the large jobs are either on M1 or on M2: 2. The total is 4 + 4 + 2 + 4 + 2 = 16 ✓.

In each of the non-equilibrium splits there is a job that moves away. In {2, 1, 1} | {2}, if a job of size 1 on M1 moves to M2 it waits 2 + 1 = 3 < 4. In {2, 2, 1} | {1}, if a job of size 2 moves it waits 1 + 2 = 3 < 5. If all are on a single machine, any job gains by moving to the empty machine. The equilibria are those with maximum load 3 and 4: PoA = 4/3 (worst equilibrium), PoS = 1 (best equilibrium = optimum).

Best-response dynamics. This process, in which the players make profitable moves in turn, is called best-response dynamics. In this game the dynamics always stop at an equilibrium, because every profitable move shrinks the sorted load list (9.4.1). But the equilibrium reached depends on the starting point and the order of moves. The order in Example 9.11 reached (3, 3); if the large jobs start on M1 and the small ones on M2, the process never begins and stays at (4, 2).

9.4.5Code trace: poa_pos()

Table 9.8 was built by hand. A function that scans all the assignments can do the same job; for each assignment the function calls is_nash.

from itertools import product
def poa_pos(sizes, m):
  opt, eqs = float("inf"), []
  for assign in product(range(m), repeat=len(sizes)):
    load = [0] * m
    for j, k in enumerate(assign):
      load[k] += sizes[j]
    opt = min(opt, max(load))
    if is_nash(sizes, assign, m):       # eq. test
      eqs.append(max(load))
  return max(eqs) / opt, min(eqs) / opt
r = poa_pos([2, 2, 1, 1], 2)
print(round(r[0], 3), r[1])
  • product(range(m), repeat=len(sizes)) produces in turn all the tuples giving each job a machine index: (0, 0, 0, 0), (0, 0, 0, 1), …, (1, 1, 1, 1). With four jobs and two machines there are 16 tuples.
  • For each tuple the loads are computed and opt is updated to the smallest maximum load seen so far. float("inf") is an infinitely large initial value; at the first comparison it is certain to give way to a real number.
  • If the assignment is an equilibrium, its maximum load is appended to the list eqs.
  • At the end the ratios of the worst and the best equilibrium to the optimum are returned: (PoA, PoS).
Table 9.9: Trace of poa_pos([2, 2, 1, 1], 2). The “Deviator” column is the first profitable deviation that is_nash found.
AssignmentLoadsDeviatorEquilibrium?opt
(0, 0, 0, 0)[6, 0]i1: 0 + 2 = 2 < 6no6
(0, 0, 0, 1)[5, 1]i1: 1 + 2 = 3 < 5no5
(0, 0, 1, 0)[5, 1]i1: 1 + 2 = 3 < 5no5
(0, 0, 1, 1)[4, 2]noneyes, 44
(0, 1, 0, 0)[4, 2]i3: 2 + 1 = 3 < 4no4
(0, 1, 0, 1)[3, 3]noneyes, 33
(0, 1, 1, 0)[3, 3]noneyes, 33
(0, 1, 1, 1)[2, 4]i3: 2 + 1 = 3 < 4no3
(1, 0, 0, 0)[4, 2]i3: 2 + 1 = 3 < 4no3
(1, 0, 0, 1)[3, 3]noneyes, 33
(1, 0, 1, 0)[3, 3]noneyes, 33
(1, 0, 1, 1)[2, 4]i3: 2 + 1 = 3 < 4no3
(1, 1, 0, 0)[2, 4]noneyes, 43
(1, 1, 0, 1)[1, 5]i1: 1 + 2 = 3 < 5no3
(1, 1, 1, 0)[1, 5]i1: 1 + 2 = 3 < 5no3
(1, 1, 1, 1)[0, 6]i1: 0 + 2 = 2 < 6no3

When the scan ends, eqs = [4, 3, 3, 3, 3, 4] and opt = 3. The function returns (4/3, 3/3) = (1.333…, 1.0); the last line prints this as 1.333 1.0. The cost of the method is high: with n jobs and m machines there are mn assignments. With 30 jobs and 2 machines this number exceeds a billion. Brute force is good for verifying small examples; for large games the PoA must be bounded by analysis.

9.4.6The general result: 2 − 2/(m + 1)

In the {2, 2, 1, 1} example the PoA came out as 4/3. This is the worst possible value for two machines. The general result is as follows (Finn and Horowitz, 1979; Koutsoupias and Papadimitriou, 1999):

Theorem 9.4 (Pure PoA on identical machines)

On m identical machines, if the social cost is the maximum load, the Price of Anarchy of the pure Nash equilibria is

PoA = 2 − 2/(m + 1)

This value is tight.

Values: for m = 1 it is 1 (there is no choice with a single machine), for m = 2 it is 4/3, for m = 3 it is 3/2, for m = 9 it is 1.8. As m grows the ratio approaches 2 but never reaches 2. Selfish job distribution, whatever the number of machines, cannot be worse than twice the best distribution.

Why the bound stays below 2 can be seen by a short argument. Let L be the load of the most heavily loaded machine at an equilibrium. If that machine has a single job, L is the size of that job and the optimum must also put this job on some machine; the ratio is 1. If it has several jobs, let w be the size of the smallest job there. At equilibrium this job does not want to move to another machine: for every machine h, load(h) + w ≥ L, that is, every machine has a load of at least L − w. The total amount of work is therefore at least L + (m − 1)(L − w). The optimum cannot be smaller than the total work divided by the number of machines (the average load): OPT ≥ L − w(m − 1)/m. Also, since the most heavily loaded machine has at least two jobs and the smallest is w, w ≤ L/2. Putting the second fact into the first gives OPT ≥ L − (L/2)(m − 1)/m = L · (m + 1)/(2m). Rearranging gives L / OPT ≤ 2m/(m + 1) = 2 − 2/(m + 1). Example 9.13 shows that this bound is attained, that is, that it is tight.

Example 9.13

Six jobs of sizes 3, 3, 3, 1, 1, 1 are to be distributed over three identical machines. The bound is 2 − 2/4 = 3/2. This example reaches the bound.

  1. Optimum. The total work is 12, with three machines: the maximum load is at least 4. {3, 1} | {3, 1} | {3, 1} achieves this: OPT = 4.
  2. The bad assignment. {3, 3} | {3} | {1, 1, 1}: loads 6, 3, 3.
  3. A job of size 3 on M1: if it moves to M2 it waits 3 + 3 = 6, if it moves to M3 it waits 3 + 3 = 6; it now waits 6. No gain.
  4. The job of size 3 on M2: it now waits 3; if it moved to M3 it would wait 6, to M1 9. No gain.
  5. A job of size 1 on M3: it now waits 3; if it moved to M2 it would wait 4, to M1 7. No gain.
  6. Conclusion. The assignment is an equilibrium and the ratio is 6/4 = 3/2. A script that scanned all 36 = 729 assignments confirmed that the maximum loads of the equilibria are 4 and 6.

Mixed equilibria. If jobs can choose machines randomly (mixed strategies) the situation changes. Then the expected maximum load is used as the social cost, and the PoA can no longer be bounded by a constant: it grows with m very slowly but without bound. The growth rate is of the order log m / log log m (Koutsoupias et al., 2003; Czumaj and Vöcking, 2002). This resembles the “balls into bins” problem: when m balls are thrown at random into m bins, more balls than expected pile up in the fullest bin. Randomness leads to unlucky collisions even at equilibrium.

9.4.7Machines with different speeds (related machines)

Real servers do not all run at the same speed. In the related machines model the speed of machine i is si and the completion time of a job is the total load of its machine divided by si. A fast machine finishes the same load in a shorter time. In this model too a pure Nash equilibrium always exists (the same “sorted list decreases” idea works with completion times).

Example 9.14

Speeds A = 2, B = 1, C = 1; job sizes 2, 1, 1. The social cost is the maximum completion time.

  1. Optimum. A {2}, B {1}, C {1}: times 2/2 = 1, 1/1 = 1, 1/1 = 1. The maximum time is 1. This is the best, because the job of size 2 takes 1 even on the fastest machine.
  2. A bad assignment. A {1, 1}, B {2}, C { }: times 2/2 = 1, 2/1 = 2, 0. The maximum time is 2.
  3. The job of size 2 deviates. It now waits 2. If it moves to A it waits (2 + 2)/2 = 2, if it moves to C 2/1 = 2. No gain.
  4. A job of size 1 deviates. It now waits 1. If it moves to C it waits 1/1 = 1, if it moves to B 3/1 = 3. No gain.
  5. Conclusion. The second assignment is also an equilibrium. The ratio is 2/1 = 2.
Table 9.10: Two equilibria on related machines (speeds A = 2, B = 1, C = 1; jobs 2, 1, 1).
AssignmentTimes (A, B, C)MaximumNash?
A {2}, B {1}, C {1}1, 1, 11yes (optimum)
A {1, 1}, B {2}, C { }1, 2, 02yes

The ratio is 2, which is greater than the bound 2 − 2/4 = 1.5 for three identical machines. On identical machines the loss of a pure equilibrium always stays below a factor of 2. If the speeds differ, the loss grows without bound as the number of machines increases (though very slowly); the growth is of the order log m / log log m (Czumaj and Vöcking, 2002).

9.4.8Back to the game: total completion time

The measure in the game at the beginning of the chapter is different. There the social cost is not the maximum load but the sum of the completion times of all the jobs. There are 7 jobs of size 1 and the server speeds are A = 2, B = 1, C = 1. If a server holds L jobs, each finishes in time L / s; the contribution of that server to the sum is L · L / s.

Table 9.11: The two equilibria of the game (7 units of work, speeds 2, 1, 1).
Loads (A, B, C)Total timeNash?
(3, 2, 2)3 · 1.5 + 2 · 2 + 2 · 2 = 12.5yes (optimum)
(4, 2, 1)4 · 2 + 2 · 2 + 1 · 1 = 13yes (worst)
Example 9.15
  1. Is (4, 2, 1) an equilibrium? A job on A waits 2; if it moves to C it waits (1 + 1)/1 = 2, if it moves to B it waits 3. No gain. A job on B waits 2; if it moves to C it waits 2, if it moves to A 5/2 = 2.5. No gain. The job on C waits 1; that is already the best. Equilibrium ✓.
  2. Is (3, 2, 2) an equilibrium? A job on A waits 1.5; if it moved to B or C it would wait 3. A job on B waits 2; if it moved to A it would wait 4/2 = 2 (equal, no gain), to C 3. Equilibrium ✓.
  3. Ratio. PoA = 13 / 12.5 = 1.04. Its mirror image (4, 1, 2) is also an equilibrium with the same cost (13). A script that scanned all load distributions confirmed that the total times of the equilibria are only 12.5 and 13, and that the smallest total is 12.5.

Where does selfish placement lead? The jobs arrive one after another. What happens if each job, at the moment it arrives, picks the server on which its own completion time will be shortest (breaking ties in favor of the server that comes first alphabetically)? Table 9.12 follows this process step by step.

Table 9.12: Greedy selfish placement. In each row the completion time of the new job on the three servers; the chosen server is in bold.
JobIf it goes to AIf it goes to BIf it goes to CChoiceLoads
11/2 = 0.511A(1, 0, 0)
22/2 = 111A (tie)(2, 0, 0)
33/2 = 1.511B (tie)(2, 1, 0)
41.521C(2, 1, 1)
51.522A(3, 1, 1)
64/2 = 222A (tie)(4, 1, 1)
75/2 = 2.522B (tie)(4, 2, 1)

The order is A, A, B, C, A, A, B, and the result is exactly (4, 2, 1), one of the worst equilibria. Greedy placement picks the best for the new job at each step but cannot foresee the effect of the jobs that arrive later; the sixth job going to A makes A expensive for the seventh job.

With 6 jobs and three identical servers the only equilibrium is (2, 2, 2) and it is the optimum: PoA = 1. The loss appears when the servers differ. One last comparison: the 4/3 in the {2, 2, 1, 1} example measures the maximum load, while this game measures the total time. The value of the PoA depends on the social cost measured; when one speaks of “the PoA of this game”, it must always be stated which cost is meant.

9.4.9Common mistakes in load balancing

Common mistakes
  • Not adding one's own size when deviating: A job moving to h waits load(h) + wj, not load(h). In {2, 2} | {1, 1}, saying that a large job sees M2 with load 2 and “2 < 4, so it moves” is wrong; after moving it waits 4.
  • Moving on a tie: The condition in the definition is strict (<). A move to an equal cost is not profitable; the job stays where it is.
  • Assuming the optimum is always an equilibrium: In this example the optimum is an equilibrium (PoS = 1), but this is not so in every game; in Pigou's network the optimum is not an equilibrium.
  • Mixing up the measures: The maximum load and the total time give different PoA values. The social cost must be stated explicitly before the calculation starts.
  • Carrying the bound for mixed equilibria over to pure ones: 2 − 2/(m + 1) is for pure equilibria; for mixed equilibria the ratio grows slowly with m.

9.5The Price of Stability

In most of the examples so far the PoA and the PoS were the same, or the PoS was 1. There is also a family of games in which the two ratios can be very different: network design games, in which players rent links and the cost is shared equally among those using them. In these games the worst equilibrium can be very bad, but there is always a good equilibrium too. The tool that shows how good that equilibrium is, is the potential function.

9.5.1PoA ≠ PoS in the same game

Definition 9.6

In a network design game with fair cost sharing each link has a fixed cost ce. Each player chooses a path between his or her own source and destination nodes. If ne players use a link, each pays ce / ne. The total cost is the sum of the costs of the links used.

In this game there is an effect opposite to congestion: the more people use a link, the lower the cost per person. The players do not push one another; they attract. So it is good for the players to gather on the same link; the problem is which link they gather on.

Example 9.16

4 players rent a connection from s to t. There are two options: link A costs 2 TL, link B costs 6 TL. Those who use a link split its cost equally.

  1. Everyone on A. Each pays 2/4 = 0.5 TL. A player who moved alone to B would pay 6 TL. Nobody moves: equilibrium. The total is 2 TL, which is also the optimum (the cheapest link is used).
  2. Everyone on B. Each pays 6/4 = 1.5 TL. A player who moved alone to A would pay 2 TL; since 2 > 1.5 nobody moves. This is also an equilibrium; the total is 6 TL.
  3. A split profile (1 on A, 3 on B). The player on A pays 2 TL, those on B pay 6/3 = 2 TL. If a player on B moves to A, two people share A and the player pays 2/2 = 1 TL; 1 < 2, so the player leaves. Not an equilibrium.
  4. All profiles. When all 24 = 16 profiles are scanned, only “all on A” and “all on B” turn out to be equilibria. In the profile with 2 on A and 2 on B, a player on B pays 3 TL and would pay 2/3 TL on A; with 3 on A and 1 on B, the player on B pays 6 TL and would pay 0.5 on A.
  5. Ratios. PoA = 6/2 = 3 (worst equilibrium), PoS = 2/2 = 1 (best equilibrium).
stA: 2 TLB: 6 TL1234everyone on A: 0.5 TL eacha player moving alone to B: 6 TLtotal 2 = optimum
Figure 9.13: The good equilibrium: all four players on link A (2 TL), 0.5 TL each. A player moving alone to B would pay 6 TL. Total 2 = optimum.
stA: 2 TLB: 6 TL1234everyone on B: 1.5 TL eacha player moving alone to A: 2 TLtotal 6
Figure 9.14: The bad equilibrium: all four players on link B (6 TL), 1.5 TL each. A player moving alone to A would pay 2 TL; nobody moves. Total 6.

Figure 9.13 and Figure 9.14 are two equilibria of the same game. At the bad equilibrium everyone would gain if all moved to A together (0.5 TL instead of 1.5). But a player who moves alone pays 2 TL and loses. The problem is a coordination problem: if all the players could move at the same time, the loss would disappear. The PoS is the measure of this optimistic scenario. If somebody tells the players “all of you use A” and nobody wants to deviate from the suggestion because it is an equilibrium, there is no loss. The PoA says how much can be lost if no suggestion is made.

How large can the PoA be? The same structure can be built with more extreme numbers. Let there be n players, a link of cost 1 and a link of cost n. If everyone is on the expensive link, each pays n/n = 1. A player who moved alone to the cheap link would also pay 1; the move is not profitable. This profile is an equilibrium and its total cost is n; the optimum is 1. So in fair cost sharing games the PoA can be as large as n. As the number of players grows, the worst equilibrium becomes unboundedly bad.

9.5.2Step by step: the Hn example

Since the PoA can be bad, the question turns to the PoS: is the best equilibrium always close to the optimum? The answer is “yes, but not exactly”. In the example below even the best equilibrium is worse than the optimum by a certain ratio. The harmonic number appears in the example:

Hn = 1 + 1/2 + 1/3 + … + 1/n

For example H1 = 1, H2 = 3/2, H3 = 11/6 ≈ 1.83, H4 = 25/12 ≈ 2.08. Hn grows very slowly and is approximately ln n; H100 ≈ 5.19.

Setup. There are 4 players and each goes to t by one of two routes: a route used only by himself or herself with cost 1/i (1 for player 1, 1/2 for player 2, 1/3 for player 3, 1/4 for player 4), or a shared route that everyone can use with cost 1 + ε = 1.1. Here ε is a small extra cost (0.1). The cost of the shared route is split equally among its users.

Optimum. If everyone uses the shared route the total is 1.1. If everyone uses his or her own route the total is 1 + 1/2 + 1/3 + 1/4 = 25/12 ≈ 2.083. Mixed choices can be tried too, but once the shared route is used its cost is paid once, and those who add their own routes only increase the total. The optimum is the state in which everyone is on the shared route: total 1.1, 0.275 per person.

11/21/31/41.11234vtplayerroutepays1shared0.2752shared0.2753shared0.2754shared0.275total1.1
Figure 9.15: The optimum in the Hn example: four players use the shared route (cost 1.1), each paying 0.275. The thin lines are the unused own routes (costs 1, 1/2, 1/3, 1/4).
Example 9.17

Start from the optimum and follow the best-response dynamics: at each step, if some player would gain by moving to his or her own route, that player moves.

  1. Player 4. Pays 0.275 on the shared route; the own route costs 1/4 = 0.25 < 0.275. Leaves. The remaining three now pay 1.1/3 ≈ 0.367.
  2. Player 3. The own route costs 1/3 ≈ 0.333 < 0.367. Leaves. The remaining two pay 1.1/2 = 0.55.
  3. Player 2. The own route costs 1/2 = 0.5 < 0.55. Leaves. Player 1 pays for the shared route alone: 1.1.
  4. Player 1. The own route costs 1 < 1.1. Leaves.
  5. The final state. Everyone is on his or her own route. Nobody wants to go back to the shared route: a player who went back alone would pay 1.1, and 1.1 is more expensive than every player's own route. The total is 1 + 1/2 + 1/3 + 1/4 = 25/12 ≈ 2.083.

The unique equilibrium. If k ≥ 1 people are on the shared route, the highest-numbered of them has a number of at least k; its own route costs 1/i ≤ 1/k < 1.1/k, so it leaves. So no profile in which the shared route is used is an equilibrium, and the only equilibrium is “everyone on his or her own route”. A script that scanned the 16 profiles confirmed this too.

Ratio. Since there is a single equilibrium, PoS = PoA = (25/12) / 1.1 = 125/66 ≈ 1.894.

11/21/31/41.11234vtplayerroutepays1own12own0.53own0.3334own0.25total2.083
Figure 9.16: The unique equilibrium in the Hn example: everyone on his or her own route; the payments are 1, 0.5, 0.333 and 0.25, total 25/12 ≈ 2.083.

The unraveling in the example is a chain reaction. The player whose cheapest alternative leaves the shared route first; this raises the share of the rest and pushes the next one to leave. As ε approaches zero the PoS of the same structure with n players approaches Hn = 1 + 1/2 + … + 1/n: the optimum goes to 1 and the unique equilibrium to Hn. With four players this limit is 25/12 ≈ 2.08; with ε = 0.1 we found 1.894.

9.5.3Rosenthal's potential

The Hn example showed that the PoS can approach at least Hn. To show that this is an upper bound, that is, that the PoS exceeds Hn in no fair cost sharing game, an auxiliary function is needed.

Notation. ce: the cost of link e; ne: the number of players using e (each pays ce/ne). H(k) = 1 + 1/2 + … + 1/k and H(0) = 0; Hn = H(n). The total cost C(s) is the sum of the costs of the links used.

Definition 9.7

In a fair cost sharing game Rosenthal's potential is defined as

Φ(s) = Σe ce · H(ne)

The definition comes from an imaginary count. Think of the players as added to a link one by one: the 1st person writes ce because he or she is alone, the 2nd writes ce/2, …, the k-th writes ce/k. The sum of these numbers is ce · (1 + 1/2 + … + 1/k) = ce · H(k). Each person has written the share “at the moment of arrival”; the potential is the sum of these shares over all links.

The key property of the potential. When a player changes route, the change in his or her own cost equals exactly the change in the potential. The reason is this: when the player leaves a link e, the count of that link falls from ne to ne − 1 and the potential falls by exactly ce/ne (the last term of the sum), which is the share the player was paying there. When the player joins a new link e′, the count of that link rises by one and ce′/(ne′ + 1) is added to the potential; this is the new share the player will pay there. So if the deviating player gains (the cost falls), the potential falls by the same amount. A game with such a function is called a potential game.

Theorem 9.5 (Potential and cost)

For every profile s, C(s) ≤ Φ(s) ≤ Hn · C(s).

A link in use has at least one and at most n users; so 1 = H(1) ≤ H(ne) ≤ H(n) = Hn. Each term is multiplied by ce ≥ 0: ce ≤ ce · H(ne) ≤ Hn · ce. For links not in use, since H(0) = 0, the contribution to both the cost and the potential is zero. Summing over all links, the left side becomes C(s), the middle Φ(s), and the right side Hn · C(s). □

Example 9.18

In the Hn example (four players, ε = 0.1):

  1. Everyone on the shared route. The only link in use is the shared route and it has 4 users. C = 1.1, Φ = 1.1 · H(4) = 1.1 · 25/12 ≈ 2.29. C ≤ Φ; moreover Φ = H4 · C: equal to the upper bound, because all four players use the link.
  2. Everyone on his or her own route. Each route has one user; H(1) = 1. Φ = C = 25/12 ≈ 2.08: equal to the lower bound.
  3. The effect of one move. When player 4 leaves the optimum, his or her cost falls by 0.275 − 0.25 = 0.025. The potential: the shared route 1.1 · H(3) = 1.1 · 11/6 ≈ 2.017, player 4's route 1/4 · H(1) = 0.25; total ≈ 2.267. The old potential was ≈ 2.292; a fall of ≈ 0.025 ✓.

9.5.4PoS ≤ Hn: walking from the optimum to an equilibrium

Theorem 9.6 (Anshelevich et al., 2004)

In every network design game with fair cost sharing and n players, PoS ≤ Hn; in directed networks this bound is tight.

1. Start from the optimum. Run best-response dynamics from the profile sOPT: at each step a player moves to a route that is cheaper for him or her.

2. Φ falls with every move. In a potential game the cost change of the deviating player equals the change of Φ; if the player gains, Φ falls. Since Φ falls strictly at each step, the same profile cannot be visited twice. Since the number of profiles is finite, the dynamics stop at some profile s. Where it stops, nobody can find a profitable move; s is a Nash equilibrium and Φ(s) ≤ Φ(sOPT).

3. Build the chain.

C(s) ≤ Φ(s) ≤ Φ(sOPT) ≤ Hn · C(sOPT)

The first inequality is the left side of Theorem 9.5 (the potential is not smaller than the cost). The second is Step 2. The third is again the right side of Theorem 9.5 (the potential is at most Hn times the cost). So at least one equilibrium has cost at most Hn times the optimum: PoS ≤ Hn. Tightness comes from the Hn example. □

In the Hn example the numbers of the chain are: C(s) ≈ 2.08, Φ(s) ≈ 2.08, Φ(OPT) ≈ 2.29, H4 · C(OPT) = 25/12 · 1.1 ≈ 2.29. That is, 2.08 ≤ 2.08 ≤ 2.29 ≤ 2.29. The first and the third inequalities hold with equality; this is why the example comes so close to the bound.

The strength of the proof is that it does not need to know which equilibrium will be reached. The information “the potential falls” is enough. The same method does not work for the PoA: the worst equilibrium may lie where the dynamics from the optimum cannot reach, and its potential may be larger than that of the optimum. Indeed in these games the PoA can reach n while the PoS is at most Hn ≈ ln n. With 100 players this difference is 100 against about 5.19.

9.5.5Common mistakes with the Price of Stability

Common mistakes
  • Assuming the optimum is always an equilibrium: In the A/B example the optimum was an equilibrium; in the Hn example it is not. PoS = 1 only if the optimum is an equilibrium.
  • Confusing fair sharing with congestion: Here crowding lowers the cost per person. In a congestion game crowding raises the delay. In the deviation computation the denominator must be ne + 1 (including the newcomer).
  • Confusing the potential with the cost: Φ is a computational tool, not a cost anyone pays. The total cost counts ce for each link; the potential counts ce · H(ne).
  • Carrying the PoS bound over to the PoA: Hn is a guarantee only for the best equilibrium. The worst equilibrium can be n times the optimum.

9.6Reducing the PoA

Measuring the PoA is the first step; the second step is to reduce it. If the loss comes from an externality, the solution is to bring the externality into the player's own calculation. The most direct tool for this is the congestion toll; there are other tools too.

9.6.1A congestion toll shifts the equilibrium

Let us take up the two-route network of 9.2.6 again: ℓ1 = 5 + x1/100, ℓ2 = 20 + x2/200, 3,000 cars in total. Without a toll the equilibrium is x1 = 2,000 with a total of 75,000 car-min; the optimum is x1 = 1,500 with a total of 71,250 car-min.

Let a congestion toll τ be put on Route 1. To keep the calculation simple, the toll is counted as an extra cost for the driver measured in minutes: a toll of τ = 2.5 is the same, in the driver's eyes, as an extra delay of 2.5 minutes. The driver now sees ℓ1 + τ on Route 1 and at equilibrium ℓ1 + τ = ℓ2:

  1. 5 + τ + x1/100 = 20 + (3,000 − x1)/200.
  2. Multiply both sides by 200: 1,000 + 200τ + 2x1 = 7,000 − x1.
  3. 3x1 = 6,000 − 200τ ⇒ x1 = (6,000 − 200τ)/3.
Table 9.13: The equilibrium and the total delay as the toll τ (min) on Route 1 grows. The toll is not added to the total delay.
τx1x2Total delay (car-min)
02,0001,00075,000
2.5≈ 1,833≈ 1,167≈ 72,917
5≈ 1,667≈ 1,333≈ 71,667
7.51,5001,50071,250 (optimum)
10≈ 1,333≈ 1,667≈ 71,667
1020304001,0002,0003,000x₁minℓ₁ + τℓ₂x₁ ≈ 1,333 carstotal delay C (thousand car-min)τ = 075τ = 2.572.92τ = 571.67τ = 7.571.25τ = 1071.67optimum 71.25(bars start at 70,000)
Figure 9.17: The effect of a toll in the two-route network. On the left the cost ℓ1 + τ of Route 1 as the driver sees it (blue) crosses ℓ2 (red); as τ grows the crossing moves left. On the right the total delay for each τ; the smallest value is at τ = 7.5 (71,250), and at τ = 10 the total rises again.

Figure 9.17 shows the effect of the toll in two ways. In the graph on the left the curve of Route 1 shifts up by τ and the crossing of the two curves (the equilibrium) moves left: fewer drivers choose Route 1. The bars on the right show the total delay. As the toll grows some drivers move to the wide Route 2 and the total falls.

At τ = 7.5 the optimum becomes an equilibrium. x1 = (6,000 − 1,500)/3 = 1,500, exactly the distribution of the optimum. The number 7.5 is not random. A marginal-cost toll puts on each route the externality on that route: on Route 1, x1 · ℓ1′ = 1,500 · 1/100 = 15 min; on Route 2, x2 · ℓ2′ = 1,500 · 1/200 = 7.5 min. If these two tolls are imposed, the driver sees 20 + 15 = 35 on Route 1 and 27.5 + 7.5 = 35 on Route 2; they are equal, so the optimum is an equilibrium. But the driver's decision is affected only by the difference between the two routes: 15 − 7.5 = 7.5. That is why a toll worth 7.5 min on Route 1 alone gives the same result.

A toll is a transfer. The toll is collected from the drivers and goes elsewhere (to the municipality, to road building); it does not lengthen anyone's time. That is why it is not added to the total delay in the table. From the drivers' viewpoint, though, the situation is different: at τ = 7.5 the 1,500 drivers on Route 1 pay a total toll of 1,500 · 7.5 = 11,250 min. The drivers' “delay + toll” total is 71,250 + 11,250 = 82,500, which is larger than the 75,000 of the untolled equilibrium. If the revenue collected is not redistributed to the drivers, the drivers as a whole lose; the gain passes to society (to wherever the revenue is used).

Too high a toll overshoots. At τ = 10, x1 falls to about 1,333 and Route 2 fills more than it should; the total delay rises again to about 71,667. The right toll is the one equal to the externality; it is not “the more the better”.

9.6.2A marginal-cost toll fixes Pigou's network

In Pigou's network the aim is to make the optimum (x = 1/2) an equilibrium. Without a toll everyone is on the upper route and the total delay is 1.

Definition 9.8

A marginal-cost toll puts on each edge a toll equal to the externality of that edge: τe = fe · ℓe′(fe). The cost the driver sees is ℓe(fe) + τe; this is the marginal cost of the edge.

Example 9.19
  1. Compute the tolls. On the upper route ℓ(x) = x, ℓ′ = 1; the toll is τ = x · 1 = x. On the lower route ℓ = 1 is constant, ℓ′ = 0; there is no toll.
  2. What the driver sees. x + x = 2x on top, 1 on the bottom.
  3. The new equilibrium. The costs they see are equalized: 2x = 1 ⇒ x = 1/2. Selfish drivers choose the optimal distribution on their own. The total delay is 3/4.
  4. The toll collected. The 1/2 of the traffic on top each pay τ = 1/2: 1/2 · 1/2 = 1/4.
  5. The drivers' bill. Delay + toll = 3/4 + 1/4 = 1. The drivers pay the same total as at the untolled equilibrium (1); if the revenue is not redistributed the drivers do not gain, and the gain passes to society.
stℓ(x) = x + toll xℓ(x) = 1top: 0.5bottom: 0.500.511.5200.250.50.751x (share on the upper route)cost seen by the driverbottom: 1xx + tollnew equilibrium x = 1/2
Figure 9.18: Pigou's network with a marginal-cost toll. On the upper route the cost the driver sees is x + toll x = 2x (red sloping line), on the lower route 1 (red horizontal line). They cross at x = 1/2: the new equilibrium is the same as the optimum.

A fixed toll is enough too. The toll does not have to vary with traffic. If a fixed τ = 1/2 is put on the upper route, the driver sees x + 1/2 on top; the equilibrium is x + 1/2 = 1 ⇒ x = 1/2. The right value of the fixed toll is the value of the marginal-cost toll at the optimum. This result generalizes:

Theorem 9.7 (Marginal-cost pricing)

In a network with nonatomic traffic, if the latencies are increasing and differentiable and the total cost x · ℓe(x) of each edge is also convex (bowl-shaped) (linear and xp latencies are like this), then when each edge is charged a toll equal to its externality at the optimum (τe = feOPT · ℓe′(feOPT)), the system optimum is a Wardrop equilibrium.

At the optimum all the paths carrying traffic have equal marginal costs and the marginal cost of unused paths is not smaller (9.2.5). Once the tolls are fixed at their values at the optimum, the cost a driver sees on an edge at the optimum is ℓe(feOPT) + feOPT · ℓe′(feOPT); this is exactly the marginal cost of the edge. Since the cost a path shows is the sum over its edges, the path costs the drivers see are the same as the marginal path costs at the optimum. So all the paths used at the optimum are equal and cheapest in the drivers' eyes: the Wardrop condition holds. □

The name of the toll also comes from Pigou: a tax that prices an externality is called a Pigouvian tax. In practice the difficulty is not in computing the toll but in measuring the externality: one must know the latency functions and the traffic.

9.6.3Other ways to reduce the PoA

A toll is not the only tool. The main tools used in the literature and in practice are these:

Congestion pricing
Brings the external cost that users impose on others into the decision. London (2003), Stockholm (a trial in 2006, permanent since 2007) and Singapore (since 1975) charge for entry to the city center.
Centralized (Stackelberg) routing
A center routes part of the traffic and the rest chooses selfishly. The center moves first, and the selfish users respond by looking at its choice; this “leader first, then followers” structure takes its name from Stackelberg games. As the controlled share grows the ratio approaches 1 (Roughgarden, 2004).
Capacity planning
Roughgarden and Tardos also showed this: the selfish equilibrium of r units of traffic is no more expensive than the best routing of 2r units of traffic. The result holds for every increasing latency, nonlinear ones included. In other words, making every link twice as fast makes up for the lack of coordination; adding capacity can do the job of a toll.
Route recommendations and information
The recommendations of navigation apps can steer the equilibrium toward a lower total cost; but compliance is voluntary. If the recommendation is an equilibrium (nobody wants to deviate), compliance comes by itself.
Mechanism design
Designing the rules so that the good outcome is the only equilibrium. For example, in the A/B link game, forbidding the rental of B or giving a small discount to whoever joins A removes the bad equilibrium.
Counting the cost
The information, implementation and fairness costs of an intervention must be weighed together with the efficiency gain obtained. A toll system built to remove a 5% loss is pointless if it itself costs more than 5%.
Example 9.20

The capacity result can be tested in Pigou's network. The equilibrium of 1 unit of traffic is 1. For the optimum of 2 units of traffic the amount on the upper route x (0 ≤ x ≤ 2) is chosen: C(x) = x · x + (2 − x) · 1, C′(x) = 2x − 1 = 0 ⇒ x = 1/2, C(1/2) = 1/4 + 3/2 = 7/4. 1 ≤ 7/4 ✓: the selfish equilibrium of one unit is cheaper than the best routing of two units.

9.6.4Real life and discussion

Toll lanes in traffic networks, inter-domain route selection on the Internet, time-of-use tariffs in the power grid: the question is the same in all three. How bad is the selfish equilibrium, and which intervention brings it closer to the optimum? On the Internet every network operator routes traffic according to its own cost; this is a large-scale example of selfish routing. In the power grid consumers use electricity at the cheapest hour; a time-of-use tariff reflects the grid's externality at peak hours in the price.

The concepts of this chapter are consolidated by a few discussion questions:

  • Why do individual interests not always reach the social optimum? What externality is there in the Pigou example? In Pigou's network a driver entering the upper route slows everyone there at the rate ℓ′ = 1; this extra delay (x · ℓ′ = x) is not in his or her calculation. The optimum itself is also not stable: those on the bottom want to switch to the top.
  • Which incentives can be applied to reduce the PoA? Which is fairer? A toll is efficient but can be regressive: the same toll weighs more heavily on a low-income driver. A bonus (a payment to whoever uses the lower route) can achieve the same distribution but requires a budget. Centralized routing “forces” some people onto the long route. The fairness debate comes down to the question of whose pocket the efficiency gain goes into.
  • Where can Braess's paradox be seen in everyday life? When does closing a road make sense? It can occur in any network where a new link sends everyone to the same bottleneck. A frequently cited example is that after the demolition of the highway over the Cheonggyecheon in Seoul, which began in 2003, city traffic did not worsen as much as expected. Closing a road makes sense if it brings the equilibrium closer to the optimum; to tell, the equilibrium and the optimum must be computed together.

9.6.5Common mistakes with tolls

Common mistakes
  • Adding the toll to the total delay: A toll is a transfer; it does not change society's total delay. The drivers' “delay + toll” total is a separate number.
  • Thinking “the more the better”: τ = 10 is worse than τ = 7.5. The right toll equals the externality.
  • Forgetting the difference of the marginal tolls: In the two-route network the tolls of the two routes are 15 and 7.5; the toll to be put on a single route is their difference (7.5).
  • Taking the revenue collected to be the toll: In Pigou's network the toll per person is τ = x = 1/2; 1/4 is the total revenue collected.
  • Putting a toll on a route with constant latency: On the lower route ℓ′ = 0; there is no externality there and the marginal-cost toll is zero.

9.7Worked problems

The problems in this section use all the methods of the chapter together: the optimum by derivative in Pigou-type networks, deviation checks in load balancing, the equilibrium in the Braess network, the Hn example, smoothness and code tracing. Each solution is given with its intermediate steps.

9.7.1Sample problems

Example 9.21

Problem. Let the latency of the upper route in Pigou's network be x2 (the lower route 1). What are the equilibrium cost, the optimum and the PoA?

Solution. Since x2 ≤ 1, the upper route is never slower than the lower; the equilibrium is the state in which everyone is on top and its cost is 1. For the optimum, C(x) = x · x2 + (1 − x) = x3 − x + 1, C′(x) = 3x2 − 1 = 0 ⇒ xOPT = 1/√3 ≈ 0.577. C(OPT) = 1 − 2/(3√3) ≈ 0.615. PoA ≈ 1/0.615 ≈ 1.626; it is the same as the p = 2 row of Table 9.4.

Example 9.22

Problem. The jobs are {3, 3, 2, 2, 2}, 2 identical machines. What is the optimum makespan? Is there a Nash equilibrium with makespan 7?

Solution. The total is 12, so the optimum is at least 6; {3, 3} | {2, 2, 2} achieves this: OPT = 6. In the assignment {3, 2, 2} | {3, 2} the loads are 7 and 5. If a job of size 2 on M1 moves to M2 it waits 5 + 2 = 7; not smaller than the present 7, so no gain. If the job of size 3 on M1 moves it waits 8. If the jobs on M2 move to M1 they wait 9 or 10. Nobody gains: an equilibrium, with ratio 7/6.

Example 9.23

Problem. What is the PoA in the normalized Braess network (s→A: x, A→t: 1, s→B: 1, B→t: x, A→B: 0; 1 unit of traffic)?

Solution. Equilibrium: everyone on the zigzag, 1 + 0 + 1 = 2; a driver who switches to an old route also waits 2 and does not gain. Optimum: zigzag closed, traffic split half and half; each driver 1/2 + 1 = 3/2. PoA = 2 / (3/2) = 4/3.

Example 9.24

Problem. If the Hn example is built for n = 3 (ε small), what does the PoS approach?

Solution. The own routes cost 1, 1/2, 1/3; the shared route 1 + ε. With the same unraveling chain the only equilibrium is the state in which everyone is on his or her own route: H3 = 1 + 1/2 + 1/3 = 11/6 ≈ 1.83. Since the optimum is 1 + ε, as ε → 0, PoS → 11/6.

Example 9.25

Problem. In Pigou's network with upper route 2x and lower route 1, what is the PoA and what fixed toll makes the optimum an equilibrium?

Solution. Equilibrium: 2x = 1 ⇒ x = 1/2; the latency is 1 on both routes, C = 1. Optimum: C(x) = 2x2 + 1 − x, C′ = 4x − 1 = 0 ⇒ x = 1/4, C = 1/8 + 3/4 = 7/8. PoA = 8/7. Toll: at the optimum the driver on top waits 2 · 1/4 = 1/2; 1/2 + τ = 1 ⇒ τ = 1/2. The marginal-cost toll is the same: x · ℓ′ = 1/4 · 2 = 1/2.

9.7.2Traces and new topics

Example 9.26

Problem. What does pigou_poa(3) return?

Solution. x = 4−1/3 ≈ 0.63; x4 ≈ 0.1575, 1 − x ≈ 0.37; C(OPT) ≈ 0.528. The function returns 1/0.528 ≈ 1.896; the value lies between p = 2 (1.626) and p = 4 (2.151).

Example 9.27

Problem. Four jobs of sizes 4, 3, 3, 2 all start on M1. At each step the first job with a profitable deviation moves to the least loaded machine. At which makespan do the dynamics stop? What is the optimum?

Solution. The loads are (12, 0). The job of size 4 moves to M2 (0 + 4 < 12): (8, 4). Then a job of size 3 moves (4 + 3 = 7 < 8): (5, 7). Now if the job of size 4 on M2 moved to M1 it would wait 9, if a job of size 3 moved it would wait 8 (both larger than 7); if those on M1 moved to M2 they would wait 10 or 9. The dynamics stop at makespan 7. The optimum is {4, 2} | {3, 3} = 6 | 6; the ratio is 7/6.

Example 9.28

Problem. In the game of Example 9.16 let link A cost 3 TL and link B cost 8 TL (4 players). Which are the equilibria, and what are the PoA and the PoS?

Solution. All on A: 0.75 each; a player who moves to B pays 8, an equilibrium. All on B: 2 each; a player who moves to A pays 3, an equilibrium. In split profiles those on B gain by moving to A (for example with 1 on A and 3 on B, the player on B pays 8/3 and would pay 1.5 on A). PoA = 8/3, PoS = 1.

Example 9.29

Problem. What does poa_pos([3, 2, 2, 1], 2) return?

Solution. The total is 8; {3, 1} | {2, 2} = 4 | 4 is the optimum. {3, 2} | {2, 1} (loads 5 and 3) is also an equilibrium: if the job of size 3 moves it waits 6, if a job of size 2 moves it waits 3 + 2 = 5 (equal, no gain); if those on M2 move they wait 7 or 6. The maximum loads of the equilibria are 4 and 5: the function returns (1.25, 1.0), that is, PoA = 5/4, PoS = 1.

Two exercises on smoothness, the bound of a (1, ½)-smooth game (2) and the check of the key inequality for (y, z) = (2, 3) (8 ≤ 29/3), are solved in Example 9.8 and Example 9.9.

9.8Summary

  • The Price of Anarchy divides the cost of the worst Nash equilibrium by the cost of the social optimum: PoA = maxs∈NE C(s) / C(OPT). The Price of Stability writes the same ratio for the best equilibrium. Always 1 ≤ PoS ≤ PoA; if there is a single equilibrium the two are equal. In payoff problems the ratio is inverted.
  • The PoA is a pessimistic guarantee given without knowing which equilibrium will be reached. It is the game-theoretic counterpart of the approximation ratio: in the approximation ratio computational power is what is missing, in the PoA it is coordination.
  • In Pigou's network (upper route x, lower route 1) the equilibrium sends everyone to the top and costs 1; the optimum splits the traffic in half and costs 3/4: PoA = 4/3.
  • At equilibrium the latencies of the routes are equalized; at the optimum their marginal costs (ℓ + f · ℓ′) are. The term f · ℓ′ in between is the externality that a driver imposes on the others.
  • When the latency gets steeper, like xp, the PoA grows without bound (≈ 4.73 at p = 16). With linear latency PoA ≤ 4/3 in every network and for every demand (Roughgarden–Tardos); the proof consists of the equilibrium condition, the edge inequality and summation; the bound is tight in Pigou's network.
  • In (λ, μ)-smooth games PoA ≤ λ/(1 − μ); nonatomic linear traffic gives 4/3 with (1, ¼), atomic linear congestion games give 5/2 with (5/3, 1/3). The bound carries over to mixed equilibria (robust PoA).
  • In the Braess network (4,000 cars) the equilibrium is 320,000 and the optimum of the same network is 258,750 car-min: PoA ≈ 1.237. 80/65 is the Braess loss, not the PoA.
  • In the load balancing game a pure equilibrium always exists. In the {2, 2, 1, 1} example PoA = 4/3, PoS = 1; on m identical machines the tight value is 2 − 2/(m + 1). On machines with different speeds and at mixed equilibria the ratio grows slowly with m. The value of the PoA depends on the social cost measured.
  • In fair cost sharing the PoA can reach n, but thanks to Rosenthal's potential Φ = Σ ce H(ne) we have PoS ≤ Hn ≈ ln n; the Hn example shows that the bound is tight.
  • A marginal-cost toll τe = fe · ℓe′(fe) makes the optimum an equilibrium (in Pigou's network τ = x or a fixed 1/2; in the two-route network 7.5 min on Route 1). A toll is a transfer; too high a toll creates loss again. Stackelberg routing, added capacity, information and mechanism design are other tools.
Table 9.14: The examples of the chapter at a glance.
ExampleEquilibriumOptimumRatio
Two routes, 3,000 cars75,00071,250PoA ≈ 1.053
Pigou (x and 1)13/4PoA = 4/3
Linear latency, any network——PoA ≤ 4/3 (tight)
Pigou, ℓ = xp1→ 0PoA → ∞
Atomic congestion, linear——PoA ≤ 5/2 (tight)
Braess, 4,000 cars320,000258,750PoA ≈ 1.237
Load balancing {2, 2, 1, 1}4 (worst)3PoA = 4/3, PoS = 1
Fair sharing, Hn example25/121.1PoS ≈ 1.894 (≤ Hn)
Pigou + toll τ = x3/43/41

9.9Key terms

  • Price of Anarchy (PoA)
  • Price of Stability (PoS)
  • coordination ratio
  • worst-case equilibrium
  • social optimum
  • social cost
  • efficiency loss
  • approximation ratio
  • tight bound
  • Pigou network
  • latency function
  • nonatomic
  • atomic
  • Wardrop equilibrium
  • system optimum
  • selfish routing
  • marginal cost
  • externality
  • congestion game
  • smoothness, (λ, μ)-smooth game
  • robust Price of Anarchy
  • Braess's paradox
  • load balancing
  • makespan
  • related machines
  • best-response dynamics
  • fair cost sharing
  • network design
  • harmonic number Hn
  • potential game
  • Rosenthal potential
  • congestion toll
  • marginal-cost toll
  • congestion pricing
  • Pigouvian tax
  • Stackelberg routing
  • capacity augmentation

9.10Test Yourself

  1. 1 unit of traffic is split between two parallel routes: the latency of Route 1 is ℓ1(x) = x and that of Route 2 is ℓ2(x) = x + 1/2. What are the Wardrop equilibrium, the social optimum and the PoA?

    Answer

    Equilibrium: equal latencies, x1 = (1 − x1) + 1/2 ⇒ x1 = 3/4, x2 = 1/4; everyone waits 3/4, C = 3/4. Optimum: equal marginal costs, 2x1 = 2x2 + 1/2 and x1 + x2 = 1 ⇒ x1 = 5/8, x2 = 3/8. C = (5/8)2 + (3/8)(3/8 + 1/2) = 25/64 + 21/64 = 23/32. PoA = (3/4)/(23/32) = 24/23 ≈ 1.043, far below 4/3.

  2. In Pigou's network (upper route x, lower route 1; here x is the amount of traffic on the upper route) let the total traffic be r = 1/2 and r = 2. What is the PoA in each case?

    Answer

    r = 1/2: the latency of the upper route is at most 1/2, everyone is on top; C = 1/2 · 1/2 = 1/4. The optimum is C(x) = x2 + (1/2 − x); since the derivative 2x − 1 is always ≤ 0 on the interval, the smallest value is at x = 1/2: again 1/4. PoA = 1; with little traffic the externality is unimportant. r = 2: the equilibrium is 1 unit on the upper route (latency 1) and 1 unit on the lower; C = 1 + 1 = 2. The optimum is C(x) = x2 + 2 − x, x = 1/2, C = 7/4. PoA = 8/7 ≈ 1.143.

  3. For the edge inequality ℓ(f) · fOPT ≤ ℓ(fOPT) · fOPT + ¼ · ℓ(f) · f take ℓ(x) = x and f = 1. What are the two sides for fOPT = 1/4? At which value of fOPT does equality hold?

    Answer

    Left 1 · 1/4 = 1/4; right 1/16 + 1/4 = 5/16. 1/4 ≤ 5/16 ✓; the difference is (1/4 − 1/2)2 = 1/16. The difference is always (fOPT − f/2)2; equality holds only at fOPT = f/2 = 1/2. Pigou's network uses exactly this point.

  4. A game is known to be (2, 1/3)-smooth. What bound results for the PoA? Would this information be useful if the same game were (1, 1)-smooth?

    Answer

    PoA ≤ 2/(1 − 1/3) = 2/(2/3) = 3. (1, 1) is not a pair allowed by the definition (μ < 1 is required). In Step 4 of the proof the inequality (1 − μ) · C(s) ≤ λ · C(OPT) becomes 0 ≤ C(OPT), which is always true and gives no bound.

  5. The jobs are {5, 4, 3, 2}, 2 identical machines, the social cost is the maximum load. What is the optimum? Is {5, 4} | {3, 2} a Nash equilibrium? What are the PoA and the PoS?

    Answer

    The total is 14, so the maximum load is at least 7; {5, 2} | {4, 3} = 7 | 7: OPT = 7. In {5, 4} | {3, 2} the loads are 9 and 5. If the job of size 5 moves it waits 5 + 5 = 10, if the job of size 4 moves it waits 5 + 4 = 9 (equal, no gain); if those on M2 move they wait 12 or 11. Equilibrium ✓, maximum load 9. Scanning the 16 assignments shows that the maximum loads of the equilibria are 7, 8 and 9: PoA = 9/7 ≈ 1.286 ≤ 4/3, PoS = 1 (7 | 7 is also an equilibrium).

  6. 3 players rent a connection from s to t: A costs 1 TL, B costs 2 TL; those who use a link split its cost equally. Which are the pure equilibria? What are the PoA and the PoS?

    Answer

    All on A: 1/3 each; a player who moves to B pays 2, an equilibrium. All on B: 2/3 each; a player who moves to A pays 1 (1 > 2/3), an equilibrium. 1 on A, 2 on B: the one on B pays 1 and would pay 1/2 on A; leaves. 2 on A, 1 on B: the one on B pays 2 and would pay 1/3 on A; leaves. The equilibria are “all on A” (total 1 = OPT) and “all on B” (total 2): PoA = 2, PoS = 1.

  7. Build the Hn example with two players: own routes 1 and 1/2, shared route 1.2 (ε = 0.2). What are the optimum, the unique equilibrium and the PoS? How are Φ(OPT) and Φ(equilibrium) related?

    Answer

    Optimum: both on the shared route, total 1.2 (the other options are 1.5, 1.7 and 2.2). From the optimum: player 2 pays 0.6 on the shared route, its own route costs 0.5 < 0.6, and it leaves; player 1 pays the whole cost of the shared route (1.2) alone, its own route costs 1 < 1.2, and it leaves. Equilibrium: everyone on his or her own route, C = 1.5. PoS = 1.5/1.2 = 1.25 ≤ H2 = 1.5. Potential: Φ(OPT) = 1.2 · H(2) = 1.8, Φ(equilibrium) = 1 + 1/2 = 1.5; along the dynamics the potential has fallen from 1.8 to 1.5.

  8. 2,000 cars split between two routes: ℓ1 = 10 + x1/100, ℓ2 = 15 + x2/100 (min). What are the total delays at the equilibrium and at the optimum? What fixed toll on Route 1 makes the optimum an equilibrium?

    Answer

    Equilibrium: 10 + x1/100 = 15 + (2,000 − x1)/100 ⇒ x1 = 1,250, everyone 22.5 min; total 45,000 car-min. Optimum: 10 + x1/50 = 15 + x2/50 ⇒ x1 − x2 = 250, x1 = 1,125, x2 = 875; latencies 21.25 and 23.75; total 1,125 · 21.25 + 875 · 23.75 = 44,687.5. PoA ≈ 1.007. Toll: 21.25 + τ = 23.75 ⇒ τ = 2.5 min; this equals the difference of the marginal tolls (11.25 − 8.75 = 2.5).

9.11Further reading

  • T. Roughgarden, Twenty Lectures on Algorithmic Game Theory (2016), Lectures 11–15: covers all the topics of this chapter, from the Pigou and Braess examples to smoothness and the Hn bound in network design, in short and clear lectures.
  • N. Nisan, T. Roughgarden, É. Tardos and V. Vazirani (eds.), Algorithmic Game Theory (2007), Chapters 17–20: comprehensive reference chapters on load balancing, selfish routing, network formation and the Price of Stability.
  • D. Easley and J. Kleinberg, Networks, Crowds, and Markets (2010), Chapter 8: explains equilibrium in traffic and Braess's paradox with examples for readers with little mathematics.
  • A. R. Karlin and Y. Peres, Game Theory, Alive (2017), Chapter 8: presents the Price of Anarchy together with potential games and congestion games, with proofs at the student level.

9.12References

  1. E. Anshelevich vd., “The Price of Stability for Network Design with Fair Cost Allocation”, IEEE FOCS, 2004.
  2. B. Awerbuch, Y. Azar, A. Epstein, “The Price of Routing Unsplittable Flow”, ACM STOC, 2005.
  3. D. Braess, “Über ein Paradoxon aus der Verkehrsplanung”, Unternehmensforschung 12, 258–268, 1968.
  4. G. Christodoulou, E. Koutsoupias, “The Price of Anarchy of Finite Congestion Games”, ACM STOC, 2005.
  5. A. Czumaj, B. Vöcking, “Tight Bounds for Worst-Case Equilibria”, ACM-SIAM SODA, 2002.
  6. D. Easley, J. Kleinberg, Networks, Crowds, and Markets, Cambridge, 2010 (Chapter 8: traffic and Braess).
  7. G. Finn, E. Horowitz, “A Linear Time Approximation Algorithm for Multiprocessor Scheduling”, BIT 19, 1979.
  8. R. L. Graham, “Bounds for Certain Multiprocessing Anomalies”, Bell System Technical Journal 45(9), 1966.
  9. A. R. Karlin, Y. Peres, Game Theory, Alive, AMS, 2017 (Chapter 8: The Price of Anarchy).
  10. E. Koutsoupias, M. Mavronicolas, P. Spirakis, “Approximate Equilibria and Ball Fusion”, Theory of Computing Systems 36(6), 2003.
  11. E. Koutsoupias, C. Papadimitriou, “Worst-case Equilibria”, STACS, 1999.
  12. N. Nisan, T. Roughgarden, É. Tardos, V. Vazirani (eds.), Algorithmic Game Theory, Cambridge University Press, 2007 (Chapters 17–20).
  13. C. Papadimitriou, “Algorithms, Games, and the Internet”, ACM STOC, 2001.
  14. A. C. Pigou, The Economics of Welfare, Macmillan, 1920.
  15. T. Roughgarden, “The Price of Anarchy Is Independent of the Network Topology”, Journal of Computer and System Sciences, 2003.
  16. T. Roughgarden, “Stackelberg Scheduling Strategies”, SIAM Journal on Computing 33(2), 2004.
  17. T. Roughgarden, “Intrinsic Robustness of the Price of Anarchy”, ACM STOC, 2009.
  18. T. Roughgarden, Twenty Lectures on Algorithmic Game Theory, Cambridge University Press, 2016 (Lectures 11–15).
  19. T. Roughgarden, É. Tardos, “How Bad Is Selfish Routing?”, Journal of the ACM, 2002.
  20. J. G. Wardrop, “Some Theoretical Aspects of Road Traffic Research”, Proceedings of the Institution of Civil Engineers 1(3), 325–362, 1952.

Course page: Roughgarden CS364A (Stanford, 2013), notes of Lectures 11–15 · © Sercan Külcü. All rights reserved.