Content deleted Content added
→Example: make images dark mode compatible |
|||
Line 52:
Given a network of seven nodes, source A, sink G, and capacities as shown below:
[[Image:Edmonds-Karp flow example 0.svg|300px|class=skin-invert-image]]
In the pairs <math>f/c</math> written on the edges, <math>f</math> is the current flow, and <math>c</math> is the capacity. The residual capacity from <math>u</math> to <math>v</math> is <math>c_f(u,v)=c(u,v)-f(u,v)</math>, the total capacity, minus the flow that is already used. If the net flow from <math>u</math> to <math>v</math> is negative, it ''contributes'' to the residual capacity.
Line 68:
= & \min(3,2,1) = 1
\end{align}</math>
| [[Image:Edmonds-Karp flow example 1.svg|300px|class=skin-invert-image]]</td>
|-
| align="center" | <math>A,D,F,G</math>
Line 76:
= & \min(2,6,9) = 2
\end{align}</math>
| [[Image:Edmonds-Karp flow example 2.svg|300px|class=skin-invert-image]]</td>
|-
| align="center" | <math>A,B,C,D,F,G</math>
Line 84:
= & \min(3,4,1,4,7) = 1
\end{align}</math>
| [[Image:Edmonds-Karp flow example 3.svg|300px|class=skin-invert-image]]</td>
|-
| align="center" | <math>A,B,C,E,D,F,G</math>
Line 92:
= & \min(2,3,2,1,3,6) = 1
\end{align}</math>
| [[Image:Edmonds-Karp flow example 4.svg|300px|class=skin-invert-image]]</td>
|}
|