I'm looking for fast algorithm to compute maximum flow in dynamic graphs (adding/deleting node with related edges to graph). i.e we have maximum flow in G now new node added/deleted with related edges, I don't like to recalculate maximum flow for new graph, in fact, I want use previous available results for this graph.
Any preprocessing which isn't very time/memory consumer is appropriated.
Simplest idea is recalculating the flow.
Another simple idea is as this, save all augmenting paths which used in previous maxflow calculation, now for adding vertex v
, we can find simple paths (in updated capacity graph by previous step) which start from source, goes to v
then goes to destination, but problem is this path should be simple, I couldn't find better than O(n*E) for this case. (if it was just one path or paths was disjoint, this can be done in O(n+E), but it's not so).
Also for removing node above idea doesn't work.
Also my question is not related to another question which looks on dynamic edges adding/removing.
A residual network graph indicates how much more flow is allowed in each edge in the network graph. If there are no augmenting paths possible from to , then the flow is maximum. The result i.e. the maximum flow will be the total flow out of source node which is also equal to total flow in to the sink node.
The maximum value of an s-t flow (i.e., flow from source s to sink t) is equal to the minimum capacity of an s-t cut (i.e., cut severing s from t) in the network, as stated in the max-flow min-cut theorem.
The minimum residual capacity among the edges is 1 ( D-C ). Updating the capacities. The capacity for forward and reverse paths are considered separately. Adding all the flows = 2 + 3 + 1 = 6, which is the maximum possible flow on the flow network.
For adding Vertex v,Use the old Flow f and compute the Residual Graph, then get an Augmenting Path by DFS OutDeg(v) times.
For removing a Vertex v - compute all the flow thats leaving v, say the sum of flow leaving v is a, then while (a>0) find a path P from s to t that is going thro v, and reduce f(P) from the flow and from a.
i think that should help... im more sure on the addition then on the remove, so id love to get corrected in comments :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With