You are on page 1of 8

11/17/20

Network Flow Extensions


and Applications

Multiple Sources / Multiple Sinks


• Given a graph with multiple
sources and multiple sinks, how
to compute maximum flow.

1
11/17/20

Multiple Sources / Multiple Sinks


• Given a graph with multiple
sources and multiple sinks, how
New sink edge can also
to compute maximum flow. have capacity equal to
the capacity of all
edges into t1 (or t2
respectively)
New source edge can also
have capacity equal to
the capacity of all edges
out of s1
(or s2, s3, s4
respectively)

Finding a Min-Cut
• Given a graph, how to find the min-cut?

2
11/17/20

Finding a Min-Cut
• Given a graph, how to find the min-cut?
• Use Ford-Fulkerson algorithm to determine the max-flow
• Do BFS / DFS on residual graph to determine the set of reachable nodes.

Edge Disjoint Paths


• Disjoint path problem. Given a directed graph ! = ($, &) and two
nodes ( and ), find the max number of edge-disjoint ( − ) paths.

• Def. Two paths are edge-disjoint if they have no edge in common.

3
11/17/20

Edge Disjoint Paths

• Max flow formulation: assign unit capacity to every edge.


• Theorem. Max number edge-disjoint ! − # paths equals max flow
value.
• Pf. =>
• Suppose there are ! edge-disjoint paths "1, . . . , "'.
• Set %(') = 1 if ' participates in some path "( ; else set %(') = 0.
• Since paths are edge-disjoint,% is a flow of value !.

Edge Disjoint Paths


• Pf. <=
• Suppose max flow value is #.
• Integrality theorem Þ there exists 0 − 1 flow ' of value #.
• Consider edge (*, ,) with '(*, ,) = 1.
• by conservation, there exists an edge (,, .) with '(,, .) = 1
• continue until reach /, always choosing a new edge
• Produces # edge-disjoint paths.

4
11/17/20

Network Connectivity
• Network connectivity. Given a directed graph ! = ($, &) and two
nodes ( and ), find min number of edges whose removal disconnects
) from (.
• Def. A set of edges * ⊆ & disconnects ) from ( if all ( − ) paths use
at least one edge in *.
2 5

s 3 6 t

4 7

Edge Disjoint Paths and Network Connectivity


• Theorem. [Menger 1927] The max number of edge-disjoint ! − #
paths is equal to the min number of edges whose removal
disconnects # from !.
• Pf. =>
• Suppose the removal of ! ⊆ # disconnects $ from %, and |!| = (.
• All % − $ paths use at least one edge of !. Hence, the number of edge-disjoint
paths is at most (.
2 5 2 5

s 3 6 t s 3 6 t

4 7 4 7

5
11/17/20

Edge Disjoint Paths and Network Connectivity


• Pf. <=
• Suppose max number of edge-disjoint paths is !.
• Then max flow value is !.
• Max-flow min-cut Þ cut (#, %) of capacity !.
• Let ( be set of edges going from A to B.
• |(| = ! and disconnects + from ,.
2 5 2 5
A

s 3 6 t s 3 6 t

4 7 4 7

Bipartite Matching
• Input: undirected, bipartite graph ! = ($ ∪ &, ().
• + ⊆ ( is a matching if each node appears in at most 1 edge in +.
• Max matching: find a max cardinality matching.
1 1'
matching

2 2' 1-2', 3-1', 4-5'

3 3' max matching


1-1', 2-2', 3-3’ 5-
4 4'
5'

L 5 5' R

6
11/17/20

Bipartite Matching
• Max flow formulation.
• Create directed graph !′ = (% ∪ ' ∪ {), +}, -′ ).
• Direct all edges from % to ', and assign unit capacity.
• Add source ), and unit capacity edges from ) to each node in %.
• Add sink +, and unit capacity edges from each node in ' to +.
G' 1 1 1'

1 1
2 2'

s 3 3' t

4 4'

L 5 5' R

Bipartite Matching
• Theorem. Max cardinality matching in ! = value of max flow in !′.
• Pf. =>
• Given max matching ! of cardinality ".
• Consider flow # that sends 1 unit along each of " paths.
• # is a flow, and has cardinality ".
1 1' 1 1 1'

1 1
2 2' 2 2'

3 3' s 3 3' t

4 4' 4 4'

G G'
5 5' 5 5'

7
11/17/20

Bipartite Matching
• Pf. <=
• Let ! be a max flow in G' of value k.
• Integrality theorem Þ " is integral and can assume ! is 0 − 1.
• Consider & = set of edges from ( to ) with !(+) = 1.
• each node in ( and ) participates in at most one edge in &
• |&| = ": consider cut (( ∪ /, ) ∪ 1)
1 1 1' 1 1'

1 1
2 2' 2 2'

s 3 3' t 3 3'

4 4' 4 4'

G' G
5 5' 5 5'

You might also like