When talking about computing network flows
, the Algorithm Design Manual says:
Traditional network flow algorithms are based on the idea of augmenting paths, and repeatedly finding a path of positive capacity from s to t and adding it to the flow. It can be shown that the flow through a network is optimal if and only if it contains no augmenting path.
I don't understand what is augmenting paths
. I have googled, and found:
but they all reference to the quote above.
Can anyone please really clearly explain what is an augmenting path
?
Augmenting means increase-make larger. In a given flow network
G=(V,E)
and a flowf
an augmenting pathp
is a simple path fromsource s
tosink t
in the residual networkGf
. By the definition ofresidual network
, we may increase the flow on an edge(u,v)
of an augmenting path by up to a capacityCf(u,v)
without violating constraint, on whichever of(u,v)
and(v,u)
is in the original flow networkG
. Also the maximum amount by which we can increase the flow on each edge in an augmented path p is called theresidual capacity of p
. The proof can be found in the introduction to algorithms by thomas h. cormen etc...An augmenting path is a simple path - a path that does not contain cycles - through the graph using only edges with positive capacity from the source to the sink.
So the statement above is somehow obvious - if you can not find a path from the source to the sink that only uses positive capacity edges, then the flow can not be increased.
By the way the proof of that statement is not that easy.
And how do you find out the augmenting path from source to sink? Using modified version of BFS. You do BFS from source till you reach sink and you traverse an edge only if it has residual capacity (i.e. for that edge, its max capacity - current flow > 0). And for this path from source to sink, you maintain minimum residual capacity, which is the maximum flow you can pass through that path. High level code snippet to get the idea:
A process of finding flows from source to sink iteratively. For e.g., in the case of Ford-Fulkerson algorithm, initially all the flows on all the edges are Zero. On iteration we take the values for every path/edge leading us to find flows called augmenting paths.