When attacking this kind of problem, I usually record a mathematical program, and then massage it. It is clear that we must orient all the missing edges from w to w. Let d be a finite power of w. For all different i, j, let x_{ij} = 1 if the arc i-> j appears in the solution, and let x_{ij} = 0 if arc j-> i appears.
forall j. sum_i x_{ij} <= k forall i <> j. x_{ij} = 1 - x_{ji} forall i <> j. x_{ij} in {0, 1}
Rewrite to use x_{ij} only if I <k.
(*) forall j. sum_{i<j} x_{ij} + sum_{i>j} (1-x_{ji}) <= k forall i < j. x_{ij} in {0, 1}
Now (*) begins to resemble storage constraints, since each variable appears once negatively and once positively. Let the change in inequality be equal to equality.
(*) forall j. x_{si} + sum_{i<j} x_{ij} + sum_{i>j} (1-x_{ji}) = k ^^^^^^ ^ forall i < j. x_{ij} in {0, 1} forall i. x_{si} >= 0 ^^^^^^^^^^^^^^^^^^^^^
We almost completely approached the LP stream - we just need to clear the constants 1 and k . I will let you handle the rest (this is related to the introduction of t).
source share