Изменения

Перейти к: навигация, поиск
Реализация
===Реализация===
'''function''' findMaxFlow(E, C, s, t):
'''for''' <tex>e edge \in E</tex>: <tex>fflow[eedge] = 0</tex>
'''while''' <tex>\exists</tex> путь <tex>s \leadsto t</tex> в остаточной сети <tex>G_f</tex>:
<tex>path = </tex> путь <tex>s \leadsto t</tex> с наименьшей стоимостью
<tex>maxFlow = \displaystyle \min_{e \in path} flow[e]</tex>
'''for''' <tex>edge \in path</tex>:
flow[edge] = flow[edge] + maxFlow
дополнить поток <tex>f</tex> вдоль <tex>path</tex>
147
правок

Навигация