MinCostFlow

MinCostFlow - EXTENSIONS OF THE MAXFLOW PROBLEM. 10A....

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
EXTENSIONS OF THE MAXFLOW PROBLEM. 10A. Circulations with Demands. Suppose we have multiple sources and sinks, instead of a single s-t pair. Rather than maximize the total flow (which can be tricky to agree on due to fairness among different flows), we work with a *fixed* set of demands and supplies. Each node v has an associated demand dv. If dv > 0, we say v is a demand node; if dv = 0, v is a transshipment node; if dv < 0, v is a supply node (it supplies -dv units). A circulation is a function f such that (i) Capacity Constraint: 0 <= f(e) <= c(e), for all edges e (ii) Demand Condition: fin(v) - fout(v) = dv, for all nodes v So, instead of *optimization*, we now have a feasibility problem (satisfying demands at all nodes subject to capacity constraints). Clearly, if a feasible circulation exists then \sum_v dv = 0. This is because \sum_v (dv) = \sum_v ( fin(v) - fout(v) ). In the summation on the right, each edge appears twice, once in fin and once in fout, canceling each other. Algorithm. We convert the circulation problem into a flow problem. Introduce a source s, and join it to all supply nodes, with edge capacity equal to -dv. Similarly, add a sink node t, and join each demand node to t, with edge capacity dv. Now, the circulation is feasible if and only if the maxflow has value exactly \sum_{v demand node} dv. Example. 10B. Circulation with Demands and Lower Bounds. In some applications, certain amount of flow is forced on some edges. That is, f(e) >= l(e), and so there is a lower bound on the value of flow at some edges. The conditions for the flow, with demands, now change to: (i) l(e) <= f(e) <= c(e), for all edges e (ii) fin(v) - fout(v) = dv, for all nodes v. Now, again, decide if such a circulation is feasible. We will do this in two steps. I. First, solve for the circulation *without* any lower bounds. That is, we set an initial circulation of f_0(e) = l(e), for all edges. This circulation clearly satisfies the capacity constraint (both upper and lower bounds), but perhaps violates the demands. In particular, let L(v) = f_0^in (v) - f_0^out (v) = \sum_{e into v} l(e) - \sum_{v out of v} l(e).
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
If L(v) = dv, we have satisfied the demand at v. Otherwise, we need to *superimpose* another circulation that Will clear the imbalance introduced by f_0. So, we need to find a circulation f_1, where for node v,
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/27/2011 for the course CMPSC 225 taught by Professor Vandam during the Fall '09 term at UCSB.

Page1 / 5

MinCostFlow - EXTENSIONS OF THE MAXFLOW PROBLEM. 10A....

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online