Graphic matroid 2026-10-14
For a finite undirected graph, the graphic matroid has its edges as the ground set. A subset is a matroid independent set when its edges form a forest on the original vertices, including isolated vertices. Its matroid bases give a spanning tree in each connected component of a graph; for a connected graph, each matroid basis is a spanning tree.
For a graph triangle on vertices , label the edges , , and , with weights . The empty set, all singletons, and all pairs are forests; the triple contains the graph cycle . Thus its eight subsets have exactly the independence pattern checked in the weighted three-vector matroid, and the same fifteen exchange comparisons pass. The matroid greedy algorithm chooses , chooses , and rejects , producing the heaviest spanning tree, of weight .
A weighted graph triangle admits greedy selection of a matroid basis; a hereditary independence system without exchange traps a greedy algorithm at weight instead of
. Details. Exchange outline. Deleting edges cannot create a graph cycle. If forests have , some edge of joins different connected components of a graph of : otherwise, within each such component, would have at most its number of vertices minus one edges, giving . Adding that edge keeps a forest. This is the matroid independence axioms expressed through connectivity.
Hereditary nonmatroid greedy obstruction 2026-10-14
On the ground set , permit exactlyThis lists every admissible subset; the excluded subsets are , , and . It is an independence system: deleting elements from produces its listed singletons or the empty set, and deleting from a singleton produces the empty set. But and violate exchange: neither nor can be added to . Thus it is not a matroid.
The descending-weight greedy algorithm admits first, then rejects both and , returning with weight . Exchanging the tied order of changes nothing. The admissible pair weighs , exceeding every singleton and the empty set, so it is the true optimum. Both and are maximal elements under inclusion of subsets, but only the pair has maximum cardinality. This identifies exactly where the matroid greedy algorithm loses its guarantee: heredity preserves admissibility under deletions, while exchange prevents a locally maximal selection from being too small.
Matroid Created 2026-10-13 Updated 2026-10-14
A matroid is an independence system in which a smaller admissible selection can always grow using an element of a larger admissible selection. This exchange rule abstracts linear independence of vectors and the selection of edges forming a forest. It forces all matroid bases to have the same cardinality and makes the matroid greedy algorithm correct for maximizing their total weight. The useful surprise is that local choices become globally optimal because of a structural rule about admissible subsets, rather than a special numerical coincidence.
The weighted three-vector matroid below lets us inspect every subset and every possible size comparison. Its three vectors give three two-element matroid bases, yet their total weights differ. The graphic matroid of a graph triangle has exactly the same admissible labels. A pregeometry is a finitary closure-theoretic extension to possibly infinite sets.
Matroid greedy algorithm 2026-10-14
Assign each element of the finite ground set a real number . The matroid greedy algorithm sorts elements by nonincreasing weight, starts with the empty set, and admits an element exactly when the enlarged selection is a matroid independent set. Ties can be resolved arbitrarily. After all elements have been considered, the result is a matroid basis of maximum total weight among all matroid bases. This holds even with negative weights: the task is to produce a full matroid basis. [ref]
Maximizing weight over all matroid independent sets is a different task when weights can be negative. For that task, skip negative elements; zero-weight additions are optional. With weights , , in the weighted three-vector matroid, the heaviest matroid basis is with weight , while the heaviest matroid independent set is with weight . For nonnegative weights, every matroid independent set can be extended to a matroid basis without reducing weight, so the optimum values coincide.
Proof outline. Let be the admitted elements in order, and order any competing matroid basis by nonincreasing weight. If , exchange would let one of augment . That element was considered before and, by heredity, was admissible even at that earlier stage, a contradiction. Hence for every , and summing proves optimality. Rejected elements remain inadmissible as the selection grows, by heredity, so the final selection is maximal. The guarantee depends on the matroid independence axioms and on weights adding independently across elements; interactions between chosen elements are a different objective.
Weighted three-vector matroid 2026-10-14
Take labels and vectors in the real vector space :Here is the complete independence check for all eight subsets. The empty set is independent. Each of is independent because its vector is nonzero. Every pair is independent: the determinants of the two-column matrices , , and are respectively , , and . The triple is dependent because . ThereforeDeleting elements from any listed subset stays in this list, verifying heredity. Every exchange comparison has sizes , , or . From the empty set, any element of the larger matroid independent set works: this covers three singleton targets and three pair targets. From any singleton to any pair, every element of the pair outside the singleton works, since every resulting pair is independent. This covers all nine singleton-pair comparisons, including disjoint ones. There are no other comparisons: all fifteen ordered size-increasing pairs satisfy exchange.
Three vectors have three independent pairs and one dependent triple; the heaviest matroid basis is with weight
. Details. The three matroid bases are , , and , all of cardinality two, with weights , , and . The matroid greedy algorithm considers , then , then : it admits , admits because their determinant is nonzero, and rejects because the triple is dependent. The resulting matroid basis has weight , the largest of the three totals. Every singleton can grow, so none is maximal; the three pairs are both maximal and maximum in cardinality.

