LPM Simplex Method Tabular Form1

44
The Simplex Method in Tableau Format A very useful tabular form displaying all the quantities of interest has been developed by Orden, Datzig and Holfman. The systematic arrangement of solving a linear programming problem in a tabular format is known as a tableau and a new tableau is constructed at each iteration i.e. each time a new vector is introduced into the basis. *The first column of tableau gives that is cost coefficient of basic variables. *The second column tells which vectors are in the basis * The right hand side column under the heading “b” of a tableau gives you the current value of the together with the 1

description

Simplex method in Tabular format

Transcript of LPM Simplex Method Tabular Form1

The Simplex Method in Tableau FormatA very useful tabular form displaying all the quantities of interest has been developed by Orden, Datzig and Holfman. The systematic arrangement of solving a linear programming problem in a tabular format is known as a tableau and a new tableau is constructed at each iteration i.e. each time a new vector is introduced into the basis.

*The first column of tableau gives that is cost coefficient of basic variables. *The second column tells which vectors are in the basis

* The right hand side column under the heading b of a tableau gives you the current value of the together with the value of the objective function for the basic feasible solution.

The remaining columns list the values of for all vectors in A and any artificial vectors which may have been added.Suppose we have a starting basic feasible solution x with basis B. The linear programming problem can be represented as follows

Minimize: Subject to

(1)

(2)

(3)

Multiplying equation (2) by we have

(4)

Now multiplying the equation (4) by and adding the equation (1) with the resulting equation we have

(5)

Currently , and from equation (4) and (5) we have

and The equations (4) and (5) can conveniently be represented the current basic feasible solution in the following tableau. Here we think of z as (basic) variable to be minimized. The objective row will be referred to as row zero and the remaining rows are rows 1 through m. The right hand side column will denote the values of the basic variables including the objective function. The basic variables are identified on the left column. The tableau representation of the LPP is given below;z

RHS

Z10

Row 0

0I

Rows 1 through m

This tableau gives us the objective function and the basic variables on the RHS. This also gives us all the information we need to proceed with the simplex method. Actually the cost row gives us which consists of the for all j (j =1, 2,..,N) non basic variables. The row zero will tell us if we are at the optimal solution if each and which non-basic variable to increase otherwise.

If is increased then the vector which is stored in the tableau in rows 1 through m under the variable can be increased indefinitely without being blocked and the optimal is unbounded. On the other hand if has at least one positive component then increased of will be blocked by one of the current basic variable which droops to zero. The minimum ratio test determines the blocking variables. We would like to have a scheme that will do the following(i) Update the basic variables and their values

(ii)Update values for the new non basic variables

(iii) Update columnsThat is represent the following tableau form.Basic VariablesNon-Basic

z

..

RHS

z10 0 0 .. 0

..

...

0

0...0...01 0.................0...... 0

0 1 0.. 0..

0 0 1.. 0....0 00 1

...

.....

.......

...

...

...

Pivoting:All of the foregoing tasks can be simultaneously done by a simple pivoting operation.

If enters the basis and leaves the basis, then pivoting on can be stated as follows;

(i) Divide row r by . Thus we can write that

New pivot row = Current pivot row Pivot Element(ii) For all other rows that is for i = 1, 2,,m except row r, update the ith row by adding to it times the new pivot row. That is new row is given by

New row = Current row + (- its pivotal column coefficient) (New pivotal row)

(iii) Update row zero by adding to it times the new rth row.Thus the new pivotal row is given byBasic VariablesNon-Basic

z

..

RHS

z10 0 0 .. 0

...

...

0

0...0...01 0.................0...... 0

0 1 0.. 0..

0 0 1/.. 0....0 00 1

...

....

../.1....

...

..

/NPR...

.

Thus the after pivoting the tableau is given byBasic VariablesNon-Basic

z

..

RHS

z10 0 .. 00

...

...

0

0...0...01 0............. ...... 0

0 1 . 0..

0 0 1/.. 0...

.0 0 1 0

0...

../.1..

.

0 ..

..

./NPR...

Let us now examine the implications of the pivoting operations

(i) The variable enters the basis and left the basis. This is illustrated on the left hand side of the tableau by replacing with (ii) The right hand side of the tableau gives the current values of the basic variables. The non-basic variables are kept zeroUse of Tableau Format to Obtain the Solution of LPPSuppose we are to Minimize: z=CxSubject toAx = b

Initialization Step:

We find an initial basic feasible solution with basis B, with and solution , ,, A=(B, N)We form the initial tableau as follows;Basic VariablesNon-Basic

z

..

RHS

z10 0 0 .. 0

...

...

0

0....0...01 0.................0...... 0

0 1 0.. 0..

0 0 1.. 0....0 00 1

...

.....

.......

...

...

...

Main Step:

then stop and the current solution is optimal. Otherwise examine . If , then stop and the optimal solution is unbounded along the ray

where is the vector of zero except for a 1 at the kth position.

determine the index r is as follows;

Update the tableau by pivoting at . Update the basic and non basic variables where enters the basis and leaves the basis and repeat the main step.Identification of Different Terms in the Tableau

(i) is the vector of basic variables and is the vector of non basic variables

(ii) is the matrix under the slack variables

(iii) is the matrix consisting of the vectors under the non basic variables(iv) B and N are basic and non basic matrix

(v) is the vector of under the slack variables Rate of Change

is the rate of change of z as a function of the typical non basic variable

(ii) is the rate of change of basic variables as a function of the non-basic variable

is the rate of change of the objective function as a function of the right hand side vector b

(iv) is the rate of change of the basic variables as a function of b

(v)

(vi)

(vii) Interpretation of Entries in the Simplex TableauLet us consider the following typical simplex tableauz

RHS

Z10

Row 0

0I

Rows 1 through m

The tableau may be thought of as a representation of both the basic variables and the cost variable z in terms of the non basic variables

The non basic variables can therefore be thought of as independent variables where as and Z are the dependent variablesFrom row zero we have

Now, is the rate of change of z with respect to non-basic variable

In order to minimize z, we should increase if Also the basic variables can be represented in terms of non basic variables as follows

Now, , is the rate of change of the basic variables as a function of the non basic variable . In other words of is increased by 1 unit the basic variable decrease by unitsThe simplex tableau also gives us a convenient way of predicting the rate of change of the objective function and the value of the basic variables as a function of the right hand side vector

is the rate of change of the objective function as a function of the right hand side vector b

(iv) is the rate of change of the basic variables as a function of b

(v)

(vi)

(vii)

If the tableau corresponds to a degenerate basic feasible solution, then as a non basic variable increases at least one of the basic variables may become immediately negative destroying feasibility. In this case a change of basis is necessary to restore feasibility, leading to non-differentiability to the objective value as a function of Problem:

Subject to

Solution: Introducing the slack variables , the given problem can be written as the standard form

The system of equation can be written as the matrix form as followsMinimize z = CxSubject toAx = b

where C= (1, 1, -4, 0, 0, 0) ,

Since , thus we can choose our initial basis as and we indeed have . This gives the following tableauIteration 1

zX1X2X3X4X5X6RHC

z1-1-140000

X401121009

X5011-10102

X60-1110014PR

PC

Here we choose to enter the basis because

Now,Basic Variables x3()

(ratio or Intercept)

x4x5x62-119244.5-2 (Ignore)4 (Minimum)

We are interested only in the nonnegative ratios because they represent the direction of increase x3. The minimum non negative ratio provides the value of the entering variable x3 in the new solution namely x3 = 4. The corresponding value of the objective function will be -16. Next we determine the leaving variable from among the current basic variables x4, x5 and x6 that should be forced to zero when x3 enters. Here x6 is the leaving variable because x6 is associated with the smallest nonnegative ratio ie, . Replacing the leaving variable x6 with entering variable x3 produces the new basic solution (x4, x5 and x3). The computation of the new basic solution is based on the Gauss-Jordan row operation. The Gauss-Jordan row operation is given by(i) Pivotal RowNew pivotal row = Current pivotal row/Pivot element(ii) All other rows including z

The new pivotal row is given below;z x1 x2 x3 x4 x5 x6Solution

z

x4x5x3

0

-1 1 1 0 0 1

4 New Pivotal Row

Type ii computations are applied to the remaining rows as follows

(1) Zero Row

Current zero Row1-1-140000

04-4-400-4-16

New Zero Row13-5000-4-16

2. X4 Row

Current X4 Row01121009

02-2-200-2-8

New X4 Row03-1010-21

3. X5 row

Current x5 Row011-10102

0-1110014

New x5 Row00200116

Iteration 2

zX1X2X3X4X5X6RHC

z13-5000-4-16

X403-1010-21PR

X500200116

X30-1110014

Pivotal Column

Observe that the new tableau has the same properties as the starting tableau. When we set the non basic variables x1, x2 and x6 to zero, the solution column automatically yields the new basic solution ( x4=1, x5=6 and x3=4) together with the corresponding new value of z is -16.The last tableau shows that it is not optimal because the non basic variable x1 has positive coefficient in the z-rows. An increase in x1 is advantages because it will decrease the value z. Thus x1 is the entering variable.Next we will determine the leaving variable by computing the ratio of the constraints with the nonnegative direction of the entering variable. Basic Variablesx1 9Solution) (ratio or Intercept)

x4x5x330-11641/3 (minimum)6/0 (undefined) Ignore4/-1 = -4 (Ignore)

The computations show that x4 leaving variable and x1 will enter the new basic solution as the value 1/3 (the smallest non-negative ratio). The corresponding increase in z is (-3X1/3)=-1 yielding new z =-16-1 =-17The pivotal row is given by x4-row and pivotal column is associated with x1. New pivotal row = current x4-row/3 z x1 x2 x3 x4 x5 x6RHS

z -16

x1x5x30

1 -1/3 0 1/3 0 -2/3

1 /3(Pivotal Row)

The remaining rows are obtained by using Gauss-Jordan row operation technique as follows(1) Zero Row

Current zero Row13-50000-16

0-310-102-1

New Zero Row10-40-10-2-17

2. X5 Row

Current X5 Row00200116

00000000

New X5 Row00200116

3. X3 row

Current x3 Row0-1110014

01-1/301/30-2/31/3

New x3 Row002/311/301/313/3

These computations produce the following tableauIteration 3z x1 x2 x3 x4 x5 x6RHS

z10 -4 0 -1 0 -2-17

x1x5x30001 -1/3 0 1/3 0 -2/30 2 0 0 1 10 2/3 1 1/3 0 1/31/3 613/3

Pivotal Column)

Since for all non-basic variables, hence it is the optimal tableau. The optimal solution is(x1, x2, x3, x4, x5, x6) = (1/3, 0, 13/3, 0, 6, 0).The optimal value of the objective function is -17The basic matrix is given by

From iteration 2 we have

; ;

From Iteration 3 we have

;

; Example: Suppose a company produces both interior and exterior paints from two raw materials 1 and 2. The following table provides the basic data of the problem;Exterior Paint from per ton of Raw MaterialInterior Paint from Per Ton of Raw MaterialMaximum Daily Availability (tons)

Raw Material 1Raw Material 26142246

Profit per ton (in 1000 USD)54

A market survey restricts the maximum daily demand of interior paint to 2 tons. Additionally the daily demand for interior paint cannot exceed that of exterior paint by more than 1 ton. Determine the best product mix of interior and exterior paints using simplex method (matrix form) for which the daily profit will be maximum level.

Solution: Let the variable and indicate the quantity of exterior and interior paints to be produced. Here the objective function is given by

and the constraints are given by;

and

Now introducing slack variables the given problem can be written as the following standard form

which is equivalent to

That is Minimize z = CxAx=b

where, , ; ;

Since , thus we can choose our initial basis as and we indeed have . This gives the following tableauIteration 1zx1 x2 x3 x4 x5 x6RHS

z15 4 0 0 0 00

x3x4x5x600006 4 1 0 0 01 2 0 1 0 0-1 1 0 0 1 0 0 1 0 0 0 1 24 Pivotal row612

Pivotal column

Here we choose to enter the basis because

Now,Basic Variablesx1 ()

(ratio or Intercept)

X3x4x5x66(Pivotal Element)1-102461246-1 (Ignore)

(Ignore)

We are interested only in the nonnegative ratios because they represent the direction of increase x1. The minimum non negative ratio provides the value of the entering variable x1 in the new solution namely x1 = 4. The corresponding value of the objective function will be -20. Next we determine the leaving variable from among the current basic variables x3, x4, x5 and x6 that should be forced to zero when x1 enters. Here x3 is the leaving variable because x3 is associated with the smallest nonnegative ratio ie, Replacing the leaving variable x3 with entering variable x1 produces the new basic solution (x1, x4 x5, and x6). The computation of the new basic solution is based on the Gauss-Jordan row operation. The Gauss-Jordan row operation is given by(i) Pivotal RowNew pivotal row = Current pivotal row/Pivot element(ii) All other rows including z

The new pivotal row is given below;

zx1 x2 x3 x4 x5 x6Solution

z

x1x4x5x60

1 2/3 1/6 0 0 0

4 New Pivotal Row

Type 2 computations are applied to the remaining rows as follows1. z-rowCurrent z-row15400000

-(5) New Pivot row 0-5-10/3-5/6000-20

New z row 102/3-5/6000-20

2. x4-rowCurrent x4-row01201006

-(1) New Pivot row 0-1-2/3-1/6000-4

New x4- row 004/3-1/61002

3. x5-rowCurrent x5-row0-1100101

-(-1) New Pivot row 012/31/60004

New x5- row 005/31/60105

3. x6-row: The new x6-row remains the same as the current x6-row because its coefficient in the pivotal column is zero.All the computations are given below in tableau Iteration 2zx1 x2 x3 x4 x5 x6RHS

z10 2/3 -5/6 0 0 0-20

x1x4x5x600001 2/3 1/6 0 0 00 4/3 -1/6 1 0 00 5/3 1/6 0 1 00 1 0 0 0 1 42Pivotal row52

Pivotal column

Observe that the new tableau has the same properties as the starting tableau. When we set the non basic variables x2, and x3 to zero, the solution column automatically yields the new basic solution ( x1=4, x4=2, x5=5 and x6=2) together with the corresponding new value of z is -20.The last tableau shows that it is not optimal because the non basic variable x2 has positive coefficient in the z-rows. An increase in x2 is advantages because it will decrease the value z. Thus x2 is the entering variable.Next we will determine the leaving variable by computing the ratio of the constraints with the nonnegative direction of the entering variable. Basic Variables X2()(Solution) (ratio or Intercept)

X1X4X5X62/34/3Pivotal E5/31425263/2 (Minimum)32

The computations show that x4 leaving variable and x2 will enter the new basic solution as the value 3/2 (the smallest non-negative ratio). The pivotal row is given by x4-row and pivotal column is associated with x2. New pivotal row = current x4-row/4/3 zx1 x2 x3 x4 x5 x6RHS

z -20

x1x2x5x60

0 1 -1/8 3/4 0 0

3/2(Pivotal Row)

The remaining rows are obtained by using Gauss-Jordan row operation technique as follows1. z-rowCurrent z-row102/3-5/6000-20

-(2/3) New Pivot row 00-2/31/12-1/200-1

New z row 100-3/4-1/200-21

2. x1-rowCurrent x1-row012/31/60004

-(2/3) New Pivot row 00-2/31/12-1/200-1

New x1- row 0101/4-1/2003

3. x5-rowCurrent x5-row005/31/60105

-(5/3) New Pivot row 00-5/35/24-5/400-5/2

New x5- row 0003/8-5/4105/2

4. x6-row: Current x6-row00100012

-(1) New Pivot row 00-11/8-3/400-3/2

New x6- row 0001/8-3/4011/2

These computations produce the following tableauIteration 3zx1 x2 x3 x4 x5 x6RHS

z10 0 -3/4 -1/2 0 0-21

x1x2x5x600001 0 1/4 -1/2 0 0 0 1 -1/8 3/4 0 0 0 0 3/8 -5/4 1 0 0 0 1/8 -3/4 0 1 33/25/21/2

Since for all non-basic variables, hence it is the optimal tableau. The optimal solution is(x1, x2, x3, x4, x5, x6) = (3, 3/2, 5/2,).The optimal value of the objective function is -17The basic matrix is given by

From iteration 2 we have

; ;

From Iteration 3 we have

;

;

28