问题
I am reading Algorithms book written by Robert Sedwick.
Note: "s" is source and "t" is tank.
Augument any flow network with an edge from "t" to "s" with flow and capacity equal to the network's value, and know that inflow is equal to outflow for any set of nodes in the augumented network. Such a flow is called a circulation, and this construction demonstrates that the maxflow problem reduces to the problem of finding a circulation that maximizes the flow along a given edge.
Given a set of cycles and a flow value for each cycle, it is easy to compute the corresponding circulation by following through each cycle and adding the indicated flow to each edge. The converse property is more surprising; We can find a set of cycles (with a flow value for each) that is equivalent to any given circulation.
Flow decomposition theorm: Any circulation can be represented as flow along a set of atmost E directed cycles.
My questions on above explanation
Request to explain with example what does author mean and how we can reduce "maxflow problem reduces to the problem of finding a circulation that maximizes the flow along a given edge. "?
Can any one explain with simple example following paragraph.
"Given a set of cycles and a flow value for each cycle, it is easy to compute the corresponding circulation by following through each cycle and adding the indicated flow to each edge. The converse property is more surprising; We can find a set of cycles (with a flow value for each) that is equivalent to any given circulation."
Thanks!
回答1:
If you have a maxflow problem with source s and sink t, you can convert this problem into a maximum circulation problem by just adding an edge t->s. The original maximum flow from s to t is now converted into a maximum circulation s--->t->s.
If you have a list of cycles (closed paths in your graph) and every cycle is associated with a flow N, you can go through all the cycles and add the flow values N to those edges the cycles go through. In this fashion, every edge in your graph will have a flow value calculated for it, and this is the total circulation in your graph. Conversely, the theorem says that whenever you have a circulation in the total graph, it can be decomposed into cycles. Here is an example of a maximum circulation, on every edge the notation a(b) means that the flow is a and edge maximum capacity is b:
3(3) 2(2) a ----> b -----> c ^ |1(1) | |3(3) V V 2(4) d<------e<-------f 3(4) 2(3)
The corresponding cycles are: a-b-e-d-a with flow value 1, and a-b-c-f-e-d with flow value 2. Those two cycles together define the maximum circulation as shown above.
来源:https://stackoverflow.com/questions/10545472/circulation-in-network-flow