Vertex Covers and Matchings

Slides:



Advertisements
Similar presentations
Maximum flow Main goals of the lecture:
Advertisements

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.
1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
EMIS 8374 Vertex Connectivity Updated 20 March 2008.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 8 Network models.
Introduction To Algorithms CS 445 Discussion Session 8 Instructor: Dr Alon Efrat TA : Pooja Vaswani 04/04/2005.
MAXIMUM FLOW Max-Flow Min-Cut Theorem (Ford Fukerson’s Algorithm)
The Maximum Network Flow Problem. CSE Network Flows.
HW2 Solutions. Problem 1 Construct a bipartite graph where, every family represents a vertex in one partition, and table represents a vertex in another.
Modelling with Max Flow 1. 2 The Max Flow Problem.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
CS138A Maximum Bipartite Matching Peter Schröder.
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.
Approximating Minimum Bounded Degree Spanning Tree (MBDST) Mohit Singh and Lap Chi Lau “Approximating Minimum Bounded DegreeApproximating Minimum Bounded.
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
CSCI 3160 Design and Analysis of Algorithms Chengyu Lin.
Network Flow. Network flow formulation A network G = (V, E). Capacity c(u, v)  0 for edge (u, v). Assume c(u, v) = 0 if (u, v)  E. Source s and sink.
Max Flow – Min Cut Problem. Directed Graph Applications Shortest Path Problem (Shortest path from one point to another) Max Flow problems (Maximum material.
Maximum Flow Problem (Thanks to Jim Orlin & MIT OCW)
Maximum Flow Chapter 26. Flow Concepts Source vertex s – where material is produced Sink vertex t – where material is consumed For all other vertices.
EMIS 8373: Integer Programming Combinatorial Relaxations and Duals Updated 8 February 2005.
15.082J and 6.855J March 4, 2003 Introduction to Maximum Flows.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 25.
Chapter 8 Maximum Flows: Additional Topics All-Pairs Minimum Value Cut Problem  Given an undirected network G, find minimum value cut for all.
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.
NP-completeness NP-complete problems. Homework Vertex Cover Instance. A graph G and an integer k. Question. Is there a vertex cover of cardinality k?
CSEP 521 Applied Algorithms Richard Anderson Lecture 8 Network Flow.
EMIS 8374 The Ford-Fulkerson Algorithm (aka the labeling algorithm) Updated 4 March 2008.
Prof. Swarat Chaudhuri COMP 382: Reasoning about Algorithms Fall 2015.
Approximation Algorithms Duality My T. UF.
A directed graph G consists of a set V of vertices and a set E of arcs where each arc in E is associated with an ordered pair of vertices from V. V={0,
Instructor Neelima Gupta Edited by Divya Gaur(39, MCS '09) Thanks to: Bhavya(9), Deepika(10), Deepika Bisht(11) (MCS '09)
The Maximum Network Flow Problem
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
Max Flow Application: Precedence Relations
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Maximum Flow Chapter 26.
Algorithm Design and Analysis
Richard Anderson Lecture 23 Network Flow
Maximum Flow 9/13/2018 6:12 PM Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015.
Lecture 22 Network Flow, Part 2
Max Flow min Cut.
Special Graphs: Modeling and Algorithms
Greedy Algorithms / Minimum Spanning Tree Yin Tat Lee
Bipartite Matching and Other Graph Algorithms
The Taxi Scheduling Problem
3.3 Applications of Maximum Flow and Minimum Cut
Network Flows and Matching (Supplementary)
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Introduction to Maximum Flows
3.5 Minimum Cuts in Undirected Graphs
Introduction Basic formulations Applications
Lecture 19-Problem Solving 4 Incremental Method
Flow Networks Topics Flow Networks Residual networks
R. Johnsonbaugh Discrete Mathematics 5th edition, 2001
Vertex Covers, Matchings, and Independent Sets
Problem Solving 4.
Max Flow Application: Precedence Relations
Network Flows and Matching (Supplementary)
Max Flow Min Cut, Bipartite Matching Yin Tat Lee
Flow Networks and Bipartite Matching
Project Selection Bin Li 10/29/2008.
Algorithms (2IL15) – Lecture 7
CSE 6408 Advanced Algorithms.
and 6.855J March 6, 2003 Maximum Flows 2
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
The Ford-Fulkerson Algorithm
Lecture 22 Network Flow, Part 2
Maximum Flow Problems in 2005.
EMIS 8374 Max-Flow in Undirected Networks Updated 18 March 2008
Presentation transcript:

Vertex Covers and Matchings Given an undirected graph G=(V,E), a vertex cover of G is a subset of the vertices C such that for every edge (i,j) in E i is in C and/or j is in C. -a matching in G is a subset of the edges M such that no two edges in M share the same vertex.

Example C = {1, 2, 3, 4} M = {(1,5), (2,3), (4,6)} 1 2 5 6 3 4

Maximum Cardinality Matching Find the largest matching in a given graph G. Tricky (put polynomial) in general, but “easy” in a bipartite graph. A bipartite network has two sets of nodes N1 and N2 such that all edges have one endpoint in N1 and the other in N2.

A Bipartite Graph N1 N2 1 3 5 7 2 4 6 8

Max Flow Network G’ capacity =  1 2 4 6 8 1 1 3 s t 5 7

Mapping Flows into Matchings Given a feasible flow in G’, let (i,j) be an edge in M if and only if xij = 1. Observe that |M| = value of the flow. If two edges in E, (i,j) and (k,j), share a node, then either xij = 0, or xkj = 0, or both. Otherwise the arc capacity of (j,t) will be violated. If two edges in E, (i,j) and (i,k), share a node, then either xij = 0, or xik = 0, or both.

Mapping Matchings into Flows Start with a zero flow. If (i,j) is an edge in M, then let xsi=1, xij=1, and xjt=1. Consider a pair of matched nodes i and j. The flow x sends exactly one unit of flow to node i on arc (s,i) and exactly one unit of flow into the sink on arc (j,t) Thus, a matching of size |M| gives a feasible s-t flow of value |M|.

Max Flow in Network G’ 1 1 2 4 6 8 1 1 3 1 s t 5 1 7

Matching in G 1 3 5 7 2 4 6 8

Residual Network 1 2 3 4 s t 5 6 7 8 S ={S, 1, 2, 3, 5, 6} T ={T, 4, 7, 8} 7 8

Minimum Cardinality Vertex Covers Find a vertex cover with a minimum number of nodes. Hard in general, but polynomial in bipartite graphs. Solve max flow problem as described earlier and find min cut [S,T]. C = {i in N1  T}  {i in N2  S} is a minimum cardinality vertex cover.

Vertex Cover in G N1 N2 1 2 3 4 5 6 7 8 T ={T, 4, 7, 8} S ={S, 1, 2, 3, 5, 6}

Correctness of Vertex Cover Result j in N2  S N1  S 1 j s t 1 N2  T i i in N1  T can’t be in min cut

Correctness of Vertex Cover Result Let [S,T] be a finite cut in G. Claim: C = {i in N1  T}  {i in N2  S} is a vertex cover. Suppose not. This implies there is some edge (a,b) such that a is in N1 and S, and b is in N2 and T. Since a is in N1 and b is in N2 capacity (a,b) = . But (a,b) goes from s to t. So, u[S,T] = .

Correctness of Vertex Cover Result The [S,T] be a finite cut in G. Claim: C = {i in N1  T}  {i in N2  S} is a vertex cover such that|C|=u[S,T]. Theorem for Bipartite Graphs: The cardinality of a maximum-size matching is equal to the cardinality of a minimum-size vertex cover.