a polynomial combinatorial algorithm for generalized minimum cost flow, kevin d. wayne

51
A POLYNOMIAL COMBINATORIAL ALGORITHM FOR GENERALIZED MINIMUM COST FLOW, KEVIN D. WAYNE Eyal Dushkin – 03.06.13

Upload: kaylee

Post on 23-Feb-2016

39 views

Category:

Documents


0 download

DESCRIPTION

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 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

A POLYNOMIAL COMBINATORIAL ALGORITHM FOR GENERALIZED

MINIMUMCOST FLOW, KEVIN D. WAYNE

Eyal Dushkin – 03.06.13

Page 2: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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 10 v

V received 8 units of flow!

Page 3: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 4: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

PROBLEM HISTORY

Page 5: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 6: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 7: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 8: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

RESIDUAL NETWORKS

Residual Capacity Gain Factor Cost

u v

u v40

20

𝛾 (𝑒 )=12 ,𝑐 (𝑒 )=17 ,𝑢𝑔 (𝑒 )=60

𝛾 (𝑒 )=2,𝑐 (𝑒)=−34 ,𝑢𝑔 (𝑒 )=20

Page 9: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 10: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 11: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

CIRCULATION DECOMPOSITION

A bicycle is a flow-generating cycle, a flow-absorbing cycle, and a (possibly trivial) path from the first to the second

Page 12: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 13: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

CIRCUITS AND COSTS

Page 14: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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 = 0Repeat:

Cancel a negative cost circuit in Gg Update g

until optimal

Complexity: Very bad! NP-hard even to detect a unit-gain cycle …

Page 15: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

u

−20

−10−15

Cost = -15-20-10 = -45Mean Cost = (-15-20-10)/3 = -15

Page 16: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

−20

−10−15

𝑢𝑔 (𝑒 )=10

𝑢𝑔 (𝑒 )=1𝑢𝑔 (𝑒 )=2

= 28.125

Page 17: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

CIRCUIT CANCELING ALGORITHM (3RD TRY)

We define the ratio of a circuit x to be: where and c(x)=

Examples on board

Page 18: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

CIRCUIT CANCELING ALGORITHM

Page 19: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 20: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 21: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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!

Page 22: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

MINIMUM RATIO CIRCUIT ALGORITHM

In this section we discuss 3 matters:1. Detecting a circuit2. Detecting a negative cost circuit3. Finding a minimum ratio circuit

Page 23: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 24: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

STEP1 - DETECTING A BICYCLE

First find a subset of nodes that leads to a flow-absorbing cycle or participate in such one

Page 25: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

STEP1 - DETECTING A BICYCLE

𝜋 𝑖 (𝑣 )=min (𝜋 𝑖−1 (𝑣 ) ,𝛾 (𝑣 ,𝑤 ) 𝜋𝑖− 1 (𝑤 ))1

1

1

1

1

1

5

1

1/26 1

3/4

1

Page 26: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

STEP1 - DETECTING A BICYCLE

𝜋 𝑖 (𝑣 )=min (𝜋 𝑖−1 (𝑣 ) ,𝛾 (𝑣 ,𝑤 ) 𝜋𝑖− 1 (𝑤 ))3/4

1

1

1

1/2

1

5

1

1/26 1

3/4

1

Page 27: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

STEP1 - DETECTING A BICYCLE

𝜋 𝑖 (𝑣 )=min (𝜋 𝑖−1 (𝑣 ) ,𝛾 (𝑣 ,𝑤 ) 𝜋𝑖− 1 (𝑤 ))3/4

1

3/4

1

1/2

1

5

1

1/26 1

3/4

1

Page 28: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

STEP1 - DETECTING A BICYCLE

𝜋 𝑖 (𝑣 )=min (𝜋 𝑖−1 (𝑣 ) ,𝛾 (𝑣 ,𝑤 ) 𝜋𝑖− 1 (𝑤 ))3/4

3/4

3/4

1

1/2

1

5

1

1/26 1

3/4

1

Page 29: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

STEP1 - DETECTING A BICYCLE

𝜋 𝑖 (𝑣 )=min (𝜋 𝑖−1 (𝑣 ) ,𝛾 (𝑣 ,𝑤 ) 𝜋𝑖− 1 (𝑤 ))9/16

9/16

9/16

1

1/2

1

5

1

1/26 1

3/4

1nth-step

Page 30: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

STEP1 - DETECTING A BICYCLE

𝜋 𝑖 (𝑣 )=min (𝜋 𝑖−1 (𝑣 ) ,𝛾 (𝑣 ,𝑤 ) 𝜋𝑖− 1 (𝑤 ))0.31

6

0.42

0.316

1

1/2

1

5

1

1/26 1

3/4

1(2n-1)th-step

Page 31: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

STEP1 - DETECTING A BICYCLE

𝜋 𝑖 (𝑣 )=min (𝜋 𝑖−1 (𝑣 ) ,𝛾 (𝑣 ,𝑤 ) 𝜋𝑖− 1 (𝑤 ))0.31

6

0.316

0.316

1

1/2

1

5

1

1/26 1

3/4

1(2n)th-step

Page 32: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 33: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 34: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

MINIMUM RATIO CIRCUIT ALGORITHM

In this section we discuss 3 matters:1. Detecting a circuit a2. Detecting a negative cost circuit3. Finding a minimum ratio circuit

Page 35: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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)

Page 36: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 37: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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 .

Page 38: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

MINIMUM RATIO CIRCUIT ALGORITHM

In this section we discuss 3 matters:1. Detecting a circuit a2. Detecting a negative cost circuit a 3. Finding a minimum ratio circuit

Page 39: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 40: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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?

Page 41: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

MINIMUM RATIO CIRCUIT ALGORITHM

In this section we discuss 3 matters:1. Detecting a circuit a2. Detecting a negative cost circuit a 3. Finding a minimum ratio circuit a on O(n) Processors

Page 42: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

ALGORITHM CORRECTNESS

The minimum ratio circuit-cancelling algorithm computes an generalized minimum cost circulation in a strongly Polynomial time!

~𝑂 (𝑚𝑛3 )

Page 43: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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)

Page 44: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

SCALING VERSION

Page 45: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 46: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 47: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

ALGORITHMS SUMMARY

Approximation Algorithms1st Algorithm Faster Scaling

Version

What About Exact Algorithms ?

Page 48: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

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

Page 49: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

ROUNDING TO A VERTEX

Lemma 8 – Giving a generalized circulation g we can determine an optimal circulation in n) time

Proof: On Board.

Page 50: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

ALGORITHMS SUMMARY

Approximation Algorithms1st Algorithm Faster Scaling

Version

Exact Algorithms1st Algorithm Faster Scaling

Version

Page 51: A Polynomial Combinatorial Algorithm for Generalized Minimum Cost  Flow, Kevin D. Wayne

QUESTIONS? Eyal Dushkin – 03.06.13