Documentation

CslibFrontier.GameTheory.Congestion.AtomicSplittable

Atomic splittable selfish routing and the player-splitting paradox #

In an atomic splittable selfish routing game ([Rou07], Section 18.6.2, p. 483, and Exercise 18.9, pp. 485–486), finitely many players i : ι each control a nonnegligible traffic rate rate i for commodity playerCommodity i : K and may split their traffic fractionally across paths of their commodity (f i : P → ℝ). Unlike nonatomic players, each player i internalizes the congestion its own flow causes on its own traffic while ignoring the externality it imposes on other players.

This module develops the atomic splittable model and proves its core structural properties together with [Rou07], Exercise 18.9 (pp. 485–486; attributed in Section 18.6.2, p. 483, to Catoni and Pallottino, 1991):

Main definitions #

Main results #

References #

structure Cslib.GameTheory.AtomicSplittableGame (K : Type u_1) (ι : Type u_2) (P : Type u_3) (E : Type u_4) :
Type (max (max (max u_1 u_2) u_3) u_4)

An atomic splittable selfish routing game ([Rou07], Section 18.6.2, p. 483): each path p : P belongs to commodity commodity p : K and uses resource set resources p : Finset E, each player i : ι routes demand rate i for commodity playerCommodity i : K fractionally over paths of that commodity, and resource e has latency latency e x at total edge flow x.

  • commodity : P → K

    The commodity served by path p.

  • resources : P → Finset E

    The resources (edges) used by path p.

  • playerCommodity : ι → K

    The commodity routed by player i.

  • rate : ι → ℝ

    The traffic demand r_i controlled by player i.

  • latency : E → ℝ → ℝ

    The latency of resource e as a function of total flow on e.

structure Cslib.GameTheory.AtomicSplittableGame.IsPlayerFeasible {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} [Fintype P] (G : AtomicSplittableGame K ι P E) [DecidableEq K] (i : ι) (g : P → ℝ) :

A path flow g : P → ℝ is feasible for player i if it is nonnegative, vanishes on paths of commodities other than playerCommodity i, and routes total demand rate i.

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

A flow profile f : ι → P → ℝ is feasible if each player's flow is feasible for that player.

def Cslib.GameTheory.AtomicSplittableGame.playerEdgeFlow {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} [Fintype P] [DecidableEq E] (G : AtomicSplittableGame K ι P E) (f : ι → P → ℝ) (i : ι) (e : E) :

The flow routed by player i across resource e.

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

The total flow routed by all players across resource e.

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

The latency of path p under flow profile f.

def Cslib.GameTheory.AtomicSplittableGame.playerCost {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} [Fintype P] [DecidableEq E] (G : AtomicSplittableGame K ι P E) [Fintype ι] (f : ι → P → ℝ) (i : ι) :

The total latency cost experienced by player i under flow profile f.

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

The social cost (total latency) of flow profile f.

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

An atomic splittable equilibrium flow ([Rou07], Section 18.6.2, p. 483): a feasible flow profile f from which no player can strictly reduce its own cost by rerouting its own demand fractionally.

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

A socially optimal flow minimizes G.cost over all feasible flow profiles.

def Cslib.GameTheory.AtomicSplittableGame.HasAffineLatencies {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} (G : AtomicSplittableGame K ι P E) :

G has affine latencies if every resource latency has the form a e * x + b e with a e, b e ≥ 0.

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

Exchanging path and resource sums for a single player's flow.

theorem Cslib.GameTheory.AtomicSplittableGame.playerCost_eq_sum_playerEdgeFlow {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} [Fintype P] [DecidableEq E] (G : AtomicSplittableGame K ι P E) [Fintype ι] [Fintype E] (f : ι → P → ℝ) (i : ι) :
G.playerCost f i = ∑ e : E, G.playerEdgeFlow f i e * G.latency e (G.edgeFlow f e)

Player i's cost equals ∑ e, playerEdgeFlow f i e * latency e (edgeFlow f e).

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

Total social cost equals ∑ e, edgeFlow f e * latency e (edgeFlow f e).

theorem Cslib.GameTheory.AtomicSplittableGame.isEquilibrium_iff_isOptimal_of_unique {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} [Fintype P] [DecidableEq E] (G : AtomicSplittableGame K ι P E) [DecidableEq K] [Unique ι] [DecidableEq ι] (f : ι → P → ℝ) :

Single-player optimality ([Rou07], Section 18.6.2, p. 483): if a single player controls all traffic in the network ([Unique ι]), then a flow profile is an equilibrium if and only if it is socially optimal.

Affine variational characterization and essential uniqueness #

theorem Cslib.GameTheory.AtomicSplittableGame.isEquilibrium_iff_affine_vi {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} [DecidableEq K] [Fintype ι] [DecidableEq ι] [Fintype P] [DecidableEq E] {G : AtomicSplittableGame K ι P E} [Fintype E] {a b : E → ℝ} (ha : ∀ (e : E), 0 ≤ a e) (hl : ∀ (e : E) (x : ℝ), G.latency e x = a e * x + b e) {f : ι → P → ℝ} :
G.IsEquilibrium f ↔ G.IsFeasible f ∧ ∀ (i : ι) (g : P → ℝ), G.IsPlayerFeasible i g → 0 ≤ ∑ e : E, (a e * G.edgeFlow f e + b e + a e * G.playerEdgeFlow f i e) * (∑ p : P with e ∈ G.resources p, g p - G.playerEdgeFlow f i e)

First-order variational characterization of affine atomic splittable equilibria: when G.latency e x = a e * x + b e with a e ≥ 0, a feasible flow f is an equilibrium if and only if for every player i and every player-feasible flow g, 0 ≤ ∑ e, (a e * edgeFlow f e + b e + a e * playerEdgeFlow f i e) * (x'_e - x_e).

theorem Cslib.GameTheory.AtomicSplittableGame.isEquilibrium_cost_eq_of_hasAffineLatencies {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} [DecidableEq K] [Fintype ι] [DecidableEq ι] [Fintype P] [DecidableEq E] {G : AtomicSplittableGame K ι P E} [Finite E] (haff : G.HasAffineLatencies) {f g : ι → P → ℝ} (hf : G.IsEquilibrium f) (hg : G.IsEquilibrium g) :
G.cost f = G.cost g

Essential uniqueness of equilibrium cost for affine atomic splittable games: any two equilibria f and g of an atomic splittable game with nonnegative affine latencies have the exact same total social cost (in particular, PoA = PoS).

Player splitting and invariance of optimal cost #

@[reducible, inline]

Player index type after splitting player i₀ into two players Sum.inl false and Sum.inl true, keeping every other player j ≠ i₀ as Sum.inr ⟨j, hj⟩.

noncomputable def Cslib.GameTheory.AtomicSplittableGame.splitPlayer {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} (G : AtomicSplittableGame K ι P E) (i₀ : ι) :

Split player i₀ into two equal half-demand players ([Rou07], Exercise 18.9, pp. 485–486): replaces player i₀ (rate r) by two players Sum.inl false and Sum.inl true of rate r / 2 serving the same commodity playerCommodity i₀.

noncomputable def Cslib.GameTheory.AtomicSplittableGame.splitFlow {ι : Type u_2} {P : Type u_3} (i₀ : ι) (f : ι → P → ℝ) :
SplitPlayer ι i₀ → P → ℝ

Lift a flow profile f of G to G.splitPlayer i₀ by splitting f i₀ equally between the two half-players.

def Cslib.GameTheory.AtomicSplittableGame.mergeFlow {ι : Type u_2} {P : Type u_3} (i₀ : ι) [DecidableEq ι] (f' : SplitPlayer ι i₀ → P → ℝ) :
ι → P → ℝ

Project a flow profile f' of G.splitPlayer i₀ back to G by summing the two half-players' flows on player i₀.

theorem Cslib.GameTheory.AtomicSplittableGame.isFeasible_splitFlow {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} (G : AtomicSplittableGame K ι P E) (i₀ : ι) [Fintype P] [DecidableEq K] {f : ι → P → ℝ} (hf : G.IsFeasible f) :
(G.splitPlayer i₀).IsFeasible (splitFlow i₀ f)
theorem Cslib.GameTheory.AtomicSplittableGame.isFeasible_mergeFlow {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} (G : AtomicSplittableGame K ι P E) (i₀ : ι) [Fintype P] [DecidableEq K] [DecidableEq ι] {f' : SplitPlayer ι i₀ → P → ℝ} (hf' : (G.splitPlayer i₀).IsFeasible f') :
G.IsFeasible (mergeFlow i₀ f')
theorem Cslib.GameTheory.AtomicSplittableGame.edgeFlow_splitFlow {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} (G : AtomicSplittableGame K ι P E) (i₀ : ι) [Fintype P] [DecidableEq E] [Fintype ι] [DecidableEq ι] (f : ι → P → ℝ) (e : E) :
(G.splitPlayer i₀).edgeFlow (splitFlow i₀ f) e = G.edgeFlow f e
theorem Cslib.GameTheory.AtomicSplittableGame.edgeFlow_mergeFlow {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} (G : AtomicSplittableGame K ι P E) (i₀ : ι) [Fintype P] [DecidableEq E] [Fintype ι] [DecidableEq ι] (f' : SplitPlayer ι i₀ → P → ℝ) (e : E) :
G.edgeFlow (mergeFlow i₀ f') e = (G.splitPlayer i₀).edgeFlow f' e
theorem Cslib.GameTheory.AtomicSplittableGame.cost_splitFlow {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} (G : AtomicSplittableGame K ι P E) (i₀ : ι) [Fintype P] [DecidableEq E] [Fintype ι] [DecidableEq ι] [Finite E] (f : ι → P → ℝ) :
(G.splitPlayer i₀).cost (splitFlow i₀ f) = G.cost f
theorem Cslib.GameTheory.AtomicSplittableGame.cost_mergeFlow {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} (G : AtomicSplittableGame K ι P E) (i₀ : ι) [Fintype P] [DecidableEq E] [Fintype ι] [DecidableEq ι] [Finite E] (f' : SplitPlayer ι i₀ → P → ℝ) :
G.cost (mergeFlow i₀ f') = (G.splitPlayer i₀).cost f'
theorem Cslib.GameTheory.AtomicSplittableGame.isOptimal_splitFlow_iff {K : Type u_1} {ι : Type u_2} {P : Type u_3} {E : Type u_4} (G : AtomicSplittableGame K ι P E) (i₀ : ι) [Fintype P] [DecidableEq E] [DecidableEq K] [Fintype ι] [DecidableEq ι] [Finite E] {f : ι → P → ℝ} :

Splitting a player preserves optimal flows and optimal cost ([Rou07], Exercise 18.9, p. 486): f is socially optimal for G if and only if splitFlow i₀ f is socially optimal for G.splitPlayer i₀ (with the exact same cost).

Exercise 18.9: the player-splitting paradox #

Two-commodity, three-edge affine atomic splittable network witnessing Exercise 18.9 ([Rou07], pp. 485–486; cf. Catoni and Pallottino, 1991):

  • Resources Fin 3 have affine latencies c_0(x) = x, c_1(x) = 2x, c_2(x) = 2.
  • Paths Fin 4: commodity 0 has {0} (path 0) and {1} (path 1); commodity 1 has {1} (path 2) and {2} (path 3).
  • Players Fin 2: player 0 routes rate 1 on commodity 0; player 1 routes rate 1 on commodity 1.

Socially optimal flow profile of splittingParadoxGame (cost 5 / 2): player 0 puts all flow on edge 0 and player 1 splits evenly (1 / 2, 1 / 2) across edges 1 and 2.

Equilibrium flow profile of splittingParadoxGame before splitting (cost 64 / 25): player 0 routes (4 / 5, 1 / 5) on (e_0, e_1) and player 1 routes (2 / 5, 3 / 5) on (e_1, e_2).

Equilibrium flow profile of splittingParadoxGame.splitPlayer 0 after splitting player 0 into two demand-1 / 2 players (cost 124 / 49 < 64 / 25): each half-player routes (3 / 7, 1 / 14) on (e_0, e_1) and player 1 routes (3 / 7, 4 / 7) on (e_1, e_2).

Player-splitting paradox ([Rou07], Exercise 18.9, pp. 485–486; Catoni–Pallottino 1991): in the multicommodity affine atomic splittable network splittingParadoxGame, splitting player 0 into two half-demand players preserves the positive optimal cost (5 / 2), while strictly decreasing the cost of every equilibrium from 64 / 25 to 124 / 49 (lowering the price of anarchy from 128 / 125 to 248 / 245).