Theorem 8.3 — the Greedy Algorithm is optimal for every weighting iff the independence system is a matroid
ProvedCombOpt.MatroidPolytope.greedy_optimal_iff_isMatroidcombinatoricsgreedy-algorithmlinear-optimizationmatroidsp2o-gran-per-chapterp2o-plan-bookp2o-v1
Let be an independence system on a finite set , i.e. and is closed under taking subsets. Then:
- is a matroid if and only if, for every , every set the Greedy Algorithm can return is a maximum-weight independent set;
- is a matroid if and only if, for every , some run of the Greedy Algorithm returns a maximum-weight independent set.
So matroids are exactly the independence systems on which greedy optimization works for all weightings, however ties are broken.
Differences from the source:
- reading: "the Greedy Algorithm finds an optimal independent set for every c" → stated twice, once for every run and once for some run of the algorithm; reason: ties are broken arbitrarily (p. 274), so "finds" can be read either way, and any fixed tie-breaking rule lies between the two readings; stating both covers every reading
Preamble
import Mathlib import Definitions.Def_CombOpt_MatroidPolytope_IsMatroid import Definitions.Def_CombOpt_MatroidPolytope_IsMaxWeightIndep import Definitions.Def_CombOpt_MatroidPolytope_IsGreedyOutput
Formal statement
namespace CombOpt.MatroidPolytope
/-- **Theorem 8.3: the Greedy Algorithm characterizes matroids.**
Cook, Cunningham, Pulleyblank & Schrijver, *Combinatorial Optimization* (Wiley, 1998), Theorem 8.3, p. 277 (PDF p. 284): "Let (S, I) be an independence system. Then the Greedy
Algorithm finds an optimal independent set for every c ∈ R^S if and only if (S, I) is a matroid."
An *independence system* is a pair satisfying (M0) and (M1) (p. 277).
For an independence system `I` on a finite ground set, both readings of "the Greedy Algorithm
finds an optimal independent set" are stated:
1. `I` is a matroid iff, for every `c`, **every** set the algorithm can return is a
maximum-weight independent set;
2. `I` is a matroid iff, for every `c`, **some** run of the algorithm returns a maximum-weight
independent set.
**Formalization Note.** Ties in the algorithm are broken arbitrarily (p. 274), so "finds" can be
read for every run or for some run; the conjunction covers both readings (and every fixed
tie-breaking rule, which lies between them). -/
theorem greedy_optimal_iff_isMatroid {α : Type*} [Fintype α] [DecidableEq α]
(I : Finset α → Prop) (hI : SubsamplingSM.Offline.IsIndepSystem I) :
(IsMatroid I ↔
∀ (c : α → ℝ) (J : Finset α), IsGreedyOutput I c J → IsMaxWeightIndep I c J) ∧
(IsMatroid I ↔
∀ c : α → ℝ, ∃ J : Finset α, IsGreedyOutput I c J ∧ IsMaxWeightIndep I c J) := by sorry
end CombOpt.MatroidPolytope
Source
Cook, Cunningham, Pulleyblank & Schrijver, Combinatorial Optimization (Wiley, 1998), Theorem 8.3, p. 277 (PDF p. 284)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.