Operations Research - CH - Iii
Operations Research - CH - Iii
CHAPTER III
LINEAR PROGRAMMING
SIMPLEX METHOD
INTRODUCTION
The graphical method to solving LPPs provides fundamental
concepts for fully understanding the LP process. However,
the graphical method can handle problems involving only
two decision variables (say X1 and X2).
The simplex method is an ITERATIVE or “step by step”
method or repetitive algebraic approach that moves
automatically from one basic feasible solution to another
basic feasible solution improving the situation each time
until the optimal solution is reached at.
Note: The simplex method starts with a corner that is in
the solution space or feasible region and moves to
another corner the solution space improving the value of
the objective function each time until optimal solution is
reached at the optimal corner.
INTRODUCTION
Scope of solution of LPP by simplex method
Following types of problems are solved by
simplex method:
Maximize Z with inequalities of constraints in “<
“form.
Minimize Z with inequalities of constraints in
“>“form.
Maximize Z with inequalities of constraints in
“>“form.
Maximize Z or Minimize Z with
inequalities of constraints in “< “, “>“or
“=” form
MAXIMIZATION PROBLEMS
Maximize Z with inequalities of constraints in
“< “form
Example: Solve the problem using the simplex approach
Max.Z=300x1 +250x2
Subject to:
2x1 + x2 < 40 (Labor )
x1+3x2 < 45 (Machine)
x1 < 12 (Marketing)
x 1, x 2 > 0
Solution
Step 1
Formulate LPP Model
Step 2
Standardize the problem, i.e convert constraint inequality into
equality form by introducing a variable called Slack variable.
MAXIMIZATION PROBLEMS
Slack Variables:
A slack variable(s) is added to the left hand side of a <
constraint to covert the constraint inequality in to
equality. The value of the slack variable shows unused
resource.
Step 3
Obtain the initial simplex tableau
To represent the data, the simplex method uses a table called the
simplex table or the simplex matrix.
==> In constructing the initial simplex tableau, the search for of
the optimal solution begins at the origin. Indicating that nothing
can be produced;
Thus, first assumption, No production implies that x =0 and x =0
1 2
MAXIMIZATION PROBLEMS
Cj 300 250 0 0 0
SV Q
X1 X2 S1 S2 S3
0 S1 2 1 1 0 0 40
0 S2 1 3 0 1 0 45
0 S3 1 0 0 0 1 12
Zj 0 0 0 0 0 0
Cj - Zj 300 250 0 0 0
MAXIMIZATION PROBLEMS
Step 4:
Choose the “incoming” or “entering” variables
Note: The entering variable is the variable that has
the most positive value in the Cj - Zj row also
called as indicator row. Or the entering variable
is the variable that has the highest contribution
to profit per unit.
X1 in our case is the entering variable
The column associated with the entering
variable is called key or pivot column ( X1
column in our case )
MAXIMIZATION PROBLEMS
Construct the initial simplex tableau
Cj 300 250 0 0 0
SV Q
X1 X2 S1 S2 S3
0 S1 2 1 1 0 0 40
0 S2 1 3 0 1 0 45
0 S3 1 0 0 0 1 12
Zj 0 0 0 0 0 0
Cj - Zj 300 250 0 0 0
MAXIMIZATION PROBLEMS
Step 5:
Choose the “leaving “or “outgoing” variable
==> In this step, we determine the variable that will leave the
solution for X1 (or entering variable)
Note: The row with the minimum or lowest positive (non-negative)
replacement ratio shows the variable to leave the solution.
Replacement Ratio (RR) = Solution Quantity (Q)
Corresponding values in pivot column
Note: RR>0
Cj 300 250 0 0 0
SV Q
X1 X2 S1 S2 S3
0 S1 2 1 1 0 0 40
0 S2 1 3 0 1 0 45
0 S3 1 0 0 0 1 12
Zj 0 0 0 0 0 0
Cj - Zj 300 250 0 0 0
MAXIMIZATION PROBLEMS
Step 6:
Repeat step 3-5 till optimum basic feasible solution
is obtained.
Or: repeat step 3-5 till no positive value occurs in
the Cj - Zj row.
Cj 300 250 0 0 0
SV Q
X1 X2 S1 S2 S3
0 S1 0 1 1 0 -2 16 R’3 = R3 /1
0 S2 0 3 0 1 -1 33 R’2 = -1*R’3 + R2
Cj - Zj 0 250 0 0 -300
MAXIMIZATION PROBLEMS
Third and Final simplex tableau
Cj - Zj 0 0 0 -250/3 -650/3
MAXIMIZATION PROBLEMS
Exercise: A Juice Company has available two kinds of food
Juices: Orange Juice and Grape Juice. The company
produces two types of punches: Punch A and Punch B. One
bottle of punch A requires 20 liters of Orange Juice and 5
liters of Grape Juice.1 Bottle of punch B requires 10 liters
of Orange Juice and 15 liters of Grape Juice.
From each of bottle of Punch A a profit of $4 is made and
from each bottle of Punch B a profit of $3 is
made .Suppose that the company has 230 liters of Orange
Juice and 120 liters of Grape Juice available
Required:
a) Formulate this problem as a LPP
b) How many bottles of Punch A and Punch B the company
should produce in order to maximize profit? (Using the
simplex method)
c) What is this maximum profit?
MAXIMIZATION PROBLEMS
Final Simplex tableau
Cj 4 3 0 0
SV Q Therefore,
X1 X2 S1 S2 X1 =9, X2 =5,
and Max Z = 51
4 X1 1 0 3/50 -1/25 9
3 X2 0 1 -1/50 2/25 5
Zj 4 3 0.12 0.08 51
Cj - Zj 0 0 -0.12 -0.08
MAXIMIZATION PROBLEMS
Exercise: Solve the following LPPs using simplex method
Answer:
Answer:
x1=50, x2 =0, s1 =0 , s2=50
x1=2, x2 =6, s1 =0 , s2=0
and MaxZ=$36
and MaxZ=$1,000
MINIMIZATION PROBLEMS
Minimize Z with inequalities of
constraints in “> “form
There are two methods to solve
minimization LP problems:
1. Direct method/Big M-method/
Using artificial variables
2. Conversion method
Minimization by maximizing the dual
MINIMIZATION PROBLEMS
Surplus Variable (-s):
A variable inserted in a greater than or equal to
constraint to create equality. It represents the amount of
resource usage above the minimum required usage.
Surplus variable is subtracted from a > constraint in the
process of converting the constraint to standard form.
Neither the slack nor the surplus is negative value. They
must be positive or zero.
Artificial variable (A):
Artificial variable is a variable that has no meaning in a
physical sense but acts as a tool to create an initial
feasible LP solution.
Note: To put into standard form
< Add a slack variable
= Add an artificial variable
> Subtract a surplus variable and add a slack variable
MINIMIZATION PROBLEMS
Big M-method /Charnes Penalty Method/
The Big-M Method is a method which is used in removing
artificial variables from the basis .
In this method; we assign coefficients to artificial
variables, undesirable from the objective function point
of view.
If objective function Z is to be minimized, then a very
large positive price (called penalty) is assigned to each
artificial variable.
Similarly, if Z is to be maximized, then a very large
negative price (also called penalty) is assigned to each
of these variables.
Following are the characteristics of Big-M Method:
M A1 20 15 -1 0 1 0 100 5
M A2 2 3 0 -1 0 1 15 7.5
25-22M 30-18M M M 0 0
Cj - Zj
MINIMIZATION PROBLEMS
Big M-method /Charnes Penalty Method/
Note:
Once an artificial variable has left the basis, it
has served its purpose and can therefore be
removed from the simplex tableau. An artificial
variable is never considered for re-entry into the
basis.
MINIMIZATION PROBLEMS
Second simplex tableau
Cj 25 30 0 0 M
SV Q
X1 X2 S1 S2 A2
RR
25 X1 1 ¾ -1/20 0 0 5
20/3
M A2 0 3/2 1/10 -1 1 5
10/3
Zj 25 75/4+3/2M -5/4+1/10M -M M 125+5M
Cj - Zj 0 45/4-3/2M 5/4-1/10M M 0
MINIMIZATION PROBLEMS
Second simplex tableau
Cj 25 30 0 0 M
SV Q
X1 X2 S1 S2 A2
RR
25 X1 1 ¾ -1/20 0 0 5
20/3
M A2 0 3/2 1/10 -1 1 5
10/3
Zj 25 75/4+3/2M -5/4+1/10M -M M 125+5M
Cj - Zj 0 45/4-3/2M 5/4-1/10M M 0
MINIMIZATION PROBLEMS
Third simplex tableau
Cj 25 30 0 0
SV Q
X1 X2 S1 S2
25 X1 1 0 -1/10 ½ 5/2
Note:
As long as an “A” variable is available in the solution variable
column, the solution is infeasible.
Exercise Use the penalty (Big-M) method to solve the
following LPP
Min Z=5x1 +3x2
Subject to: Answer:
2x1+4x2 < 12 2xMinZ=23
X1=4, X 2=1, S1=0, S2=12 and 1+ 2x2 =
10
5x1+ 2x2 > 10
x1, x2 >0
SPECIAL CASES IN SIMPLEX METHOD
1. Mixed constraints
Example
Max Z=6x1 +8x2
Subject to:
x2 < 4
x1+ x2 = 9
6x1+ 2x2 >24
x1, x2 >0
SPECIAL CASES IN SIMPLEX METHOD
1. Mixed constraints
Example
Max Z=6x1 +8x2
Subject to:
x2 < 4
x1 + x2 = 9
6x1+ 2x2 >24
x1 , x 2 >0
Standard form
Max.Z=6x1 +8x2 + 0 s1 +0 s2+ 0 s3-M A2- M A3
St:
x2 + s1 = 4
x1+ x2 + A2 = 9
6x1+2x2 - s3 + A3 =24
All Variables >0
SPECIAL CASES IN SIMPLEX
METHOD
Initial simplex tableau
Cj 6 8 0 0 -M -M
SV Q
X1 X2 S1 S3 A2 A3
Ans: At
the 4th
0 S1 0 1 1 0 0 0 4 tableau:
X1 =5 ,X2
-M A2 1 1 0 0 1 0 9 =4 ,S3
=14 and
-M A3 6 2 0 -1 0 1 24 MaxZ=62
7M+6 3M+8 0 -M 0 0
Cj - Zj
SPECIAL CASES IN SIMPLEX METHOD
2. Two incoming variables / Or Tie for entering
variables/
12 12 0 0
Cj - Zj
SPECIAL CASES IN SIMPLEX
METHOD
Example (a tie between Xi and Si )
Cj
SV Q
X1 X2 S1 S3
12 0 12 0
Cj - Zj
SPECIAL CASES IN SIMPLEX
METHOD
Example (a tie between slack or surplus variables)
Cj
SV Q
X1 X2 S1 S3
0 3 12 12
Cj - Zj
SPECIAL CASES IN SIMPLEX METHOD
3. Infeasibility
A situation with no feasible solution may exist
if the problem was formulated improperly.
Infeasibility comes about when there is no
solution that satisfies all of the problem’s
constraints.
In the simplex method, an infeasible solution is
indicated by looking at the final tableau .In
it, all Cj - Zj row entries will be the proper
sign to imply optimality, but an artificial
variable (A) will still be in the solution mix.
SPECIAL CASES IN SIMPLEX METHOD
Infeasibility
Cj 5 8 0 0 M
SV X1 X2 S1 S2 A2 Q
5 X1 1 1 -2 3 0 200
8 X2 0 1 1 2 0 100
M A2 0 0 0 -1 1 20
Zj 5 8 -2 31-M M 1,800+200M
Cj - Zj 0 0 2 M-31 0
SPECIAL CASES IN SIMPLEX METHOD
4. Unbounded Solutions
No finite solution may exist in problems that are
not bounded .This means that a variable can be
infinitely large without violating a constraint.
In the simplex method, the condition of
unboundedness will be discovered prior to reaching
the final tableau. We will note the problem when
trying to decide which variable to remove from the
solution mix.
The procedure in unbounded solution is to divide
each quantity column number by the corresponding
pivot column number. The row with the smallest
positive ratio is replaced. But if the entire ratios
turn out to be negative or undefined, it indicates
that the problem is unbounded.
SPECIAL CASES IN SIMPLEX METHOD
Unbounded Solutions
Example: Maximization Case
Cj 6 9 0 0
SV X1 X2 S1 S2 Q
RR
9 X2 -1 1 2 0 30 30/-1 =-30
0 S2 -2 0 -1 1 10 10/-2 = -5
Zj -9 9 18 0 270
Cj - Zj 15 0 -18 0
SPECIAL CASES IN SIMPLEX METHOD
5. Degeneracy
If there is a tie for the smallest ratio, this is a signal that
degeneracy exists. Degeneracy can occur right in the first (initial
tableau).This normally happens when the number of constraints
is less than the number of variables in the objective function.
Problem can be overcome by trial and error method.
Degeneracy could lead to a situation known as cycling, in
which the simplex algorithm alternatives back and forth
between the same non-optimal solutions, i.e, it puts a new
variable in, then takes it out in the next tableau, puts it back
in ,and so on.
One simple way of dealing with the issue is to select either
row (S2 or S3 in this case) arbitrary. If we are unlucky and
cycling does occur, we simply go back and select the other
row.
Remark
When there is a tie between a slack and artificial variable to
leave the basis, the preference shall be given to artificial
variable to leave the basis and there is no need to apply the
procedure for resolving such cases.
SPECIAL CASES IN SIMPLEX METHOD
Degeneracy
Example
5 8 2 0 0 0
Cj
Q
SV X1 X2 X3 S1 S2 S3 RR
8 X2 1/4 1 1 -2 0 0 10 10/1/4=40
Zj 2 8 8 16 0 0 80
C j - Zj 3 0 -6 -16 0 0
SPECIAL CASES IN SIMPLEX METHOD
6. Multiple Optimal Solutions
Multiple optimal solutions exist when non-basic variable
contains zero on its Cj - Zj row.
Example:
Maximization problem
Cj 3 2 0 0
SV X1 X2 S1 S2 Q
2 X2 3/2 1 1 0 6
0 S2 1 0 1/2 1 3
Zj 3 2 2 0 12
Cj - Zj 0 0 -2 0
SPECIAL CASES IN SIMPLEX METHOD
6. Multiple Optimal Solutions
Multiple optimal solutions exist when non-basic variable
contains zero on its Cj - Zj row.
Example:
Maximization problem
Cj 3 2 0 0
MaxZ=3X1+2X2
SV X1 X2 S1 S2 Q
X1=0, X2=6, S2=3
and MaxZ=12
2 X2 3/2 1 1 0 6
or
Cj - Zj 0 0 -2 0
END OF THE CHAPTER
THANK YOU!