Given a matroid and weights , inspect the elements of in non-increasing order of weight. Starting from , add an element precisely when the resulting set remains independent. Return the final set .
Let be the greedy result in selection order. Fix an element that greedy rejects at iteration . Suppose greedy has already selected elements. Its current set is : the elements already accepted, not all elements inspected so far. Greedy rejects because .
Later iterations only add elements, so . Heredity says that a subset of an independent set is independent. For these two sets, it says
But greedy rejected , so . The contrapositive gives . No rejected element can extend ; hence is maximal.
Among all optimal solutions, choose one of largest cardinality and label its elements in descending weight order: . It is maximal too: as , an independent extension would either improve its weight or be a larger optimal solution. Both sets are bases, so exchangeability gives .
Exchange the prefixes
We want to show . Since , it suffices to compare each position:
To prove these stronger inequalities, suppose for a contradiction that one fails: for some . Stop the greedy prefix just before it selects , but take the first elements of :
The greedy prefix must be , not : including would make both prefixes size , so exchangeability would not apply. This also lets us compare adding with greedy’s later choice of .
Both prefixes are independent: and , so heredity applies. Since , exchangeability supplies some element of , with , that can be added to :
The diagram shows ; when , the marked is . The two inequalities have different sources:
The strict comparison is our temporary assumption, not a general property. Together they force greedy to inspect before selecting .
Greedy must select
Greedy inspects before it selects . If it has accepted elements at that moment, then : its current set is a prefix of . The element is only being inspected; it is not yet in .
The set is independent, so greedy accepts as its next selection: . Here means the -th accepted element. Since is accepted later, . For example, if and , the accepted elements must occur in this order:
In general, places among , so . Exchangeability gave , a contradiction. Therefore for every , and
Since is optimal, so is .
Alternative proof by cardinality cases
Suppose is not optimal, in selection order. Among all optimal solutions, choose one of largest cardinality and label its elements in descending weight order: . Then .