CMPSCI 611: ``Advanced Algorithms"

CMPSCI 611: “Advanced Algorithms”
Lecture 6: Cardinality Theorem and Matroid Examples
Andrew McGregor
Last Compiled: October 27, 2015
1/8
Outline
Summary of Matroid Results
2/8
The Problem
Definition
A subset system S = (E , I) is a finite set E with a collection I of
subsets of E such that if i ∈ I and i 0 ⊂ i then i 0 ∈ I.
Problem Given a subset system S = (E , I)P
and weight function
w : E → R+ , find i ∈ I such that w (i) = e∈i w (e) is maximized.
Algorithm (Greedy)
1. i = ∅
2. Sort elements of E by non-increasing weight
3. For each e ∈ E : If i + e ∈ I then i ← i + e
3/8
Matroid Definition and Theorem
Definition
Subset system (E , I) has the exchange property if
∀i, i 0 ∈ I : (|i| < |i 0 |) =⇒ (∃e ∈ i 0 − i such that i + e ∈ I)
Definition
A subset system (E , I) has the cardinality property if
∀A ⊆ E : (i, i 0 ∈ I maximal subsets of A) =⇒ (|i| = |i 0 |)
where we say i ∈ I is a maximal subset of A if i ⊆ A and there doesn’t
exist e ∈ A such that i + e ∈ I.
Theorem
Given a subset system (E , I), the following statements are equivalent:
1. Greedy algorithm returns optimal solution for any weight function.
2. The subset system obeys the exchange property.
3. The subset system obeys the cardinality property.
4/8
Exchange Property implies Cardinality Property
I
Let i, i 0 be maximal subsets of A ⊆ E . Need to show |i| = |i 0 |
I
If |i 0 | > |i|, the exchange property implies
∃ e ∈ i 0 − i such that i + e ∈ I
I
Thus i was not maximal in A. Contradiction!
5/8
Cardinality Property implies Exchange Property
I
Suffices to show that (E , I) not a matroid implies there exists A and
i, j ∈ I such that |i| =
6 |j| and i, j are maximal in A
I
(E , I) not a matroid implies that
∃ i, i 0 ∈ I such that |i| < |i 0 | and 6 ∃ e ∈ i 0 − i with i + e ∈ I
I
Define A = i ∪ i 0 and note that i is maximal in A.
I
There exists j ∈ I such that i 0 ⊆ j and j is maximal in A.
I
But |j| ≥ |i| + 1 as required.
6/8
Example 1
Theorem
The Maximum Weight Forest (MWF) subset system is a matroid.
Proof.
I
Pick an arbitrary subset of edges A ⊆ E .
Let n1 , . . . , nk be the size of the connected components.
I
Any maximal acyclic subset of A has size
I
(n1 − 1) + (n2 − 1) + . . . + (nk − 1) = n − k
because a maximal acyclic subgraph of a connected graph on ni
nodes is a tree and has ni − 1 edges.
I
Cardinality Theorem implies that it’s a matroid.
7/8
Example 2
Theorem
Let E be a set of directed edges and I be subsets such that no two edges
in the same subset point to same node. This is a matroid.
Proof.
I
For any A ⊆ E , the number of edges in a maximal subset of A is
equal to the number of vertices pointed to in A.
I
Cardinality Theorem implies that it’s a matroid.
8/8