Minimum cost transportation problem

Similar documents
Maximum flow problem (part I)

Graphs and Network Flows IE411. Lecture 12. Dr. Ted Ralphs

(P ) Minimize 4x 1 + 6x 2 + 5x 3 s.t. 2x 1 3x 3 3 3x 2 2x 3 6

Energy minimization via graph-cuts

min 4x 1 5x 2 + 3x 3 s.t. x 1 + 2x 2 + x 3 = 10 x 1 x 2 6 x 1 + 3x 2 + x 3 14

- Well-characterized problems, min-max relations, approximate certificates. - LP problems in the standard form, primal and dual linear programs

Linear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004

IE 5531: Engineering Optimization I

Summary of the simplex method

Linear Programming Duality

Introduction to Mathematical Programming IE406. Lecture 10. Dr. Ted Ralphs

4.6 Linear Programming duality

4. Duality Duality 4.1 Duality of LPs and the duality theorem. min c T x x R n, c R n. s.t. ai Tx = b i i M a i R n

Network Flows. 7. Multicommodity Flows Problems. Fall 2010 Instructor: Dr. Masoud Yaghini

C&O 355 Mathematical Programming Fall 2010 Lecture 18. N. Harvey

Scheduling with AND/OR Precedence Constraints

Discrete Optimization

Maximum flow problem CE 377K. February 26, 2015

Lecture 5 January 16, 2013

Slack Variable. Max Z= 3x 1 + 4x 2 + 5X 3. Subject to: X 1 + X 2 + X x 1 + 4x 2 + X X 1 + X 2 + 4X 3 10 X 1 0, X 2 0, X 3 0

Discrete Optimization 23

Week 4. (1) 0 f ij u ij.

Linear Programming: Chapter 5 Duality

Linear Programming. Jie Wang. University of Massachusetts Lowell Department of Computer Science. J. Wang (UMass Lowell) Linear Programming 1 / 47

Relation of Pure Minimum Cost Flow Model to Linear Programming

Lectures 6, 7 and part of 8

Combinatorial optimization problems

Lagrangean relaxation

MVE165/MMG631 Linear and integer optimization with applications Lecture 5 Linear programming duality and sensitivity analysis

Preprocessing. Complements of Operations Research. Giovanni Righini. Università degli Studi di Milano

The maximum flow problem

Technische Universität München, Zentrum Mathematik Lehrstuhl für Angewandte Geometrie und Diskrete Mathematik. Combinatorial Optimization (MA 4502)

Lecture #21. c T x Ax b. maximize subject to

Multicommodity Flows and Column Generation

Lecture 11: Post-Optimal Analysis. September 23, 2009

Homework 5 ADMM, Primal-dual interior point Dual Theory, Dual ascent

In the original knapsack problem, the value of the contents of the knapsack is maximized subject to a single capacity constraint, for example weight.

Mathematics for Decision Making: An Introduction. Lecture 13

INVERSE SPANNING TREE PROBLEMS: FORMULATIONS AND ALGORITHMS

u = 50 u = 30 Generalized Maximum Flow Problem s u = 00 2 u = 00 u = 50 4 = 3=4 u = 00 t capacity u = 20 3 u = 20 = =2 5 u = 00 gain/loss factor Max o

Mathematical Programs Linear Program (LP)

Notes on Dantzig-Wolfe decomposition and column generation

Optimization - Examples Sheet 1

Lecture 3. 1 Polynomial-time algorithms for the maximum flow problem

Maximum Flow Problem (Ford and Fulkerson, 1956)

Part 4: Active-set methods for linearly constrained optimization. Nick Gould (RAL)

Note 3: LP Duality. If the primal problem (P) in the canonical form is min Z = n (1) then the dual problem (D) in the canonical form is max W = m (2)

Part 1. The Review of Linear Programming

3. Duality: What is duality? Why does it matter? Sensitivity through duality.

Advanced Linear Programming: The Exercises


EXERCISES SHORTEST PATHS: APPLICATIONS, OPTIMIZATION, VARIATIONS, AND SOLVING THE CONSTRAINED SHORTEST PATH PROBLEM. 1 Applications and Modelling

Friday, September 21, Flows

Summary of the simplex method

DEPARTMENT OF STATISTICS AND OPERATIONS RESEARCH OPERATIONS RESEARCH DETERMINISTIC QUALIFYING EXAMINATION. Part I: Short Questions

Worked Examples for Chapter 5

CSC373: Algorithm Design, Analysis and Complexity Fall 2017 DENIS PANKRATOV NOVEMBER 1, 2017

Two Applications of Maximum Flow

TRANSPORTATION PROBLEMS

6.854 Advanced Algorithms

Part IB Optimisation

Introduction 1.1 PROBLEM FORMULATION

CMPSCI 611: Advanced Algorithms

2.13 Maximum flow with a strictly positive initial feasible flow

On Végh s Strongly Polynomial Algorithm for Generalized Flows

Chapter 7 Network Flow Problems, I

BBM402-Lecture 20: LP Duality

The use of shadow price is an example of sensitivity analysis. Duality theory can be applied to do other kind of sensitivity analysis:

The Maximum Flow Problem with Disjunctive Constraints

The Primal-Dual Algorithm P&S Chapter 5 Last Revised October 30, 2006

Duality of LPs and Applications

Lecture 10: Linear programming duality and sensitivity 0-0

Topic: Primal-Dual Algorithms Date: We finished our discussion of randomized rounding and began talking about LP Duality.

SAMPLE QUESTIONS. b = (30, 20, 40, 10, 50) T, c = (650, 1000, 1350, 1600, 1900) T.

Sensitivity Analysis

GRAPH ALGORITHMS Week 7 (13 Nov - 18 Nov 2017)

Discrete (and Continuous) Optimization Solutions of Exercises 2 WI4 131

Spring 2017 CO 250 Course Notes TABLE OF CONTENTS. richardwu.ca. CO 250 Course Notes. Introduction to Optimization

Dual Decomposition.

3.10 Lagrangian relaxation

The Max Flow Problem

END3033 Operations Research I Sensitivity Analysis & Duality. to accompany Operations Research: Applications and Algorithms Fatih Cavdur

Flows. Chapter Circulations

CS675: Convex and Combinatorial Optimization Fall 2016 Combinatorial Problems as Linear and Convex Programs. Instructor: Shaddin Dughmi

princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 17: Duality and MinMax Theorem Lecturer: Sanjeev Arora

Lecture 13: Polynomial-Time Algorithms for Min Cost Flows. (Reading: AM&O Chapter 10)

Linear programming. Saad Mneimneh. maximize x 1 + x 2 subject to 4x 1 x 2 8 2x 1 + x x 1 2x 2 2

(includes both Phases I & II)

Lecture 15 (Oct 6): LP Duality

Chap6 Duality Theory and Sensitivity Analysis

Lecture 10: Linear programming. duality. and. The dual of the LP in standard form. maximize w = b T y (D) subject to A T y c, minimize z = c T x (P)

Farkas Lemma, Dual Simplex and Sensitivity Analysis

F 1 F 2 Daily Requirement Cost N N N

The Strong Duality Theorem 1

3 The Simplex Method. 3.1 Basic Solutions

Math 5490 Network Flows

Network Flows. 4. Maximum Flows Problems. Fall 2010 Instructor: Dr. Masoud Yaghini


Chapter 7. Network Flow. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

CS599: Convex and Combinatorial Optimization Fall 2013 Lecture 17: Combinatorial Problems as Linear Programs III. Instructor: Shaddin Dughmi

Transcription:

Minimum cost transportation problem Complements of Operations Research Giovanni Righini Università degli Studi di Milano

Definitions The minimum cost transportation problem is a special case of the minimum cost maximum flow problem. We are given: a set of origins, O; a set of destinations, D; an amount of flow o i to be sent from each origin i O; an amount of flow d j to be received by each destination j D; a transportation network, connecting each origin i O with each destination j D at a unit cost c ij. There are no capacities associated with the arcs between O and D. We assume i O o i = j D If this does not hold, we add a dummy origin or a dummy destination where necessary, with zero cost arcs incident in it. d j.

A reformulation By adding a dummy source s connected to each node i O with an arc of capacity o i and a dummy sink t connected to each node j D with an arc of capacity d j, we can solve a min cost max flow problem from s to t on the resulting digraph. This is equivalent to the original problem, because the bottleneck is the cut separating s (or t) from the rest of the digraph and hence the max flow has value i O o i = j D d j.

A formulation We use a variable x ij (continuous and non-negative) to indicate the amount of flow on each arc (i, j) A = O D. A mathematical model of the problem is: minimize z = c ij x ij s.t. (i,j) A x ij = o i j D x ij = d j i O i O j D x ij 0 (i, j) A. It is a linear programming model. Duality theory applies.

The dual problem P) minimize z = c ij x ij s.t. (i,j) A x ij = o i j D x ij = d j i O i O j D x ij 0 (i, j) A. D) maximize w = i O o i u i + j D d j v j s.t. u i + v j c ij (i, j) A Complementary slackness conditions imply: x ij (c ij (u i + v j )) = 0.

Primal-dual algorithm Begin Primal initialization; Dual initialization; while (i, j) : u i + v j > c ij do Update primal solution; Update dual solution; end while End At each iteration the algorithm keeps a primal-dual pair of solutions satisfying the CSCs. The primal solution is feasible; the dual solution is (super-)optimal. When the optimal dual solution is also feasible, the feasible primal solution is also optimal.

Primal initialization Begin Primal Initialization for i O do R o (i) := o i ; end for for j D do R d (j) := d j ; end for for (i, j) A do x ij := min{r o (i), R d (j)}; R o (i) := R o (i) x ij ; R d (j) := R d (j) x ij ; end for End Primal Initialization At each step at least one of the residuals R is set to 0. At least in the last iteration a row residual and a column residual are simultaneously set to 0, because o and d are balanced. The number of arcs with non-zero flow is at most O + D 1.

Visualization of primal initialization x R o 0 0 0 0 0 0 30 0 0 0 0 0 0 30 0 0 0 0 0 0 30 R d 12 13 15 20 20 0 c u 7 12 4 15 2 0 0 1 8 9 3 0 0 6 5 7 2 18 0 0 v 0 0 0 0 0 0 0

Visualization of primal initialization x R o 0 0 0 0 0 20 0 0 0 0 0 0 30 0 0 0 0 0 0 30 R d 0 12 13 15 20 20 70 c u 7 12 4 15 2 0 0 1 8 9 3 0 0 6 5 7 2 18 0 0 v 0 0 0 0 0 0 0

Visualization of primal initialization 12 x R o 12 0 0 0 0 8 0 0 0 0 0 0 30 0 0 0 0 0 0 30 R d 0 0 13 15 20 20 214 c u 7 12 4 15 2 0 0 1 8 9 3 0 0 6 5 7 2 18 0 0 v 0 0 0 0 0 0 0

Visualization of primal initialization 12 8 x R o 12 8 0 0 0 0 0 0 0 0 0 0 30 0 0 0 0 0 0 30 R d 0 0 5 15 20 20 246 c u 7 12 4 15 2 0 0 1 8 9 3 0 0 6 5 7 2 18 0 0 v 0 0 0 0 0 0 0

Visualization of primal initialization 12 8 5 x R o 12 8 0 0 0 0 0 0 5 0 0 0 25 0 0 0 0 0 0 30 R d 0 0 0 15 20 20 291 c u 7 12 4 15 2 0 0 1 8 9 3 0 0 6 5 7 2 18 0 0 v 0 0 0 0 0 0 0

Visualization of primal initialization 12 8 5 15 x R o 12 8 0 0 0 0 0 0 5 15 0 0 0 0 0 0 0 0 30 R d 0 0 0 0 20 20 441 c u 7 12 4 15 2 0 0 1 8 9 3 0 0 6 5 7 2 18 0 0 v 0 0 0 0 0 0 0

Visualization of primal initialization 12 8 5 15 x R o 12 8 0 0 0 0 0 0 5 15 0 0 0 0 0 0 0 0 30 R d 0 0 0 0 20 471 c u 7 12 4 15 2 0 0 1 8 9 3 0 0 6 5 7 2 18 0 0 v 0 0 0 0 0 0 0

Visualization of primal initialization 12 8 5 15 x R o 12 8 0 0 0 0 0 0 5 15 0 0 0 0 0 0 0 20 R d 0 0 0 0 0 20 651 c u 7 12 4 15 2 0 0 1 8 9 3 0 0 6 5 7 2 18 0 0 v 0 0 0 0 0 0 0

Visualization of primal initialization 12 8 5 15 20 x R o 12 8 0 0 0 0 0 0 5 15 0 0 0 0 0 0 20 0 R d 0 0 0 0 0 0 651 c u 7 12 4 15 2 0 0 1 8 9 3 0 0 6 5 7 2 18 0 0 v 0 0 0 0 0 0 0

Dual update Exploiting CSCs, a dual solution corresponding to the current primal solution is obtained by solving a system of linear equations: u i + v j = c ij (i, j) : x ij > 0. Since the number of basic x variables is O + D 1 and the number of dual variables is O + D, the system has infinitely many dual solutions. This is consistent with the degeneracy of the primal problem: any equality constraint can be derived from the others. Dual update amounts at arbitrarily fixing a dual variable and solving a system of linear equations. This is done both after primal initialization and after each primal update step.

Visualization of dual update c 7 12 4 15 2 0 1 8 9 3 0 6 5 7 2 18 0 u 1 + v 1 = 7 u 1 + v 2 = 12 u 1 + v 3 = 4 u 2 + v 3 = 9 u 2 + v 4 = u 2 + v 5 = 3 u 3 + v 5 = 18 u 3 + v 6 = 0 u 1 = 0 v 1 = 7 v 2 = 12 v 3 = 4 u 2 = 5 v 4 = 5 v 5 = 2 u 3 = 20 v 6 = 20 c u 0 0 0 4 20 0-11 -9 0 0 0 15 5-21 -27-17 -23 0 0 20 v 7 12 4 5-2 -20 651

Visualization of dual feasibility test In our example there are several violated dual constraints: they correspond to arcs with negative reduced cost. c u 0 0 0 4 20 0-11 -9 0 0 0 15 5-21 -27-17 -23 0 0 20 v 7 12 4 5-2 -20 651 We can choose for example the minimum reduced cost. We want to enforce u 3 +v 2 =c 32 to allow x 32 taking positive value.

Primal update The primal solution is changed by sending flow on arc (i, j), corresponding to a violated dual constraint. This implies re-balancing the flow on other arcs, in order to maintain primal feasibility. Hence a cycle containing (i, j) is identified, such that all the arcs in the cycle correspond to active dual constraints. The flow is alternately increased and decreased on the arcs of the cycle. The bottleneck arc determines the amount of flow to be sent along the cycle. After the flow update, the bottleneck arc has zero flow and its corresponding dual constraint is no longer forced to be active.

Visualization of primal update 12 8 5 15 x 12 8 0 0 0 0 0 5 15 0 0 0 0 0 20 20

Visualization of primal update 12 8 5 15 x 12 8 0 0 0 0 0 5 15 0 0 0 0 0 20 There is a unique cycle joining with in the flow graph corresponding to the current primal solution. 20 Flow must be increased on (3, 2), (1, 3) and (2, 5); decreased on (1, 2), (2, 3) and (3, 5). δ = min{x 12, x 23, x 35 } = 5.

Visualization of primal update 7 13 5 20 5 15 15 x 7 13 0 0 0 0 0 0 15 15 0 0 5 0 0 5 20 Now (2, 3) carries no flow; it has been replaced by (3, 2). The cost variation is δ c 32 = δ(c 32 c 12 +c 13 c 23 +c 25 c 35 ) = 5(5 12+4 9+3 18) = 5( 27) = 135.