Documentation

CslibFrontier.Probability.OptimalStopping.MatroidProphet

The matroid prophet inequality #

Let M : Matroid E be a matroid on a finite ground set E, and let elements e : E have independent nonnegative random weights drawn from μ : E → PMF ℝ≥0 (piFintype μ). Elements arrive one by one in an arbitrary fixed (adversarial) order σ : Fin (Fintype.card E) ≃ E. Upon each arrival, an online algorithm observes the element's weight and irrevocably decides whether to accept it, maintaining independence in M.

An offline prophet seeing all weights w : E → ℝ≥0 collects optWeight M w, the maximum weight of an independent subset of M. The matroid prophet inequality of Kleinberg and Weinberg ([KW12]) guarantees that an online threshold algorithm achieves at least half of the prophet's expected weight for every arrival order σ.

For any independent set A, let residualOpt M A w := optWeight (M.contract (A : Set E)) w be the maximum weight of an independent subset of the contracted matroid M.contract A. When the expected offline optimum expectedOpt M μ is finite, define the balanced threshold for accepting e given currently accepted set A by balancedThreshold M μ A e = (E[residualOpt M A] - E[residualOpt M (insert e A)]) / 2. The online algorithm onlineThresholdRun accepts each arriving element e whenever insert e A is independent in M and balancedThreshold M μ A e ≤ w e.

The proof decomposes each accepted weight into its threshold τ(A_{<e}, e) and excess (w e - τ(A_{<e}, e))⁺:

  1. The sum of thresholds telescopes deterministically to (expectedOpt M μ - E_{w'}[residualOpt M (A w) w']) / 2.
  2. Symmetric basis exchange in M implies submodularity of A ↦ residualOpt M A w on independent sets (marginalLoss_mono), so marginal losses increase as A grows and sum over any independent I of M.contract A to at most residualOpt M A w (sum_marginalLoss_le_residualOpt).
  3. Decoupling each arriving weight w e from A_{<e} via an independent copy w' shows the expected excess is at least E_{w, w'}[residualOpt M (A w) w'] / 2. Adding the two parts gives expectedOpt M μ ≤ 2 * expectedOnlineWeight ... (expectedOpt_le_two_mul_expectedOnlineWeight).

Specializing to the k-uniform matroid uniformMatroid E k yields the multiple-choice prophet inequality (expectedOpt_uniformMatroid_le_two_mul), and specializing further to k = 1 identifies expectedOpt and expectedOnlineWeight with Prophet.expectedMax and the single-item half-expectation threshold rule (expectedOpt_uniformMatroid_one, expectedOnlineWeight_uniformMatroid_one).

Main definitions #

Main results #

References #

Independent product distribution over a Fintype #

noncomputable def Cslib.Probability.OptimalStopping.MatroidProphet.piFintype {E : Type u_1} {α : Type u_2} [Fintype E] (μ : E → PMF α) :
PMF (E → α)

Independent draws from a Fintype-indexed family of distributions μ : E → PMF α, without requiring α to be finite.

@[simp]
theorem Cslib.Probability.OptimalStopping.MatroidProphet.piFintype_apply {E : Type u_1} {α : Type u_2} [Fintype E] (μ : E → PMF α) (w : E → α) :
(piFintype μ) w = ∏ x : E, (μ x) (w x)

Each weight vector has mass equal to the product of its coordinate masses.

theorem Cslib.Probability.OptimalStopping.MatroidProphet.piFintype_eq_map_piFin {E : Type u_1} {α : Type u_2} [Fintype E] (μ : E → PMF α) {n : ℕ} (σ : Fin n ≃ E) :
piFintype μ = PMF.map (fun (v : Fin n → α) (x : E) => v (σ.symm x)) (PMF.piFin fun (i : Fin n) => μ (σ i))

piFintype μ agrees with pushing piFin (μ ∘ σ) along any arrival bijection σ.

Matroid contraction optimum and submodularity #

Maximum total weight of an independent subset of a finite matroid M under nonnegative weights w : E → ℝ≥0.

noncomputable def Cslib.Probability.OptimalStopping.MatroidProphet.residualOpt {E : Type u_1} [Fintype E] (M : Matroid E) (A : Finset E) (w : E → NNReal) :

Residual offline optimal weight after contracting A: the maximum weight of an independent subset of M.contract (A : Set E).

theorem Cslib.Probability.OptimalStopping.MatroidProphet.sum_le_optWeight {E : Type u_1} [Fintype E] {M : Matroid E} {w : E → NNReal} {I : Finset E} (hI : M.Indep ↑I) :
∑ e ∈ I, w e ≤ optWeight M w

Balanced thresholds and the online algorithm #

noncomputable def Cslib.Probability.OptimalStopping.MatroidProphet.onlineThresholdStep {E : Type u_1} [DecidableEq E] (M : Matroid E) (τ : Finset E → E → NNReal) (w : E → NNReal) (A : Finset E) (e : E) :

One step of the online threshold algorithm: accept e if insert e A stays independent in M and w e meets the state-dependent threshold τ A e.

noncomputable def Cslib.Probability.OptimalStopping.MatroidProphet.onlineThresholdRun {E : Type u_1} [DecidableEq E] (M : Matroid E) (τ : Finset E → E → NNReal) (w : E → NNReal) (L : List E) :

Online threshold selection along a list L of arriving elements, starting from ∅.

The arrival list induced by a bijection σ : Fin (Fintype.card E) ≃ E.

theorem Cslib.Probability.OptimalStopping.MatroidProphet.onlineThresholdRun_indep {E : Type u_1} [DecidableEq E] (M : Matroid E) (τ : Finset E → E → NNReal) (w : E → NNReal) (L : List E) :
M.Indep ↑(onlineThresholdRun M τ w L)

The online threshold algorithm always produces an independent set of M.

Expected offline optimal weight in M under independent weights μ.

Expected residual offline optimal weight in M.contract A under independent weights μ.

noncomputable def Cslib.Probability.OptimalStopping.MatroidProphet.balancedThreshold {E : Type u_1} [Fintype E] [DecidableEq E] (M : Matroid E) (μ : E → PMF NNReal) (A : Finset E) (e : E) :

The Kleinberg–Weinberg balanced threshold for element e given currently accepted set A: half the expected marginal loss E[residualOpt M A - residualOpt M (insert e A)].

noncomputable def Cslib.Probability.OptimalStopping.MatroidProphet.expectedOnlineWeight {E : Type u_1} [Fintype E] [DecidableEq E] (M : Matroid E) (τ : Finset E → E → NNReal) (μ : E → PMF NNReal) (σ : Fin (Fintype.card E) ≃ E) :

Expected weight collected by onlineThresholdRun M τ under independent weights μ and arrival order σ.

Kleinberg–Weinberg Matroid Prophet Inequality ([KW12]): for any finite matroid M : Matroid E, independent nonnegative weight laws μ : E → PMF ℝ≥0 with finite expected optimal weight expectedOpt M μ ≠ ⊤, and any fixed arrival order σ : Fin (Fintype.card E) ≃ E, the online algorithm using balancedThreshold M μ selects an independent set (onlineThresholdRun_indep) of expected weight at least expectedOpt M μ / 2.

Uniform matroids: multiple-choice and rank-1 corollaries #

The k-uniform matroid on E: every finite subset of cardinality at most k is independent.

theorem Cslib.Probability.OptimalStopping.MatroidProphet.expectedOpt_uniformMatroid_le_two_mul {E : Type u_1} [Fintype E] [DecidableEq E] (k : ℕ) (μ : E → PMF NNReal) (σ : Fin (Fintype.card E) ≃ E) (hOpt : expectedOpt (uniformMatroid E k) μ ≠ ⊤) :
∑' (w : E → NNReal), (piFintype μ) w * ↑({I : Finset E | I.card ≤ k}.sup fun (I : Finset E) => ∑ e ∈ I, w e) ≤ 2 * expectedOnlineWeight (uniformMatroid E k) (balancedThreshold (uniformMatroid E k) μ) μ σ ∧ ∀ (w : E → NNReal), (onlineThresholdRun (uniformMatroid E k) (balancedThreshold (uniformMatroid E k) μ) w (arrivalList σ)).card ≤ k

Multiple-choice (k-uniform) prophet inequality: for any capacity k : ℕ, independent nonnegative weights μ : E → PMF ℝ≥0 with finite expected top-k sum, and any arrival order σ, the online threshold algorithm always selects at most k elements and achieves expected total weight at least half the expected maximum sum of at most k elements.

On the rank-1 uniform matroid, expectedOpt equals Prophet.expectedMax in any arrival order σ.

Rank-1 specialization: on uniformMatroid E 1, the expected weight collected by the Kleinberg–Weinberg balanced-threshold algorithm equals Prophet.expectedReward of the single-item half-expectation threshold rule Prophet.thresholdRule (E[max] / 2) for every arrival order σ. Combined with expectedOpt_uniformMatroid_one and expectedOpt_le_two_mul_expectedOnlineWeight, this recovers the 1/2 single-item prophet inequality.