Documentation

CslibFrontier.Probability.OptimalStopping.TransversalSecretary

Transversal matroid secretary and truthful online USV mechanisms #

Formalizes the Price Sampling Algorithm for bounded-left-degree transversal matroids and the associated truthful online mechanism in the Unknown Single-Value (USV) unit-demand domain ([BIK07], Section 4, Theorems 4.1 and 4.2, p. 6).

A bipartite graph G : L × R → Bool induces a transversal matroid on left vertices L in which a subset of left vertices is independent iff it can be matched to distinct right vertices R. Left vertices L arrive in uniformly random order σ : Fin (Fintype.card L) ≃ L. After observing a sample S of the first s = ⌈|L|/2⌉ arrivals without selection, each right vertex r is assigned price equal to the maximum weight of a sampled neighbor of r (0 if none was sampled). Each subsequent arrival l is matched greedily to a lowest-price unmatched neighbor r whose price is strictly less than w l.

Model notes and deviations #

Main definitions #

Main results #

References #

Price Sampling Algorithm for bounded-degree transversal matroids #

noncomputable def Cslib.Probability.OptimalStopping.TransversalSecretary.itemPrice {L : Type u_1} {R : Type u_2} (G : L × R → Bool) (w : L → ℝ) (S : Finset L) (r : R) :

Item price w(l*_S(r)): maximum weight of a sampled neighbor of r, or 0 if r has no sampled neighbors.

theorem Cslib.Probability.OptimalStopping.TransversalSecretary.itemPrice_nonneg {L : Type u_1} {R : Type u_2} (G : L × R → Bool) (w : L → ℝ) {S : Finset L} (hw : ∀ l ∈ S, 0 ≤ w l) (r : R) :
0 ≤ itemPrice G w S r
noncomputable def Cslib.Probability.OptimalStopping.TransversalSecretary.priceSamplingStep {L : Type u_1} {R : Type u_2} [Fintype R] [DecidableEq L] [DecidableEq R] (G : L × R → Bool) (w : L → ℝ) (p : R → ℝ) (M : Finset (L × R)) (l : L) :
Finset (L × R)

Single online step of the Price Sampling Algorithm for left vertex l: collects all unmatched neighbors of l with price strictly below w l and, if nonempty, matches l to a minimum-price candidate.

noncomputable def Cslib.Probability.OptimalStopping.TransversalSecretary.priceSamplingMatch {L : Type u_1} {R : Type u_2} [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R] (G : L × R → Bool) (w : L → ℝ) (σ : Fin (Fintype.card L) ≃ L) :
Finset (L × R)

Price Sampling Algorithm ([BIK07], Section 4): observes the first s = (|L| + 1) / 2 arriving left vertices to set item prices itemPrice G w S, then scans the remaining arrival list with priceSamplingStep.

noncomputable def Cslib.Probability.OptimalStopping.TransversalSecretary.priceSamplingPMF {L : Type u_1} {R : Type u_2} [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R] (G : L × R → Bool) (w : L → ℝ) :
PMF (Finset (L × R))

Randomized distribution over matchings produced by priceSamplingMatch under uniform random arrival order σ.

Expected weight of left vertices matched by priceSamplingMatch under a uniformly random arrival order.

Every execution of priceSamplingMatch produces a valid matching in G.

theorem Cslib.Probability.OptimalStopping.TransversalSecretary.sum_le_four_mul_degree_mul_expectedPriceSampling {L : Type u_1} {R : Type u_2} [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R] (G : L × R → Bool) (w : L → ℝ) (hw : ∀ (l : L), 0 ≤ w l) (hwb : ∀ (x y : L), x ≠ y → w x = w y → w x = 0) {d : ℕ} (hd : ∀ (l : L), {r : R | G (l, r) = true}.card ≤ d) (hn : 2 ≤ Fintype.card L) {M : Finset (L × R)} (hM : Algorithms.Lean.MaxFlow.IsMatching G M) :
∑ e ∈ M, w e.1 ≤ 4 * ↑d * expectedPriceSamplingWeight G w

Theorem 4.1 (Transversal Matroid Price Sampling) of [BIK07] (Section 4, p. 6): for any bipartite graph G : L × R → Bool of left degree at most d with 2 ≤ |L| and well-behaved nonnegative weights w : L → ℝ (w x = w y → w x = 0 for x ≠ y), the expected weight matched by priceSamplingMatch G w is at least 1 / (4 * d) of the weight of any matching M.

Truthful online mechanism in the Unknown Single-Value (USV) domain #

A buyer's private type in the Unknown Single-Value (USV) unit-demand domain ([BIK07], Sections 2 and 4): scalar value value for receiving any desired item r with desired r = true, and value 0 for undesired items.

  • value : ℝ

    Buyer's scalar valuation for obtaining a desired item.

  • desired : R → Bool

    Indicator of desired items (desired r = true iff r ∈ T_l).

Bipartite demand graph induced by a reported USV type profile.

Agent weight vector induced by a reported USV type profile.

noncomputable def Cslib.Probability.OptimalStopping.TransversalSecretary.priceSamplingUSVAlloc {L : Type u_1} {R : Type u_2} [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R] (profile : L → USVType R) (σ : Fin (Fintype.card L) ≃ L) (l : L) :

Item allocated to agent l under a reported USV profile and arrival order σ.

noncomputable def Cslib.Probability.OptimalStopping.TransversalSecretary.priceSamplingUSVPayment {L : Type u_1} {R : Type u_2} [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R] (profile : L → USVType R) (σ : Fin (Fintype.card L) ≃ L) (l : L) :

Payment charged to agent l under the Price Sampling USV mechanism: itemPrice of the allocated item, or 0 if unallocated.

Utility of an agent with true type trueType receiving alloc and paying payment.

theorem Cslib.Probability.OptimalStopping.TransversalSecretary.priceSamplingUSV_ir {L : Type u_1} {R : Type u_2} [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R] (profile : L → USVType R) (σ : Fin (Fintype.card L) ≃ L) (l : L) :
0 ≤ priceSamplingUSVUtility (profile l) (priceSamplingUSVAlloc profile σ l) (priceSamplingUSVPayment profile σ l)

Ex-post individual rationality ([BIK07], Theorem 4.2): under truthful reporting, every agent's utility is nonnegative for every arrival order σ (regardless of left degree d or other agents' reports).

theorem Cslib.Probability.OptimalStopping.TransversalSecretary.priceSamplingUSV_truthful {L : Type u_1} {R : Type u_2} [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R] (profile : L → USVType R) (σ : Fin (Fintype.card L) ≃ L) (l : L) (trueType misreport : USVType R) (hothers : ∀ (l' : L), l' ≠ l → 0 ≤ (profile l').value) :
priceSamplingUSVUtility trueType (priceSamplingUSVAlloc (Function.update profile l misreport) σ l) (priceSamplingUSVPayment (Function.update profile l misreport) σ l) ≤ priceSamplingUSVUtility trueType (priceSamplingUSVAlloc (Function.update profile l trueType) σ l) (priceSamplingUSVPayment (Function.update profile l trueType) σ l)

Ex-post dominant-strategy truthfulness (Theorem 4.2) of [BIK07] (Section 4, p. 6): in the Unknown Single-Value (USV) unit-demand domain—even without any bound d on desired set sizes—truthfully reporting both value and desired maximizes agent l's utility for every arrival order σ and every nonnegative report profile of the other agents.

theorem Cslib.Probability.OptimalStopping.TransversalSecretary.priceSamplingUSV_welfare {L : Type u_1} {R : Type u_2} [Fintype L] [Fintype R] [DecidableEq L] [DecidableEq R] (profile : L → USVType R) (hw : ∀ (l : L), 0 ≤ (profile l).value) (hwb : ∀ (x y : L), x ≠ y → (profile x).value = (profile y).value → (profile x).value = 0) {d : ℕ} (hd : ∀ (l : L), {r : R | (profile l).desired r = true}.card ≤ d) (hn : 2 ≤ Fintype.card L) {M : Finset (L × R)} (hM : Algorithms.Lean.MaxFlow.IsMatching (profileGraph profile) M) :
∑ e ∈ M, (profile e.1).value ≤ 4 * ↑d * expectedPriceSamplingWeight (profileGraph profile) (profileWeight profile)

Social welfare guarantee of the USV mechanism ([BIK07], Theorem 4.2): when agents report truthfully, have well-behaved nonnegative valuations, and each agent desires at most d items with 2 ≤ |L|, the expected social welfare is a 4d-approximation to the maximum weight matching.