Documentation

CslibFrontier.GameTheory.Congestion.PigouBound

The Pigou bound for nonatomic selfish routing #

A Pigou-like network ([Rou13], Lecture #11, Definition 3.2) routes r units of traffic over two parallel links, one with latency c and one with constant latency c(r). Routing everything over the first link is a Wardrop equilibrium of cost r c(r), while routing x units over it costs x c(x) + (r - x) c(r). The Pigou bound of a class C of latency functions ([Rou13], Lecture #11, (2)) is the worst such ratio,

α(C) = sup_{c ∈ C} sup_{r ≥ 0} sup_{x ≥ 0} r c(r) / (x c(x) + (r - x) c(r)),

taken in ℝ≥0∞ because it may be infinite. The theorem of Roughgarden ([Rou03], Theorem 3.8, for latencies with x c(x) convex; in the generality used here, [Rou13], Lecture #11, Theorem 3.3, who credits it to [Rou03] and [CSSM04]) says that α(C) bounds the price of anarchy of every nonatomic congestion game whose latencies are nonnegative, nondecreasing and in C, whatever its network topology and number of commodities. When C also contains the constant functions, Pigou-like networks show that no smaller bound holds ([Rou03], Theorem 4.2): the price of anarchy is independent of the network topology.

For polynomials of degree at most d with nonnegative coefficients the Pigou bound is (1 - d (d+1)^{-(d+1)/d})⁻¹ ([Rou03], Proposition 5.1), attained by Pigou's network with latency x ^ d; d = 1 gives the 4/3 theorem of Roughgarden and Tardos ([RT02], Theorem 4.5).

The model is NonatomicCongestionGame, whose Wardrop equilibria are defined by the shortest-path characterization. The sources also assume continuous latencies, which is needed only to match that characterization with their definition of equilibrium and for the existence of equilibria; the bounds here hold for every Wardrop flow without it. Lean's a / 0 = 0 is harmless for the latencies of the theorems below, which are nonnegative and nondecreasing on [0, ∞): for them a nonpositive denominator forces r c(r) = 0, and such degenerate ratios do not change α(C) once some c ∈ C is positive somewhere on (0, ∞) (then α(C) ≥ 1, one_le_pigouBound).

Main definitions #

Main results #

References #

noncomputable def Cslib.GameTheory.pigouRatio (c : ℝ → ℝ) (r x : ℝ) :

The Pigou ratio r c(r) / (x c(x) + (r - x) c(r)): the ratio between the cost r c(r) of routing all r units of traffic over a link of latency c and the cost of routing x units over it and the remaining r - x units over a parallel link of constant latency c(r).

noncomputable def Cslib.GameTheory.pigouBound (C : Set (ℝ → ℝ)) :

The Pigou bound α(C) of a class C of latency functions: the supremum of the Pigou ratios pigouRatio c r x over c ∈ C and r, x ≥ 0.

theorem Cslib.GameTheory.pigouRatio_le_pigouBound {C : Set (ℝ → ℝ)} {c : ℝ → ℝ} (hc : c ∈ C) {r x : ℝ} (hr : 0 ≤ r) (hx : 0 ≤ x) :

Every Pigou ratio of a function in C is at most α(C).

theorem Cslib.GameTheory.pigouBound_le {C : Set (ℝ → ℝ)} {a : ENNReal} (h : ∀ c ∈ C, ∀ (r x : ℝ), 0 ≤ r → 0 ≤ x → pigouRatio c r x ≤ a) :

α(C) ≤ a as soon as every Pigou ratio of a function in C is at most a.

theorem Cslib.GameTheory.lt_pigouBound_iff {C : Set (ℝ → ℝ)} {a : ENNReal} :
a < pigouBound C ↔ ∃ c ∈ C, ∃ (r : ℝ) (x : ℝ), 0 ≤ r ∧ 0 ≤ x ∧ a < pigouRatio c r x

a < α(C) exactly when some Pigou ratio of a function in C exceeds a.

theorem Cslib.GameTheory.one_le_pigouBound {C : Set (ℝ → ℝ)} {c : ℝ → ℝ} (hc : c ∈ C) {r : ℝ} (hr : 0 ≤ r) (hpos : 0 < r * c r) :

The Pigou bound is at least 1 as soon as some c ∈ C and r ≥ 0 have r c(r) > 0: the ratio at x = r is 1.

theorem Cslib.GameTheory.mul_le_toReal_pigouBound_mul {C : Set (ℝ → ℝ)} (htop : pigouBound C ≠ ⊤) {c : ℝ → ℝ} (hc : c ∈ C) (hc0 : ∀ (x : ℝ), 0 ≤ x → 0 ≤ c x) (hcm : MonotoneOn c (Set.Ici 0)) {r x : ℝ} (hr : 0 ≤ r) (hx : 0 ≤ x) :
r * c r ≤ (pigouBound C).toReal * (x * c x + (r - x) * c r)

The Pigou inequality: if α(C) is finite and c ∈ C is nonnegative and nondecreasing on [0, ∞), then r c(r) ≤ α(C) (x c(x) + (r - x) c(r)) for all r, x ≥ 0.

theorem Cslib.GameTheory.pigouBound_le_ofReal_inv_one_sub {C : Set (ℝ → ℝ)} {β : ℝ} (hβ : β < 1) (hC : ∀ c ∈ C, ∀ (x : ℝ), 0 ≤ x → 0 ≤ c x) (h : ∀ c ∈ C, ∀ (r x : ℝ), 0 ≤ r → 0 ≤ x → x * (c r - c x) ≤ β * (r * c r)) :

A bound x (c(r) - c(x)) ≤ β r c(r) with β < 1 for every c ∈ C bounds the Pigou bound by (1 - β)⁻¹.

Polynomial latencies #

The class of polynomial latencies of degree at most d with nonnegative coefficients: c(x) = ∑_{i ≤ d} a_i x^i with a_i ≥ 0.

theorem Cslib.GameTheory.mem_polynomialLatencies {d : ℕ} {c : ℝ → ℝ} :
c ∈ polynomialLatencies d ↔ ∃ (a : Fin (d + 1) → ℝ), (∀ (i : Fin (d + 1)), 0 ≤ a i) ∧ ∀ (x : ℝ), c x = ∑ i : Fin (d + 1), a i * x ^ ↑i

Membership in polynomialLatencies d, unfolded.

The monomial x ^ d is a polynomial latency of degree at most d.

theorem Cslib.GameTheory.const_mem_polynomialLatencies {d : ℕ} (a : ℝ) (ha : 0 ≤ a) :
(fun (x : ℝ) => a) ∈ polynomialLatencies d

Nonnegative constant functions are polynomial latencies of every degree.

theorem Cslib.GameTheory.nonneg_of_mem_polynomialLatencies {d : ℕ} {c : ℝ → ℝ} (hc : c ∈ polynomialLatencies d) {x : ℝ} (hx : 0 ≤ x) :
0 ≤ c x

Polynomial latencies with nonnegative coefficients are nonnegative on [0, ∞).

Polynomial latencies with nonnegative coefficients are nondecreasing on [0, ∞).

theorem Cslib.GameTheory.one_sub_pigouConst_pos (d : ℕ) :
0 < 1 - ↑d * (↑d + 1) ^ (-((↑d + 1) / ↑d))

1 - d (d+1)^{-(d+1)/d} > 0, so the polynomial Pigou bound is finite.

The Pigou bound of polynomial latencies ([Rou03], Proposition 5.1; [Rou13], Lecture #11, Table 1): for polynomials of degree at most d with nonnegative coefficients, α = (1 - d (d+1)^{-(d+1)/d})⁻¹. It is attained by Pigou's example with latency x ^ d, rate 1 and (d + 1)^{-1/d} units of traffic on the first link.

The Pigou bound of affine latencies with nonnegative coefficients is 4/3.

theorem Cslib.GameTheory.NonatomicCongestionGame.IsWardrop.cost_le_mul_of_forall_mul_le {K : Type u_1} {P : Type u_2} {E : Type u_3} [Fintype P] [DecidableEq E] {G : NonatomicCongestionGame K P E} [DecidableEq K] [Finite E] {α : ℝ} (hα : 0 ≤ α) (h : ∀ (e : E) (r x : ℝ), 0 ≤ r → 0 ≤ x → r * G.latency e r ≤ α * (x * G.latency e x + (r - x) * G.latency e r)) {f g : P → ℝ} (hf : G.IsWardrop f) (hg : G.IsFeasible g) :
G.cost f ≤ α * G.cost g

Edgewise inequalities bound the price of anarchy: if α ≥ 0 and every resource latency satisfies r c(r) ≤ α (x c(x) + (r - x) c(r)) for r, x ≥ 0, then every Wardrop equilibrium costs at most α times every feasible flow. This is the argument of [Rou13], Lecture #11, Section 5.

theorem Cslib.GameTheory.NonatomicCongestionGame.IsWardrop.cost_le_toReal_pigouBound_mul {K : Type u_1} {P : Type u_2} {E : Type u_3} [Fintype P] [DecidableEq E] {G : NonatomicCongestionGame K P E} [DecidableEq K] [Finite E] {C : Set (ℝ → ℝ)} (htop : pigouBound C ≠ ⊤) (hC : ∀ (e : E), G.latency e ∈ C) (h0 : ∀ (e : E) (x : ℝ), 0 ≤ x → 0 ≤ G.latency e x) (hm : ∀ (e : E), MonotoneOn (G.latency e) (Set.Ici 0)) {f g : P → ℝ} (hf : G.IsWardrop f) (hg : G.IsFeasible g) :

The price of anarchy is at most the Pigou bound ([Rou13], Lecture #11, Theorem 3.3; [Rou03], Theorem 3.8; [CSSM04]): if every resource latency lies in C and is nonnegative and nondecreasing on [0, ∞), and the Pigou bound α(C) is finite, then every Wardrop equilibrium f costs at most α(C) times every feasible flow g.

theorem Cslib.GameTheory.NonatomicCongestionGame.IsWardrop.cost_le_of_mem_polynomialLatencies {K : Type u_1} {P : Type u_2} {E : Type u_3} [Fintype P] [DecidableEq E] {G : NonatomicCongestionGame K P E} [DecidableEq K] [Finite E] {d : ℕ} (hG : ∀ (e : E), G.latency e ∈ polynomialLatencies d) {f g : P → ℝ} (hf : G.IsWardrop f) (hg : G.IsFeasible g) :
G.cost f ≤ (1 - ↑d * (↑d + 1) ^ (-((↑d + 1) / ↑d)))⁻¹ * G.cost g

The price of anarchy of selfish routing with polynomial latencies ([Rou03], Proposition 5.1): if every latency is a polynomial of degree at most d with nonnegative coefficients, then every Wardrop equilibrium costs at most (1 - d (d+1)^{-(d+1)/d})⁻¹ times every feasible flow.

Pigou-like networks and tightness #

The Pigou-like network with latency c and rate r ([Rou13], Lecture #11, Definition 3.2): r units of traffic on two parallel links, with latency c on link 0 and constant latency c r on link 1.

The first link of a Pigou-like network has latency c.

The second link of a Pigou-like network has constant latency c r.

@[simp]
theorem Cslib.GameTheory.NonatomicCongestionGame.pigouNetwork_edgeFlow (c : ℝ → ℝ) (r : ℝ) (f : Fin 2 → ℝ) (e : Fin 2) :
(pigouNetwork c r).edgeFlow f e = f e

In a Pigou-like network each link is its own path, so the flow on a link is the flow on that path.

theorem Cslib.GameTheory.NonatomicCongestionGame.pigouNetwork_cost (c : ℝ → ℝ) (r : ℝ) (f : Fin 2 → ℝ) :
(pigouNetwork c r).cost f = f 0 * c (f 0) + f 1 * c r

The cost of a flow f in a Pigou-like network is f 0 * c (f 0) + f 1 * c r.

Routing x ∈ [0, r] units over the first link of a Pigou-like network, and the rest over the second, is feasible.

In a Pigou-like network, routing all traffic over the first link is a Wardrop equilibrium.

theorem Cslib.GameTheory.NonatomicCongestionGame.exists_lt_cost_of_lt_pigouBound {C : Set (ℝ → ℝ)} (hC : ∀ c ∈ C, ∀ (x : ℝ), 0 ≤ x → 0 ≤ c x) (hCm : ∀ c ∈ C, MonotoneOn c (Set.Ici 0)) (hconst : ∀ (a : ℝ), 0 ≤ a → (fun (x : ℝ) => a) ∈ C) {β : ℝ} (hβ : ENNReal.ofReal β < pigouBound C) :
∃ (G : NonatomicCongestionGame Unit (Fin 2) (Fin 2)) (f : Fin 2 → ℝ) (g : Fin 2 → ℝ), (∀ (e : Fin 2), G.latency e ∈ C) ∧ G.IsWardrop f ∧ G.IsFeasible g ∧ 0 < G.cost g ∧ β * G.cost g < G.cost f

Pigou-like networks attain the Pigou bound ([Rou03], Lemma 4.1 and Theorem 4.2; [Rou13], Lecture #11, Section 3): if C consists of nonnegative functions that are nondecreasing on [0, ∞) and contains every nonnegative constant function, then every β below the Pigou bound α(C) is exceeded by the ratio of a Wardrop equilibrium to a feasible flow of positive cost in a two-link network with latencies in C. Together with IsWardrop.cost_le_toReal_pigouBound_mul, α(C) is the exact worst-case price of anarchy.

theorem Cslib.GameTheory.NonatomicCongestionGame.pigouBound_le_ofReal_iff {C : Set (ℝ → ℝ)} (hC : ∀ c ∈ C, ∀ (x : ℝ), 0 ≤ x → 0 ≤ c x) (hCm : ∀ c ∈ C, MonotoneOn c (Set.Ici 0)) (hconst : ∀ (a : ℝ), 0 ≤ a → (fun (x : ℝ) => a) ∈ C) {β : ℝ} :
pigouBound C ≤ ENNReal.ofReal β ↔ ∀ (K P E : Type) [inst : Fintype P] [Finite E] [inst_2 : DecidableEq K] [inst_3 : DecidableEq E] (G : NonatomicCongestionGame K P E) (f g : P → ℝ), (∀ (e : E), G.latency e ∈ C) → G.IsWardrop f → G.IsFeasible g → G.cost f ≤ β * G.cost g

The Pigou bound is the exact worst-case price of anarchy ([Rou03], Theorem 4.2; [Rou13], Lecture #11, Section 3): if C consists of nonnegative functions that are nondecreasing on [0, ∞) and contains every nonnegative constant function, then α(C) ≤ β exactly when, in every nonatomic congestion game with latencies in C, every Wardrop equilibrium costs at most β times every feasible flow. Since the right side ranges over all games, while the proof of ← uses only Pigou-like networks, two-link networks already exhibit the worst case.

theorem Cslib.GameTheory.NonatomicCongestionGame.exists_cost_eq_mul_of_mem_polynomialLatencies (d : ℕ) :
∃ (G : NonatomicCongestionGame Unit (Fin 2) (Fin 2)) (f : Fin 2 → ℝ) (g : Fin 2 → ℝ), (∀ (e : Fin 2), G.latency e ∈ polynomialLatencies d) ∧ G.IsWardrop f ∧ G.IsFeasible g ∧ 0 < G.cost g ∧ G.cost f = (1 - ↑d * (↑d + 1) ^ (-((↑d + 1) / ↑d)))⁻¹ * G.cost g

Pigou's example attains the polynomial bound ([Rou03], Section 2.4 and Remark 5.2): with latency x ^ d on one link and 1 on the other, one unit of traffic has a Wardrop equilibrium of cost exactly (1 - d (d+1)^{-(d+1)/d})⁻¹ times the cost of the feasible flow routing (d + 1)^{-1/d} units over the first link.

Affine latencies #

Nonnegative affine latencies are polynomial latencies of degree at most 1.

theorem Cslib.GameTheory.NonatomicCongestionGame.IsWardrop.cost_le {K : Type u_1} {P : Type u_2} {E : Type u_3} [Fintype P] [DecidableEq E] {G : NonatomicCongestionGame K P E} [DecidableEq K] [Finite E] (hG : G.HasAffineLatencies) {f g : P → ℝ} (hf : G.IsWardrop f) (hg : G.IsFeasible g) :
G.cost f ≤ 4 / 3 * G.cost g

The price of anarchy of selfish routing with affine latencies is at most 4/3 ([RT02], Theorem 4.5): if the latencies are affine with nonnegative coefficients, f is a Wardrop equilibrium and g is a feasible flow, then cost f ≤ 4/3 * cost g. This is the case d = 1 of IsWardrop.cost_le_of_mem_polynomialLatencies.

The bound 4/3 is attained by Pigou's example ([RT02], Figure 3): there is a nonatomic congestion game with affine latencies, a Wardrop equilibrium f and a feasible flow g with cost f = 4/3 * cost g > 0. So the constant in IsWardrop.cost_le cannot be improved.