{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# 11 - Algorithms Matchings Matchings Design and Analysis of...

This preview shows pages 1–11. Sign up to view the full content.

Algorithms – Matchings Matchings Design and Analysis of Algorithms Andrei Bulatov

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Algorithms – Matchings 11-2 Matchings A matching M of a graph G = (V,E) is a set of edges such that every vertex is incident to at most one edge from M Bipartite graphs: bipartition X, Y The Bipartite Matching Problem Instance : A bipartite graph G Objective : Find a matching in G of maximal size
Algorithms – Matchings 11-3 Algorithm We show how to reduce the Bipartite Matching problem to Network Flow Let G be a bipartite graph with bipartition X, Y - orient all edges from X to Y - add source s and sink t - add arcs from s to all nodes in X, and from all nodes in Y to t - set the weight of all arcs to be 1 t s

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Algorithms – Matchings 11-4 Analysis Lemma Suppose there is a matching of G containing k edges. Then there is a flow in G’ of value k ) , ( , ), , ( ), , ( 2 2 1 1 k k y x y x y x K Proof Straightforward t s
Algorithms – Matchings 11-5 Analysis (cntd) Lemma Suppose there is a flow in G’ of value k, the there is a matching of G containing k edges. Proof Let f be a flow in G’ of value k. Since all capacities in G’ are integer, there is an integer flow of value at least k. So we can assume f is integer. f(e) equals 0 or 1 for every edge e Let M be the set of arc with the flow value 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Algorithms – Matchings 11-6 Analysis (cntd) M contains k edges Indeed, consider the cut (A,B) with A = X {s} The value of the flow through the cut equals the number of arcs from X to Y where the flow is non-zero The set of such arcs is exactly the set M Every node from X is the beginning of at most one arc from M It follows straightforwardly from the conservation property Every node from Y is the end of at most one arc from M Same argument Therefore M is a matching
Algorithms – Matchings 11-7 Running Time Proof Theorem The Ford-Falkerson algorithm can be used to find a maximal matching in a bipartite graph in O(mn) time We can assume that G has no isolated vertices, and so m n/2 The maximal value of a flow in G’ does not exceed C = c(s) = |X| n By the theorem on the running time of the F.-F. algorithm, it runs in O(mC) = O(mn) time QED

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Algorithms – Matchings 11-8 Augmenting Paths in Bipartite Graphs There is another algorithm for Bipartite Matching. It finds alternating paths t s
Algorithms – Matchings 11-9 Perfect Matching and Hall’s Theorem If both parts of a bipartite graph have the same number of elements , a perfect matching can exist, that is a matching that includes all vertices of the graph How is it possible that a bipartite graph does not have a perfect matching If there is A X such that for the set of neighbors N(A) |N(A)| |A| (or same for Y) Theorem (Hall) If G is a bipartite graph, and for any A X and any B Y, we have |A| |N(A)|, |B| |N(B)|, then there is a perfect matching of G.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Algorithms – Matchings 11-10 Perfect Matching and Hall’s Theorem (cntd) Proof We use graph G’. Assume |X| = |Y| = n If there is know perfect matching of G, a maximal flow in G’ has value less than n We use this fact to find a set A (a subset of
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern