Download presentation
Presentation is loading. Please wait.
1
EMIS 8374 Max-Flow Applications: Matchings, Covers, and Independent Sets Updated 19 April 2008
2
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.
3
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
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.
5
A Bipartite Graph N1 N2 1 3 5 7 2 4 6 8
6
Max Flow Network G' capacity = 1 2 4 6 8 1 1 3 s t 5 7
7
Max Flow in Network G' 1 1 2 4 6 8 1 1 3 1 s t 5 1 7
8
Matching in G 1 3 5 7 2 4 6 8
9
s-t Cuts in G' N1 N2 i N2 S N1 S 1 i s t 1 N2 T j j N1 T
10
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.
11
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 =
12
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 |{j T N1}| = 4 |{(i, j): i S N1, j T N2}| = 0 |{i S N2}| = 0
13
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 =
14
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 |{j T N1}| = 0 |{(i, j): i S N1, j T N2}| = 0 |{i S N2}| = 4
15
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 =
16
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
17
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.
18
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.
19
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.
20
Max Flow in Network G' 1 1 2 4 6 8 1 1 3 1 s t 5 1 7
21
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
22
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}
23
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
24
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|.
25
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.