Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Add all the "lower bounds" of the flows on each edge: any feasible solution will need that anyway.</p> <p>For each node <code>n</code> in the topological order (i.e. following the edges) from the sink <code>t</code>, if the sum <code>S-</code> of what goes in the edge is greater that the sum <code>S+</code> of what goes out, then add the flow <code>S+ - S-</code> on all edges of the shortest path between <code>s</code> and <code>t</code> (construct the list of shortest path while doing this for efficiency).</p> <p>Then, you have a 'minimal' assigment (in the sense that it is needed in every feasible solution) such as <code>S+ - S-</code> is nonnegative at each node and the minimal capacity is satisfied on each edge.</p> <p>The problem then reduce to a multiflow problem on the same graph structure:</p> <ul> <li>the source is the same;</li> <li>there are no capacity limit;</li> <li>every node where <code>S+ - S-</code> is strictly positive becomes a sink with required flow <code>S+ - S-</code>.</li> <li>the initial sink (which had a required flow <code>F</code>) becomes a sink with flow <code>F - S-</code> if <code>F-S-</code> is nonnegative (otherwise the initial constraint will be satisfied by any solution).</li> </ul> <p>Edit: for your problem, the graph looks like this</p> <pre><code> x1 -- x2 / \ \ s \ t \ \ / x3 -- x4 </code></pre> <p>with minimal capacities 1 for each edge, and I suppose there is no minimal flow required at the sink <code>t</code>.</p> <p>First assign 1 to each edge.</p> <p>The difference <code>S+ - S-</code> for each node (except, of course, <code>s</code> and <code>t</code>) is:</p> <pre><code>x1: 1 x2: 0 x3: 0 x4: -1 </code></pre> <p>the only negative one is for <code>x4</code>; we add <code>1</code> to every edge on the shortest path from <code>x4</code> to <code>t</code>, in that case to the edge <code>(x4, t)</code>.</p> <p>Now <code>S+ - S-</code> is non-negative for every node, and positive only for <code>x1</code>; the problem reduce to a multiflow problem (in that case it is a simple flow problem) where the requested flow is <code>1</code> at <code>x1</code>, and the source is still <code>s</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload