Documentation

CslibFrontier.GameTheory.Cooperative.Basic

Cooperative transferable-utility games, cost sharing, and facility location #

A cooperative cost-sharing game with transferable utility (CostSharingGame A) assigns a real cost cost S to every finite coalition S : Finset A with cost ∅ = 0 ([TV07a], Section 1.7.2; [JM07], Section 15.1). Dual value (or surplus-sharing) cooperative games (CooperativeGame A) assign a coalition value val S with val ∅ = 0 and correspond to cost-sharing games via negation (CooperativeGame.toCostSharingGame, CostSharingGame.toCooperativeGame).

This module defines:

Main definitions #

Main results #

References #

Cost-sharing games and core concepts #

structure Cslib.GameTheory.CostSharingGame (A : Type u_1) :
Type u_1

A transferable-utility cost-sharing game on agent type A assigns a real cost cost S to each finite coalition S : Finset A, normalized by cost ∅ = 0 ([JM07], Section 15.1; [TV07a], Section 1.7.2).

  • cost : Finset A → ℝ

    Cost cost S of serving coalition S.

  • cost_empty : self.cost ∅ = 0

    Serving the empty coalition costs 0.

Instances For
    theorem Cslib.GameTheory.CostSharingGame.ext {A : Type u_1} {x y : CostSharingGame A} (cost : x.cost = y.cost) :
    x = y
    @[instance_reducible]
    @[simp]
    @[instance_reducible]
    @[simp]
    theorem Cslib.GameTheory.CostSharingGame.add_cost {A : Type u_1} (G₁ G₂ : CostSharingGame A) (S : Finset A) :
    (G₁ + G₂).cost S = G₁.cost S + G₂.cost S
    @[instance_reducible]
    @[simp]
    @[instance_reducible]
    @[simp]
    theorem Cslib.GameTheory.CostSharingGame.sub_cost {A : Type u_1} (G₁ G₂ : CostSharingGame A) (S : Finset A) :
    (G₁ - G₂).cost S = G₁.cost S - G₂.cost S
    @[simp]
    theorem Cslib.GameTheory.CostSharingGame.smul_cost {A : Type u_1} (r : ℝ) (G : CostSharingGame A) (S : Finset A) :
    (r • G).cost S = r * G.cost S
    @[simp]
    theorem Cslib.GameTheory.CostSharingGame.sum_cost {A : Type u_1} {ι : Type u_2} (s : Finset ι) (f : ι → CostSharingGame A) (S : Finset A) :
    (∑ i ∈ s, f i).cost S = ∑ i ∈ s, (f i).cost S

    Pushforward of a cost-sharing game along a permutation π of the agents: a coalition S of renamed agents pays the cost of its preimage S.map π.symm.toEmbedding ([JM07], Definition 15.25).

    Restriction of a cost-sharing game to a finite subcoalition T : Finset A, viewed as a game on the subtype {x // x ∈ T}.

    @[simp]
    theorem Cslib.GameTheory.CostSharingGame.restrict_cost {A : Type u_1} (G : CostSharingGame A) (T : Finset A) (S : Finset ↥T) :
    (G.restrict T).cost S = G.cost (Finset.map (Function.Embedding.subtype fun (x : A) => x ∈ T) S)

    All coalition costs are nonnegative (c : 2^A → ℝ₊ ∪ {0}, [JM07], Section 15.3).

    Disjoint subadditivity: c(S₁ ∪ S₂) ≤ c(S₁) + c(S₂) for all disjoint coalitions S₁, S₂ ([JM07], Section 15.2.2, p. 389).

    Coalitional rationality (LP (15.1) feasibility) restricted to subcoalitions of T: ∑ j ∈ S, α j ≤ G.cost S for every S ⊆ T.

    Coalitional rationality (the core property, [JM07], Definition 15.3): no coalition S pays more in total than its standalone cost G.cost S.

    A cost allocation α : A → ℝ lies in the core of G ([JM07], Definition 15.3; [TV07a], Section 1.7.2) if it is budget-balanced (∑ j, α j = G.cost univ) and satisfies IsCoreFeasible.

    G has a nonempty core if there exists an allocation in G.InCore.

    A cost allocation α : A → ℝ lies in the γ-approximate core (γ-core) of G ([JM07], Definition 15.7) if it is γ-budget-balanced (γ * G.cost univ ≤ ∑ j, α j ≤ G.cost univ) and satisfies IsCoreFeasible.

    G has a nonempty γ-core if there exists an allocation in G.InApproxCore γ.

    theorem Cslib.GameTheory.CostSharingGame.InCore.inApproxCore {A : Type u_1} [Fintype A] {G : CostSharingGame A} {α : A → ℝ} (h : G.InCore α) {γ : ℝ} (hγ : γ ≤ 1) (hcost : 0 ≤ G.cost Finset.univ) :
    G.InApproxCore γ α
    theorem Cslib.GameTheory.CostSharingGame.InApproxCore.mono {A : Type u_1} [Fintype A] {G : CostSharingGame A} {γ₁ γ₂ : ℝ} {α : A → ℝ} (h : G.InApproxCore γ₂ α) (hγ : γ₁ ≤ γ₂) (hcost : 0 ≤ G.cost Finset.univ) :
    G.InApproxCore γ₁ α

    Dual surplus-sharing cooperative games #

    structure Cslib.GameTheory.CooperativeGame (A : Type u_1) :
    Type u_1

    A transferable-utility cooperative value game (surplus-sharing game) assigns a real value val S to each finite coalition S : Finset A, normalized by val ∅ = 0 ([JM07], Section 15.1; [TV07a], Section 1.7.2).

    • val : Finset A → ℝ

      Total value val S achievable by coalition S.

    • val_empty : self.val ∅ = 0

      The empty coalition generates value 0.

    theorem Cslib.GameTheory.CooperativeGame.ext {A : Type u_1} {x y : CooperativeGame A} (val : x.val = y.val) :
    x = y

    A payoff allocation x : A → ℝ lies in the core of a value game G if it distributes G.val univ (∑ j, x j = G.val univ) and gives every coalition S at least its standalone value (G.val S ≤ ∑ j ∈ S, x j).

    G has a nonempty core if there exists a payoff allocation in G.InCore.

    Negating values turns a cooperative value game into its dual cost-sharing game ([JM07], Section 15.1, p. 386).

    Negating costs turns a cost-sharing game into its dual cooperative value game.

    Balanced weights and weak duality #

    A weight vector w : Finset A → ℝ is a balanced collection of weights ([JM07], Definition 15.5) if w S ≥ 0 for all S and ∑_{S : j ∈ S} w S = 1 for every agent j : A.

    The trivial balanced weight collection putting weight 1 on Finset.univ and 0 elsewhere.

    theorem Cslib.GameTheory.IsBalancedWeights.sum_mul_sum_eq {A : Type u_1} [Fintype A] [DecidableEq A] {w : Finset A → ℝ} (hw : IsBalancedWeights w) (α : A → ℝ) :
    ∑ S : Finset A, w S * ∑ j ∈ S, α j = ∑ j : A, α j

    Weighted coalition sum identity: for any α : A → ℝ and balanced weights w, ∑ S, w S * (∑ j ∈ S, α j) = ∑ j, α j.

    theorem Cslib.GameTheory.CostSharingGame.InApproxCore.mul_le_sum_balanced {A : Type u_1} [Fintype A] [DecidableEq A] {G : CostSharingGame A} {γ : ℝ} {α : A → ℝ} (hα : G.InApproxCore γ α) {w : Finset A → ℝ} (hw : IsBalancedWeights w) :
    γ * G.cost Finset.univ ≤ ∑ S : Finset A, w S * G.cost S

    Weak duality for γ-approximate core allocations: if α lies in the γ-core of G, then every balanced weight collection w satisfies γ * G.cost univ ≤ ∑ S, w S * G.cost S.

    theorem Cslib.GameTheory.CostSharingGame.InCore.le_sum_balanced {A : Type u_1} [Fintype A] [DecidableEq A] {G : CostSharingGame A} {α : A → ℝ} (hα : G.InCore α) {w : Finset A → ℝ} (hw : IsBalancedWeights w) :
    G.cost Finset.univ ≤ ∑ S : Finset A, w S * G.cost S

    Weak duality for exact core allocations: if α lies in the core of G, then every balanced weight collection w satisfies G.cost univ ≤ ∑ S, w S * G.cost S.

    Cooperative facility location games #

    structure Cslib.GameTheory.FacilityLocationInstance (A : Type u_1) (F : Type u_2) :
    Type (max u_1 u_2)

    An instance of the cooperative facility location game ([JM07], Definition 15.1) consists of facility opening costs openCost : F → ℝ and agent-facility connection costs connCost : F → A → ℝ. Metric instances are constructed via FacilityLocationInstance.ofMetric and characterized by FacilityLocationInstance.IsMetric.

    • openCost : F → ℝ

      Cost openCost i of opening facility i.

    • connCost : F → A → ℝ

      Cost connCost i j of connecting agent j to open facility i.

    • openCost_nonneg (i : F) : 0 ≤ self.openCost i

      Facility opening costs are nonnegative.

    • connCost_nonneg (i : F) (j : A) : 0 ≤ self.connCost i j

      Connection costs are nonnegative.

    def Cslib.GameTheory.FacilityLocationInstance.ofMetric {A : Type u_1} {F : Type u_2} [PseudoMetricSpace (A ⊕ F)] (openCost : F → ℝ) (openCost_nonneg : ∀ (i : F), 0 ≤ openCost i) :

    Construct a facility location instance whose connection costs come from a (pseudo)metric space on A ⊕ F, matching [JM07], Definition 15.1 verbatim.

    @[simp]
    theorem Cslib.GameTheory.FacilityLocationInstance.ofMetric_openCost {A : Type u_1} {F : Type u_2} [PseudoMetricSpace (A ⊕ F)] (openCost : F → ℝ) (openCost_nonneg : ∀ (i : F), 0 ≤ openCost i) (i : F) :
    (ofMetric openCost openCost_nonneg).openCost i = openCost i
    @[simp]
    theorem Cslib.GameTheory.FacilityLocationInstance.ofMetric_connCost {A : Type u_1} {F : Type u_2} [PseudoMetricSpace (A ⊕ F)] (openCost : F → ℝ) (openCost_nonneg : ∀ (i : F), 0 ≤ openCost i) (i : F) (j : A) :
    (ofMetric openCost openCost_nonneg).connCost i j = dist (Sum.inr i) (Sum.inl j)

    I is a metric facility location instance if its connection costs arise as distances dist (inr i) (inl j) in some pseudometric space on A ⊕ F ([JM07], Definition 15.1).

    theorem Cslib.GameTheory.FacilityLocationInstance.isMetric_ofMetric {A : Type u_1} {F : Type u_2} [PseudoMetricSpace (A ⊕ F)] (openCost : F → ℝ) (hopen : ∀ (i : F), 0 ≤ openCost i) :
    (ofMetric openCost hopen).IsMetric
    def Cslib.GameTheory.FacilityLocationInstance.planCost {A : Type u_1} {F : Type u_2} (I : FacilityLocationInstance A F) (S : Finset A) (F' : Finset F) (hF' : F'.Nonempty) :

    Cost of serving coalition S using a nonempty set F' of open facilities: (∑ i ∈ F', openCost i) + ∑ j ∈ S, min_{i ∈ F'} connCost i j.

    theorem Cslib.GameTheory.FacilityLocationInstance.planCost_eq {A : Type u_1} {F : Type u_2} (I : FacilityLocationInstance A F) (S : Finset A) (F' : Finset F) (hF' : F'.Nonempty) :
    I.planCost S F' hF' = ∑ i ∈ F', I.openCost i + ∑ j ∈ S, F'.inf' hF' fun (i : F) => I.connCost i j

    Coalition cost c(S) = min_{∅ ≠ F' ⊆ F} (∑_{i ∈ F'} f_i + ∑_{j ∈ S} min_{i ∈ F'} d_{ij}) for S nonempty, and 0 for S = ∅ (opening no facilities serves the empty set of clients at cost 0, [JM07], Definition 15.1).

    theorem Cslib.GameTheory.FacilityLocationInstance.le_toCostSharingGame_cost_of_nonempty {A : Type u_1} {F : Type u_2} [Fintype F] [Nonempty F] (I : FacilityLocationInstance A F) {S : Finset A} (hS : S.Nonempty) {c : ℝ} (h : ∀ (F' : Finset F) (hF' : F'.Nonempty), c ≤ I.planCost S F' hF') :

    Cooperative facility location games have subadditive cost functions ([JM07], Section 15.2.2): opening F₁ ∪ F₂ serves S₁ ∪ S₂ at cost at most c(S₁) + c(S₂).

    def Cslib.GameTheory.FacilityLocationInstance.IsDualFeasible {A : Type u_1} {F : Type u_2} [Fintype A] (I : FacilityLocationInstance A F) (α : A → ℝ) (β : F → A → ℝ) :

    Feasibility for the standard facility location dual LP (15.4) ([JM07], p. 390): α_j, β_{ij} ≥ 0, β_{ij} ≥ α_j - d_{ij}, and ∑_{j ∈ A} β_{ij} ≤ f_i.

    Proposition 15.10 ([JM07], p. 390): for any feasible solution (α, β) of the facility-location dual LP (15.4), α satisfies the core property of the facility location game.

    Canonical examples: Examples 15.2 & 15.4 and empty-core facility location #

    Example 15.2 ([JM07], Figure 15.1, pp. 386–387): 3 agents {0, 1, 2} ({a, b, c}) and 2 facilities {0, 1} of opening cost 2 each, with metric distances induced by the line/path embedding example15_2_pos.

    Example 15.4 ([JM07], p. 387): the cost allocation (4, 2, 2) lies in the core of example15_2.

    Example 15.4 ([JM07], p. 388): the cost allocation (4, 1, 3) also lies in the core of example15_2.

    The 3-facility bipartite connection table described in Example 15.4 ([JM07], pp. 388–389): adding a third facility of opening cost 3 with distance 1 to a (0) and c (2) and distance 4 to b (1) while keeping f₁, f₂ distances unchanged (d(f₂, a) = 5).

    Source note: if d is re-closed under the metric triangle inequality on A ∪ F, then d(f₂, a) ≤ d(f₂, c) + d(f₃, c) + d(f₃, a) = 3, which lowers c({a, b, c}) from 8 to 7 (by opening f₂ alone) and restores a nonempty core (3, 2, 2). Below we also provide emptyCoreMetricFL, a genuine 6-vertex (3 agents, 3 facilities) metric instance with the exact same (15 / 16) integrality gap (7.5 < 8).

    Genuine 6-vertex (3 agents, 3 facilities) metric facility location instance on the shortest-path metric of K_{3,3} \ M with opening costs 3: every pair {j, k} costs 5, the grand coalition costs 8, the exact core (γ = 1) is empty, and the (15 / 16)-core is nonempty and optimal.

    Grand-coalition cost c(univ) = 8 for the 6-vertex metric facility location game emptyCoreMetricFL.

    The 6-vertex metric facility location game emptyCoreMetricFL has an empty exact core (γ = 1 fails): pairwise balanced weights sum to at most 7.5 < 8 = c(univ).

    The symmetric allocation (5 / 2, 5 / 2, 5 / 2) lies in the (15 / 16)-core of emptyCoreMetricFL (verified via Proposition 15.10 with α_j = 5 / 2 and β_{ij} = max(0, α_j - d_{ij}) = 3 / 2 for i ≠ j).

    Example 15.4 ([JM07], pp. 388–389): on the 3-facility bipartite connection table emptyCoreBipartiteFL, the exact core is empty (7.5 < 8).

    (3.5, 2.5, 1.5) lies in the (15 / 16)-core (7.5 / 8-core) of emptyCoreBipartiteFL ([JM07], p. 389).