Transportation Problem

Similar documents
TRANSPORTATION PROBLEMS

Chapter 7 Network Flow Problems, I

1 Determinants. 1.1 Determinant

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

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

Standard Form An LP is in standard form when: All variables are non-negativenegative All constraints are equalities Putting an LP formulation into sta

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

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

Simplex Algorithm Using Canonical Tableaus

Relation of Pure Minimum Cost Flow Model to Linear Programming

Discrete Optimization 23

1 Multiply Eq. E i by λ 0: (λe i ) (E i ) 2 Multiply Eq. E j by λ and add to Eq. E i : (E i + λe j ) (E i )

F 1 F 2 Daily Requirement Cost N N N

The dual simplex method with bounds

Lecture 4: Algebra, Geometry, and Complexity of the Simplex Method. Reading: Sections 2.6.4, 3.5,

Simplex tableau CE 377K. April 2, 2015

AM 121: Intro to Optimization Models and Methods Fall 2018

Undergraduate Mathematical Economics Lecture 1

ACI-matrices all of whose completions have the same rank

Linear and Integer Programming - ideas

OPERATIONS RESEARCH. Linear Programming Problem

Fundamentals of Engineering Analysis (650163)

CHAPTER 6. Direct Methods for Solving Linear Systems

Math Models of OR: Extreme Points and Basic Feasible Solutions

Ω R n is called the constraint set or feasible set. x 1

Math Models of OR: Some Definitions

Chapter 4 - MATRIX ALGEBRA. ... a 2j... a 2n. a i1 a i2... a ij... a in

Dr. Maddah ENMG 500 Engineering Management I 10/21/07

21. Solve the LP given in Exercise 19 using the big-m method discussed in Exercise 20.

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

Graduate Mathematical Economics Lecture 1

Maximum Flow Problem (Ford and Fulkerson, 1956)

Chapter 1: Linear Programming

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 6

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

Lecture Notes in Linear Algebra

Presentation by: H. Sarper. Chapter 2 - Learning Objectives

Lesson 27 Linear Programming; The Simplex Method

Letting be a field, e.g., of the real numbers, the complex numbers, the rational numbers, the rational functions W(s) of a complex variable s, etc.

Contents. 4.5 The(Primal)SimplexMethod NumericalExamplesoftheSimplexMethod

Chapter 3, Operations Research (OR)

AM 121: Intro to Optimization

Lecture 5 January 16, 2013

Matrices. Chapter Definitions and Notations

Direct Methods for Solving Linear Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le

Lecture 2: The Simplex method

Linear programs Optimization Geoff Gordon Ryan Tibshirani

Math 240 Calculus III

UNIVERSITY of LIMERICK

3. Linear Programming and Polyhedral Combinatorics

ORF 522. Linear Programming and Convex Analysis

Chapter 5 Linear Programming (LP)

MATH 315 Linear Algebra Homework #1 Assigned: August 20, 2018

Sensitivity Analysis

A NEW FACE METHOD FOR LINEAR PROGRAMMING. 1. Introduction We are concerned with the standard linear programming (LP) problem

CO350 Linear Programming Chapter 6: The Simplex Method

Linear Programming. Murti V. Salapaka Electrical Engineering Department University Of Minnesota, Twin Cities

Linear Programming Redux

3. Linear Programming and Polyhedral Combinatorics

A primal-simplex based Tardos algorithm

This operation is - associative A + (B + C) = (A + B) + C; - commutative A + B = B + A; - has a neutral element O + A = A, here O is the null matrix

Mathematical Programs Linear Program (LP)

Revised Simplex Method

CO350 Linear Programming Chapter 6: The Simplex Method

Integer programming: an introduction. Alessandro Astolfi

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

21-301, Spring 2019 Homework 4 Solutions

Special cases of linear programming

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

Pivoting. Reading: GV96 Section 3.4, Stew98 Chapter 3: 1.3


Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #06. The Simplex Method

(1) for all (2) for all and all

CO 602/CM 740: Fundamentals of Optimization Problem Set 4

Calculation in the special cases n = 2 and n = 3:

FORBIDDEN MINORS FOR THE CLASS OF GRAPHS G WITH ξ(g) 2. July 25, 2006

/3 4 1/2. x ij. p ij

3.3 Easy ILP problems and totally unimodular matrices

Lecture 14 Transportation Algorithm. October 9, 2009

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

Equality: Two matrices A and B are equal, i.e., A = B if A and B have the same order and the entries of A and B are the same.

Matrices and Vectors

9.1 Linear Programs in canonical form

1 Implementation (continued)

D1 D2 D3 - 50

Linear Systems and Matrices

ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3

Linear programming: theory, algorithms and applications

15-780: LinearProgramming

Lecture 7. Econ August 18

Introduction to Integer Programming

Ma/CS 6b Class 20: Spectral Graph Theory

Lecture 12 (Tue, Mar 5) Gaussian elimination and LU factorization (II)

Lecture Notes 1: Matrix Algebra Part C: Pivoting and Matrix Decomposition

The Simplex Method. Lecture 5 Standard and Canonical Forms and Setting up the Tableau. Lecture 5 Slide 1. FOMGT 353 Introduction to Management Science

Direct Methods for Solving Linear Systems. Matrix Factorization

Part 1. The Review of Linear Programming

Math/CS 466/666: Homework Solutions for Chapter 3

MATH Topics in Applied Mathematics Lecture 12: Evaluation of determinants. Cross product.

Since the determinant of a diagonal matrix is the product of its diagonal elements it is trivial to see that det(a) = α 2. = max. A 1 x.

Transcription:

Transportation Problem Alireza Ghaffari-Hadigheh Azarbaijan Shahid Madani University (ASMU) hadigheha@azaruniv.edu Spring 2017 Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 1 / 34

Overview 1 Transportation problem A brief definition Properties of the coefficient matrix Nonbasic vector in terms of the basic vectors The simplex method for transportation problem 2 Degeneracy in the transportation problem Necessary Condition 3 The Simplex Tableau Associated with a Transportation Tableau Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 2 / 34

Assumptions Transportation problem A brief definition m origin points located on a map, where origin i has a supply of a i units of a particular item. n destination points, where destination j requires b j units of the commodity. unit cost c ij for transportation from origin i to destination j. Determine the feasible shipping solution from origins to destinations that minimizes the total transportation cost. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 3 / 34

A brief definition Mathematical Formulation x = (x 11, x 12,..., x 1n, x 21,..., x 2n,..., x mn ) T c = (c 11, c 12,..., c 1n, c 21,..., c 2n,..., c mn ) T b = (a 1, a 2,..., a m, b 1, b 2,..., b n ) T A = (a 11, a 12,..., a 1n, a 21,..., a 2n,..., a mn ) a ij = e i + e m+j Linear optimization model min c T x Ax = b x 0 1 is an n row vector of all 1 s I is an n n identity matrix Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 4 / 34

Example Transportation problem A brief definition 2 Origins, 3 Destinations. c 11 = 4 c 12 = 7 c 13 = 5 c 21 = 2 c 22 = 4 c 23 = 3 1 1 1 0 0 0 0 0 0 1 1 1 A = 1 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 5 / 34

Feasibility of the problem A brief definition d = m a i = i=1 n j=1 b j x ij = a i b j d, i = 1,..., m, j = 1,..., n. 0 x ij min{a i, b j } A bounded feasible linear optimization problem has optimal solution. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 6 / 34

Rank of the matrix A Transportation problem Properties of the coefficient matrix If m, n 2 then m + n mn, thus rank A m + n. rank A m + n, since the sum of first m rows equals the sum of last n rows. Fact: Rank A = m + n 1 We need only to find an (m + n 1) (m + n 1) nonsingular submatrix from A. Delate the last row: A = (a 1n, a 2n,..., a mn, a 11, a 21,..., a m,n 1 ) 1 1 1 0 0 0 [ ] Im Q 0 0 0 1 1 1 1 0 1 1 0 1 0 0 A = 0 I n 1 Rank A = m + n 1. A = 1 0 0 1 0 0 0 1 0 0 1 0 A = 0 0 1 0 0 1 0 0 1 0 0 0 0 1 Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 7 / 34

Properties of the coefficient matrix Totally Unimodularity Definition A matrix is totally unimodular if the determinant of its every square submatrix is 1, 0 or +1. Claim In the transportation problem, the matrix A is totally unimodular. Since all entries of A are 0 or 1, every 1 1 submatrix has determinant of value 0 or 1. Any (m + n) (m + n) submatrix has determinant of value 0 since rank(a) = m + n 1. Suppose the property is true for A k 1, then Each column of A k has either no 1 s, a single 1, or two 1 s. If any column of A k has no 1 s, then det A k = 0. If every column of A k has two 1 s, then one of the i s is in an origin row and the other is in a destination row. In this case the sum of the origin rows of A k equals the sum of the destination rows of A k.det A k = 0. If some column of A k contains a single 1, expanding det A k by the minors of that column we get det A k = ± det A k 1. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 8 / 34

Triangularity of the Basis Matrix Properties of the coefficient matrix Claim Any basic submatrix is upper triangular. We had a particular (m + n 1) (m + n 1) submatrix that was nonsingular, therefore was a basis for A (ignoring the last row). This Matrix is upper triangular. Suppose that B is a basis matrix from A. There must be at least one column of B containing a single 1; otherwise, det B = 0. Permuting the rows and columns of B, we obtain [ ] 1 q 0 B m+n 2 B m+n 2 must contain at least one column with a single 1. (why?) 1 q q 0 1 p 0 0 B m+n 3 Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 9 / 34

Properties of the coefficient matrix Finding basic solution Use backward substitution. The basis consisting of x 13, x 23, x 11, and x 12, we append the last row and artificial column. x 12 = 10 x 11 = 15 x 23 = 20 x 13 = 30 x 11 x 12 = 5 x a = 25 x 13 = x 23 = 0 Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 10 / 34

Integrality of the basic solution Properties of the coefficient matrix Main result Since each basis consists entirely of integer entries and is triangular with all diagonal elements equal to 1, we conclude that the values of all basic variables will be integral if the supplies and demands are integers. In particular, we may conclude that the optimal basic feasible solution will be all integer. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 11 / 34

Simplex Method, Reminder Properties of the coefficient matrix Simplex for minimization problem Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 12 / 34

Properties of the coefficient matrix On the typical updated simplex column The elements of B 1 are all ±1 or 0 (why?). For the optimality we need to solve By ij = a ij. Utilizing Cramer s rule, the kth unknown element of y ij is y ijk = det B k det B. y ijk = ±1 or 0. Typical updated simplex column y ij consists of ±1 s and 0 s. Any vector a ij can be obtained by the simple addition and subtraction of basic vectors. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 13 / 34

Properties of the coefficient matrix Representation of a nonbasic vector in terms of basic vectors a ij = e i + e m+j a ij = a ik a lk + a ls a us + a uj = (e i + e m+k ) (e l + e m+k ) + (e l + e m+s ) (e u + e m+s ) + (e u + e m+j ) = e i + e m+j Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 14 / 34

Properties of the coefficient matrix Basic vectors cannot form a cycle on the transportation tableau. By contradiction let cells (p, q), (r, q), (r, s), (u, s), (u, v), and (p, v) which form a cycle be basic. Consider the following linear combination a pq a rq + a rs a us + a uv a pv = 0 Thus, they are not independent and so can t be basic. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 15 / 34

Properties of the coefficient matrix It has no cycle. (Tree of Forest) Spanning (All columns and rows) A spanning Tree (Chain) Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 16 / 34

Properties of the coefficient matrix Is this possible? Consider the two basic cells (i, j) and (k, l) If cell (k, j)is basic, then cells (, ij) and (k, l) are connected via the basic chain {(i, j), (k, j), (k, l)}. If the cell (k, j) is not basic, then a kj = a rj a rs + a ts + + a vu a vw + a kw The two basic cells (i, j) and (k, l) are connected by the basic chain {(i, j), (r, j), (r, s), (t, s),..., (v, u), (u, w), (k, w), (k, l)}. The basic cells are connected. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 17 / 34

Properties of the coefficient matrix Inverse A spanning tree with m + n 1 points together with an artificial vector is a basis. Proof sketch The matrix of vectors associated with a spanning tree has an (m + n 1) (m + n 1) (upper) triangular submatrix with 1 s on the diagonal. Hints! A tree always has at least one end. An end of the tree, it must either be the only point in the particular row or column. Assumption: The end is the only point in its particular row. Say (i, j). Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 18 / 34

Properties of the coefficient matrix Proof steps T = [ ] T1 q 0 1 a ij = e i + e m+j is the only tree vector with a nonzero entry in row i. Perform row and column permutation on the (m + n) (m + n 1) matrix T T 1 is the matrix associated with the tree vectors when row i and vector a ij are deleted. The endpoint and line joining it are deleted to obtain a new connected tree. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 19 / 34

Continued... Transportation problem Properties of the coefficient matrix T 2 p q 2 T = 0 1 q 1 0 0 1 Consider the end of cell (k, l). The only end point in column l a kl = e k + e m+l is the only vector with a nonzero entry in row m + 1. Continue this procedure. The proof is complete. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 20 / 34

Properties of the coefficient matrix Representation of the Basis on the Transportation Graph Each tree on the transportation tableau corresponds uniquely to a tree on the transportation graph Each basic cell (i, j) corresponds to the basic link (i, j). Each line connecting two basic cells in the transportation tableau corresponds to the node The artificial vector e m+n is a link leaving destination n and ending nowhere. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 21 / 34

Nonbasic vector in terms of the basic vectors Locate the unique cycle, in the basis graph, containing the arc associated with the particular nonbasic cell. All of the basic cells of the transportation matrix associated with the arcs of the cycle in the graph are required for the representation of the nonbasic cell. Not all basic cells in the unique cycle are used. The unique cycle of the graph is given by (1, 4), (3, 4), (3, 1), (1, 1). The chain of basic cells (3, 4), (3, 1), (1, 1). Assign alternating signs of +1 and 1, a 14 = a 11 a 31 + a 34. e 1 + e 4+4 = (e 1, +e 4+1 ) (e 3 + e 4+1 ) + (e 3 + e 4+4 ) Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 22 / 34

Simplex steps Transportation problem The simplex method for transportation problem 1 Find a starting basic feasible solution. 2 Compute z j c j for each nonbasic variable. Stop or select the entry column. 3 Determine the exit column. 4 Obtain the new basic feasible solution and repeat Step 2. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 23 / 34

The simplex method for transportation problem Finding a Starting Basic Feasible Solution Northwest corner rule As a variable x ij is assigned a value, the corresponding a i, and b j are reduced by that value. Start with, a i = ã i and and b j = b j. x 11 = min{ã 1, b 1 } Replace ã 1 by ã 1 x 11 and b 1 by b 1 x 11 If ã 1 < b 1, move to cell (1, 2); let X 21 = min{ã 2, b 1 }. and replace ã 2 by ã 2 x 21 and b 1 by b 1 x 21 If ã 1 = b 1, Degeneracy!! If ã 1 > b 1, move to cell (2, 1); let X 12 = min{ã 1, b 2 }. and replace ã 1 by ã 1 x 12 and b 2 by b 2 x 12 Continue. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 24 / 34

Starting Basic solution, an example The simplex method for transportation problem Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 25 / 34

The simplex method for transportation problem Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 26 / 34

The simplex method for transportation problem Computing z ij c ij for Each Nonbasic Cell z ij c ij = c B y ij c ij Since y ij consists of 1 s, 1 s, and 0 s, then c B y ij is calculated by simply adding and subtracting the costs of some basic variables. z ij c ij = (c uj c us + c ls c lk + c ik ) c ij Optimality criterion is z ij c ij 0 for each nonbasic x ij. z 21 c 21 = 4 5 + 3 2 = 0 z 22 c 22 = 7 5 + 3 4 = 1 x 22 is a candidate to enter the basis. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 27 / 34

The simplex method for transportation problem Alternative method for optimality controlling z ij c ij = c B B 1 a ij c ij = wa ij c ij. w i = u i, i = 1,... m and w m+j = v j, j = 1,... n. w = (u 1, u 2,..., u m, v 1, v 2,..., v n ) wa ij = u i + v j thus z ij c ij = u i + v j c ij. w = c B B 1 is the dual solution, for basic columns u i + v j = c ij. (u 1, u 2,..., u m, v 1, v 2,..., v n )(a pq,..., a st, e m+n ) = (c pq,..., c st, 0) System of equations: u p + v q = c pq. u s + v t = c st v n = 0 Compute the z ij c ij = u i + v j c ij for each nonbasic cell in order to determine the entering column. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 28 / 34

The simplex method for transportation problem Determination of the Exit Column Let (k, l) be selected to enter the basis. If the entry, in column y kl, corresponding to a basic variable is 1, then the basic variable will increase at the same rate as the nonbasic variable x kl increases. Let ˆx ij be the value of x ij in the current solution and let be the amount by which the nonbasic variable, x kl, increases. Each component of y kl is either 1, 1, or 0. = min{ˆx ij : basic cell (i, j) has a + 1 in the representation of the nonbasic cell (k, l)}. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 29 / 34

The simplex method for transportation problem Illustrative step = min{x 12, x 23 } = min{10, 20} = 10 New solution: x 12 = ˆx 12 = 10 10 = 0(leaves the basis) x 13 = ˆx 13 + = 5 + 10 = 15 x 23 = ˆx 23 = 20 10 = 10 x 12 = = 10 x 11 = 15(unchanged) Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 30 / 34

Degeneracy in the transportation problem Finding and Maintaining a Basis in the Presence of Degeneracy The reduced supply is equal to the reduced demand. x kl = min{â k, ˆb l } = a k = b l, Whichever way we go with the northwest corner rule, the next basic variable will be zero and degeneracy occurs. Proceed in either direction, that is, to (k, l + 1) or (k + 1, l), and assign either x k,l+1 or x k+1,l as a basic variable at zero level. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 31 / 34

Degeneracy in the transportation problem Continued x 31 = min{ˆx 11, ˆx 22, ˆx 34 } = min{10, 0, 40} = 0 x 11 = 10 0 = 10 x 21 = 10 + 0 = 10 x 22 = 0 0 = 0(leaves the basis) x 24 = 10 + 0 = 10 x 34 = 40 0 = 40 Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 32 / 34

Degeneracy in the transportation problem Necessary Condition A Necessary Condition for Degeneracy in the Transportation Problem A proper subset of the rows and columns have the total supply equal to the total demand. x ij = a i, C 1 C 1 C 1 x ij = C 1 b j, = C 1 a i = C 1 b j. Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 33 / 34

The Simplex Tableau Associated with a Transportation Tableau The Simplex Tableau Associated with a Transportation Tableau z x 11 x 12 x 13 x 21 x 22 x 23 x a RHS z 1 0 0-10 2 0 0 0 375 x 11 0 1 0 0 1 0 0 0 15 x 12 0 0 0 1-1 0 0 0 5 x 22 0 0 0-1 1 1 0 0 10 x 23 0 0 0 1 0 0 1 0 10 x a 0 0 0 0 0 0 0 1 0 Alireza Ghaffari-Hadigheh (ASMU) Transportation Problem Spring 2017 34 / 34