Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c7295b3

Browse files
author
Oleksandr Kulkov
authored
elaboration on unit capacity networks
1 parent 2a4b691 commit c7295b3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/graph/dinic.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ Firstly, each phase now works in $O(E)$ because each edge will be considered at
5757

5858
Secondly, suppose there have already been $\sqrt{V}$ phases. Then all the augmenting paths with the length $\le\sqrt{V}$ have been found. Let $f$ be the current flow, $f'$ be the maximum flow. Consider their difference $f' - f$. It is a flow in $G^R$ of value $|f'| - |f|$ and on each edge it is either $0$ or $1$. It can be decomposed into $|f'| - |f|$ paths from $s$ to $t$ and possibly cycles. As the network is unit, they can't have common vertices, so the total number of vertices is $\ge (|f'| - |f|)\sqrt{V}$, but it is also $\le V$, so in another $\sqrt{V}$ iterations we will definitely find the maximum flow.
5959

60+
### Unit capacities networks
61+
62+
In a more generic settings when all edges have unit capacities, _but the number of incoming and outgoing edges is unbounded_, the paths can't have common edges rather than common vertices. In a similar way it allows to prove the bound of $\sqrt E$ on the number of iterations, hence the running time of Dinic algorithm on such networks is at most $O(E \sqrt E)$.
63+
64+
Finally, it is also possible to prove that the number of phases on unit capacity networks doesn't exceed $O(V^{2/3})$, providing an alternative estimate of $O(EV^{2/3})$ on the networks with particularly large number of edges.
65+
6066
## Implementation
6167

6268
```{.cpp file=dinic}

0 commit comments

Comments
 (0)