Documentation

CslibFrontier.GameTheory.Congestion.Nonatomic

Selfish routing: nonatomic congestion games #

In a nonatomic congestion game a continuum of infinitesimal players routes traffic. There is a finite set P of paths. Each path p belongs to a commodity commodity p and uses the finite set of resources resources p (the edges of a path in a network). A commodity k has traffic rate rate k. A flow f : P → ℝ is feasible if it is nonnegative and routes exactly rate k units of traffic on the paths of each commodity k. The flow on resource e is the total flow on the paths through e, a path's latency is the sum of the latencies of its resources at their flows, and the cost of f is the total latency ∑ p, f p * pathLatency f p.

This is the model of Roughgarden and Tardos [RT02], Section 2.1, with a network's s_i–t_i paths abstracted to finite sets of resources. A feasible flow is a Wardrop equilibrium (a flow at Nash equilibrium, [RT02], Definition 2.1) when every path carrying flow is a shortest path of its commodity; for continuous nondecreasing latencies this is the characterization of [RT02], Lemma 2.2, which we take as the definition.

The variational inequality proved here is the first step of every price-of-anarchy bound. The bounds themselves are in CslibFrontier.GameTheory.Congestion.PigouBound: the Pigou bound for an arbitrary class of latencies, its value for polynomials of bounded degree, and the 4/3 theorem for affine latencies ([RT02], Theorem 4.5).

Main definitions #

Main results #

References #

structure Cslib.GameTheory.NonatomicCongestionGame (K : Type u_1) (P : Type u_2) (E : Type u_3) :
Type (max (max u_1 u_2) u_3)

A nonatomic congestion game: each path p belongs to the commodity commodity p and uses the resources resources p; commodity k has traffic rate rate k; and latency e x is the latency of resource e when it carries flow x.

  • commodity : P → K

    The commodity whose traffic may use the path p.

  • resources : P → Finset E

    The resources used by the path p.

  • rate : K → ℝ

    The amount of traffic of commodity k.

  • latency : E → ℝ → ℝ

    The latency of resource e when it carries flow x.

def Cslib.GameTheory.NonatomicCongestionGame.IsFeasible {K : Type u_1} {P : Type u_2} {E : Type u_3} [Fintype P] (G : NonatomicCongestionGame K P E) [DecidableEq K] (f : P → ℝ) :

A flow f on the paths is feasible if it is nonnegative and routes exactly rate k units of traffic on the paths of each commodity k.

def Cslib.GameTheory.NonatomicCongestionGame.edgeFlow {K : Type u_1} {P : Type u_2} {E : Type u_3} [Fintype P] [DecidableEq E] (G : NonatomicCongestionGame K P E) (f : P → ℝ) (e : E) :

The flow on the resource e: the total flow on the paths that use e.

def Cslib.GameTheory.NonatomicCongestionGame.pathLatency {K : Type u_1} {P : Type u_2} {E : Type u_3} [Fintype P] [DecidableEq E] (G : NonatomicCongestionGame K P E) (f : P → ℝ) (p : P) :

The latency of the path p under the flow f: the sum of the latencies of its resources.

def Cslib.GameTheory.NonatomicCongestionGame.cost {K : Type u_1} {P : Type u_2} {E : Type u_3} [Fintype P] [DecidableEq E] (G : NonatomicCongestionGame K P E) (f : P → ℝ) :

The cost (total latency) of the flow f: ∑ p, f p * pathLatency f p.

A Wardrop equilibrium: a feasible flow under which every path carrying positive flow has latency at most that of every path of the same commodity ([RT02], Lemma 2.2).

G has affine latencies: there are a e, b e ≥ 0 with latency e x = a e * x + b e for every resource e and flow x ([RT02], Section 4).

theorem Cslib.GameTheory.NonatomicCongestionGame.sum_mul_sum_resources {K : Type u_1} {P : Type u_2} {E : Type u_3} [Fintype P] [DecidableEq E] (G : NonatomicCongestionGame K P E) [Fintype E] (w : P → ℝ) (h : E → ℝ) :
∑ p : P, w p * ∑ e ∈ G.resources p, h e = ∑ e : E, G.edgeFlow w e * h e

Exchanging the sums over paths and resources: weighting each path's resource sum by w p weights each resource e by the flow edgeFlow w e.

theorem Cslib.GameTheory.NonatomicCongestionGame.cost_eq_sum_edgeFlow {K : Type u_1} {P : Type u_2} {E : Type u_3} [Fintype P] [DecidableEq E] (G : NonatomicCongestionGame K P E) [Fintype E] (f : P → ℝ) :
G.cost f = ∑ e : E, G.edgeFlow f e * G.latency e (G.edgeFlow f e)

The cost of a flow is the sum over resources of flow times latency.

theorem Cslib.GameTheory.NonatomicCongestionGame.cost_nonneg {K : Type u_1} {P : Type u_2} {E : Type u_3} [Fintype P] [DecidableEq E] (G : NonatomicCongestionGame K P E) (hl : ∀ (e : E) (x : ℝ), 0 ≤ x → 0 ≤ G.latency e x) {f : P → ℝ} (hf : ∀ (p : P), 0 ≤ f p) :
0 ≤ G.cost f

A nonnegative flow has nonnegative cost when the latencies are nonnegative on [0, ∞).

theorem Cslib.GameTheory.NonatomicCongestionGame.IsWardrop.cost_le_sum_mul_pathLatency {K : Type u_1} {P : Type u_2} {E : Type u_3} [Fintype P] [DecidableEq E] {G : NonatomicCongestionGame K P E} [DecidableEq K] {f g : P → ℝ} (hf : G.IsWardrop f) (hg : G.IsFeasible g) :
G.cost f ≤ ∑ p : P, g p * G.pathLatency f p

The variational inequality for Wardrop equilibria: if f is a Wardrop equilibrium and g is feasible, then cost f ≤ ∑ p, g p * pathLatency f p, that is, rerouting the traffic as in g while keeping the latencies of f does not lower the total latency.