Ak7 Simplex Method
-
Upload
ankit-kumar -
Category
Documents
-
view
136 -
download
12
Transcript of Ak7 Simplex Method
Operations Research Unit 3
Sikkim Manipal University 39
Unit 3 Simplex Method
Structure
3.1. Introduction
3.2. Standard form of L.P.P
3.2.1 The standard form of the LPP
3.2.2 Fundamental Theorem of L.P.P.
3.3. Solution of L.P.P – Simplex method
3.3.1 Initial basic feasible solution of a LPP
3.3.2 To Solve problem by Simplex Method
3.4. The Simplex Algorithm
3.4.1 Steps
3.5. Penalty cost method or Big Mmethod
3.6. Two phase method
3.7. Maximisation – Examples
3.8. Summary
Terminal Questions
Answers to SAQs & TQs
3.1 Introduction The simplex method provides an efficient technique which can be applied for solving LPP of any
magnitude involving two or more decision variables. In this method the objective function used to
control the development and evaluation of each feasible solution to the problem.
The simplex algorithm is an iterative procedure for finding the optimal solution to a linear
programming problem. In the earlier methods, if a feasible solution to the problem exists, it is
located at a corner point of the feasible region determined by the constraints of the system. The
simplex method, according to its iterative search, selects this optimal solution from among the set
of feasible solutions to the problem. The efficiency of this algorithm is, because it considers only
those feasible solutions which are provided by the corner points, and that too not all of them. We
consider a minimum number of feasible solutions to obtain an optimal solution.
Operations Research Unit 3
Sikkim Manipal University 40
Learning Objectives:
After studying this unit, you should be able to understand the following
1. To write the standard form of LPP from the given hypothesis 2. Apply the simplex algorithm to the system of equations 3. Understand the big Mtechnique 4. Know the importance of the two phase method. 5. Formulate the dual from the primal (and vice versa).
3.2 The Standard Form Of LPP The characteristics of the standard form are:
1. All constraints are equations except for the nonnegativity condition which remain inequalities
(≥, 0) only.
2. The righthand side element of each constraint equation is nonnegative.
3. All variables are nonnegative.
4. The objective function is of the maximization or minimization type.
The inequality constraints can be changed to equations by adding or substracting the lefthand
side of each such constraints by a nonnegative variable. The nonnegative variable that has to
be added to a constraint inequality of the form ≤ to change it to an equation is called a slack
variable. The nonnegative variable that has to be substracted from a constraint inequality of the
form ≥ to change it to an equation is called a surplus variable. The right hand side of a constraint
equation can be made positive by multiplying both sides of the resulting equation by (1) wherever
necessary. The remaining characteristics are achieved by using the elementary transformations
introduced with the canonical form.
3.2.1 The Standard Form Of The LPP Any standard form of the L.P.P. is given by
Maximize or Minimize i xi C z n
1 i ∑ = =
Subject to: . m . .......... 2 , 1 i ) 0 b ( b S x a i i i j ij
n
1 j = ≥ = ± ∑
=
& xj ≥ 0, j = 1, 2, n.
S i ≥ 0, i = 1, 2, m.
Operations Research Unit 3
Sikkim Manipal University 41
3.2.2 Fundamental Theorem Of L.P.P. Given a set of m simultaneous linear equations in n unknowns/variables, n ≥ m, AX = b, with r(A)
= m. If there is a feasible solution X ≥ 0, then there exists a basic feasible solution.
Self Assessment Questions 1
State True / False
1. We add surplus variable for “≤” of constraint
2. The right hand side element of each constraint is nonnegative.
3.3 Solution Of The Linear Programming Program – Simplex Method Consider a LPP given in the standard form,
To optimize z = c1 x1 + c2 x2 + + cn xn Subject to
a11 x1 + a12 x2 + + an x n ± S1 = b1
a21 x1 + a22 x2 + + a2n xn ± S2 = b2
………………………………………………………………….
………………………………………………………………….
am1 x1 + am2 x2 + + amn xn ± Sm = bm
x1, x2, xn, S1, S2 , Sm ≥ 0.
To each of the constraint equations add a new variable called an artificial variable on the left hand side of every equation which does not contain a slack variable. Then every constraint
equation contains either a slack variable or an artificial variable.
The introduction of slack and surplus variables do not alter either the constraints or the objective function. So such variables can be incorporated in the objective function with zero coefficients. However, the artificial variables do change the constraints, since these are added only to one side i.e., to the left hand side of the equations. The new constraint equations so obtained is equivalent to the original equations if and only if all artificial variables have value zero. To guarantee such assignments in the optimal solutions, artificial variables are incorporated into the objective function with very large positive coefficient M in the minimization program and very large negative coefficient – M in the maximization program. These coefficients represent the penalty incurred in making an unit assignment to the artificial variable.
Thus the standard form of LPP can be given as follows : Optimize Z = C T X
Operations Research Unit 3
Sikkim Manipal University 42
Subject to AX = B,
and X ≥ 0
Where X is a column vector with decision, slack, surplus and artificial variables, C is the vector corresponding to the costs, A is the coefficient matrix of the constraint equations and B is the column vector of the righthand side of the constraint equations.
Example 1: Consider the LPP Minimize Z = 4x1 + x2 Subject to 3x1 + x2 = 3
4x1 + 3x2 ≥ 6
x1 + 2x2 ≤ 3,
x1, x2 ≥ 0
Rewriting in the standard form, Minimize Z = 4x1 + x2 + 0.S1 + 0.S2 + M (A1 + A2) Subject to 3x1+ x2 + A1 = 3
4x1 + 3x2 – S1 + A2 = 6 x1 + 2x2 + S2 = 3 x1, x2, S1, S2, A1, A2 ≥ 0
When S2 is slack variable, S1 is a surplus variable and A1 & A2 an artificial variables.
Representing this program in matrixes, we have
Minimize Z = (4 1 0 0 M M)
2
1
2
1
2
1
A A S S x x
Subject to
−
0 0 1 0 2 1 1 0 0 1 3 4 0 1 0 0 1 3
2
1
2
1
2
1
A A S S x x
=
3 6 3
and
2
1
2
1
2
1
A A S S x x
≥ 0
Operations Research Unit 3
Sikkim Manipal University 43
3.3.1 Initial basic feasible solution of a LPP Consider a system of m equations in n unknowns x1, x2 xn,
a11 x1 + a12 x2 + + a1n xn = b1 a21 x1 + a22 x2 + + a2n xn = b2
………………………………………………………
………………………………………………………
am1 x1 + am2 x2 + + amn xn = bn Where m ≤ n.
To solve this system of equations, we first assign any of n – m variables with value zero. These variables which have assigned value zero initially are called the nonbasic variables, the remaining variables are called basic variables. Then the system can be solved to obtain the values of the basic variables. If one or more values of the basic variables are also zero valued, then solution of the system is said to degenerate. If all basic variable, have nonzero values, then the solution is called a nondegenerate solution.
A basic solution is said to be feasible, if it satisfies all constraints.
Example 2: Consider the system of equations 2x1 + x2 – x3 = 2 3x1 + 2x2 + x3 = 3
where x1, x2, x3 ≥ 0.
Since there are 3 variables and two equations, assign 3 – 2 = 1 variable, the value zero initially.
Case (i): Let x3 = 0 i.e., x3 be a nonbasic variable, then equation becomes 2x1 + x2 = 2 3x1 + 2x2 = 3
Solving, we get x1 = 1, x2 = 0.
∴ The solution degenerates, but is feasible.
Case (ii) : Let x2 be a nonbasic variable i.e., x2 = 0, then solution is x1 = 1 and x3 = 0 Here also the solution degenerates but feasible.
Case (iii) : Let x1 be nonbasic i.e., x1= 0
Solution is x2 = 3 1 , x3 = – 3
1 .
The solution nondegenerates, but is not feasible.
Operations Research Unit 3
Sikkim Manipal University 44
Consider a LPP given in the standard form Optimize Z = C T X Subject to AX = B,
X ≥ 0.
The initial solution of such a problem denoted by X0, is obtained by treating all decision and surplus variables as nonbasic variables i.e., they have assigned value zero, all slack and, artificial variables as basic variables and have assigned values which are on R.H.S. of the corresponding constraint equations.
3.3.2 To Solve problem by Simplex Method
1. Introduce stack variables (Si’s) for “ ≤” type of constraint.
2. Introduce surplus variables (Si’s) and Artificial Variables (Ai) for “ ≥” type of constraint.
3. Introduce only Artificial variable for “=” type of constraint.
4. Cost (Cj) of slack and surplus variables will be zero and that of Artificial variable will be “M”
Find Zj Cj for each variable.
5. Slack and Artificial variables will form Basic variable for the first simplex table. Surplus
variable will never become Basic Variable for the first simplex table.
6. Zj = sum of [cost of variable x its coefficients in the constraints – Profit or cost coefficient of
the variable].
7. Select the most negative value of Zj Cj. That column is called key column. The variable
corresponding to the column will become Basic variable for the next table.
8. Divide the quantities by the corresponding values of the key column to get ratios select the
minimum ratio. This becomes the key row. The Basic variable corresponding to this row will
be replaced by the variable found in step 6.
9. The element that lies both on key column and key row is called Pivotal element.
10. Ratios with negative and “α” value are not considered for determining key row.
11. Once an artificial variable is removed as basic variable, its column will be deleted from next
iteration.
12. For maximisation problems decision variables coefficient will be same as in the objective
function. For minimization problems decision variables coefficients will have opposite signs
as compared to objective function.
Operations Research Unit 3
Sikkim Manipal University 45
13. Values of artificial variables will always is – M for both maximisation and minimization
problems.
14. The process is continued till all Zj Cj ≥ 0.
Self Assessment Questions 2 State True / False
1. A basic solution is said to be a feasible solution if it satisfies all constraints.
2. If one or more values of basic variable are zero then solution is said to be degenerate.
3.4 The Simplex Algorithm To test for optimality of the current basic feasible solution of the LPP, we use the following algorithm called simplex algorithm. Let us also assume that there are no artificial variable existing in the program.
3.4.1 Steps 1) Locate the most negative number in the last (bottom) row of the simplex table, excluding that
of last column and call the column in which this number appears as the work column. 2) Form ratios by dividing each positive number in the work column, excluding that of the last
row into the element in the same row and last column. Designate that element in the work column that yields the smallest ratio as the pivot element. If more than one element yields the same smallest ratio choose arbitrarily one of them. If no element in the work column is non negative the program has no solution.
3) Use elementary row operations to convert the pivot element to unity (1) and then reduce all other elements in the work column to zero.
4) Replace the x variable in the pivot row and first column by xvariable in the first row pivot column. The variable which is to be replaced is called the outgoing variable and the variable that replaces is called the incoming variable. This new first column is the current set of basic variables.
5) Repeat steps 1 through 4 until there are no negative numbers in the last row excluding the last column.
6) The optimal solution is obtained by assigning to each variable in the first column that value in the corresponding row and last column. All other variables are considered as nonbasic and have assigned value zero. The associated optimal value of the objective function is the number in the last row and last column for a maximization program but the negative of this number for a minimization problem.
Operations Research Unit 3
Sikkim Manipal University 46
Examples: 3) Maximize z = x1+ 9x2 + x3
Subject to x1 + 2x2 + 3x3 ≤ 9
3x1 + 2x2 + 2x3 ≤ 15
x1, x2, x3 ≥ 0.
Rewriting in the standard form Maximize z = x1 + 9x2 + x3 + 0.S1 + 0.S2
Subject to the conditions x1 + 2x2 + 3x3 + S1 = 9 3x1 + 2x2 + 2x3 + S2 = 15
x1, x2, x3, S1, S2 ≥ 0. Where S1 and S2 are the slack variables. The initial basic solution is S1 = 9, S2 = 15
∴ X0 =
2
1 S S
, C0 =
0 0
The initial simplex table is given below :
x1 1
x2 9
x3 1
S1
0 S2
0 Ratio
S1 0 S2 0
1 3
2*2
3 2
1 0
0 1
9 15 2
9 = 4.5 ←
2 15 = 7.5
Zj – cj –1 –9 ↑
–1 0 0
Work column * – pivot element.
S1 – outgoing variable, x2 incoming variable.
Since there are three Zj – Cj which are negative, the solution is not optimal.
We choose the most negative of these i.e. – 9, the corresponding column vector x2 enters the basis replacing S1, since ratio is minimum. We use elementary row operations to reduce the pivot element to 1 and other elements of work column to zero.
First Iteration – The variable x1 becomes a basic variable replacing S1. The following table is obtained.
Operations Research Unit 3
Sikkim Manipal University 47
x1 x2 x3 S1 S2
1 9 1 0 0 X2 9
2 1 1
2 3
2 1 0
2 9
S2 0 2 0 – 1 – 1 1 6
2 9 0
2 25
2 9 0
2 81
Since all elements of the last row are nonnegative the optimal solution is obtained. The
maximum value of the objective function Z is 2 81 which is achieved for x2 = 2
9 S2 = 6 which
are the basic variables. All other variables are nonbasic.
4) Use Simplex method to solve the LPP
Maximize Z = 2x1 + 4x2 + x3 + x4 Subject to x1 + 3x2 + x4 ≤ 4
2x1 + x2 ≤ 3 x2 + 4x3 + x4 ≤ 3 x1, x2, x3, x4 ≥ 0
Rewriting in the standard form Maximize Z = 2x1 + 4x2 + x3 + x4 + 0.S1 + 0.S2 + 0.S3
Subject to x1 + 3x2 + x4 + S1 = 4 2x1 + x2 + S2 = 3 x2 + 4x3 + x4 + S3 = 3 x1, x2, x3, x4, S1, S2, S3 ≥ 0.
The initial basic solution is S1 = 4, S2 = 3, S3 = 3
∴X0 =
3
2
1
S S S
=
3 3 4
C0 =
0 0 0
Operations Research Unit 3
Sikkim Manipal University 48
The initial table is given by
X1 x2 x3 x4 S1 S2 S3 Ratio
2 4 1 1 0 0 0
S1 0 1 3* 0 1 1 0 0 4 3 4 ←
S2 0 2 1 0 0 0 1 0 3 1 3
S3 0 0 1 4 1 0 0 1 3 1 3
Zjcj – 2 – 4 – 1 – 1 0 0 0 0
↑
work column * pivot element
S1 is the outgoing variable, x2 is the incoming variable to the basic set.
The first iteration gives the following table :
x1 x2 x3 x4 S1 S2 S3 Ratio
2 4 1 1 0 0 0
x2 4 3 1 1 0
3 1
3 1 0 0
3 4
S2 0 3 5 0 0 –
3 1 –
3 1 1 0
3 5
S3 0 – 3 1 0 4*
3 2 –
3 1 0 1
3 5
12 5 ←
ZjCj – 3 2 0 – 1
3 1
3 4 0 0
3 16
↑
Work column
Operations Research Unit 3
Sikkim Manipal University 49
x3 enters the new basic set replacing S3, the second iteration gives the following table :
x1 x2 x3 x4 S1 S2 S3 Ratio
2 4 1 1 0 0 0
x2 4 3 1 1 0
3 1
3 1 0 0
3 4 4
S2 0 3 5 * 0 0 –
3 1 –
3 1 1 0
3 5 1←
x3 1 – 12 1 0 1
6 1 –
12 1 0
4 1
12 5
ZjCj – 4 3 0 0
6 1
4 5 0
4 1
4 23 1/2
↑
Work column
x1 enters the new basic set replacing S2, the third iteration gives the following table:
x1 x2 x3 x4 S1 S2 S3
2 4 1 1 0 0 0
x2 4 0 1 0 5 2
5 2 –
5 1 0 1
x1 2 1 0 0 – 5 1 –
5 1
5 3 0 1
x3 1 0 0 1 20 3 –
10 1
20 1
4 1
2 1
ZjCj 0 0 0 20 7
10 11
20 9
4 1
2 13
Since all elements of the last row are nonnegative, the optimal solution is Z = 2 13 which is
achieved for x2 = 1, x1 = 1, x3 = 2 1 and x4 = 0.
5) A manufacturing firm has discontinued production of a certain unprofitable product line.
This created considerable excess production capacity. Management is considering to
devote this excess capacity to one or more of three products: call them product 1, 2 and 3.
The available capacity on the machines which might limit output are given below :
Operations Research Unit 3
Sikkim Manipal University 50
Machine Type Available Time (in machine hours per week)
Milling Machine 250 Lathe 150 Grinder 50
The number of machinehours required for each unit of the respective product is given below :
Productivity (in Machine hours/Unit)
Machine Type Product 1 Product 2 Product 3 Milling Machine 8 2 3 Lathe 4 3 0 Grinder 2 – 1
The unit profit would be Rs. 20, Rs. 6 and Rs. 8 for products 1, 2 and 3. Find how much of
each product the firm should produce in order to maximize profit ?
Let x1, x2, x3 units of products 1, 2 and 3 are produced in a week.
Then total profit from these units is
Z = 20 x1 + 6 x2 + 8 x3
To produce these units the management requires
8x1 + 2x2 + 3x3 machine hours of Milling Machine
4x1 + 3x2 + 0 x3 machine hours of Lathe
and 2x1 + x3 machine hours of Grinder
Since time available for these three machines are 250, 150 and 50 hours respectively, we
have
8x1 +2x2 + 3x3 ≤ 250
4x1 + 3x2 ≤ 150
2x1 + x3 ≤ 50.
Obviously x1, x2, x3 ≥ 0
Thus the problem is to
Maximize Z = 20x1 + 6x2 + 8x3
Subject to 8x1 + 2x2 + 3x3 ≤ 250
4x1 + 3x2 ≤ 150
2x1 + x3 ≤ 50,
x1, x2, x3 ≥ 0.
Operations Research Unit 3
Sikkim Manipal University 51
Rewriting in the standard form,
Maximize Z = 20x1 + 6x2 + 8x3 + 0S1 + 0S 2 + 0S 3 Subject to 8x1 + 2x2 + 3x3 + S1 = 250
4x1 + 3x2 + S2 = 150
2x1 + x3 + S3 = 50,
x1, x2, x3, S1, S2, S 3 ≥ 0.
The initial basic solution is
X0 =
3
2
1
S S S
=
50 150 250
The initial simplex table is given by
x1 x2 x3 S1 S2 S3 Ratio
20 6 8 0 0 0
S1 0 8 2 3 1 0 0 250 31
8 250
=
S2 0 4 3 0 0 1 0 150 4
150 = 37.5
S3 0 2* 0 1 0 0 1 50 2 50 = 25 ←
ZJ – Cj – 20 – 6 – 8 0 0 0 0
↑
Work column * pivot element
x1 enters the basic set of variables replacing the variable s3. The first iteration gives the
following table:
x1 x2 x3 s1 s2 s3 Ratio
20 6 8 0 0 0
s1 0 0 2 – 1 1 0 – 4 50 2 50 = 25
Operations Research Unit 3
Sikkim Manipal University 52
s2 0 0 3* – 2 0 1 – 2 50 3 50
x1 20 1 0 2 1 0 0
2 1 25
Zj – Cj 0 – 6 2 0 0 10 500
↑
Work column * pivot element
x2 enters the basic set of variables replacing the variable s2. The second iteration gives the
following table:
x1 x2 x3 S1 S2 S3 Ratio
20 6 8 0 0 0
S1 0 0 0 3 1 1 –2/3 –
3 8
3 50 50
X2 6 0 1 – 3 2 0
3 1 –
3 2
3 50 –
X1 20 1 0 2 1 * 0 0
2 1 25 50
Zj –
Cj
0 0 – 2 0 2 6 600
↑
work column * pivot element.
x3 enters the basic set of variables replacing the variable x1. The third iteration yields the following
table:
x1 x2 x3 S1 S2 S3
20 6 8 0 0 0
S1 0 – 3 2 0 0 1 –
3 2 – 3 0
X2 6 3 4 1 0 0
3 1 0 50
X3 8 2 0 1 0 0 1 50
Zj – cj 4 0 0 0 2 8 700
Since all zj – cj ≥ 0 in the last row, the optimum solution is 700.
Operations Research Unit 3
Sikkim Manipal University 53
i.e., the maximum profit is Rs. 700/ which is achieved by producing 50 units of product 2 and
50 units of product 3.
3.4.2. Self Assessment Questions 3
State Yes / No
1. The key column is determined by Zj Cj row.
2. Pivotal element lies on the crossing of key column and key row
3. The –ve and infinite ratios are considered for determining key row.
3.5 Penalty Cost Method Or BigM Method Consider a L.P.P. when atleast one of the constraints is of the type ≥ or = . While expressing in
the standard form, add a non negative variable to each of such constraints. These variables are
called artificial variables. Their addition causes violation of the corresponding constraints, since
they are added to only one side of an equation, the new system is equivalent to the old system of
constraints if and only if the artificial variables are zero. To guarantee such assignments in the
optimal solution, artificial variables are incorporated into the objective function with large positive
coefficients in a minimization program or very large negative coefficients in a maximization
program. These coefficients are denoted by ±M.
Whenever artificial variables are part of the initial solution X0, the last row of simplex table will
contain the penalty cost M. The following modifications are made in the simplex method to
minimize the error of incorporating the penalty cost in the objective function. This method is called
Big Mmethod or Penalty cost method.
1) The last row of the simplex table is decomposed into two rows, the first of which involves those terms not containing M, while the second involves those containing M.
2) The Step 1 of the simplex method is applied to the last row created in the above modification and followed by steps 2, 3 and 4 until this row contains no negative elements. Then step 1 of simplex algorithm is applied to those elements next to the last row that are positioned over zero in the last row.
3) Whenever an artificial variable ceases to be basic, it is removed from the first column of the table as a result of step 4, it is also deleted from the top row of the table as is the entire column under it.
4) The last row is removed from the table whenever it contains all zeroes.
Operations Research Unit 3
Sikkim Manipal University 54
5) If non zero artificial variables are present in the final basic set, then the program has no solution. In contrast, zero valued artificial variables in the final solution may exist when one or more of the original constraint equations are redundant.
Examples: 6) Use Penalty Cost method to
Maximize z = 2x1 + 3x2 Subject to x1 + 2x2 ≤ 2
6x1 + 4x2 ≥ 24,
x1, x2 ≥ 0. Rewriting in the standard form, we have Maximize z = 2x1 + 3x2 + 0S1 + 0S2 – M A1
Subject to x1 + 2x2 + S1 = 2 6x1 + 4x2 – S2 + A1 = 24,
x1, x2, S1, S2, A1 ≥ 0. The initial simplex table is
x1 x2 S1 S2 A1
2 3 0 0 – M Ratio
S1 0 1* 2 1 0 0 2 1 2 = 2
A1 – M 6 4 0 –1 1 24 6 24
= 4
–2 –3 0 0 0 0
– 6M – 4M 0 M – M –24M
↑
Work column
The first iteration gives the following table :
x1 x2 S1 S2 A1
2 3 0 0 – M
x1 2 1 2 1 0 0 2
Ai – M 0 – 8 – 3 – 1 1 12
0 1 2 0 0 4
Operations Research Unit 3
Sikkim Manipal University 55
0 8M 6M 1M 0 – 12M
Since all elements of the last two rows are non negative, the procedure is complete. But
existence of non zero artificial variable in the basic solution indicates that the problem has no
solution.
3.5.1 Self Assessment Questions 4 State Yes / No
1. The value of artificial value is “M” 2. Artificial variables enters as Basic Variable.
3.6 Two Phase Method The drawback of the penalty cost method is the possible computational error that could result from assigning a very large value to the constant M. To overcome this difficulty, a new method is considered, where the use of M is eliminated by solving the problem in two phases. They are
Phase I: Formulate the new problem by eliminating the original objective function by the sum of the artificial variables for a minimization problem and the negative of the sum of the artificial variables for a maximization problem. The resulting objective function is optimized by the simplex method with the constraints of the original problem. If the problem has a feasible solution, the optimal value of the new objective function is zero (which indicates that all artificial variables are zero). Then we proceed to phase II. Otherwise, if the optimal value of the new objective function is non zero, the problem has no solution and the method terminates.
Phase II : Use the optimum solution of the phase I as the starting solution of the original problem. Then the objective function is taken without the artificial variables and is solved by simplex
method.
Examples: 7) Use the two phase method to
Maximise z = 3x1 – x2 Subject to 2x1 + x2 ≥ 2
x1 + 3x2 ≤ 2
x2 ≤ 4,
x1, x2 ≥ 0
Rewriting in the standard form,
Operations Research Unit 3
Sikkim Manipal University 56
Maximize z = 3x1 – x2 + 0S1 – MA1 + 0.S2 + 0.S3
Subject to 2x1 + x2 – S1 + A1 = 2
x1 + 3x2 + S2 = 2
x2 + S3 = 4,
x1, x2, S1, S2, S3, A1 ≥ 0.
Phase I : Consider the new objective,
Maximize Z* = – A1
Subject to 2x1 + x2 – S1 + A1 = 2
x1 + 3x2 + S2 = 2
x2 + S3 = 4,
x1, x2, S1, S2, S3, A1 ≥ 0.
Solving by Simplex method, the initial simplex table is given by
x1 x2 S1 A1 S2 S3
0 0 0 –1 0 0 Ratio
A1 –1 2* 1 –1 1 0 0 2 2 2 = 1 ←
S2 0 1 3 0 0 1 0 2 1 2 = 2
S3 0 0 1 0 0 0 1 4
–2 –1 1 0 0 0 –2
↑ Work column * pivot element
x1 enters the basic set replacing A1.
The first iteration gives the following table:
x1 x2 x1 A1 S2 S3
0 0 0 –1 0 0
X1 0 1
2 1
– 2 1
2 1 0 0 1
S2 0 0 2 5
2 1
– 2 1 1 0 1
S3 0 0 1 0 0 0 1 4
0 0 0 1 0 0 0
Operations Research Unit 3
Sikkim Manipal University 57
Phase I is complete, since there are no negative elements in the last row.
The Optimal solution of the new objective is Z* = 0.
Phase II: Consider the original objective function,
Maximize z = 3x1 – x2 + 0S1 + 0S2 + 0S3
Subject to x1 + 2
x 2 – 2
S 1 =1
2 5 x2 +
2
S 1 + S2 =1
x2 + S3 = 4
x1, x2, S1, S2, S3 ≥ 0
with the initial solution x1 = 1, S2 = 1, S3 = 4, the corresponding simplex table is
x1 x2 S1 S2 S3
3 –1 0 0 0 Ratio
x1 3 1
2 1
– 2 1 0 0 1
S2 0 0 2 5
2 1 *
1 0 1
2 1 1 = 2
S3 0 0 1 0 0 1 4
0 2 5 –
2 3 0 0 3
↑ Work column * pivot element
Proceeding to the next iteration, we get the following table:
x1 x2 S1 S2 S3
3 –1 0 0 0
x1 3 1 3 0 1 0 2
S1 0 0 5 1 2 0 2
S3 0 0 1 0 0 1 4
0 10 0 3 0 6
Operations Research Unit 3
Sikkim Manipal University 58
Since all elements of the last row are non negative, the current solution is optimal.
The maximum value of the objective function Z = 6 which is attained for x1 = 2, x2 = 0.
8) Maximize z = 3x1 + 2x2,
subject to 2x1 + x2 ≤ 2,
3x1 + 4x2 – S2 + A1 ≥ 12,
x1, x2 ≥ 0.
Rewriting in the standard form,
Maximize z = 3x1 + 2x2 + 0S1 + 0.S2 – MA1
Subject to 2x1 + x2 + S1 = 2
3x1 + 4x2 – S2 + A1 = 2
x1, x2, S1, S2, A1 ≥ 0.
Solving by two phase method.
Phase I : Consider the new objective function
Maximize z* = – A1
Subject to 2x1 + x2 + S1 =2
3x1 + 4x2 – S2 + A1 = 12,
x1, x2, S1, S2, A1 ≥ 0.
The initial Simplex table is given by
x1 x2 S1 S2 A1 Ratio
0 0 0 0 –1
S1 0 2 1* 1 0 0 2 1 2 = 2
A1 – 1 3 4 0 –1 1 12 4 12 = 3
–3 – 4 0 1 0 –12
↑ Work column
Operations Research Unit 3
Sikkim Manipal University 59
The first iteration gives the following table :
x1 x2 S1 S2 A1
0 0 0 0 –1
X2 0 2 1 1 0 0 2
A1 – 1 – 5 0 – 4 – 1 1 4
5 0 4 1 0 – 4
Since all elements of the last row an non negative, the procedure is complete.
But the existence of non zero artificial variable in the basic set indicates that the problem has no solution. 3.7 Minimization Examples Example 10 Minimize = Z = 3x1 + 8x2 Subject to
x1 + x2 = 200
x1 ≥ 80
x2 ≤ 60
x1 , x2 ≥ 0
Solution
In a standard form
Minimize Z = 3x1 + 8x2 + MA1 + OS1 + MA2 + OS2
Subject to
x1 + x2 +A1 = 200
x1 – S1 + A2 = 80
x2 + S2 = 60
S1, S2, A1, A2 ≥ 0
Simplex Table 1
Cj 3 8 0 0 M M
C.B B.V x1 x2 S1 S2 A1 A3 Qty Ratio
M A1 1 1 0 0 1 0 200 200
M A2 1
P.E
0 1 0 0 0 80 80 ← K R
Operations Research Unit 3
Sikkim Manipal University 60
0 S2 0 1 0 1 0 1 60 α
Zj Cj 2M +3 ↑ K C M + 8 M 0 0 0
Simplex Table 2
Cj 3 8 0 0 M
C.B B.V x1 x2 S1 S2 A1 Qty Ratio Transformation
M A1 0 1 1 0 1 120 120 R1 1 = R1R2
1
3 x1 1 0 1 0 0 80 α R2 1 = R2
0 S2 0 1
P.E
0 1 0 60 60 ← K
R R3
1 = R3
Zj Cj 0 M + 8↑
K C
M +
3 0 0
Simplex Table 3
Cj 3 8 0 0
C.B B.V x1 x2 S1 S2 A1 Qty Ratio Transformation
M A1 0 0 1
P.E
1 1 60 60 R1
1 = R1
3 x1 1 0 1 0 0 80 ve R2 1 = R2
8 x2 0 1 0 1 0 60 α R3 1 = R3 – R1
1
Zj Cj 0 0 M + 3 ↑
KC M 8 0 0
Simplex Table 4
Cj 3 8 0 0
C.B B.V x1 x2 S1 S2 Qty Ratio Transformation
0 S1 0 0 1 1 60 ve R1 1 = R1
3 x1 1 0 0 1 140 ve R2 1 = R2 + R1
1
8 x2 0 1 0 1
P.E
60 80 ← K
R R3
1 = R1 1
Zj Cj 0 0 0 5
Simplex Table 5
Operations Research Unit 3
Sikkim Manipal University 61
Cj 3 8 0 0
C.B B.V x1 x2 S1 S2 Qty Ratio Transformation
0 S1 0 1 1 0 120 R1 1 = R1 + R3
1
3 x1 1 1 0 0 200 R2 1 = R2 + R3
1
0 S2 0 1 0 1 60 R3 1 = R3
Zj Cj 0 4 0 0
Since all Zj Cj ≥ 0, the optimum solution is x1 = 200 x2 = 0
Min Z = 60
3.8. Summary In this unit we solved the L.P.P by simplex method. The constraints for which slack, surplus and
artificial variables to be introduced and the method of solving L.P.P is explained with examples.
Terminal Questions
1. Maximize z = 3x1 – x2
Subject to2x1 + x2 ≥ 2
x1 + 3x2 ≤ 3
x2 ≤ 4,
x1, x2 ≥ 0.
2. Minimize Z = 6x1 + 7x2 Subject to the constraints
x1 + 3x2 ≥ 12
3x1 + x2 ≥ 12
x1 + x2 ≥ 8
x1 + x2 ≥ 0
Answers To Self Assessment Questions Self Assessment Questions 1
1. False 2. True
Self Assessment Questions 2 1. True 2. True