15.082 and 6.855j
Post on 31-Dec-2015
57 Views
Preview:
DESCRIPTION
TRANSCRIPT
1
15.082 and 6.855J
Min Global Cut Animation
2
Initialize
1
3
2 5
6
41
1
1
5
3
4
6
Saturate the arcs out of node 1.
Update the residual network
3
Initialize
0
5
4
3
2
1
2
4
53
6
1
Compute distances to node 2
Determine admissible arcs
1
1
3
2 5
6
41
1
1
5
3
4
6
51
6
4
1
3
We will never push from node 1 again or into node 1.
4
Push/Relabel
0
5
4
3
2
1
2
4
53
6
1
Select an active node
1
Carry out push/relabel
1
3
2 5
6
4
1
13
4
6
51
6
4
1
3
32
5
Push/Relabel
0
5
4
3
2
1
2
4
53
6
1
Select an active node
1
Relabel. There are no admissible arcs.
1
3
2 5
6
4
1
16
4
6
51
6
4
1
32
3
3
6
Push/Relabel
0
5
4
3
2
1
2
4
5
6
1
Select an active node
1
Push from node 3.
1
3
2 5
6
4
1
16
4
6
51
6
4
1
32
3
1 1
7
Push/Relabel
0
5
4
3
2
1
2
4
5
6
1
Select an active node
1
Relabel node 3. Rule: no empty levels permitted.
1
3
2 5
6
4
16
4
6
52
6
4
1
32
3
1 1
8
Gaps
Let t denote the current sink node.
Let dmax be the maximum distance label of a node other than the source node.
An empty level is a value k with d(t) < k < dmax such that there is no node j with d(j) = k.
If we increase d(3) to 7, we create a gap. In such a case, we increase d(j) to dmax + 1.
9
Push/Relabel
0
5
4
3
2
1
2
4
5
6
1
Relabel node 3 so no empty level is created.
1
1
3
2 5
6
4
16
4
6
52
6
4
1
32
3
1 1
3
3
10
Cut Level
0
5
4
3
2
1
2
4
5
6
1
A cut level is a level with exactly one node that needs to be relabeled.
1
1
3
2 5
6
4
16
4
6
52
6
4
1
21 1
3
There is no path in the residual network from a node in a cut level to a node below it.
11
Cut-level rule
Always select an active node that is below the lowest cut-level.
If each active node is at or above a cut level, then stop with the max preflow/ min cut.
12
Push/Relabel
0
5
4
3
2
1
2
4
5
6
1
Select an active node below the lowest cut level.
1
1
3
2 5
6
4
16
4
6
52
6
4
1
21 1
3
Push from node 4.
4
13
Push/Relabel
0
5
4
3
2
1
2
4
5
6
1
Select an active node below the lowest cut level.
1
3
2 5
6
4
16
3
6
52
6
5
1
21
3
Push from node 6.
26
14
Push/Relabel
0
5
4
3
2
1
2
4
5
6
1
Select an active node below the lowest cut level.
1
3
2 5
6
4
16
3
4
52
8
5
1
21
3
Push from node 5.
25
15
Push/Relabel
0
5
4
3
2
1
2
4
5
6
1
Select an active node below the lowest cut level.
1
3
2 5
6
4
26
3
4
52
8
5
21
3
Relabel node 5 if it will not create an empty level.
15
16
End of finding the first cut
0
5
4
3
2
1
2
4
5
6
1
There is no active node below the lowest cut level.
1
3
2 5
6
4
26
3
4
52
8
5
21
3
The max preflow and min cut have been found.
1
Let T be all nodes that can reach the sink node.
17
End of finding the first cut
0
5
4
3
2
1
2
4
5
6
1
Here is the first minimum cut.
31
3
2 5
6
41
1
1
5
3
4
6
18
Beginning of the second cut
0
5
4
3
2
1
2
4
5
6
1
Choose a new sink node at the lowest level
1
3
2 5
6
4
26
3
4
52
8
5
21
3
Make node 2 a source node
1
Saturate arcs out of node 2.
2 5
5
19
Beginning of the second cut
0
5
4
3
2
1
2
4
5
6
1
We will not push from node 2 or into node 2 again.
1
3
2 5
6
4
3
4
52
8
5
27
3
There is no need to physically merge nodes 1 and 2.
52
20
Push/Relabel
0
5
4
3
2
1
2
4
5
6
1
Select an active node
1
3
2 5
6
4
3
4
52
8
5
27
3
Relabel node 3 if it will not create an empty level.
52
3
21
Push/Relabel
0
5
4
3
2
1
2
4
5
6
1
Level 4 becomes a cut level
1
3
2 5
6
4
3
4
52
8
5
27
3
There is no active node below a cut level.
52
The second cut has been found.
Let T be all nodes that can reach the sink node.
22
Push/Relabel
0
5
4
3
2
1
2
4
5
6
1
Here is the 2nd cut.
31
3
2 5
6
41
1
1
5
3
4
6
23
Starting the 3rd cut
0
5
4
3
2
1
2
4
5
6
1
Make node 5 a source node
1
3
2 5
6
4
3
4
52
8
5
27
3
Node 6 becomes the new sink node
52
Saturate arcs out of node 5.
5
5
66
24
Starting the 3rd cut
0
5
4
3
2
1
2
4
5
6
1
Level 3 is still a cut level
1
3
2 5
6
4
3
52
5
27
3
There are still no active nodes below a cut level
52
We have found the 3rd cut
Let T be all nodes that can reach the sink node.
25
The 3rd cut
0
5
4
3
2
1
2
4
5
6
1
The above cut is the best cut with 1, 2, 5 on one side and with node 6 on the other side.
31
3
2 5
6
41
1
1
5
3
4
6
26
Starting the 4th cut
0
5
4
3
2
1
2
4
5
6
1
Node 6 becomes a source node
1
3
2 5
6
4
3
52
5
27
3
Node 4 becomes the next source node
52
Saturate arcs out of node 6
66
4
4
27
We have found the 4th and 5th cuts
0
5
4
3
2
1
2
4
5 61
1
3
2 5
6
4
529
3
52
The only arcs in the network are out of source nodes
We can stop the algorithm and identify the remaining cuts.
28
Here are cuts 4 and 5
1
3
2 5
6
41
1
1
5
3
4
6
1
3
2 5
6
41
1
1
5
3
4
6
Cut 4 Cut 5
29
The global min cut was cut number 2
0
5
4
3
2
1
2
4
5
6
1
31
3
2 5
6
41
1
1
5
3
4
6
The algorithm ends with the minimum cut with node 1 on the source side.
top related