Greedy Submodular Maximization over Matroids and p-Systems #
This module formalizes the greedy algorithm of Fisher, Nemhauser, and Wolsey for maximizing a
monotone submodular set function f : Finset α → β subject to a matroid constraint, or more
generally a p-system constraint ([FNW78];
[CCPV11], Appendix B). Starting from S = ∅, each round inserts a
feasible element c ∉ S with indep (insert c S) maximizing f (insert c S), and the algorithm
stops when no feasible element remains.
It instantiates the general selector-driven framework in
CslibFrontier.Algorithms.Lean.Submodular.ApproxMatroidGreedy with exact scanCandidates
selection (α = 1).
Main definitions #
Cslib.Algorithms.Lean.Submodular.submodularMatroidGreedyM,Cslib.Algorithms.Lean.Submodular.submodularMatroidGreedy: the monadic and pure greedy algorithms.Cslib.Algorithms.Lean.Submodular.submodularMatroidGreedyChain: the chainS₀ = ∅ ⊆ S₁ ⊆ ⋯of greedy prefixes, which stabilizes once no feasible element remains.
Main results #
submodularMatroidGreedy_subset_toFinset,indep_submodularMatroidGreedy,not_indep_insert_submodularMatroidGreedy: the output is a maximal independent subset of the ground list.add_nsmul_le_succ_nsmul_submodularMatroidGreedy: for a monotone submodularf, ap-systemindepand any independentO ⊆ xs.toFinset,f O + p • f ∅ ≤ (p + 1) • f G([FNW78]; [CCPV11], Appendix B).div_succ_le_submodularMatroidGreedy:f O / (p + 1) ≤ f Gover ordered fields when0 ≤ f ∅.div_add_mul_le_submodularMatroidGreedy_of_approxOracle:(α / (p + α)) * f O ≤ f GwhensubmodularMatroidGreedyis run on a surrogate value oracle whose marginal gains approximate those offwithin[α, 1].add_le_two_nsmul_submodularMatroidGreedy_of_matroid,half_le_submodularMatroidGreedy_of_matroid: the1/2bound for a MathlibMatroid.div_card_succ_le_submodularMatroidGreedy_of_iInter_matroid: the1/(k+1)bound for the intersection ofk ≥ 1matroids.sum_le_nsmul_sum_submodularMatroidGreedy,sum_le_sum_submodularMatroidGreedy_of_matroid: for nonnegative modular objectives,∑ O w ≤ p • ∑ G w([Jen76]); forp = 1(matroids) the greedy output is optimal.exists_tight_submodularMatroidGreedy: the1/2bound is attained exactly.
References #
- [FNW78] Marshall L. Fisher, George L. Nemhauser, and Laurence A. Wolsey, An Analysis of Approximations for Maximizing Submodular Set Functions—II, 1978. Attributed via [CCPV11], Section 1 and Appendix B; not inspected (paywalled).
- [CCPV11] Gruia Calinescu, Chandra Chekuri, Martin Pál, and Jan Vondrák, Maximizing a Monotone Submodular Function Subject to a Matroid Constraint, 2011.
- [Jen76] Thomas A. Jenkyns, The Efficacy of the "Greedy" Algorithm, 1976.
Monadic and pure greedy algorithm #
One pure greedy round over the deduplicated ground list u: returns some (insert c S) for the
feasible candidate c maximizing f (insert c S) (ties broken toward earlier elements of u), or
none when no candidate is feasible.
Pure greedy loop with fuel k, stopping at the first round without a feasible candidate.
Pure Fisher–Nemhauser–Wolsey greedy algorithm for maximizing f over the independent subsets
of the ground list xs.
One monadic greedy round: one indepM call per element c ∉ S of u, then one evalSet call
per feasible candidate.
Monadic greedy loop with fuel k, stopping at the first round without a feasible candidate.
Monadic Fisher–Nemhauser–Wolsey greedy algorithm with value-oracle callback evalSet and
independence-oracle callback indepM.
The greedy chain, feasibility, and maximality #
The chain S₀ = ∅ ⊆ S₁ ⊆ ⋯ of greedy prefixes over the ground list u: S (t + 1) is the next
greedy prefix, or S t once no feasible candidate remains.
A successful greedy round inserts a feasible candidate c maximizing f (insert c S) over all
feasible candidates.
The greedy output is the prefix S n of the greedy chain, n = xs.eraseDups.length.
The greedy loop only adds elements.
The greedy output is a subset of the ground list.
The greedy output is independent whenever ∅ is.
The greedy output is maximal: no element of the ground list can be added to it while preserving independence.
Under an independence test implementing M : Matroid α, the greedy output is a basis of the
ground list, M.IsBasis' G {x | x ∈ xs}.
Approximation guarantees #
A feasible element o ∉ S t of u cannot gain more over S t than the greedy round did.
Chain-level charging ([CCPV11], Appendix B). Let indep be a
p-system, O ⊆ u.toFinset independent, and f monotone. If each o ∈ O costs at most the gain
f S (t + 1) - f S t of every greedy round t < n in which o is still feasible, then
∑ O c ≤ p • (f S n - f ∅), where n = u.toFinset.card.
Fisher–Nemhauser–Wolsey greedy bound ([FNW78];
[CCPV11], Appendix B). For a monotone submodular f, a p-system
indep and every independent O ⊆ xs.toFinset, the greedy output G satisfies
f O + p • f ∅ ≤ (p + 1) • f G, i.e. f O - f ∅ ≤ (p + 1) • (f G - f ∅).
Corollaries: ordered fields, approximate value oracles, matroids, modular objectives #
Ordered-field form of the greedy bound: f O / (p + 1) ≤ f G when 0 ≤ f ∅.
α / (p + α) guarantee for submodularMatroidGreedy run on an approximate value oracle:
if the oracle fApprox has marginal gains within [r, 1] of f's marginal gains on feasible
insertions, then (r / ((p : β) + r)) * f O ≤ f (submodularMatroidGreedy fApprox indep xs).
1/2-approximation over a matroid ([FNW78];
[CCPV11], Section 1, the case p = 1): under an independence test
implementing M : Matroid α, f O + f ∅ ≤ 2 • f G for every independent O ⊆ xs.toFinset.
1/2-approximation over a matroid, ordered-field form: f O / 2 ≤ f G when
0 ≤ f ∅.
1/(k+1)-approximation over an intersection of k ≥ 1 matroids
([FNW78]; [CCPV11], Section 1), ordered-group form:
f O + k • f ∅ ≤ (k + 1) • f G with k = Fintype.card ι.
1/(k+1)-approximation over an intersection of k ≥ 1 matroids
([FNW78]; [CCPV11], Section 1), ordered-field form:
f O / (k + 1) ≤ f G when 0 ≤ f ∅.
Modular objectives on p-systems ([Jen76]; [CCPV11],
Section 1): for nonnegative weights w, the greedy algorithm run on modularSum w satisfies
∑ O w ≤ p • ∑ G w for every independent O ⊆ xs.toFinset.
Greedy is optimal for nonnegative modular objectives on a matroid (the p = 1 case of
sum_le_nsmul_sum_submodularMatroidGreedy): ∑ O w ≤ ∑ G w for every independent
O ⊆ xs.toFinset. Compare the Rado–Edmonds weight-sorted greedy
Cslib.Algorithms.Lean.Matroid.sum_le_greedyMaxBasis_of_indep, which reaches the same optimum by
scanning elements in decreasing weight order instead of re-evaluating marginal gains.
Tightness of the 1/2 bound #
The partition matroid on Fin 3 decided by matroidTightIndep.
Coverage sets of the tight instance: 0 and 2 both cover item 0, and 1 covers item
1.
Unit-weight coverage objective S ↦ |⋃ s ∈ S, matroidTightCover s| of the tight instance.
On the tight instance, greedy first picks 0 (all singletons have value 1, and ties go to
the earliest candidate), then 2 (1 is blocked by 0), and stops at {0, 2}.
Tightness of the 1/2 bound ([FNW78];
[CCPV11], Section 1, which states that the greedy ratios are tight for
all p): a monotone submodular
coverage objective with f ∅ = 0 and a partition matroid on three elements for which the greedy
value is exactly half the value of an independent set.