Title: Strongly Polynomial Mincost flow
1Strongly Polynomial Min-cost flow
- Evà Tardos algorithm
- William Fahle CS6381
2Original problem statement
- min ?ij ci,jfi,j / minimize sum of costsflows
- ?j(fi,j - fj,i) qi ? i?N / each vertex has a
flow - li,j ? fi,j ? ui,j / bounded as usual
3Dual of problem out of kilter
4Complementary slackness
- fi,j gt li,j ? xi,j 0 xi,j gt 0 ? fi,j li,j
- fi,j lt li,j ? yi,j 0 yi,j gt 0 ? fi,j ui,j
- Combining, we have
- ?i - ? j lt ci,j ? xi,j gt 0 ? fi,j li,j
- ?i - ? j gt ci,j ? yi,j gt 0 ? fi,j ui,j
- lij lt fij lt uij ? xi,j yi,j 0 ? ?i - ? j
ci,j
5Modified problem statement
- min ?ij ci,jfi,j / minimize sum of costsflows
- ?j(fi,j - fj,i) 0 ? i?N / flow conservation
- li,j ? fi,j ? ui,j / bounded as usual
- flows are 0 rather than qi, without loss
6Modified circulation problem
- Circulation polytope P(l, u)
- Bounded polyhedron around feasible solutions
- Find a feasible circulation
- No or many feasible circulations
- Strongly polynomial algorithm known
- Minimum cost circulation highest cost C
- Find minimum cost circulation
- Out-of-kilter is O(A3C)
- Edmonds-Karp scaling makes it log C instead.
- Our challenge is to be independent of C
7Tight arc definition
- An arc (i,j) is tight if lij fij uij
- - There may be no tight arcs to start with
- - Goal is to increase number of tight arcs by
one each iteration will be proven - - The set of tight arcs is denoted T(l, u)
8Equivalent cost functions
- c and c' are (l,u)-equivalent if there is a
potential function ? such that for each non-tight
edge (i,j), we have - c'(i,j)c(i,j)?i - ?j
9Lemma 2.1
- Let c and c' be (l,u)-equivalent cost functions
- A feasible circulation f is c-minimal if and only
if it is c'-minimal - We rely on the fact that f is a circulation, and
that the peeling process can be used.
10Proof
- The middle term is 0 because it is a circulation,
and the second term can be peeled off to simple
cycle flows. These sum to zero as well, being
cycle circulations. - Thus, c'f cf is a constant independent of f.
11Special (l,u)-equivalent cost fn.
- So, it doesnt matter what (l,u)-eqivalent cost
function is used to solve the minimization. - One with handy properties lies in the subspace
- Qf?REf is a circulation and f(e)0 for tight
e - We say such a cost function fits P(l, u).
12Almost complementary slackness
?i-?j ci,j
2?
li,j
fi,j
ui,j
13Main idea contributed by Tardos
- Let ?gt0. Let (f,?) be functions such that
- ci,j - ?i ?j gt ? ?fi,j li,j
- ci,j - ?i ?j lt -? ?fi,j ui,j
- That is, outside the small box implies on the
upper or lower bounds lines. - Such functions satisfy almost complementary
slackness.
14Lemma 2.2
- Let f be a feasible circulation, c' a cost
function, ? a potential, and ?gt0 a real number
such that - If c'(i,j) ?(i)- ?(j) ? ? then f(i,j) l(i,j),
- If c'(i,j) ?(i)- ?(j) ? -? then f(i,j) u(i,j).
- Then for any c'-minimal circulation f'
- c'(i,j) ?(i)- ?(j) ? N? implies f(i,j)
f'(i,j).
15Proof
- We can assume f'?f, otherwise reverse everything
- Suppose c'i0,j0 ?i0 - ?j0 ? N?
- If the inner block is lt -?, f' ? fu ?f', so
instead let c'i0,j0 ?i0 - ?j0 ? N? hence
fi,jli,j. - Thus f'-f is nonnegative, and ? a cycle C
strictly positive. Decrease every edge by the
smallest value on that cycle.
16Proof (cont.)
- For every edge of C, fi,j lt f'i,j ? ui,j
- so therefore, f'i,j ?i - ?j ? -?.
- The cost of this new circulation - ? is
- c'f?c'f' - ??f'i,j(i,j)?C c'f' -
??f'i,jpi-pj(i,j)?C - ?c'f' - ?(f'i0,j0pi0-pj0-(C-1) ?)
- ?c'f' - ?(N ? - (N-1) ?), because CltN and
?gt0. - c'f' - ? ? lt c'f'
- But, f' was supposed to be optimal.
Contradiction.
17The algortihm
- Overview Check if the cost function is (l,u)
equivalent to the 0 vector. Stop if so.
Otherwise, find the cost function which fits
P(l,u) and is (l,u) equivalent to c. Apply
out-of-kilter with this new cost function to find
new tight edge(s) and set l,u to f for these. - Then repeat until equivalent to the 0-vector.
- At the end, all solutions are feasible.
18The algorithm (continued)
- Check for (l,u)-equivalence to the 0 vector.
- Each iterative step, find c projection of c onto
the subspace with c0 on tight edges. - Let E be the set of all edges not tight.
- c I-Et(EEt)-1Ec
- c' c?kN?A for kmax element of c.
- Finally, take the ceiling of each element of c'.
19Algorithm (cont)
- 2b. Use the out-of-kilter to find the potentials
and flows. - 3. Set the new bounds accordingly
- If c'i,j pi pj lt N, leave l,u alone
- otherwise, set them to fi,j
20Example
Node-arc incidence matrix E
2,2,2,2
a
b
2,2,2,3
-3,0,3,4
1,1,1,4
1,1,1,4
d
c
21Example (cont)
- We use the LaGrange method from before
- Subtract result from identity matrix
- Aij1/4 for all i,j
- Scale by 4?5
- Result is c'0,9,9,9,9
222,2,2,2
a
b
2,2,2,3
-3,0,3,4
1,1,1,4
1,1,1,4
d
c
23New potentials based on costs
2,0,2,2
a
b
9
9
2,9,2,3
-3,9,3,4
1,9,1,4
1,9,1,4
d
c
0
0
24Select new l,u
- If c'i,j-?i?j lt N, l'i,jli,j and u'i,j
ui,j - Else l'i,j u'i,j fi,j.
- The Else arcs are newly created tight arcs.
- Theorem there is at least one Else arc.
25Proof
- We show that there is at least one more tight arc
at each step. That is, there is at least one
(i,j) that is not tight with the old bounds, such
that c'i,j-?i?j gt N is true. - Let c c'i,j-?i?j if (i,j) wasnt tight before
- 0 otherwise.
- We show max(i,j)?Ac i,j ? N
26Proof (cont)
- Recall that c' fits P(l,u), and that it is a
circulation with c'i,j0 if (i,j) was already
tight. - Claim c' perpendicular to (c- c').
- Proof in notes product sums to 0 orthogonal.
- So they form a right triangle, and the
square-root of A from earlier falls out leaving
maxci,j ? N.
27New bounds based on potentials
2,0,2,2
- d-c has exceeded bounds!
- 9 - ?d ?c 9 gt 4
- d-c sets lu1.
- It is now tight.
a
b
9
9
2,9,2,3
-3,9,3,4
1,9,1,4
1,9,1,1
d
c
0
0
28Final result
- Iterative step lather, rinse, repeat
2,2,2,2
a
b
- All arcs are tight
- All solutions are given as new l,u
- In this case, only one solution is optimal
2,2,2,2
-3,0,3,3
1,1,1,1
1,1,1,1
d
c