How to implement flow constraint

Revision en2, by Franklyn_W, 2017-07-18 14:13:25

Hi Codeforces,

I'm currently working on a problem related to network flows. Does anyone know how to implement constraints of the following type into a system?

Edges 1 and 2 go into the vertex, and have capacity one. Edges 3 and 4 go out and have capacity one. How can one force a constraint to the effect of (edges 3 and 2 can't have a sum of flows greater than one)? 

UPD: I should note the context involves min-cost flow, so perhaps we can leverage the costs of the edges.


  Rev. Lang. By When Δ Comment
en2 English Franklyn_W 2017-07-18 14:13:25 113
en1 English Franklyn_W 2017-07-18 07:12:12 419 Initial revision (published)