160 likes | 174 Views
This paper discusses algorithms for solving the negative weight shortest paths problem and the unit capacity minimum cost flow problem in O(m^(10/7) * log(W)) time. It explores various approaches and techniques, including interior-point methods, electrical flow problems, and predictor-corrector steps.
E N D
Negative Weight Shortest Paths and Unit Capacity Minimum Cost Flow in O(m10/7 log W) Time Michael Cohen, AleksanderMądry, Piotr Sankowski, Adrian Vladu
Input: Shortest Path Problem Directed graph G, weights w, source s, sink t with Negative Weights 2 -5 1 5 2 1 t -5 s 5 2 1 • One of the most basic graph problems from Intro to Algorithms w ≥ 0: Dijkstra in Õ(m) w in Rm: Bellman-Ford ‘58 O(mn) Goldberg ‘93 O(mn1/2log W) Sankowski/Yuster-Zwick ‘05 O(nω W) Shortest path from sto t Output: * m = #arcs , n = #vertices, W = max |w|
Input: Shortest Path Problem Directed graph G, weights w, source s, sink t with Negative Weights Focus on sparse graphs m = O(n) Did we hit a barrier? w ≥ 0: Dijkstra in Õ(n) w ≥ 0: Dijkstra in Õ(m) w in Rm: Bellman-Ford ‘58 O(mn) Goldberg ‘93 O(mn1/2log W) Sankowski/Yuster-Zwick ‘05 O(nω W) w in Rm: Bellman-Ford ‘58 O(n2) Goldberg ‘93 Õ (n1.5) Sankowski/Yuster-Zwick ‘05 O(n2.37) Shortest path from sto t Output: * m = #arcs , n = #vertices, W = max |w|
Mądry‘13 ‘16 solved unit capacity max flow inÕ (n10/7)via IPM Shortest Path Problem with Negative Weights Ways to obtainÕ(n1.5) time (some via reductions): Gabow-Tarjan’89 Orlin-Ahuja ’92 Goldberg ’93 Goldberg-Kennedy ’97 Duan-Pettie-Su ’11 Kao-Lam-Sung-Ting ‘99 Duan-Su ’12 Daitch-Spielman’08 ... • unclear how to apply to our problem • critical feature: perturbs costs, but this is all our problem is about solve linear program via interior-point methods (IPM) We knew how to obtain Õ (n1.5) in ’89, and no improvement had been made ever since Can we break the Õ (n1.5) barrier? * m = #arcs , n = #vertices, W = max |w|
predictor steps (can not be too long) Interior-Point Methods (IPM) [Dikin ‘67, Karmarkar ’84, Renegar ’88,...] corrector steps (restore centrality) LP:min cTx s.t. Ax = b x≥ 0 𝛍0 = large 𝛍1 LP’: max bTy s.t.ATy + s = c s≥ 0 𝛍2 ... 𝛍t ≈ 0 OPT • solve simultaneously: produce feasible (x, y, s) such that the duality gap • cTx - bTy = xTs = 𝚺 xi si = 0 • instead of solving in one shot, gradually reduce duality gap • make all variables contribute equally, so reduce the gap in a very specific way: maintain xisi= 𝛍 for all i (call such a solution central, with parameter 𝛍) • for each 𝛍 consider the corresponding solution (x,y,s); these solutions form a curve, called the central path • follow the path by alternating predictor steps (get close to point with smaller parameter) and corrector steps (restore centrality)
Negative Weight Shortest Path via IPM LP:min cTf s.t.BTf = dst f≥ 0 minimize the cost of a flow f running one unit from s to t (routes demand dst) • 1 ≥ f ≥ 0 without violating directions • This instance becomes degenerate when perturbing the cost vector c (can suddenly become unbounded by creating negative cycle) * This makes Mądry’s approach of perturbing costs particularly problematic • Adding upper capacities fixes this problem • Now our LP is essentially unit capacity min-cost flow • Can ‘’eliminate’’ upper capacities by combinatorial reduction
predictor steps (can not be too long) Negative Weight Shortest Path via IPM LP:min cTf s.t.BTf = d f≥ 0 𝛍 𝛍(1-δ) LP’: max dTy s.t.By + s = c s ≥ 0 OPT ri = 1 / fi2 Step 1 (predictor): min E(g)=𝚺 ri gi2 s.t.BTg= d
predictor steps (can not be too long) Negative Weight Shortest Path via IPM Electrical flow problem Nearly linear time via fast Laplacian solver: ST ‘08, KMP ‘12, KOSZ ’13, PS ‘14, CKMPPRX ’15, LKPSS ‘16, KS ‘16... corrector steps (restore centrality) LP:min cTf s.t.BTf = d f≥ 0 LP’: max dTy s.t.By + s = c s ≥ 0 ri = 1 / fi2 Step 1 (predictor): update: f’ = (1-δ) f + δ g y’= y + δ/(1-δ) 𝛗 s’ = s + δ/(1-δ) Δ𝛗 min E(g)=𝚺 ri gi2 s.t.BTg= d dual variables (Ohm’s Law) gab = (𝛗b- 𝛗a)/rab
predictor steps (can not be too long) Negative Weight Shortest Path via IPM corrector steps (restore centrality) LP:min cTf s.t.BTf = d f≥ 0 𝛍 𝛍(1-δ) LP’: max dTy s.t.By + s = c s ≥ 0 OPT ri = 1 / fi2 Step 1 (predictor): update: f’ = (1-δ) f + δ g y’= y + δ/(1-δ) 𝛗 s’ = s + δ/(1-δ) Δ𝛗 min E(g)=𝚺 ri gi2 s.t.BTg= d dual variables (Ohm’s Law) gab = (𝛗b- 𝛗a)/rab
predictor steps (can not be too long) Negative Weight Shortest Path via IPM corrector steps (restore centrality) LP:min cTf s.t.BTf = d f≥ 0 𝛍 𝛍(1-δ) LP’: max dTy s.t.By + s = c s ≥ 0 OPT Step 2 (corrector): • similar to predictor, via electrical flow computation • can correct only starting from points that are not very far from central path, so predictor steps can not be too long
predictor steps (can not be too long) Negative Weight Shortest Path via IPM corrector steps (restore centrality) LP:min cTf s.t.BTf = d f≥ 0 Claim:|ρ|4≤ m1/2 𝛍 (1) |ρ|4 ≤ |ρ|2 Proof: (2) |ρ|22= E(g) |ρ|22 = 𝚺 gi2 / fi2 = 𝚺 ri gi2= E(g) 𝛍(1-δ) LP’: max dTy s.t.By + s = c s ≥ 0 (3) E(g) ≤ E(f) ≤ m E(f) = 𝚺 rifi2 = 𝚺 (1/fi2) fi2 = m OPT How long can the predictor step be? min E(g)=𝚺 rigi2 s.t.BTu= d • let ρi=|gi|/ fi • set δ = 1 /|ρ|4 • if |ρ|4 ≤ B always,then • #iterations = O(B log n) ri = 1 / fi2
Beyond Õ(m1/2) iterations Recall: Analysis uses the bound |ρ|4 ≤ |ρ|2 |ρ|4 ≈|ρ|2when few entries of ρcontribute most of the norm, i.e. electrical energy • Can this happen? Yes • Õ(m1/2) bound is in principle tight • Recall: ρi = |gi|/fiwhere giis electrical flow with resistances ri = 1 / fi2 and |ρ|22 = E(g) • We want to discourage the situation where few edges contribute a lot to the energy E(g) • Solution:Increase their resistance (i.e. double it) • Attempt #1: double the resistance by duplicating the edge • Essentially what Mądry did, but it also doubles the cost of the edgewhere few edges contribute a lot to the energy E(g)
Beyond Õ(m1/2) iterations • After: • centrality condition • fisi= 𝛎i𝛍 for all i • compute electrical flow with: • ri= 𝛎i/ fi2= (1/𝛍)(si/fi) • step size determined by weighted • |ρ|𝛎 ,22 = 𝚺 𝛎i ρi2 = E(g) • Before: • centrality condition: • fisi= 𝛍 for all i • compute electrical flow with: • ri= 1 / fi2= (1/𝛍)(si/fi) • step size determined by • |ρ|22 = E(g) u u (f1, s1, 𝛎1) (f1, 2s1, 2𝛎1) yu yu c1 c1 a a ya ya -s1 c2 c2 v v (f2, s2, 𝛎2) (f2, s2, 𝛎2 + 𝛎1(f2/f1)) yv yv s1 = c1 + yu - ya 2s1 = c1 + yu– (ya-s1) s2 = c2 + yv - ya s2 = c2 + yv - (ya-s1)
Conclusion • We obtained an Õ(m10/7log W) time algorithm for the more general unit capacity minimum cost flow problem, with arbitrary edge weights • Yields the same running time for an entire range of problems • Negative-weight shortest paths • Min-cost circulation (unit capacity) • Min-cost bipartite perfect matching • Min-cost bipartite perfect b-matching when b(V)=O(m)
Conclusion • Matches the running time of Mądry’s algorithm for max flow • Mądry’16 showed how to obtain the same running time for max flow using more “natural” objects: augmenting paths • Is there a “natural” algorithm for negative weight shortest paths, or any of the other problems we solved? • Is the Õ(m3/7 )iteration bound “right”? • Can we improve the state-of-the art IPM? Conjecture: Õ(m1/3) iterations suffice