Documentation

CslibFrontier.GameTheory.UtilityGame.CompetitiveFacilityLocation

Vetta's competitive facility location game #

In the competitive facility location game ([Vet02]; [TW07], Section 19.4.1, pp. 502–503), k service providers i : ι choose facility locations s i : S i to serve a finite set of clients j : J. Each client j has reservation value value j (π_j) for service, and serving j from provider i's location a : S i incurs connection cost serviceCost j i a (c_{j, s_i}).

Under second-cheapest pricing ([TW07], p. 503), a provider i serving client j charges the lowest connection cost available from any competing provider i' ≠ i, capped at j's reservation value value j (secondPrice), earning profit max 0 (secondPrice j s i - serviceCost j i (s i)) from j. Social welfare (socialWelfare) sums the realized client-plus-provider surplus max_{x ∈ T} max(0, π_j - c_j(x)) across all clients j. When serviceCost j i a ≤ value j (Section 19.4.1's without-loss-of-generality normalization) and at least two providers are present, secondPrice equals min_{i' ≠ i} c_{j, s_{i'}} (secondPrice_eq_inf') and socialWelfare equals ∑ j, (π_j - min_i c_{j, s_i}) (socialWelfare_eq_sum_sub_inf').

We prove all numbered facility-location results and facility-cost extensions of Section 19.4:

  1. Monotone basic utility game ([TW07], Theorem 19.18, p. 505): toUtilityGame is a basic utility game (isBasic_toUtilityGame, hence isValid_toUtilityGame) with monotone social welfare (monotone_socialWelfare) and socialWelfare ∅ = 0.
  2. Potential game and price of stability 1 ([TW07], Theorem 19.16 and Corollary 19.17, pp. 503–504): -socialWelfare ∘ profileSet is an exact potential of toCostGame (isExactPotential), so finite instances have pure Nash equilibria (exists_isPureNash), every welfare-maximizing profile is stable (isPureNash_of_forall_socialWelfare_le, giving PoS = 1), and better/best-response dynamics always converge (hasFIP, exists_reflTransGen_isPureNash), though suboptimal equilibria exist (exists_competitiveFacilityLocation_poa_eq_two attains PoA = 2 on 2 providers and 2 clients).
  3. Price of anarchy 2 and O(n log(1 / ε)) random best-response convergence: immediate for pure Nash, mixed Nash, and coarse correlated equilibria (socialWelfare_le_two_mul_of_isPureNash, socialWelfare_le_two_mul_expected_of_isMixedNash) and random best-response trajectories (mul_socialWelfare_le_expectedWalkValue) by instantiating Basic.lean.
  4. Facility opening costs ([TW07], Section 19.5.3, p. 511 and Exercise 19.17, p. 515): subtracting installation costs openingCost i a (withOpeningCost) preserves IsBasic (hence exact potential and pure-equilibrium existence) while breaking monotonicity; every pure Nash equilibrium s still satisfies V_f(o) ≤ 2 * V_f(s) + ∑ i, f(i, s i) (netWelfare_le_two_mul_add_openingCost_of_isPureNash, Exercise 19.17(b)), whereas no constant multiplicative price-of-anarchy bound holds (exists_withOpeningCost_poa_gt, Exercise 19.17(a)).

Main definitions #

Main results #

References #

Submodularity and min-max duality for Finset.fold max #

Competitive facility location model #

structure Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation (ι : Type u_1) (S : ι → Type u_2) (J : Type u_3) :
Type (max (max u_1 u_2) u_3)

A competitive facility location game ([Vet02]; [TW07], Section 19.4.1, pp. 502–503): service providers i : ι choose facility locations in S i to serve clients j : J with reservation values value j (π_j) and connection costs serviceCost j i a (c_{j, s_i}).

  • value : J → ℝ

    Reservation value π_j of client j for receiving service.

  • serviceCost : J → (i : ι) → S i → ℝ

    Connection cost c_{j, s_i} for provider i at location a : S i to serve client j.

def Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.secondPrice {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] (j : J) (s : (i : ι) → S i) (i : ι) :

Second-cheapest connection price p_{ij}(s) available to client j outside provider i, capped at client j's reservation value value j ([TW07], Section 19.4.1, p. 503).

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.secondPrice_def {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] (j : J) (s : (i : ι) → S i) (i : ι) :
G.secondPrice j s i = Finset.fold min (G.value j) (fun (i' : ι) => G.serviceCost j i' (s i')) (Finset.univ.erase i)
@[simp]
theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.secondPrice_update_self {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] (j : J) (s : (i : ι) → S i) (i : ι) (a : S i) :
theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.secondPrice_eq_inf' {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] (j : J) (s : (i : ι) → S i) (i : ι) (hne : (Finset.univ.erase i).Nonempty) (hle : ∀ (i' : ι) (a : S i'), G.serviceCost j i' a ≤ G.value j) :
G.secondPrice j s i = (Finset.univ.erase i).inf' hne fun (i' : ι) => G.serviceCost j i' (s i')

Under Section 19.4.1's normalization serviceCost j i' a ≤ value j and at least one competing provider i' ≠ i, secondPrice j s i is literally min_{i' ≠ i} c_{j, s_{i'}} ([TW07], p. 503).

def Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.clientProfit {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] (j : J) (s : (i : ι) → S i) (i : ι) :

Profit earned by provider i from client j at profile s: max 0 (p_{ij}(s) - c_{j, s_i}). If i is the unique lowest-cost provider (with c_{j, s_i} < p_{ij}(s)), i serves j at price p_{ij}(s); if tied (c_{j, s_i} = p_{ij}(s)) or undercut (c_{j, s_i} > p_{ij}(s)), i earns zero regardless of tie-breaking.

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.clientProfit_def {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] (j : J) (s : (i : ι) → S i) (i : ι) :
G.clientProfit j s i = max 0 (G.secondPrice j s i - G.serviceCost j i (s i))
def Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.profit {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [Fintype J] (i : ι) (s : (k : ι) → S k) :

Total profit α_i(s) of provider i across all clients j : J.

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.profit_def {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [Fintype J] (i : ι) (s : (k : ι) → S k) :
G.profit i s = ∑ j : J, G.clientProfit j s i
def Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.clientSurplus {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) (j : J) (T : Finset ((i : ι) × S i)) :

Social surplus generated for client j by a finite set T of opened (provider, location) pairs: max(0, max_{x ∈ T} (π_j - c_j(x))).

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.clientSurplus_def {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) (j : J) (T : Finset ((i : ι) × S i)) :
G.clientSurplus j T = Finset.fold max 0 (fun (x : (i : ι) × S i) => G.value j - G.serviceCost j x.fst x.snd) T
@[simp]
theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.clientSurplus_singleton {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) (j : J) (x : (i : ι) × S i) :
G.clientSurplus j {x} = max 0 (G.value j - G.serviceCost j x.fst x.snd)
def Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.socialWelfare {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype J] (T : Finset ((i : ι) × S i)) :

Social welfare V(T) of a finite set T of opened (provider, location) pairs ([TW07], Section 19.4.3, p. 505).

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.socialWelfare_def {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype J] (T : Finset ((i : ι) × S i)) :
G.socialWelfare T = ∑ j : J, G.clientSurplus j T
theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.socialWelfare_eq_sum_sub_inf' {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [Nonempty ι] [Fintype J] (s : (i : ι) → S i) (hle : ∀ (j : J) (i : ι) (a : S i), G.serviceCost j i a ≤ G.value j) :
G.socialWelfare (profileSet s) = ∑ j : J, (G.value j - Finset.univ.inf' ⋯ fun (i : ι) => G.serviceCost j i (s i))

Under Section 19.4.1's normalization serviceCost j i a ≤ value j and [Nonempty ι], the social welfare of profile s equals ∑ j, (π_j - min_i c_{j, s_i}) ([TW07], p. 505).

Embedding of the competitive facility location game as a UtilityGame ([TW07], Section 19.4.3, p. 505).

@[simp]
theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.toUtilityGame_utility {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [Fintype J] (i : ι) (s : (k : ι) → S k) :

Strategic game in cost-minimization form (cost = -profit) associated to G.

@[simp]
theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.toCostGame_cost {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [Fintype J] (i : ι) (s : (k : ι) → S k) :
G.toCostGame.cost i s = -G.profit i s

Theorems 19.16, 19.17, 19.18, 19.19, and 19.20 for competitive facility location #

Social welfare in the competitive facility location game is monotone ([TW07], Theorem 19.18, p. 505).

Monotonicity of G.toUtilityGame.socialValue for module-isolated callers of UtilityGame theorems.

Theorem 19.18 ([TW07], p. 505; [Vet02]): the competitive facility location game is a basic (and monotone, by monotone_socialWelfare) utility game.

The competitive facility location game satisfies Vetta's valid utility game conditions.

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.profit_sub_profit_eq {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [Fintype J] (s : (i : ι) → S i) (i : ι) (a : S i) :

Payoff-form unilateral deviation identity ([TW07], proof of Theorem 19.16, p. 504): when provider i changes location to a, the change in i's profit equals the change in social welfare V.

Theorem 19.16 ([TW07], p. 503): the competitive facility location game is an exact potential game with social welfare V(s) as potential (-V(s) for toCostGame).

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.exists_isPureNash {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [∀ (i : ι), Finite (S i)] [∀ (i : ι), Nonempty (S i)] [Fintype J] :
∃ (s : (i : ι) → S i), G.toCostGame.IsPureNash s

Corollary 19.17 (existence) ([TW07], p. 504): every finite nonempty competitive facility location game admits a pure Nash equilibrium.

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.isPureNash_of_forall_socialWelfare_le {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [Fintype J] {s : (i : ι) → S i} (hs : ∀ (s' : (i : ι) → S i), G.socialWelfare (profileSet s') ≤ G.socialWelfare (profileSet s)) :

Corollary 19.17 (efficiency stability) ([TW07], p. 504): every socially efficient outcome of the competitive facility location game is a pure Nash equilibrium.

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.exists_isPureNash_forall_socialWelfare_le {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [∀ (i : ι), Finite (S i)] [∀ (i : ι), Nonempty (S i)] [Fintype J] :
∃ (s : (i : ι) → S i), G.toCostGame.IsPureNash s ∧ ∀ (s' : (i : ι) → S i), G.socialWelfare (profileSet s') ≤ G.socialWelfare (profileSet s)

Corollary 19.17 (price of stability 1) ([TW07], p. 504): every finite nonempty competitive facility location game has a pure Nash equilibrium maximizing social welfare.

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.hasFIP {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [∀ (i : ι), Finite (S i)] [Fintype J] :

Corollary 19.17 (finite improvement property) ([TW07], p. 504): every finite competitive facility location game has the finite improvement property (all better-response and best-response improvement sequences terminate).

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.exists_reflTransGen_isPureNash {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [∀ (i : ι), Finite (S i)] [Fintype J] (s₀ : (i : ι) → S i) :
∃ (t : (i : ι) → S i), Relation.ReflTransGen (flip G.toCostGame.Improves) s₀ t ∧ G.toCostGame.IsPureNash t

Corollary 19.17 (convergence of improvement dynamics) ([TW07], p. 504): from any starting profile s₀, better-response dynamics reach a pure Nash equilibrium.

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.socialWelfare_le_two_mul_of_isPureNash {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [Fintype J] {s : (i : ι) → S i} (hs : G.toCostGame.IsPureNash s) (o : (i : ι) → S i) :

Price of Anarchy ≤ 2 for Competitive Facility Location ([TW07], Theorems 19.18–19.19, p. 505; [Vet02]): every pure Nash equilibrium s achieves at least half the social welfare of any profile o.

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.socialWelfare_le_two_mul_expected_of_isMixedNash {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] [Fintype J] {p : (i : ι) → S i → ℝ} (hp : G.toCostGame.IsMixedNash p) (o : (i : ι) → S i) :
G.socialWelfare (profileSet o) ≤ 2 * ∑ s : (i : ι) → S i, productWeight p s * G.socialWelfare (profileSet s)

Mixed Nash Price of Anarchy ≤ 2 for Competitive Facility Location ([Vet02]; [TW07], Section 19.5.3, p. 511): every mixed Nash equilibrium p achieves expected social welfare at least half of any pure profile o.

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.mul_socialWelfare_le_expectedWalkValue {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [Nonempty ι] [Fintype J] {br : (i : ι) → ((k : ι) → S k) → S i} (hbr : G.toUtilityGame.IsBestResponse br) {ε : ℝ} (hε : 0 < ε) {t : ℕ} (ht : ↑(Fintype.card ι) / 2 * Real.log (1 / ε) ≤ ↑t) (s₀ o : (i : ι) → S i) :

Random Best-Response Convergence for Competitive Facility Location ([TW07], Theorems 19.18 and 19.20, pp. 505–506): after t ≥ (n / 2) * log (1 / ε) random best-response steps from any profile s₀, expected social welfare is at least (1 / 2 - ε) times optimal.

Tightness PoA = 2 on 2 providers and 2 clients #

Exact tightness of PoA ≤ 2 for competitive facility location: there is a 2-provider, 2-client instance satisfying 0 ≤ c ≤ π with a pure Nash equilibrium s of welfare 1 and an optimal profile o of welfare 2 = 2 * V(s).

Facility opening costs (Section 19.5.3 and Exercise 19.17) #

def Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.withOpeningCost {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [Fintype J] (openingCost : (i : ι) → S i → ℝ) :

Competitive facility location with facility installation costs openingCost i a (f(s_i)) paid by any provider i locating at a ([TW07], Section 19.5.3, p. 511 and Exercise 19.17, p. 515).

@[simp]
theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.withOpeningCost_socialValue {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [Fintype J] (openingCost : (i : ι) → S i → ℝ) (T : Finset ((i : ι) × S i)) :
(G.withOpeningCost openingCost).socialValue T = G.socialWelfare T - ∑ x ∈ T, openingCost x.fst x.snd
@[simp]
theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.withOpeningCost_profileValue {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [Fintype J] (openingCost : (i : ι) → S i → ℝ) (s : (i : ι) → S i) :
(G.withOpeningCost openingCost).profileValue s = G.socialWelfare (profileSet s) - ∑ i : ι, openingCost i (s i)
@[simp]
theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.withOpeningCost_utility {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [Fintype J] (openingCost : (i : ι) → S i → ℝ) (i : ι) (s : (k : ι) → S k) :
(G.withOpeningCost openingCost).utility i s = G.profit i s - openingCost i (s i)
theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.isBasic_withOpeningCost {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] [Fintype J] (openingCost : (i : ι) → S i → ℝ) :
(G.withOpeningCost openingCost).IsBasic

Adding facility opening costs preserves IsBasic (hence IsValid, exact potential -V_f, and pure-equilibrium existence), losing only monotonicity of socialValue.

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.netWelfare_le_two_mul_add_openingCost_of_isPureNash {ι : Type u_1} {S : ι → Type u_2} {J : Type u_3} (G : CompetitiveFacilityLocation ι S J) [Fintype ι] [DecidableEq ι] [Fintype J] (openingCost : (i : ι) → S i → ℝ) {s : (i : ι) → S i} (hs : (G.withOpeningCost openingCost).toCostGame.IsPureNash s) (o : (i : ι) → S i) :
(G.withOpeningCost openingCost).profileValue o ≤ 2 * (G.withOpeningCost openingCost).profileValue s + ∑ i : ι, openingCost i (s i)

Exercise 19.17(b) ([TW07], p. 515): at any pure Nash equilibrium s of the facility location game with opening costs f, the net social welfare of any profile o is at most 2 * V_f(s) + F, where F = ∑ i, f(i, s i) is the total facility opening cost paid at s.

theorem Cslib.GameTheory.UtilityGame.CompetitiveFacilityLocation.exists_withOpeningCost_poa_gt (C : ℝ) :
∃ (G : CompetitiveFacilityLocation (Fin 2) (fun (x : Fin 2) => Bool) Unit) (f : Fin 2 → Bool → ℝ) (s : Fin 2 → Bool) (o : Fin 2 → Bool), (∀ (j : Unit) (i : Fin 2) (b : Bool), 0 ≤ G.serviceCost j i b ∧ G.serviceCost j i b ≤ G.value j) ∧ (∀ (i : Fin 2) (b : Bool), 0 ≤ f i b) ∧ (G.withOpeningCost f).toCostGame.IsPureNash s ∧ 0 < (G.withOpeningCost f).profileValue s ∧ C * (G.withOpeningCost f).profileValue s < (G.withOpeningCost f).profileValue o

Exercise 19.17(a) ([TW07], p. 515): when facilities have nonnegative opening costs, no constant price-of-anarchy bound holds — for every C : ℝ, there is a 2-provider, 1-client competitive facility location instance (with 0 ≤ c ≤ π and 0 ≤ f) admitting a pure Nash equilibrium s of positive net social welfare and a profile o with C * V_f(s) < V_f(o).