Vertex Covers, Matchings, and Independent Sets

Slides:



Advertisements
Similar presentations
Lecture 7. Network Flows We consider a network with directed edges. Every edge has a capacity. If there is an edge from i to j, there is an edge from.
Advertisements

Min-Max Relations, Hall’s Theorem, and Matching-Algorithms Graphs & Algorithms Lecture 5 TexPoint fonts used in EMF. Read the TexPoint manual before you.
1 LP Duality Lecture 13: Feb Min-Max Theorems In bipartite graph, Maximum matching = Minimum Vertex Cover In every graph, Maximum Flow = Minimum.
Approximation Algorithms
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.
15.082J & 6.855J & ESD.78J October 14, 2010 Maximum Flows 2.
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.
Five Problems CSE 421 Richard Anderson Winter 2009, Lecture 3.
Network Optimization Models: Maximum Flow Problems
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.
04/12/2005Tucker, Sec Applied Combinatorics, 4 th Ed. Alan Tucker Section 4.4 Algorithmic Matching Prepared by Joshua Schoenly and Kathleen McNamara.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
CS138A Maximum Bipartite Matching Peter Schröder.
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.
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.
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.
EMIS 8373: Integer Programming Combinatorial Relaxations and Duals Updated 8 February 2005.
CS223 Advanced Data Structures and Algorithms 1 Maximum Flow Neil Tang 3/30/2010.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 25.
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.
CSEP 521 Applied Algorithms Richard Anderson Lecture 8 Network Flow.
Maximum Flow - Anil Kishore Graph Theory Basics. Prerequisites What is a Graph Directed, Weighted graphs How to traverse a graph using – Depth First Search.
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
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
Graph Theory and Algorithm 02
Algorithms and Networks
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
Bipartite Matching and Other Graph Algorithms
The Taxi Scheduling Problem
3.3 Applications of Maximum Flow and Minimum Cut
Edmonds-Karp Algorithm
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
CSE Algorithms Max Flow Problems 11/21/02 CSE Max Flow.
3.5 Minimum Cuts in Undirected Graphs
Introduction Basic formulations Applications
Lecture 19-Problem Solving 4 Incremental Method
GreedyMaxCut a b w c d e 1.
CSE 421 Richard Anderson Autumn 2016, Lecture 3
Richard Anderson Lecture 21 Network Flow
Problem Solving 4.
CSE 421 Richard Anderson Autumn 2015, Lecture 3
Max Flow Application: Precedence Relations
Max Flow Min Cut, Bipartite Matching Yin Tat Lee
Flow Networks and Bipartite Matching
Algorithms (2IL15) – Lecture 7
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
Lecture 21 Network Flow, Part 1
EMIS 8374 Maximum Concurrent Flow Updated 3 April 2008
CSE 421, University of Washington, Autumn 2006
Lecture 22 Network Flow, Part 2
Special Graphs: Modeling and Algorithms
Richard Anderson Lecture 22 Network Flow
Vertex Covers and Matchings
Lecture 24 Vertex Cover and Hamiltonian Cycle
EMIS 8374 Max-Flow in Undirected Networks Updated 18 March 2008
EMIS The Maximum Flow Problem: Flows and Cuts Updated 6 March 2008
The Residual Network Given a flow x, the residual capacity rij of arc (i, j) is the maximum additional flow that can be sent from i to j using arcs (i,
CSE 421 Richard Anderson Autumn 2019, Lecture 3
Presentation transcript:

EMIS 8374 Max-Flow Applications: Matchings, Covers, and Independent Sets Updated 19 April 2008

Vertex Covers, Matchings, and Independent Sets Let G=(V, E) be an undirected graph. A vertex cover of G is a subset of the vertices, C, such that for every edge (i, j) in E either node i or node j, or both, is in C. -A matching in G is a subset, M, of the edges such that no two edges in M share the same vertex. An independent set is a subset of vertices, I, such that if i and j are elements of I, then there is no edge (i, j) in E.

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

Maximum Cardinality Matching Find the largest matching in a given graph G. Tricky (but polynomial) in general, but “easy” in a bipartite graph. A bipartite graph 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

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

s-t Cuts in G' N1 N2 i  N2  S N1  S 1 i s t 1 N2  T j j  N1  T

s-t Cuts in G' Which arcs will be in an s-t cut in G'? Arcs (i, j) where i is in S and j is in T. Let (i, j) be an arc in [S, T]. There are 3 possible cases: If i = s, j  N1, then uij = 1. If i  N1, j  N2, then uij = . If i  N2, j = t, then uij = 1.

s-t Cuts in G': S = {s} N1 N2 1 2 4 6 8 1 1 3 s t 5 7 u[S, T] = 4 capacity = 

s-t Cuts in G': S = {s} S = {s}, T = {1, 2, 3, 4, 5, 6, 7, 8, t} Arcs in [S, T]: (s, 1), (s, 3), (s, 5), (s, 7) u[S, T] = 4 + 0 + 0 = 4 |{j T  N1}| = 4 |{(i, j): i S  N1, j T  N2}| = 0 |{i S  N2}| = 0

s-t Cuts in G': T = {t} N1 N2 1 2 4 6 8 1 1 3 s t 5 7 u[S, T] = 4 capacity = 

s-t Cuts in G': T = {t} S = {s, 1, 2, 3, 4, 5, 6, 7, 8}, T = { } Arcs in [S, T]: (2, t), (4, t), (6, t), (8, t) u[S, T] = 0 + 0 + 4 = 0 |{j T  N1}| = 0 |{(i, j): i S  N1, j T  N2}| = 0 |{i S  N2}| = 4

s-t Cuts in G': S = {s, 1, 3, 2, 4} N1 N2 1 2 4 6 8 1 1 3 s t 5 7 u[S, T] =  capacity = 

s-t Cuts in G': S = {s, 1, 3, 2, 4} S = {s, 1, 2, 3, 4}, T={ 5, 6, 7, 8, t} Arcs in [S, T]: (s, 5), (s, 7), (1, 6), (3, 6), (2, t), (4, t), u[S, T] = 2 + (2) + 2 =  |{j T  N1}| = |{5,7}| = 2 |{(i, j): i S  N1, j T  N2}| = 2 |{i S  N2}| = |{2,4}|=2

Observations S = {s} is always a finite cut in G' with u[S, T] = |N1|. |{(i, j): i S  N1, j T  N2}| = 0 in any minimum s-t cut in G'. {S  N1}  {T  N2} is an independent set.

Implication Let [S, T] be a minimum s-t cut in G' and let (a, b) in an edge in G. W.L.O.G assume a N1 and b  N2. |{(i, j): i S  N1, j T  N2}| = 0. If a  S, then b also  S. So, b  S  N2. If b T, then a also  T. So, a  T  N1. Every edge (a, b) in G touches a node in {S  N2} and/or a node in {T  N1} . {S  N2} {T  N1} is a vertex cover of G.

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]. Then C = {i  N1  T}  {i  N2  S} is a minimum cardinality vertex cover.

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

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

Vertex Cover & Independent Set in G 1 2 {N2  S} 3 4 {N1  S} 5 6 {N2  T} 7 8 {N1  T} T ={t, 4, 7, 8} S ={s, 1, 2, 3, 5, 6}

Vertex Covers and Matchings in Bipartite Graphs Let [S, T] be a finite capacity cut in G. C = {i  N1  T}  {i  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. M* = {(1,2), (3,6), (7,8)} in our example C* = {2, 6, 7} in our example

Independent Sets and Vertex Covers in Bipartite Graphs Let [S, T] be a finite capacity cut in G. C = {i  N1  T}  {i  N1  S} is a vertex cover such that |C| = u[S, T]. I = {i  N1  S}  {i  N1  T} is an independent set such that |I|=|V| - |C|.

Independent Sets and Vertex Covers in Bipartite Graphs Theorem for Bipartite Graphs: The cardinality of a maximum-size independent set is equal to the total number of vertices minus cardinality of a minimum-size vertex cover. C* = {2, 6, 7} in our example = {2, 6, 7} in our example I* = {1,3,4,5,8} in our example |I*| = |V| - |C*| = 8 – 3 = 5