Index
Help
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
def
UpdateFlow(Path):
delta = MinResCap(Path)
for
(u,v)
in
Edges(Path):
if
ForwardEdge(u,v):
flow[(u,v)] = flow[(u,v)] + delta
else
:
flow[(v,u)] = flow[(v,u)] - delta
s = PickSource()
t = PickSink()
while
not
maximal:
Path = ShortestPath(s,t)
if
Path:
UpdateFlow(Path)
else
:
maximal = true
ShowCut(s)