A vector space V has a notion of linear independence:
Example: In \mathbb{R}^3, the vectors (1,0,0), (0,1,0) are independent. Adding (1,1,0) makes the set dependent.
A basis B of a vector space V is a maximal linearly independent set — equivalently, a minimal spanning set.
Key properties of bases:
Examples:
The defining property of bases in vector spaces is the exchange property:
Lemma
Let A and B be two bases of V. For any a \in A \setminus B, there exists b \in B \setminus A such that (A \setminus \{a\}) \cup \{b\} is also a basis.
This is not true for arbitrary families of sets — it is a special property of linear independence.
Matroids abstract exactly this property and apply it to other structures (graphs, partitions, etc.).
Let G = (V, E) be an undirected graph. Define M_G = (S_G, \mathcal{I}_G):
Claim: M_G is a matroid.
Proof of (I1): Any subset of a forest is a forest. ✓
Proof of (I2): Let A, B \in \mathcal{I}_G with |B| > |A|. Both G_A and G_B are forests on the same vertex set V.
Recall: a forest with t trees and |V| vertices has exactly |V| - t edges.
Thus G_B contains a tree T whose vertices lie in at least two different trees of G_A.
Since T is connected, it contains an edge (u, v) with u and v in different trees of G_A.
Hence M_G = (E, \mathcal{I}_G) is a matroid. ◻
This is called the graphic matroid of G.
The exchange property says: if B is “more independent” than A (larger), then B has an element that can safely extend A.
Graphic matroid intuition:
This is exactly why Kruskal’s algorithm can keep adding edges without forming cycles: any heavier edge that would create a cycle can be skipped.
For a set E and integer k \ge 0, define:
\mathcal{I} = \{ X \subseteq E : |X| \le k \}
This is the uniform matroid U_{n,k} where n = |E|.
Example: U_{n,1} means we can pick at most one element — “select the best single item.”
Scenario: A company has m departments. From each department E_i, you can select at most c_i representatives for a committee.
Example:
Why it’s a matroid:
Application: Selecting the c_i best candidates from each department — greedy works because this is a matroid.
Lemma
All bases of a matroid have the same cardinality.
Proof
Let A and B be bases with |B| > |A|. By (I2), \exists e \in B \setminus A such that A \cup \{e\} \in \mathcal{I}, contradicting maximality of A. Thus |A| = |B|. ◻
This common size is called the rank of the matroid.
\text{rank}(M) = \max \{ |X| : X \in \mathcal{I} \}
\rho(S) = \max \{ |X| : X \subseteq S,\; X \in \mathcal{I} \}
| Matroid | Ground Set E | Independent Sets | Rank |
|---|---|---|---|
| Graphic | Edges of G | Acyclic edge sets (forests) | |V| - \kappa(S) |
| Uniform U_{n,k} | Any n elements | Subsets of size \le k | k |
| Partition | Disjoint blocks E_i | At most c_i per block | \sum c_i |
| Linear | Vectors in \mathbb{R}^d | Linearly independent sets | \dim(\text{span}) |
Next lecture: How matroids characterize problems where the greedy algorithm works optimally.
CS F364: Design & Analysis of AlgorithmsTulasimohan Molli