{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
Algorithms – Matchings Matchings Design and Analysis of Algorithms Andrei Bulatov
Image of page 1

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

View Full Document Right Arrow Icon
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
Image of page 2
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
Image of page 3

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

View Full Document Right Arrow Icon
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
Image of page 4
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
Image of page 5

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

View Full Document Right Arrow Icon
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
Image of page 6
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
Image of page 7

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

View Full Document Right Arrow Icon
Algorithms – Matchings 11-8 Augmenting Paths in Bipartite Graphs There is another algorithm for Bipartite Matching. It finds alternating paths t s
Image of page 8
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.
Image of page 9

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

View Full Document Right Arrow Icon
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
Image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern