Upload
saul
View
35
Download
2
Tags:
Embed Size (px)
DESCRIPTION
EMIS 8374 Max-Flow in Undirected Networks Updated 18 March 2008. 4. 10. 3. 8. Max Flow in Undirected Networks. 1. 6. 5. 5. 2. s. t. 2. 6. 10. 3. 4. 1. 4. 5. 5. Replace Edge {i,j} With Arcs (i,j) and (j,i). 4. 6. 4. 1. t. 6. 5. 5. 10. 2. 10. 10. 2. 10. 6. 6. - PowerPoint PPT Presentation
Citation preview
EMIS 8374
Max-Flow in Undirected Networks
Updated 18 March 2008
Slide 2
Max Flow in Undirected Networks
1
2
4
3
s t
4
10
3
8
6
5
10
4
5
6
1
2
Slide 3
2
6
Replace Edge {i,j} With Arcs (i,j) and (j,i)
1
2
4
3
s
t4
10
3
8
65
10
41
5 5
6
1
2
6
5
10
48
3
10
4
Slide 4
2
0
Max Flow in Directed Network
1
2
4
3
s
t4
0
3
0
0
0
10
01
2 4
6
0
0
6
4
0
47
0
10
0
Slide 5
2
Max Flow in Directed Network
4
3
s
t4
3
10
1
4
1
2
2
6
64
47
10
Slide 6
Remove Bi-directional flows
if xij xji then xij = xij – xji and xji = 0
else xji = xji – xij and xij = 0
1
2
2 4
4 6
12 10
1
2
2-2=0 4-2=2
4 6
12 10
Slide 7
Max Flow in Undirected Network
1
2
4
3
s t
4
10
3
7
6
4
10
4
2
6
1
2
Arrows indicate flow direction
Slide 8
Remove Saturated Edges
1
2
4
3
s t
S = {s, 4}T = {1, 2, 4, t}
Slide 9
Undirected s-t Cut
1
2
4
3
s t
4
10
3
7
6
4
10
4
2
6
1
2
u[S, T] = 24
Slide 10
All-Pairs Minimum Cut Problem
• Find the minimum value of u[A, B] where [A, B] is an partition of the nodes such that |A|>0 and |B|>0.
• Also known as the minimum 2-cut.
• Note that no specific source or sink nodes are specified.
Slide 11
Min 2-Cut Algorithm
• Since the network is undirected, u[A, B] = u[A, B]
• Don’t need to try s = j and t = i if we’ve already tried s = i and t = j
Slide 12
Min 2-Cut Algorithmv* = ;for s = 1 .. |N| - 1 for t = s + 1 .. |N| begin solve max s-t flow problem;
identify min cut [S, T]; if u[S, T] < v* then begin A = S; B = T; end end
Slide 13
Min 2-Cut Example
1 2
4
35
10
8
3 3
2 5
4
3
1
Slide 14
Minimum Cut: s = 1, t = 2
1 2
4
35
10
8
3 3
2 5
4
3
1
S = {1}T = {2, 3, 4, 5}u[S, T] = 17
Slide 15
Minimum Cut s = 1, t = 310
1 2
4
35 8
3 3
2 5
4
3
1
S = {1,2}T = {3,4,5}u[S, T]=14
Slide 16
Minimum Cut: s = 1, t = 4
1 2
4
35
10
8
3 3
2 5
4
3
1
S = {1,2,3,5}T={4}u[S, T]=12
Slide 17
Minimum Cut: s = 1, t = 510
1 2
4
35 8
3 3
2 5
4
3
1
S = {1,2}T = {3,4,5}u[S, T]=14
Slide 18
Minimum Cut: s = 2, t =310
1 2
4
35 8
3 3
2 5
4
3
1
S = {2,1}T = {3,4,5}u[S, T]=14
Slide 19
Observation• Suppose s = 2 and t = 3 and let [A, B] be a
minimum 2-3 cut.• Case 1: node 1 is in A
– [A, B] is also a 1-3 cut– Thus, we already know u[A, B] 14
• Case 2: node 1 is in N2
– [A, B] is also a 2-1 (1-2) cut– Thus, we already know u[A, B] 17
• There is no need to solve the max-flow problem for s = 2 and t =3.
Slide 20
An Improved Min 2-Cut Algorithm
• Consider a minimum 2-cut [A, B]• Let A be the set containing node 1.• Since |B| > 0, it must contain at least one
node in {2, 3, 4, 5}.• Thus we can discover [A, B] by solving only
|N| - 1 max flow problems with s =1 and t = 2, t = 3, …, t = |N|.
• Complexity is O(n f(n, m)) where f(n, m) is the complexity of solving a max flow problem
Slide 21
Minimum 2-Cut
1 2
4
35
10
8
3 3
2 5
4
3
1
u[A, B]=12
A = {1,2,3,5}
B = {4}
Edge Connectivity
• In a so-called unweighted graph where each edge as a capacity of 1 unit, the capacity of a minimum 2-cut is known as the edge connectivity of the graph
• Connectivity is an important measure of a network’s reliability.
• In a telecommunications network an edge connectivity of two (2) means that the network can survive single-link failures.
Slide 22