04/12/2005Tucker, Sec. 4.41 Applied Combinatorics, 4 th Ed. Alan Tucker Section 4.4 Algorithmic Matching Prepared by Joshua Schoenly and Kathleen McNamara.

Slides:



Advertisements
Similar presentations
Min-Max Relations, Hall’s Theorem, and Matching-Algorithms Graphs & Algorithms Lecture 5 TexPoint fonts used in EMF. Read the TexPoint manual before you.
Advertisements

Bipartite Matching, Extremal Problems, Matrix Tree Theorem.
Max Flow Problem Given network N=(V,A), two nodes s,t of V, and capacities on the arcs: uij is the capacity on arc (i,j). Find non-negative flow fij for.
3/17/2003Tucker, Applied Combinatorics Section 4.2a 1 Network Flows Michael Duquette & Whitney Sherman Tucker, Applied Combinatorics, Section 4.2a, Group.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 8 Network models.
3.3 Spanning Trees Tucker, Applied Combinatorics, Section 3.3, by Patti Bodkin and Tamsen Hunter.
Applied Combinatorics, 4th Ed. Alan Tucker
Midterm <  70 3.
4/5/05Tucker, Sec Applied Combinatorics, 4rth Ed. Alan Tucker Section 4.3 Graph Models Prepared by Jo Ellis-Monaghan.
Introduction to Approximation Algorithms Lecture 12: Mar 1.
HW2 Solutions. Problem 1 Construct a bipartite graph where, every family represents a vertex in one partition, and table represents a vertex in another.
Section 2.1 Euler Cycles Vocabulary CYCLE – a sequence of consecutively linked edges (x 1,x2),(x2,x3),…,(x n-1,x n ) whose starting vertex is the ending.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
CS138A Maximum Bipartite Matching Peter Schröder.
Applied Combinatorics, 4th Ed. Alan Tucker
Section 4.2 Network Flows By Christina Touhey. The flow out of a equals the flow into z. Algorithm 1.Make vertex a: (0, ). 2.Scan the first vertex and.
02/01/05Tucker, Sec Applied Combinatorics, 4th Ed. Alan Tucker Section 1.3 Edge Counting Prepared by Joshua Schoenly and Kathleen McNamara.
Tucker, Applied Combinatorics, Section 1.4, prepared by Patti Bodkin
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
3/29/05Tucker, Sec Applied Combinatorics, 4th Ed. Alan Tucker Section 4.2 Minimal Spanning Trees Prepared by Amanda Dargie and Michele Fretta.
1/13/03Tucker, Applied Combinatorics, Sec Tucker, Applied Combinatorics, Sec. 1.1, Jo E-M A Graph is a set of vertices (dots) with edges (lines)
3/24/03Tucker, Section 4.31 Tucker, Applied Combinatorics, Sec. 4.3, prepared by Jo E-M Bipartite GraphMatching Some Definitions X-Matching Maximal Matching.
D1: Matchings.
1 Introduction to Approximation Algorithms Lecture 15: Mar 5.
03/01/2005Tucker, Sec Applied Combinatorics, 4th Ed. Alan Tucker Section 3.1 Properties of Trees Prepared by Joshua Schoenly and Kathleen McNamara.
1/25/05Tucker, Sec.1.11 Applied Combinatorics, 4th Ed. Alan Tucker Section 1.1 Graph Models Prepared by Jo Ellis-Monaghan.
1/22/03Tucker, Applied Combinatorics, Section EDGE COUNTING TUCKER, APPLIED COMBINATORICS, SECTION 1.3, GROUP B Michael Duquette & Amanda Dargie.
 Jim has six children.  Chris fights with Bob,Faye, and Eve all the time; Eve fights (besides with Chris) with Al and Di all the time; and Al and Bob.
Hungarian Algorithm Vida Movahedi Elderlab, York University June 2007.
Theory of Computing Lecture 13 MAS 714 Hartmut Klauck.
5.8 Graph Matching  Example: Set of worker assign to a set of task  Four tasks are to be assigned to four workers.  – Worker 1 is qualified to do tasks.
10.3 The Main Theorem. Theorem (The Marriage Theorem) A bipartite graph has a perfect matching if and only if IAI = IBI and for any subset of (say)
Maximum Flow Problem (Thanks to Jim Orlin & MIT OCW)
Bipartite Matching. Unweighted Bipartite Matching.
5.8 Graph Matching  Example: Set of worker assign to a set of task  Four tasks are to be assigned to four workers.  – Worker 1 is qualified to do tasks.
15.082J and 6.855J March 4, 2003 Introduction to Maximum Flows.
and 6.855J March 6, 2003 Maximum Flows 2. 2 Network Reliability u Communication Network u What is the maximum number of arc disjoint paths from.
Graph Algorithms Maximum Flow - Best algorithms [Adapted from R.Solis-Oba]
Introduction to Graph Theory
12. Lecture WS 2012/13Bioinformatics III1 V12 Menger’s theorem Borrowing terminology from operations research consider certain primal-dual pairs of optimization.
Iterative Improvement for Domain-Specific Problems Lecturer: Jing Liu Homepage:
1 Graphs Chapters 10.1 and 10.2 University of Maryland Chapters 10.1 and 10.2 Based on slides by Y. Peng University of Maryland.
Applied Combinatorics, 4th Ed. Alan Tucker
Algorithms and Networks
Maximum Flow - Best algorithms
Algorithm Design and Analysis
Lectures on Network Flows
Richard Anderson Lecture 23 Network Flow
Lecture 22 Network Flow, Part 2
Tucker, Applied Combinatorics, Sec 2.4
Applied Combinatorics, 4th Ed. Alan Tucker
3.3 Applications of Maximum Flow and Minimum Cut
GreedyMaxCut a b w c d e 1.
R. Johnsonbaugh Discrete Mathematics 5th edition, 2001
Vertex Covers, Matchings, and Independent Sets
Linear Programming Duality, Reductions, and Bipartite Matching
Problem Solving 4.
Applied Combinatorics, 4th Ed. Alan Tucker
Applied Combinatorics, 4th ed. Alan Tucker
Max Flow Min Cut, Bipartite Matching Yin Tat Lee
Dilworth theorem and Duality in graph
Max Flow Problem Given network N=(V,A), two nodes s,t of V, and capacities on the arcs: uij is the capacity on arc (i,j). Find non-negative flow fij for.
5.7.2 A Maximum flow algorithm
Integer multicommodity flow in series-parallel graphs
V12 Menger’s theorem Borrowing terminology from operations research
Lecture 21 Network Flow, Part 1
Limits: A Numerical and Graphical Approach
Applied Combinatorics, 4th Ed. Alan Tucker
Lecture 22 Network Flow, Part 2
Vertex Covers and Matchings
Presentation transcript:

04/12/2005Tucker, Sec Applied Combinatorics, 4 th Ed. Alan Tucker Section 4.4 Algorithmic Matching Prepared by Joshua Schoenly and Kathleen McNamara

04/12/2005Tucker, Sec Some Definitions X-Matching - All vertices in X are used Maximal Matching - The largest possible number of independent edges Note: an X-matching is necessarily maximal. Matching - a set of independent edges X Y Note: independent edges refer to edges that do not share a common vertex

04/12/2005Tucker, Sec More Definitions Edge Cover A set of vertices so that every edge is incident to at least one of them R(A) Range of a set A of vertices R(A) is the set of vertices adjacent to at least one vertex in A A = red, R(A) = green

04/12/2005Tucker, Sec Matching Network z a All edges infinite capacity All edges capacity 1 By converting the bipartite graph to a network, we can use network flow techniques to find matchings.

04/12/2005Tucker, Sec Matching Network Matching a – z flow z a X – matching saturation at a z a

04/12/2005Tucker, Sec Matching Network Maximal matching Maximal flow z a

04/12/2005Tucker, Sec Matching Network Edge cover Finite a – z cut z a A = red on left, B = red on right S = red vertices, an edge cover P = a, black on left, red on right P = z, red on left, black on right Edge cover means that all edges have at least one red endpoint: P to P, to, to P. Thus only uncovered edges, would go from P to.

04/12/2005Tucker, Sec Matching Network Not an edge cover Infinite a – z cut z a A = red on left, B = red on right S = red vertices, NOT an edge cover P = a, black on left, red on right P = z, red on left, black on right An infinite cut would go through an edge with two black endpoints, which corresponds to an uncovered edge.

04/12/2005Tucker, Sec Theorem 1 Recall Corollary 2a from Section 4.3: The size of a maximal flow is equal to the capacity of a minimal cut. Since…. Then, The size of a maximal matching is equal to the size of a minimal edge cover. Edge cover Finite a – z cut Matchinga – z flow and

04/12/2005Tucker, Sec Finding Matchings z a Take any matching, convert to a network, and then use the augmenting flow algorithm to find a maximal flow, hence a maximal matching.

04/12/2005Tucker, Sec An easy way to think about it 1.Start with any matching. 2.From an unmatched vertex in X, alternate between non- matching and matching edges until you hit an unmatched vertex in Y. 3.Then switch between the non-matching and matching edges along to path to pick up one more matching edge. 4.Continue this until no unmatched vertex in X leads to an unmatched vertex in Y.

04/12/2005Tucker, Sec Example Start with any matching Find an alternating path Start at an unmatched vertex in X End at an unmatched vertex in Y Switch matching to non- matching and vice versa A maximal matching! Note: if this does not result in a maximal matching, start from step one and do it again.

04/12/2005Tucker, Sec Theorem 2 Hall’s Marriage Theorem A bipartite graph has an X-matching if and only if for every subset A of X, the number of vertices in R(A) is greater than or equal to the number of vertices in A. X – matching True for all A in X A is the set of red vertices R(A) is the set of blue vertices

04/12/2005Tucker, Sec Proof of Hall’s Marriage Theorem “ ”: An X-matching implies that for every subset A of X, |R(A)| is greater than or equal to |A|. X – matching For any A, the X – matching gives at least one vertex in R(A) for every vertex in A.

04/12/2005Tucker, Sec Proof of Hall’s Marriage Theorem “ ”: If |R(A)| is greater than or equal to |A| for every subset A of X, then there is an X-matching. First note that if M is a maximal matching, then. Taking A = X, we have that since the range of X is contained in Y. Thus. Also, by Theorem 1, if S is a minimal edge cover, then.Theorem 1 Note that if, then M must be an X – matching. Thus, it suffices to show that for all edge covers S.

04/12/2005Tucker, Sec Since,. Now let A be the vertices in X but not in S, so that. Thus,. Now, S is an edge-cover, so if it doesn’t contain on the X side, it must contain all the vertices a goes to on the Y side in order to cover the edges in between. Thus, so. Thus, But, hence, so as needed. QED Proof of Hall’s Marriage Theorem “ ”: Continued… we need to show that for all edge covers S. A S R(A) R(A)

04/12/2005Tucker, Sec Class Problem Problem #7 In the following table of remaining games, is it possible for the Bears to be champions (or co-champions) if they win all remaining games? Build the appropriate network model. TeamWins to Date Games to Play With Bears With Lions With Tigers With Vampires Bears Lions Tigers Vampires

04/12/2005Tucker, Sec Class Problem Problem #7 In the following table of remaining games, is it possible for the Bears to be champions (or co-champions) if they win all remaining games? Build the appropriate network model. TeamWins to Date Games to Play With Bears With Lions With Tigers With Vampires Bears Lions Tigers Vampires

04/12/2005Tucker, Sec Solution to Class Problem 6,1 8,0 11,4 ∞,0 1,1 4,4 0,0 ∞,1 ∞,0 ∞,4 a z TV LV LT L T V

04/12/2005Tucker, Sec Solution to Class Problem 6,1 8,0 11,4 ∞,0 1,1 4,4 0,0 ∞,1 ∞,0 ∞,4 a z TV LV LT L T V Yay! There is still hope for the Bears!