Let us define a network to be a weighted and directed graph $G = (V,E)$ such that $w(e) \geq 0 \ \forall e \in E$ and $\exists u,v \in V $ such that $s$ is a source (no edges going into $s$), and $t$ is a sink (no edges going out of $t$). Let's assume that all weights are integer valued.
Then, a flow in $G$ is a function $f: E \rightarrow \mathbb{N}$ such that:
- $\forall (u,v) \in E, f(u,v) \leq w(u,v)$
- The flow entering any non-s,t vertex is equal to the flow leaving that vertex.
The max-flow of this network can be found using the Ford-Fulkerson algorithm.
Now consider a slightly modified version of this problem, where vertices also have capacities. In other words, the flow entering/leaving a non-s,t vertex $v$ must be less than or equal to $c(v)$, where $c: V \rightarrow \mathbb{N}$ represents the capacity of that vertex.
Find a flow of maximum size for this new problem.
My attempt:
It seems pretty intuitive that this problem would be easily solved by replacing all non-s,t vertex $v$ with an edge $(a,b)$ where $a, b$ are two new vertices, such that $w(a,b) = c(v)$. And then any edge that ended at $v$ now ends at $a$, and any edge that started at $v$ now starts at $b$. Then, we can simply use the Ford-Fulkerson algorithm to find the max-flow of this new graph.
The problem is that I have no idea where to begin to formally prove that solving the max-flow problem for this new graph solves it for the original graph (original graph has the weighted vertices).
In other words, I'm not sure how to prove that if $f$ is a max-flow on $G'$ (the new network), then $f$ is also a max-flow on $G$ (the old graph) provided we make the necessary adjustments (e.g. replacing edges back with the original weighted vertex and so on).
What would be a rigorous way of showing this? (Assuming this approach is even correct)
Thank you to Gerry Myerson for the suggestion. My proof was quite lengthy, but the abridged version is to first construct the new network G' as outlined above.
Then, we take $f$ to be a valid arbitrary flow of some size $m$ on $G$, and show that we can construct a valid flow $f'$ on $G'$ that has the same size. We repeat the other direction by taking $f'$ to be a valid arbitrary flow of some size $m$ on $G'$, and again show that we can construct a valid flow $f$ on $G$ with size $m$.
This shows that the size of the maximum flow on $G$ is equal to the max flow on $G'$. Hence, run Ford-Fulkerson on $G'$ to obtain the max-flow for $G$.