Presentation is loading. Please wait.

Presentation is loading. Please wait.

Matchings Lecture 3: Jan 18. Bipartite matchings revisited Greedy method doesn’t work (add an edge with both endpoints free)

Similar presentations


Presentation on theme: "Matchings Lecture 3: Jan 18. Bipartite matchings revisited Greedy method doesn’t work (add an edge with both endpoints free)"— Presentation transcript:

1 Matchings Lecture 3: Jan 18

2 Bipartite matchings revisited Greedy method doesn’t work (add an edge with both endpoints free)

3 M -Augmenting path Start and end at a free vertex.

4 M -Augmenting path  a bigger matching

5 No M -augmenting path  no bigger matching Prove the contrapositive: A bigger matching  an M-augmenting path 1. Consider 2. Every vertex in has degree at most 2 3. A component in is an even cycle or a path 4. Since, an augmenting path!

6 Algorithm Key: M is maximum  no M-augmenting path How to find efficiently?

7 Finding M-augmenting paths Orient the edges (edges in M go up, others go down) An M-augmenting path  a directed path between two free vertices

8 Complexity At most n iterations An augmenting path in time by a DFS or a BFS Total running time

9 Matchings in general graphs Can we use the same method? Key: M is maximum  no M-augmenting path?

10 No augmenting path  no bigger matching Prove the contrapositive: A bigger matching  an augmenting path 1. Consider 2. Every vertex in has degree at most 2 3. A component in is an even cycle or a path 4. Since, an augmenting path!

11 Augmenting path  a bigger matching

12 Augmenting path  a bigger matching Not a matching!

13 Stronger requirement An augmenting path cannot have repeated vertices Key: M is maximum  no M-augmenting path

14 Algorithm Key: M is maximum  no M-augmenting path How to find efficiently?

15 Finding M-augmenting paths Don’t know how to orient the edges so that: An M-augmenting path  a directed path between two free vertices

16 No repeated vertices Just find a path without repeated vertices?! Either we may exclude some possibilities, Or we need to trace the path…

17 Blossom

18 Breakthrough (König 1931) Bipartite matching algorithm (Edmonds 1965) General matching algorithm

19 Key idea Shrink the blossoms!

20 Key Lemma (Edmonds) M is a maximum matching in G  M/C is a maximum matching in G/C Key: M is maximum  no M-augmenting path an M-augmenting path in G  an M/C-augmenting path in G/C

21 An M/C-augmenting path  an M-augmenting path

22 An M-augmenting path  an M/C-augmenting path

23 Algorithm Key: M is maximum  no M-augmenting path How to find efficiently?

24 Finding an M-augmenting path Find an alternating walk between two free vertices. This can be done in linear time by a DFS or a BFS. Either an M-augmenting path or a blossom can be found. If a blossom is found, shrink it, and (recursively) find an M/C-augmenting path P in G/C, and then expand P to an M-augmenting path in G.

25 Complexity At most augmentations. Each augmentation does at most contractions. An alternating walk can be found in time. Total running time is.


Download ppt "Matchings Lecture 3: Jan 18. Bipartite matchings revisited Greedy method doesn’t work (add an edge with both endpoints free)"

Similar presentations


Ads by Google