Matchings Lecture 3: Jan 18
Bipartite matchings revisited Greedy method doesn’t work (add an edge with both endpoints free)
M -Augmenting path Start and end at a free vertex.
M -Augmenting path a bigger matching
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!
Algorithm Key: M is maximum no M-augmenting path How to find efficiently?
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
Complexity At most n iterations An augmenting path in time by a DFS or a BFS Total running time
Matchings in general graphs Can we use the same method? Key: M is maximum no M-augmenting path?
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!
Augmenting path a bigger matching
Augmenting path a bigger matching Not a matching!
Stronger requirement An augmenting path cannot have repeated vertices Key: M is maximum no M-augmenting path
Algorithm Key: M is maximum no M-augmenting path How to find efficiently?
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
No repeated vertices Just find a path without repeated vertices?! Either we may exclude some possibilities, Or we need to trace the path…
Blossom
Breakthrough (König 1931) Bipartite matching algorithm (Edmonds 1965) General matching algorithm
Key idea Shrink the blossoms!
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
An M/C-augmenting path an M-augmenting path
An M-augmenting path an M/C-augmenting path
Algorithm Key: M is maximum no M-augmenting path How to find efficiently?
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.
Complexity At most augmentations. Each augmentation does at most contractions. An alternating walk can be found in time. Total running time is.