Top Banner
Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion Matroids Bernhard Mallinger Seminar in Algorithms WS12 TU Wien December 18th, 2012 Bernhard Mallinger Seminar in Algorithms WS12 TU Wien Matroids
36
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Matroids

Bernhard Mallinger

Seminar in Algorithms WS12TU Wien

December 18th, 2012

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 2: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Outline

1 Introduction

2 Greedy

3 Correspondence linear algebra

4 Matroid intersection

5 Conclusion

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 3: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Outline

1 Introduction

2 Greedy

3 Correspondence linear algebra

4 Matroid intersection

5 Conclusion

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 4: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Definition

Definition (Independence system)

Independence system S = (E , I)

Finite set E (universe)I ⊆ 2E (independent sets)Closed under inclusion (hereditary property)

Independent sets describe solutionsFramework for combinatorial optimisation problems (given aweight function)

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 5: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Definition

Definition (Matroid)

A matroid M is is an independence system (E , I) satisfying theaugmentation property:

I , J ∈ I, |I | < |J| ⇒ ∃e ∈ (J \ I ) s.t. I ∪ {e} ∈ I.

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 6: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Example: Minimal spanning forest/tree

Example (Minimal spanning forest/tree)

Given an undirected graph G = (V ,E )

Find a subgraph G ′ = (V ,E ′), E ′ ⊆ E , E ′ acyclic

Hereditary property: Subset of acyclic set is acyclic. XAugmentation property:

Given 2 forests I and J, |I | < |J|Always possible to find e ∈ J such that I ∪ {e} acyclic X

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 7: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Example: Minimal spanning forest/tree

Example (Minimal spanning forest/tree)

Given an undirected graph G = (V ,E )

Find a subgraph G ′ = (V ,E ′), E ′ ⊆ E , E ′ acyclic

Hereditary property: Subset of acyclic set is acyclic. XAugmentation property:

Given 2 forests I and J, |I | < |J|Always possible to find e ∈ J such that I ∪ {e} acyclic X

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 8: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Example: Minimal spanning forest/tree

Example (Minimal spanning forest/tree)

Given an undirected graph G = (V ,E )

Find a subgraph G ′ = (V ,E ′), E ′ ⊆ E , E ′ acyclic

Hereditary property: Subset of acyclic set is acyclic. XAugmentation property:

Given 2 forests I and J, |I | < |J|Always possible to find e ∈ J such that I ∪ {e} acyclic X

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 9: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Example: Matchings I

Example (Matching)

Given an undirected graph G = (V ,E )

Find M ⊆ E such that all edges are disjoint

Hereditary property: Subsets of disjoint sets are disjoint sets.XAugmentation property

Given 2 matchings I and J, |I | < |J|Always possible to find e ∈ J such that I ∪ {e} is a matching?

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 10: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Example: Matchings I

Example (Matching)

Given an undirected graph G = (V ,E )

Find M ⊆ E such that all edges are disjoint

Hereditary property: Subsets of disjoint sets are disjoint sets.XAugmentation property

Given 2 matchings I and J, |I | < |J|Always possible to find e ∈ J such that I ∪ {e} is a matching?

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 11: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Example: Matchings I

Example (Matching)

Given an undirected graph G = (V ,E )

Find M ⊆ E such that all edges are disjoint

Hereditary property: Subsets of disjoint sets are disjoint sets.XAugmentation property

Given 2 matchings I and J, |I | < |J|Always possible to find e ∈ J such that I ∪ {e} is a matching?

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 12: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Example: Matchings II

1

2 3

4 5

6

Figure: The matching in red clearly has a larger cardinality, but thematching in blue cannot be augmented by any of the red edges.

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 13: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Outline

1 Introduction

2 Greedy

3 Correspondence linear algebra

4 Matroid intersection

5 Conclusion

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 14: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Greedy I

Given a weight function w : E → R+, Greedy can be used tofind an optimal independent set.Optimal w.r.t MST: maximal size, minimal weightIn fact:

TheoremAn independence system S = (E , I) is a matroid iff Greedy finds anoptimal solution.

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 15: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Greedy II

Algorithm 1 Greedy

Input: A matroid M = (E , I) together with a weight function w :E → R+

Output: A set I ∈ I with minimal weight and maximal size1 I ← ∅2 Sort E = {e1, e2 , . . . , en} such that w(ei ) ≤ w(ei+1), 1 ≤ i < n3 for i = 1 to n do4 if (I ∪ {ei}) ∈ I then I ← I ∪ {ei}5 end if6 end for7 return I

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 16: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Greedy III

TheoremIf an independence system is a matroid, Greedy finds an optimalsolution.

Proof sketch: maximal sizeGreedy returns I ∈ IAssume there is some J ∈ I with |J| > |I |⇒ can augment I by some e ∈ (J \ I ), which Greedy wouldhave chosen.

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 17: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Greedy IV

Proof sketch: minimal weightGreedy returns I ∈ IAssume there is some J ∈ I with w(J) < w(I )Consider sets with elements ordered by weight:I = {e1, e2 , . . . , em}J = {e ′1, e ′2 , . . . , e ′m}Since w(J) < w(I ), some w(e ′i ) < w(ei )But Greedy picks elements with increasing weight, so it wouldhave picked e ′i for I

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 18: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Greedy V

TheoremIf Greedy finds an optimal solution, the structure is a matroid.

Proof sketch (for maximisation problem)

Assume the augmentation property doesn’t holdI , J ∈ I with |I | < |J|, but @e ∈ (J \ I ) s.t. (I ∪ {e}) ∈ I.Find weight function such that Greedy fails (|I | = m)

w(e) =

m + 2 e ∈ Im + 1 e ∈ (J \ I )0 otherwise

w(I ) = m(m + 2) = m2 + 2mw(J) ≥ (m + 1)2 = m2 + 2m + 1

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 19: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Outline

1 Introduction

2 Greedy

3 Correspondence linear algebra

4 Matroid intersection

5 Conclusion

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 20: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Example: Matric matroid

Example (Matric matroid)

Let E be a set of vectorsLet I ∈ 2E be the linearly independent sets

Hereditary property:Subset of linearly independent set of vectors is linearlyindependent. XAugmentation property:More linearly independent vectors span vector space withlarger dimension, so smaller sets can be augmented X

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 21: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Example: Matric matroid

Example (Matric matroid)

Let E be a set of vectorsLet I ∈ 2E be the linearly independent sets

Hereditary property:Subset of linearly independent set of vectors is linearlyindependent. XAugmentation property:More linearly independent vectors span vector space withlarger dimension, so smaller sets can be augmented X

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 22: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Example: Matric matroid

Example (Matric matroid)

Let E be a set of vectorsLet I ∈ 2E be the linearly independent sets

Hereditary property:Subset of linearly independent set of vectors is linearlyindependent. XAugmentation property:More linearly independent vectors span vector space withlarger dimension, so smaller sets can be augmented X

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 23: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Bases I

Definition (Base)

A base is a maximal independent set.

All bases have same cardinality(if there was a smaller base, it could be augmented using anelement of a larger base)Augmentation property on bases:B1,B2 ∈ B∀x ∈ (B1 \ B2) ∃y ∈ (B2 \ B1) s.t. (B1 \ {x} ∪ {y}) ∈ B

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 24: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Bases II

Vector spaceLet W be a vector space.Vector spaces are spanned by a set of linearly independentvectors ⇒ base

Every base has the same cardinality.Steinitz exchange lemma on bases:B1,B2 ∈ B∀x ∈ (B1 \ B2) ∃y ∈ (B2 \ B1) s.t. (B1 \ {x} ∪ {y}) ∈ B

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 25: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Bases III

Augmentation property =̂ Exchange lemmadimW =̂ r(I ) (rank)Closure/span:

Matroids: {e ∈ E | r(I ∪ {e}) = r(I )}Vector space: All linear combinations

Origin of matroids (1935)

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 26: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Outline

1 Introduction

2 Greedy

3 Correspondence linear algebra

4 Matroid intersection

5 Conclusion

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 27: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Partition matroid I

Example (Partition matroid)

Given a finite set E and a partition Π = (E1, . . . ,En)

Let I ⊆ E ∈ I iff I contains at most one element of each Ei .⇒ (E , I) is a matroid

Possible interpretation:E are the edges of a directed graphIn Π, edges are in the same set if they have the same endvertex

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 28: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Partition matroid II

1

2 3

4 5

6

e1e4

e5

e6e7

e9e3e2

e8

Figure: A directed graph. Its partition matroid:E = {e1, e2 , . . . , e9}Π = {{e1}, {e2, e3, e5}, {e4}, {e6, e9}, {e7, e8}}

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 29: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Partition matroid III

1

2 3

4 5

6

e1e4

e5

e6e7

e9e3e2

e8

Figure: A directed graph with an independent set of its partition matroid.E = {e1, e2 , . . . , e9}Π = {{e1}, {e2, e3, e5}, {e4}, {e6, e9}, {e7, e8}}

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 30: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Hamiltonian path I

Example (Hamiltonian path)

Given a directed graph G = (V ,A)

Let M1 be the acyclic matroid (cf. minimal spanning forest)Let M2 and M3 be partition matroids, where the partitions aredefined by start and end vertices of the arcs respectively

⇒ Sets, that are independent in Mi , 1 ≤ i ≤ 3 and maximal are:AcyclicEnter each vertex at most onceLeave each vertex at most once⇒ Hamiltonian paths (if there are some)

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 31: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Hamiltonian path II

1

2 3

4 5

6

e1e4

e5

e6e7

e9e3e2

e8

Figure: A directed graph. Its partition matroids:E = {e1, e2 , . . . , e9}Π1 = {{e1}, {e2, e3, e5}, {e4, e8}, {e6, e9}, {e7}}Π2 = {{e1, e2}, {e3, e4}, {e5, e9}, {e6}, {e7}}, {e8}}

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 32: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Hamiltonian path III

1

2 3

4 5

6

e1e4

e5

e6e7

e9e3e2

e8

Figure: A directed graph with a Hamiltonian path.E = {e1, e2 , . . . , e9}Π1 = {{e1}, {e2, e3, e5}, {e4, e8}, {e6, e9}, {e7}}Π2 = {{e1, e2}, {e3, e4}, {e5, e9}, {e6}, {e7}}, {e8}}

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 33: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Matroid intersection

Definition (Matroid intersection)

Let M1 = (E , I1) and M2 = (E , I2) be matroids. Theirintersection M = M1 ∩M2 is given by (E , I1 ∩ I2).

Cannot be solved by GreedyNP-complete if at least 3 matroids are involvedSolvable in P for 2 matroids (e.g. bipartite matching)

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 34: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Outline

1 Introduction

2 Greedy

3 Correspondence linear algebra

4 Matroid intersection

5 Conclusion

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 35: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

Conclusion

Independent sets with augmentation propertyProvable optimality for GreedyE.g. Minimal spanning treeIs the underlying structure of various problemsDerived from linear algebra (linear independent set of vectors)Many advanced uses

Most of them not covered here, except for:Matroid intersection

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids

Page 36: Matroids

Introduction Greedy Correspondence linear algebra Matroid intersection Conclusion

References

Bernhard Korte and Jens Vygen.Combinatorial Optimization: Theory and Algorithms.Springer Publishing Company, Incorporated, 4th edition, 2007.

James G. Oxley.Matroid Theory.Oxford Graduate Texts in Mathematics Series. OxfordUniversity Press, 2nd edition, 2011.

Christos H. Papadimitriou and Kenneth Steiglitz.Combinatorial Optimization: Algorithms and Complexity.Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 1982.

Bernhard Mallinger Seminar in Algorithms WS12 TU Wien

Matroids