520 likes | 660 Views
A Polynomial Combinatorial Algorithm for Generalized Minimum Cost Flow, Kevin D. Wayne. Eyal Dushkin – 03.06.13. Reminder – Generalized Flows. We are given a graph We associate a positive with every arc
E N D
A Polynomial Combinatorial Algorithm for Generalized MinimumCost Flow, Kevin D. Wayne Eyal Dushkin – 03.06.13
Reminder – Generalized Flows • We are given a graph • We associate a positive with every arc • Assume that if 1 unit of flow was sent from node along the arc then units of flow arrived at node • Notice that the model is a generalization of the minimal cost flow problem, with every arc having the multiplier u v 10 V received 8 units of flow!
Reminder - Generalized Minimum Cost Flows • G=(V,E) is a directed graph • Capacity function • Gain function • Cost function • Balance function • n = |V| ; m = |E| Minimize Subject to: And
Polynomial Combinatorial Algorithm for Generalized Minimum Cost Flow (2003) • We solve the generalized minimum cost circulation problem, in which all supplies and demands are zero • We present combinatorial algorithms which solve the problem in a polynomial time • These algorithms are strongly polynomial approximation schemes for the minimum cost circulation problem
Generalized Minimum Cost Circulation • Balance function • A circulation is a nonnegative function that satisfies the flow conservation constraints: • It is feasible if it satisfies the capacity constraints: • Define • The problem is to find a feasible generalized circulation of minimum cost
Assumptions • Costs and capacities are integral • Gain factors are ratios of two integers p/q • Let B the biggest integer among the above (costs, capacities, p, q) , we assume
Residual Networks u v 40 20 u v
Circulation Decomposition • The gain of a cycle is the product of the gain factors of arcs participating in that cycle • A unit-gain cycle is a cycle whose gain is equal to one • A flow-generating cycle is a cycle whose gain is greater than one • A flow-absorbing cycle is a cycle whose gain is less than one
Circulation Decomposition • A unit-gain cycle is a cycle whose gain is equal to one • A flow-generating cycle is a cycle whose gain is greater than one • A flow-absorbing cycle is a cycle whose gain is less than one
Circulation Decomposition • A bicycle is a flow-generating cycle, a flow-absorbing cycle, and a (possibly trivial) path from the first to the second
Circulation Decomposition • A circuit is a circulation that sends flow only along the arcs of a single unit-gain cycle or bicycle • Decomposition Lemma (without proof): • A generalized circulation g can be decomposed into components such that and each component is a circuit that is positive only on arcs with • Optimality Condition (without proof): • optimal --- no negative cost residual unit-gain cycles or bicycles
Circuit Canceling Algorithm • We start with a feasible circulation g = 0 and then repeatedly cancel a negative cost residual circuit • Klein's cycle-canceling (in non-generalized networks): • Initialize g = 0 • Repeat: • Cancel a negative cost circuit in Gg • Update g • until optimal • Complexity: Very bad! • NP-hard even to detect a unit-gain cycle …
Circuit Canceling Algorithm (2nd try) • The mean cost of a cycle is • Repeatedly cancelling the minimum mean cost residual cycle is a strongly polynomial for non-generalized flow • Unfortunately for generalized flow, the complexity analysis changes u v Cost = -15-20-10 = -45 Mean Cost = (-15-20-10)/3 = -15 u
Circuit Canceling Algorithm (3rd try) • We are interested in cycles with very negative cost and with large residual capacity • Let a time function • The ratio of a cycle is - the ratio of its cost to time • Consider • For traditional networks this gives a weakly polynomial algorithm u v u = 28.125
Circuit Canceling Algorithm (3rd try) • We define the ratio of a circuit x to be: • where and c(x)= • Examples on board
Algorithm Correctness • Lemma 1 - Let g be a feasible circulation. Let x be a negative cost circuit in and let denote its ratio. Cancelling circuit x improves the objective function value by at least • Proof: On Board • Lemma 2 – Let g be a feasible circulation that is not optimal. Let denote the minimum ratio circuit value in . Then • Proof: On Board
Algorithm Correctness • Lemma 1 - Cancelling circuit x improves the objective function value by at least • Lemma 2 – • Lemma 3 – There are cancellations of min ratio circuits • Proof: On Board
Algorithm Correctness • Lemma 3 – There are cancellations of min ratio circuits • Giving a time subroutine for computing a minimum ratio circuit, • the minimum ratio circuit-cancelling algorithm computes an • generalized minimum cost circulation in a strongly Polynomial time!
Minimum Ratio Circuit Algorithm • In this section we discuss 3 matters: • Detecting a circuit • Detecting a negative cost circuit • Finding a minimum ratio circuit
Detecting a circuit • A circuit is either a bicycle or a unit-gain cycle • Recall: a bicycle is a flow-generating cycle and a flow-absorbing cycle connected by a path from the first to the second • Detecting a circuit: • Step 1 - Detecting a bicycle • Step 2 - Remove the bicycles and detect unit-gain cycles
Step1 - Detecting a bicycle • First find a subset of nodes that leads to a flow-absorbing cycle or participate in such one
Step1 - Detecting a bicycle 1 1 1 5 1 1 1/2 6 1 1 3/4 1 1
Step1 - Detecting a bicycle 1/2 1 1 5 1 1 1/2 6 1 1 3/4 3/4 1
Step1 - Detecting a bicycle 1/2 3/4 1 5 1 1 1/2 6 1 1 3/4 3/4 1
Step1 - Detecting a bicycle 1/2 3/4 1 5 1 3/4 1/2 6 1 1 3/4 3/4 1
Step1 - Detecting a bicycle 1/2 9/16 nth-step 1 5 1 9/16 1/2 6 1 1 3/4 9/16 1
Step1 - Detecting a bicycle 1/2 0.316 (2n-1)th-step 1 5 1 0.42 1/2 6 1 1 3/4 0.316 1
Step1 - Detecting a bicycle 1/2 0.316 (2n)th-step 1 5 1 0.316 1/2 6 1 1 3/4 0.316 1
Step1 - Detecting a bicycle • Then detect flow-generating cycles on the sub-graph induced by N, with the update rule: • If we find a flow-generating cycle, then by the definition of we can extract a bicycle
Step2 - Detecting a UNIT-GAIN CYCLe • 1. Detect unit-gain cycles in the subgraph induced by V\N – On Board • 2. Detect unit-gain cycles in the subgraph induced by N – On Board
Minimum Ratio Circuit Algorithm • In this section we discuss 3 matters: • Detecting a circuit a • Detecting a negative cost circuit • Finding a minimum ratio circuit
Detecting a negative cost circuit • Any circulation can be decomposed into circuits, thus it’s sufficient to detect a negative cost circulation. • That is, we want to find a solution to the system: • (I) • Now let variables, and lets look at: • (II)
2VPI (2 Variables Per Inequality) Feasibility • (I) • (II) • System (I) + (II) can’t both be feasible! • There exists a negative cost circulation if and only if the system (II) is infeasible • Thus is it sufficient to have a 2VPI feasibility subroutine
2VPI Feasibility • Fortunately, researchers have previously developed such specialized 2VPI feasibility algorithms • Moreover, all of these algorithms either return a feasible solution to (II) or output a minimal certificate of infeasibility • Hochbaum et al. [21], and Cohen and Megiddo (נמרוד מגידו) designed an algorithm in .
Minimum Ratio Circuit Algorithm • In this section we discuss 3 matters: • Detecting a circuit a • Detecting a negative cost circuit a • Finding a minimum ratio circuit
FINDING A minimum ratio circuit • 1. Estimate with a guess • 2. Linearize the objective function with the parametric cost function • 3. Find a negative cost circuit with respect to cost function : • 3.1. If there is a negative cost circuit, then over estimate • 3.2. If every non-trivial circuit has positive cost, then is too small • 3.3. Else
FINDING A minimum ratio circuit – ANAYLSIS (no proof) • 3. Find a negative cost circuit with respect to cost function : • 3.1. If there is a negative cost circuit, then over estimate • 3.2. If every non-trivial circuit has positive cost, then is too small • 3.3. Else 3.1 - By incorporating the parametric search techniques of Megiddo (נמרוד מדיגו) and using parallel implementation, we can do it in - how much in binary search?
Minimum Ratio Circuit Algorithm • In this section we discuss 3 matters: • Detecting a circuit a • Detecting a negative cost circuit a • Finding a minimum ratio circuit a on O(n) Processors
Algorithm Correctness • The minimum ratio circuit-cancelling algorithm computes an • generalized minimum cost circulation in a strongly Polynomial time!
SCALING VERSION • The bottleneck computation in the former was detecting min ratio circuits • Idea: Cancel approximately min ratio circuits • Improvement: Cancel negative cost circuits instead of min ratio circuits (factor n speeds up)
SCALING VERSION • Lemma 4 – There are at most 2m cancelations per scaling phase • Proof: On Board Lemma 5 – Suppose at the end of a scaling phase we have , where g is the current circulation. Then g is Proof: On Board
SCALING VERSION • Lemma 4 – There are at most 2m cancelations per scaling phase • Lemma 5 – Suppose at the end of a scaling phase we have , where g is the current circulation. Then g is Lemma 6 – The scaling algorithm finds an circulation in time. Proof: On Board
ALGORITHMS SUMMARY Approximation Algorithms What About Exact Algorithms ?
ROUNDING TO A VERTEX • Lemma 7 – Let g be a feasible generalized circulation and let Then g is a vertex if and only if the subgraph induced by A has no unit-gain cycles or bicycles • Giving feasible circulation g, we can detect circuits in g in time and cancel them; each cancelation saturates at least one new arc in A, resulted in a time
ROUNDING TO A VERTEX • Lemma 8 – Giving a generalized circulation g we can determine an optimal circulation in n) time • Proof: On Board.
ALGORITHMS SUMMARY Approximation Algorithms Exact Algorithms