1 Bipartite Matching Lecture 3: Jan 17. 2 Bipartite Matching A graph is bipartite if its vertex set can be partitioned into two subsets A and B so that.

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

1 LP Duality Lecture 13: Feb Min-Max Theorems In bipartite graph, Maximum matching = Minimum Vertex Cover In every graph, Maximum Flow = Minimum.
Bipartite Matching, Extremal Problems, Matrix Tree Theorem.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
Techniques for Dealing with Hard Problems Backtrack: –Systematically enumerates all potential solutions by continually trying to extend a partial solution.
Algorithms and Networks
Tutorial 6 of CSCI2110 Bipartite Matching Tutor: Zhou Hong ( 周宏 )
Augmenting path algorithm Two theorems to recall: Theorem (Berge). A matching M in a graph G is a maximum matching in G iff G has no M-augmenting.
C&O 355 Lecture 20 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
Combinatorial Algorithms
1 Maximum Flow w s v u t z 3/33/3 1/91/9 1/11/1 3/33/3 4/74/7 4/64/6 3/53/5 1/11/1 3/53/5 2/22/2 
1 Weighted Bipartite Matching Lecture 4: Jan Weighted Bipartite Matching Given a weighted bipartite graph, find a matching with maximum total weight.
Introduction to Approximation Algorithms Lecture 12: Mar 1.
Totally Unimodular Matrices Lecture 11: Feb 23 Simplex Algorithm Elliposid Algorithm.
Duality Lecture 10: Feb 9. Min-Max theorems In bipartite graph, Maximum matching = Minimum Vertex Cover In every graph, Maximum Flow = Minimum Cut Both.
Matchings Matching: A matching in a graph G is a set of non-loop edges with no shared endpoints.
Matchings Lecture 3: Jan 18. Bipartite matchings revisited Greedy method doesn’t work (add an edge with both endpoints free)
Maximum Bipartite Matching
Matchings Matching: A matching in a graph G is a set of non-loop edges with no shared endpoints Maximal Matching: A maximal matching in a graph is a matching.
Increasing graph connectivity from 1 to 2 Guy Kortsarz Joint work with Even and Nutov.
Maximum Flows Lecture 4: Jan 19. Network transmission Given a directed graph G A source node s A sink node t Goal: To send as much information from s.
CSE 421 Algorithms Richard Anderson Lecture 4. What does it mean for an algorithm to be efficient?
Job Scheduling Lecture 19: March 19. Job Scheduling: Unrelated Multiple Machines There are n jobs, each job has: a processing time p(i,j) (the time to.
Minimum Cost Flow Lecture 5: Jan 25. Problems Recap Bipartite matchings General matchings Maximum flows Stable matchings Shortest paths Minimum spanning.
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.
Khabbazian1 Copyright © Dale Carnegie & Associates, Inc. Mohammad Khabbazian Department of computer engineering,sharif University,Tehran,iran.
1 Introduction to Approximation Algorithms Lecture 15: Mar 5.
The Maximum Independent Set Problem Sarah Bleiler DIMACS REU 2005 Advisor: Dr. Vadim Lozin, RUTCOR.
Maximum Bipartite Matching In a graph G, if no M-augmenting path exists, then M is a maximum matching in G. Idea: Iteratively seek augmenting paths to.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
1 A fast algorithm for Maximum Subset Matching Noga Alon & Raphael Yuster.
CSE, IIT KGP Matchings and Factors. CSE, IIT KGP Matchings A matching of size k in a graph G is a set of k pairwise disjoint edges.A matching of size.
Hungarian Algorithm Vida Movahedi Elderlab, York University June 2007.
C&O 355 Mathematical Programming Fall 2010 Lecture 19 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Lecture 16 Maximum Matching. Incremental Method Transform from a feasible solution to another feasible solution to increase (or decrease) the value of.
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.
Techniques for Proving NP-Completeness Show that a special case of the problem you are interested in is NP- complete. For example: The problem of finding.
1 On Completing Latin Squares Iman Hajirasouliha Joint work with Hossein Jowhari, Ravi Kumar, and Ravi Sundaram.
Graph Theory Ch. 3. Matchings and Factors 1 Chapter 3 Matchings and Factors Matchings and Covers Algorithms and Applications Matchings in General Graph.
3.2 Matchings and Factors: Algorithms and Applications This copyrighted material is taken from Introduction to Graph Theory, 2 nd Ed., by Doug West; and.
Matching Algorithms and Networks. Algorithms and Networks: Matching2 This lecture Matching: problem statement and applications Bipartite matching Matching.
Bipartite Matching. Unweighted Bipartite Matching.
1 “Graph theory” Course for the master degree program “Geographic Information Systems” Yulia Burkatovskaya Department of Computer Engineering Associate.
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.
Matching Algorithms and Networks. Algorithms and Networks: Matching2 This lecture Matching: problem statement and applications Bipartite matching Matching.
Matching Lecture 19: Nov 23.
Homework - hints Problem 1. Node weights  Edge weights
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
CSE 421 Algorithms Richard Anderson Winter 2009 Lecture 5.
Introduction to Graph Theory
Introduction to Graph Theory
C&O 355 Lecture 19 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
Iterative Improvement for Domain-Specific Problems Lecturer: Jing Liu Homepage:
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
Matching and Factors Matchings and Covers. Definitions: A matching M in a graph G is a set of non loop edges with no shared endpoints. G M.
MCS 312: NP Completeness and Approximation Algorithms Instructor Neelima Gupta
Maximum Flow - Anil Kishore Graph Theory Basics. Prerequisites What is a Graph Directed, Weighted graphs How to traverse a graph using – Depth First Search.
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Matchings and Factors Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering,
Graph Theory Ch. 3. Matchings and Factors 1 Chapter 3 Matchings and Factors.
Introduction to Approximation Algorithms
Bipartite Matching Lecture 8: Oct 7.
Algorithms and Networks
Lecture 16 Bipartite Matching
Algorithm Design and Analysis
Problem Solving 4.
Max Flow Min Cut, Bipartite Matching Yin Tat Lee
CSE 6408 Advanced Algorithms.
Lecture 28 Approximation of Set Cover
Presentation transcript:

1 Bipartite Matching Lecture 3: Jan 17

2 Bipartite Matching A graph is bipartite if its vertex set can be partitioned into two subsets A and B so that each edge has one endpoint in A and the other endpoint in B. A matching M is a subset of edges so that every vertex has degree at most one in M. A B

3 The bipartite matching problem: Find a matching with the maximum number of edges. Maximum Matching A perfect matching is a matching in which every vertex is matched. The perfect matching problem: Is there a perfect matching?

4 Greedy method? (add an edge with both endpoints unmatched) First Try

5 Key Questions How to tell if a graph does not have a (perfect) matching? How to determine the size of a maximum matching? How to find a maximum matching efficiently?

6 Hall’s Theorem [1935]: A bipartite graph G=(A,B;E) has a matching that “saturates” A if and only if |N(S)| >= |S| for every subset S of A. S N(S) Existence of Perfect Matching

7 König [1931]: In a bipartite graph, the size of a maximum matching is equal to the size of a minimum vertex cover. What is a good upper bound on the size of a maximum matching? Min-max theoremNP and co-NP Implies Hall’s theorem. Bound for Maximum Matching König [1931]: In a bipartite graph, the size of a maximum matching is equal to the size of a minimum vertex cover.

8 Any idea to find a larger matching? Algorithmic Idea?

9 Given a matching M, an M-alternating path is a path that alternates between edges in M and edges not in M. An M-alternating path whose endpoints are unmatched by M is an M-augmenting path. Augmenting Path

10 What if there is no more M-augmenting path? 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 M-augmenting path! If there is no M-augmenting path, then M is maximum! Optimality Condition

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

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

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

14 Hall’s Theorem [1935]: A bipartite graph G=(A,B;E) has a matching that “saturates” A if and only if |N(S)| >= |S| for every subset S of A. König [1931]: In a bipartite graph, the size of a maximum matching is equal to the size of a minimum vertex cover. Idea: consider why the algorithm got stuck… Minimum Vertex Cover

15 Observation: Many short and disjoint augmenting paths. Idea: Find augmenting paths simultaneously in one search. Faster Algorithms

16 Matching Determinants Randomized algorithms Bonus problem 1 (50%): Given a bipartite graph with red and blue edges, find a deterministic polynomial time algorithm to determine if there is a perfect matching with exactly k red edges. Randomized Algorithm

17 Application of Bipartite Matching Jerry Marking DarekTomIsaac TutorialsSolutions Newsgroup Job Assignment Problem: Each person is willing to do a subset of jobs. Can you find an assignment so that all jobs are taken care of?

18 Application of Bipartite Matching With Hall’s theorem, now you can determine exactly when a partial chessboard can be filled with dominos.

19 Application of Bipartite Matching Latin Square: a nxn square, the goal is to fill the square with numbers from 1 to n so that: Each row contains every number from 1 to n. Each column contains every number from 1 to n.

20 Application of Bipartite Matching Now suppose you are given a partial Latin Square. Can you always extend it to a Latin Square? With Hall’s theorem, you can prove that the answer is yes.