Proof.
Theorem 2.
If F is a non-empty collection of subsets of a
finite set S such that F is
closed under the subset operation and if
the greedy algorithm works for (F,w),
for every weight function w, then F is the set of independent sets
of a matroid.
Let A and B be elements of F
with |A| < |B|.
Let t = |A Ç B|,
k = |A \ B| = |A| - t,
and
r = |B| - |A| = |B| - t - k > 0.
Define a weight function w on S by the rules
w(e) = k+r+2 if e Î A w(e) = k+2 if e Î B \ A w(e) = 0 if e Ï A È B.
Apply the greedy algorithm to (F,w).
The algorithm must first take
all of the elements of A and then
continue until it finds a maximum weight
element of F. But
w(B) = t(k+r+2)+(k+r)(k+2) = t(k+r+2)+k(k+r+2)+2r = 2r+w(A) > w(A).
Therefore, the
greedy algorithm does not stop once it constructs A,
but must at the next
stage find an element x Ï A
with w(x) > 0 and such that A È {x} Î
F.
However, the only elements with positive weight are in
B È A.
Thus, x Î B \ A,
completing the proof.
Department of Mathematical Sciences Florida Atlantic University
777 Glades Road Boca Raton, Florida 33431-0991
USA