Presentation 2 - Part II
Presentation 2 - Part II
04/06/2025 1
Session Objectives
• Up on completion of this section, the learner will be able t:
Define simplex approach and concepts in simplex approach
Standardize LP models
Differentiate between slack, surplus and artificial variables
Solve both maximization and minimization problems using
simplex approach
Explain special cases in simplex method and how to handle them
04/06/2025 2
2.7.The Simplex Method
• The graphical approach for solving LPPs is restricted to problems with
only two decision variables.
– When the number of variables to deal with increase another method
is required to be used.
• An efficient method for solving LPPs with more than two variables is
called the simplex method, or iterative or step by step method.
• It was developed by George B. Datzing in 1947.
• It is an algebraic procedure which starts with a feasible solution that is
not optimal and systematically moves from one feasible solution to
another until an optimal solution is found.
04/06/2025 3
Key terms in Simplex method
• Basic Variables
– These are the variables that are part of the solution and are non-zero.
– They correspond to the columns in the simplex tableau that have a
pivot element in the current basic feasible solution.
– The number of basic variables equals the number of constraints in the
problem.
• Non-Basic Variables
– These variables are set to zero in the current solution and are not
included in the basis.
– The number of non-basic variables is equal to the total number of
variables minus the number of constraints.
04/06/2025 4
Cont`d…
• Pivot Element
– The pivot element is a specific value in the simplex tableau that is
selected during the pivot operation.
– It is used to update the tableau and effectively change the basis of
the linear programming problem, which in turn updates the basic
and non-basic variables.
• Pivot column
– The pivot column is the column in the Simplex tableau associated
with the entering variable.
– It is selected based on the objective function's coefficients and
represents the variable that will be introduced into the solution set.
04/06/2025 5
Cont`d…
• Pivot Row
– The pivot row is the row in the Simplex tableau that intersects with the
pivot column (the column corresponding to the entering variable) at the
pivot element.
– The pivot row is selected based on which basic variable will leave the
basis when the entering variable is introduced.
• Iteration
– refers to a single cycle of updating the Simplex tableau to move from
one feasible solution to another, with the goal of improving the
objective function.
– Each iteration involves several key steps, including choosing the
entering and leaving variables, performing the pivot operation, and
04/06/2025
updating the tableau. 6
Cont`d…
• Degeneracy
– A situation where more than one basic feasible solution corresponds
to the same vertex of the feasible region.
– It may lead to multiple optimal solutions or cycling in the Simplex
Method.
• Unbounded Solution
– A situation where the objective function can be improved indefinitely
without bound.
– Indicates that the feasible region is open in the direction of
improvement, implying no optimal solution exists.
04/06/2025 7
Cont`d…
• Infeasibility
– Occurs when no solution satisfies all constraints of the linear
programming problem.
– Indicates that the problem has no feasible solution.
• Optimal Solution
– The best solution that maximizes or minimizes the objective function
while satisfying all constraints.
– The Simplex Method iterates until it reaches the optimal solution.
04/06/2025 8
Cont`d…
• Simplex Tableau
– A tabular representation of the linear programming problem used to
perform calculations and track changes in the Simplex Method.
– It includes all the coefficients of the objective function and constraints,
and is updated during each iteration.
• Entering Variable
– The non-basic variable selected to enter the basis in the current iteration.
– It is chosen based on its potential to improve the objective function.
• Leaving Variable
– The basic variable selected to leave the basis in the current iteration.
– It is chosen based on the minimum ratio test and becomes non-basic.
04/06/2025 9
Basic Steps of simplex method
A. Convert constraints and objectives function to standardization form
Example
Non Standard form Standard form
Objective Max-5X1+3X2 Objective Max-5X1+3X2 +0S1 +0S2
2X1+3X2 ≤ 18 2X1+3X2 +S1 =18
04/06/2025 10
Cont`d…..
– On the other hand, an inequality with ‘greater than or equal to’ type
is changed into equality by subtracting surplus variable and add
artificial variable as follows:
Standard form Non Standard form
Objective Min-5X1+3X2 Objective Min-5X1+3X2 +0S1 +0S2-MA1-MA2
2X1+3X2 ≥18 2X1+3X2 -S1+A1 =18
04/06/2025 12
Cont`d…..
C. Choosing the entering variable (Positive maximum column of Cj-Zj- net
evaluation row.
Choosing the entering variable is a crucial step in the Simplex Method.
The entering variable is the variable that will increase in value as you
iterate towards the optimal solution.
04/06/2025 14
Cont`d…..
• Example: Maximization Problem
• A microcomputer manufacturing firm is about to start production of
two new microcomputers, Model-I and Model-II. Each requires limited
resources of assembly time, inspection time, and storage space.
Currently, 100 hours of assembly time, 22 hours of inspection time and
39 cubic feet of storage space are available. A unit of Model-I and
Model-II microcomputers contribute $60 and $50 to the profit of the
firm respectively. The amount of each resource needed to make each
type of microcomputer is given in the following table. The manager
wants to determine how much of each computer to produce in order
to maximize the profit generated by selling them.
04/06/2025 15
Cont`d……
– The amount of each resource needed to make each type of
microcomputer
04/06/2025 16
Solution:
Let:
o x1 = number of Model-I microcomputers manufactured
o x2 = number of Model-II microcomputers manufactured
• The LP is
Max z = 60x1 + 50x2
s.t. 4x1 + 10x2 ≤ 100 (Assembly time constraint)
2x1 + x2 ≤ 22 (Inspection time constraint)
3x1 + 3x2 ≤ 39 (Storage space constraint)
x1, x2 ≥ 0
04/06/2025 17
Cont`d…
Step 1: Convert the model in to a standard form: It can be by
introducing slack variables to the constraints and adding the slack
variables to the objective function with zero coefficients
• Standard Form of the LP:
Max Z = 60X1+50X2+0S1+0S2+0S3
Subject to 4X1+10X2+S1 = 100
2X1+ X2+S2 = 22
3X1+ 3X2+S3 = 39
X1, X2, S1, S2, S3 ≥ 0
04/06/2025 18
Cont`d…..
Step 2: Design the initial feasible solution: An initial basic feasible
solution is obtained by setting the decision variables to zero.
• In our example (at the origin):
X1 = 0
X2 = 0
• Thus, we get:
S1 = 100
S2 = 22
S3 = 39
04/06/2025 19
Cont`d….
Step 3: Set up the initial simplex tableau: it can be developed as
follows. (Table 1)
04/06/2025 20
Interpretation of the data in the above tableau:
– In the first row labeled "Cj” are stated the coefficients of the
variables in the objective function.
• These values will remain the same in subsequent tableaus.
– To find an entry in the Zj row under a column, we multiply the entries
of that column by the corresponding entries of ‘CB’ column and add
the results, i.e., Zj= ∑CBiXj.
– The Zj row entries will all be equal to zero in the initial simplex
tableau.
– The Zj entry under the “Quantity Column" gives the current value of
the objective function.
04/06/2025 21
Cont`d…..
– The last row labeled "Cj-Zj“ is called the index row or net evaluation
row.
– It is used to determine whether or not the current solution is optimal
or not.
– The calculation of Cj-Zj row simply involves subtracting each Zj value
from the corresponding Cj value for that column.
– The entries in the Cj - Zj, row represent the net contribution to the
objective function that results by introducing one unit of each of the
respective column variables.
– A plus value indicates that a greater contribution can be made by
bringing the variable for that column into the solution. [Negative values
indicate a decrease in contribution]
04/06/2025 22
Cont`d…..
– Index row elements are also known as the shadow prices.
Step 4: Test if the current solution is optimum or not:
– If all the elements or entries in the Cj- Zj row are negative or zero,
then the current solution is optimum.
– If there exists some positive number, the current solution can be
further improved by removing one basic variable from the basis
and replacing it by some non-basic one.
Step 5: Identify the Entering and Leaving Variables
The variable with the largest positive value in the Cj - Zj row is the
entering variable.
04/06/2025 23
Cont`d……
• The column associated with the entering variable is called Key/pivot
Column.
• We need to compute the replacement ratio to identify the leaving
variable:
Replacement Ratio (RR) =
Solution Quantity (Q)
• The row with the minimum ratio is the key/pivot row.
Corresponding values in pivot
• The corresponding
column variable in the key row (the departing variable)
will leave the basis.
• The number that lies at the intersection of the key column and key
row is called a pivot element.
04/06/2025 24
Cont`d…..
Step 7. Evaluate the new solution by constructing a second simplex
tableau.
Use Elementary Row Operations (EROs) to find a new BFS with a
better objective function value.
Step 8. Do the Iteration and Complete it.
If any of the numbers in Cj - Zj row are positive, repeat the steps (6-
7) again until an optimum solution is obtained.
Step 9. Interpret the result
04/06/2025 25
Cont`d…….
• In simplex Table 1
– Since we have determined the leaving and the entering variables and
since the initial feasible solution can be improved further, we need to
develop the second tableau in order to find the optimal solution.
– In developing the second tableau, we should compute for revised
values of the constraint equations, the Zj row and the Cj-Zj row and
remember that the variables in solution will have a unit vector, with a
value of 1 in the intersection of the column and the row of the basis,
i.e. the pivot element.
04/06/2025 26
Cont`d…….
• In computing for the new row values from our initial simplex tableau, we first
multiply the second constraint by ½ obtaining the values as follows:
1/2R2→R2
1X1+1/2X2+0S1+1/2S2+0S3 = 11, which results in making the pivot
element 1.
• Next, we multiply the above new row values by 4 and subtract it from the first
constraint obtaining the following results:
4R2+R1→R1
0X1+8X2+1S1-2S2+0S3 = 56.
• Then, we multiply the new row values in the pivot row by 3 and subtract it
from the third constraint resulting as follows:
3R2+R3→R3
0X1+3/2X2+0S1-3/2S2+1S3 = 6.
04/06/2025 27
Cont`d….
Second Simplex Tableau
ERO: 1/2R2→R2 -4R2+R1→R1 -3R2+R3→R3
04/06/2025 28
Cont`d……
• Interpretation of the Second Simplex Tableau
– The profit obtained at this point of solution is 660.
– In the Cj-Zj row, we search for the highest positive value.
– If there is, it means that we can further improve this solution.
– Therefore, we have a positive value in the Cj-Zj row which indicates
that this is not the optimal solution.
– As a result, we go for the next tableau.
04/06/2025 29
Cont`d….
• Developing the Third Tableau
– Here, we select the entering and the leaving variables.
– The entering variable is the one with the highest Cj-Zj row value which is the X2
column.
– This means that bringing one unit of X2 into the solution increases profit by 20.
– Therefore, the X2 will be the entering variable designated as the pivot column.
– To determine the leaving the variable, we divide the values in the pivot column
by their corresponding row values in the quantity column.
– The result obtained, as shown in the table below indicates that S3 is the leaving
variable with the smallest non-negative ratio.
– This means that S3 is the most limiting resource for how much units of X2 can
be made.
04/06/2025 30
Cont`d……
– After identifying the entering and the leaving variables, we perform
elementary row operations as follows.
– To obtain a unit vector with 1 in the pivot element, we multiply the
pivot row by 2/3 resulting as follows:
0X1+1X2+0S1+-1S2+2/3S3 = 4
– Then, multiply the above new row values by 8 and subtract it from
the first constraint (row) resulting as follows:
0X1+0X2+1S1+6S2+-16/3S3 = 24.
– For row 2, first multiply the new row values in the pivot row by ½ and
subtract it from the second row resulting as follows:
1X1+0X2+0S1+1S2+-1/3S3 = 9.
– And the third tableau looks like the following.
04/06/2025 31
Cont`d…..
Simplex Tableau 3
• ERO: 2/3R3→R3 -1/2R3+R2→R2 -8R3+R1→R1
04/06/2025 32
Cont`d…..
• Interpreting the Third Tableau
• All the values in the Cj-Zj row are zero and negative indicating that
there can no be additional improvement.
• This makes the third tableau to contain the optimal solution with the
following basic variables:
S1 = 24,
X1 = 9, and
X2 = 4, producing a maximum profit of 740.
Interpretation: In order to achieve the maximum profit of 740, the
company should produce 9 units of Model-I and 4 units of Model-II micro
computers leaving 24 hours of unused resource of the assembly time
constraint.
04/06/2025 33
Home Work
– A farmer owns a 100 acre farm and plans to plant at most three crops.
The seed for crops A,B, and C costs 40, 20, and 30 per acre,
respectively. A maximum of 3200 can be spent on seed. Crops A,B, and
C require 1,2, and 1 workdays per acre, respectively, and there are
maximum of 160 workdays available. If the farmer can make a profit of
100 per acre on crop A, 300 per acre on crop B, and 200 per acre on
crop C, how many acres of each crop should be planted to maximize
profit?
04/06/2025 34
The Simplex Algorithm :Minimization case
04/06/2025 35
Characteristics of Big-M Method
– High penalty cost (or profit) is assumed as M
– M as a coefficient is assigned to artificial variable A in the objective
function Z.
– Big-M method can be applied to minimization as well as maximization
problems with the following distinctions:
I. Minimization problems
– Assign +M as coefficient of artificial variable A in the objective
function Z of the minimization problem.
II. Maximization problems
– Assign –M is assigned as coefficient of artificial variable A in the
04/06/2025
objective function Z of the maximization problem. 36
Cont`d…..
– Coefficient of S (slack/surplus) takes zero values in the objective
function Z
– For minimization problem, the incoming variable corresponds to the
highest negative value of Cj-Zj.
– The solution is optimal when there is no negative value of Cj-Zj.(For
minimization LPP case)
04/06/2025 37
Steps Involved In Using Simplex Method For Minimization Problems
• Step 1. Formulate the linear programming model, and express the
mathematical model of L.P. problem in the standard form by
introducing surplus and artificial variables in the left hand side of the
constraints.
– Assign a 0 (zero) and +M as coefficient for surplus and artificial
variables respectively in the objective function.
– M is considered a very large number so as to finally drive out the
artificial variables out of basic solution.
04/06/2025 38
Cont`d…..
• Step 2. Next, an initial solution is set up.
– Just to initiate the solution procedure, the initial basic feasible
solution is obtained by assigning zero value to decision variables.
– This solution is now summarized in the initial simplex table.
– Complete the initial simplex table by adding two final rows Z, and Cj -
Zj.
– These two rows help us to know whether the current solution is
optimum or not.
04/06/2025 39
Cont`d…..
• Step 3. Now; we test for optimality of the solution.
– If all the entries of Cj - Zj, row are positive, then the solution is
optimum.
– However, this situation may come after a number of iterations.
– But if at least one of the Cj - Zj values is less than zero, the current
solution can be further improved by removing one basic variable
from the basis and replacing it by some non-basic one.
04/06/2025 40
Cont`d…..
• Step 4. Determine the variable to enter the basic solution.
– To do this, we identify the column with the largest negative value in
the Cj - Zj row of the table.
• Next we determine the departing variable from the basic solution.
– If an artificial variable goes out of solution, then we discard it
totally and even this variable may not form part of further
iterations.
– Same procedure, as in maximization case, is employed to determine
the departing variable.
04/06/2025 41
Cont`d…..
• Step 5. We update the new solution now.
– We evaluate the entries for next simplex table in exactly the same
manner as was discussed earlier in the maximization case.
• Step 6. Step (3—5) are repeated until an optimum solution is obtained.
– NB. So the following are the essential things to observe in solving for
minimization problems:
• The entering variable is the one with the largest negative value in
the Cj-Zj row while the leaving variable is the one with the smallest
non-negative ratio.
• The optimal solution is obtained when the Cj-Zj row contains
entirely zeros and positive values.
04/06/2025 42
Example: Assume the following minimization problem.
Min-Z = 7X1+9X2
Subject to 3X1+6X2 > 36
8X1+4X2 > 64
X1, X2 > 0
– We introduce both surplus and artificial variables into both
constraints as follows.
Min-Z = 7X1+9X2+0S1+0S2+MA1+MA2
Subject to 3X1+6X2 –S1+A1 = 36
8X1+4X2-S2+A2 = 64
X1, X2 > 0
– To remind in these tableaus is in transforming from one tableau to
another, we perform elementary row operations to obtain the unit
vector in the pivot column for the entering variable into the solution.
04/06/2025 43
Cont`d…
– Initial Simplex Tableau
Cj 7 9 0 0 M M Quantity
Basic V. X1 X2 S1 S2 A1 A2
A1 M 3 6 -1 0 1 0 36
A2 M 8 4 0 -1 0 1 64
Zj 11M 10M -M -M M M 100M
Cj-Zj 7-11M 9-10M M M 0 0
04/06/2025 44
Cont`d…
– Second Simplex Tableau
Cj 7 9 0 0 M Quantity
Basic V. X1 X2 S1 S2 A1
A1 M 0 9/2 -1 3/8 1 12
X1 7 1 ½ 0 -1/8 0 8
Zj 7 7/2+9/2M -M 3/8M-7/8 M 56+12M
04/06/2025 45
Cont`d…
• Third Simplex Tableau
Cj 7 9 0 0 Quantity
Basic V. X1 X2 S1 S2
X2
9 0 1 -2/9 1/12 8/3
X1
7 1 0 1/9 -1/6 20/3
Zj 7 9 -11/9 -5/12 212/3
Cj-Zj 0 0 11/9 5/12
04/06/2025 46
Cont`d…
– The third tableau represents a final tableau since it is the optimal
solution with entirely zeros and non-negative values in the Cj-Zj row.
– Therefore, the optimal solution is: X1 = 20/3 and X2 = 8/3 and value of
objective function is 212/3.
Exercise : Solve the following LP model using the Big-M (Charnes Penalty)
Method.
Minimize Z = 16x1 + 9x2 + 21x3
s.t. x1 + x2 + 3x3 ≥ 12
2x1 + x2 + x3 ≥ 16
x1, x2, x3 ≥ 0
04/06/2025 47
Simplex Maximization with Mixed Constraints
If a model constraint has negative constants on the RHS, multiply both
sides by -1 to obtain a constraint with a non-negative constant.
If the constraint is an inequality, this will reverse the direction of the
inequality.
– Introduce a slack variable (S) in each ≤ constraint.
– Introduce a surplus variable (S) and an artificial variable (A) in each
≥ constraint.
– Introduce an artificial variable (A) in each = constraint.
04/06/2025 48
Cont`d….
For each artificial variable Ai, add -MAi to the objective function in case
of maximization and +MAi in case of minimization.
Use the same constant M for all artificial variables.
• The artificial variables are introduced for the limited purpose of
obtaining an initial solution.
• They do not have physical representation relating to the decision
problem.
• So, they must be driven out of the system and must not remain in
the final solution (and if at all they do, it represents a situation of
infeasibility).
04/06/2025 49
Cont`d….
• This can be ensured by assigning an extremely high cost to them.
• Generally, a value M is assigned to each artificial variable, where M
represents a number higher than any finite number.
• For this reason, the method of solving the problems where artificial
variables are involved is termed as the 'Big M Method'.
• Artificial Variables will have the following coefficients in the objective
function.
• -M if the problem is maximization and
• +M if the problem is minimization.
04/06/2025 50
Cont`d….
– Form the simplex tableau for the modified problem.
– Solve the modified problem using the simplex method.
– Relate the solution of the modified problem to the original problem:
• If the modified problem has no solution, then the original
problem has no solution.
• If any artificial variables are non-zero in the solution to the
modified problem, then the original problem has no solution.
04/06/2025 51
Cont`d….
• Note. Artificial variables should be eliminated from the basic feasible
solution before the optimal solution is reached.
• Example – Maximization Problems with Mixed Constraints
– Assume the following maximization problem with mixed constraints.
– Z-Max = 6X1+8X2
Subject to : X2 <= 4
X1+X2 = 9
6X1+2X2 >= 24
04/06/2025 52
Cont`d….
Z-Max= 6X1+8X2+0S1+0S3-MA2-MA3
Subject to X2+ S1 = 4
X1+X2+A2 = 9
6X1+2X2-S3+A3 = 24
X1, X2 > = 0
• Developing the Initial Simplex Tableau
– In the initial tableau, we list the variable in the order of decision
variable, slack/surplus variables and finally artificial variables. And for
constraints, use artificial variables, and/or slack variables and/or
surplus variables for the initial solution. Therefore the initial tableau
for the problem is represented as follows.
04/06/2025 53
Cont`d….
• Initial Simplex Tableau
Cj 6 8 0 0 -M -M Quantity
Basic V. X1 X2 S1 S3 A2 A3
S1 0 0 1 1 0 0 0 4
A2 -M 1 1 0 0 1 0 9
A3 -M 6 2 0 -1 0 1 24
Zj -7M -3M 0 +M -M -M -33M
Cj-Zj 6+7M 8+3M 0 -M 0 0
04/06/2025 54
Cont`d….
– Since this is a maximization problem, the entering variable is the one
with the maximum Cj-Zj value.
– Therefore, the variable with the maximum Cj-Zj is X1, the decision
variable.
– And the leaving variable is with the minimum non-negative ratio
which is A3, the artificial variable.
– Since this artificial variable is not needed we remove it from the next
tableau.
04/06/2025 55
Cont`d….
• Developing the Second Simplex Tableau
– After identifying the entering and the leaving variable, the usual
elementary row operations are performed to obtain a unit vector in
the entering variable column.
– The end result after performing the row operations is as follows
which shows the second tableau.
Cj 6 8 0 0 -M Quantity
Basic V. X1 X2 S1 S3 A2
S1 0 0 1 1 0 0 4
A2 -M 0 2/3 0 1/6 1 5
X1 6 1 1/3 0 -1/6 0 4
Zj 6 2-2/3M 0 -1-M/6 -M 24-5M
Cj-Zj 0 6+2/3M 0 1+M/6 0
04/06/2025 56
Cont`d….
– Again here, we identify the leaving the entering variables, i.e. the pivot
row and the pivot column respectively. The entering variable with the
highest Cj-Zj row value is X2 and the leaving variable with the smallest ratio
is S1.
• Developing the Third Simplex Tableau
– Selecting the entering and leaving variables, we go for obtaining a unit
vector in the pivot column by using the elementary row operations. We
get the following third tableau. Cj 6 8 0 0 -M Quanti
Basic V. X1 X2 S1 S3 A2 ty
– Third Simplex Tableau
X2 8 0 1 1 0 0 4
A2 -M 0 0 -2/3 1/6 1 7/3
X1 6 1 0 -1/3 -1/6 0 8/3
Zj 6 8 6+2/3M -1-M/6 -M 48-7/3
Cj-Zj 0 0 -6-2/3M 1+M/6 0
04/06/2025 57
Cont`d….
• Similarly, we identify the entering and the leaving variables which are
S3 and A2 respectively representing the maximum Cj-Zj value and the
minimum ratio.
• Developing the Fourth Simplex Tableau
– Perform elementary row operations usual to have a unit vector in the
entering variable column and you will get the following fourth
tableau. Fourth Simplex Tableau
Cj 6 8 0 0 Quantity
Basic V. X1 X2 S1 S3
X2 8 0 1 1 0 4
S3 0 0 0 -4 1 14
X1 6 1 0 -1 0 5
Zj 6 8 2 0 62
Cj-Zj 0 0 -2 0
04/06/2025 58
Cont`d…..
– This tableau represents the final tableau since we have only zeros and
negative values in the Cj-Zj row which indicates that it is the optimal
solution. So we have the following results for each of the variables
and the profit obtained.
– X1 = 5, X2 = 4, S3 = 14, and Profit = 62
04/06/2025 59
2.7.Some complication and their Resolution
• Several special situations which one may encounter during the
application of simplex method are summarized below:
A. Non-feasible Solution/ Infeasibility
– Complication: A linear programming problem is infeasible if
there is no solution that satisfies all constraints
simultaneously.
– Resolution:
• introduces artificial variables and aims to minimize their
sum.
• If the minimum value is zero and the artificial variables
can be driven to zero, the problem is feasible.
• If not, the problem is infeasible.
04/06/2025 60
Cont`d…..
• Example: Minimization case
Cj 5 8 0 0 M
BV 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
5 8 -2 31-M M
Zj 1,800+200M
0 0 2 M-31 0
Cj - Z j
• Even though all Cj - Zj are positive or 0(i.e. the criterion for an optimal solution in a
minimization case), no feasible solution is possible because an artificial variable (A2)
remains in the solution mix.
04/06/2025 61
Cont`d…..
B. Unbounded Solution
– No finite solution may exist in problems that are not bounded.
– This means that a variable can be infinitely large without violating a constraint.
• Complication
– A linear programming problem is unbounded if the objective function can
increase indefinitely without violating any constraints.
• Resolution
– In the simplex method, if during the iteration, no feasible solution exists for the
leaving variable and the objective function can improve indefinitely, it indicates
unboundedness.
– The solution is to identify and confirm that the feasible region is indeed
unbounded by checking the direction in which the objective function is
increasing.
04/06/2025 62
Cont`d….
– 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.
• Note:
– A negative ratio means that increasing that variable would
increase resources.
– A zero ratio means that increasing the variable would not use
any resources.
04/06/2025 63
• Example: Maximization case
04/06/2025 64
Cont`d….
– The solution in the above case is not optimal because not all Cj - Zj
entries are 0 or negative, as required in a maximization problem.
– The next variable to enter the solution should be X1.
– To determine which variable will leave the solution, we examine the
ratios of the quantity column numbers to their corresponding numbers
in the X1 or pivot column.
– Since both pivot column numbers are negative, an unbounded solution
is indicated.
– Note:
• When unbounded solutions occur, no outgoing variable will exist.
04/06/2025 65
Cont`d….
C. Degeneracy
• Complication
– Degeneracy occurs when multiple basic feasible solutions correspond
to the same vertex of the feasible region.
– This can lead to cycling, where the algorithm revisits the same set of
basic solutions repeatedly without making progress.
• Resolution
– To address degeneracy, the simplex method can employ strategies like :
• Bland’s Rule: Choose the entering and leaving variables based on a
fixed order to avoid cycling.
• Perturbation Techniques: Slightly modify the problem to break ties
among basic feasible solutions.
04/06/2025 66
Cont`d….
– 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 LP model.
– Such problems can be overcome by trial and error method.
– If this is resolved by a proper selection of the key element, degeneracy
can be avoided.
– The main drawback to degeneracy is the increase in the computation,
which reduces the efficiency of the simplex method considerably.
04/06/2025 67
Cont`d….
• Example
04/06/2025 68
Cont`d…..
• However, the number of iterations required to arrive at the optimal solution can be minimized by
adopting the following rule:
– Divide the coefficient of slack variables in the simplex table where degeneracy is detected by the
corresponding positive numbers of the key column in the row, starting from left to right.
– The row which contains smallest ratio comparing from left to right column wise becomes the key
row.
• For the above example
• Divide the coefficients by the corresponding element of the key column, we obtain the following:
04/06/2025 69
Cont`d…..
– Comparing the ratios from left to right column wise until they are not
equal, the minimum ratio occurs for the second row (0).
– Therefore, s3 is selected to leave the basis.
– Note: 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.
04/06/2025 70
Cont`d…..
D. Two incoming variables / or Tie for entering variables/
– if there is a tie for the entering variable, it means multiple variables have the
same highest coefficient in the objective function row (for maximization
problems) or the lowest (for minimization problems).
– In order to break this tie, the selection for the key column (entering variable)
can be made arbitrary.
– However; the number of solution can be minimized by adopting the following
rules:
• If there is a tie between two decision variables, then the selection can be
made arbitrary.
• If there is a tie between a decision variable and a slack (or surplus) variable,
then select the decision variable to enter into basis first.
• If there is a tie between slack or surplus variable, then selection can be
04/06/2025 made arbitrary. 71
Cont`d…..
• Example
04/06/2025 72
2.8. Duality in LPP
• The term ‘dual’ in a general sense implies two or double.
• Every linear programming problem can have two forms.
– The original formulation of a problem is referred to as its Primal
form.
– The other forms are referred to as its dual
• Every LPP has associated with it another LPP called the dual.
• If the primal is a max problem, then the dual will be a min problem, and
vice versa.
• The dual of dual is a primal.
04/06/2025 73
why are we interested in dual form?
– Interest in the dual form of a linear programming (LP) problem stems
from several practical and theoretical benefits.
– Understanding and using the dual form can provide insights that are
valuable in both solving and analyzing linear programming problems.
A. Insight into the Optimal Solution
– Economic Interpretation:
• Shadow Prices: Dual variables (also called shadow prices)
represent the value of relaxing constraints in the primal problem.
– For example, in a resource allocation problem, the dual
variable associated with a resource constraint indicates how
much the objective function would increase if the availability of
that resource were increased by one unit.
04/06/2025 74
Cont`d…..
– Resource Valuation
• Dual variables help in understanding the worth of resources or constraints,
which can guide decision-making in resource management and allocation.
B. Computational Advantages
– Simpler Dual Problems
• In some cases, the dual problem might be easier to solve or more
computationally efficient than the primal problem.
• This can happen when the dual problem has fewer constraints or simpler
constraints compared to the primal problem.
– Dual Simplex Method
• The dual simplex method is a variant of the simplex algorithm that operates on
the dual problem.
• It is particularly useful when primal feasibility is not maintained but dual
feasibility is, such as in problems involving incremental changes or updating
04/06/2025 constraints. 75
Cont`d…..
C. Sensitivity and Stability Analysis
– Sensitivity Analysis
• The dual problem helps in analyzing how changes in the right-hand side
of constraints (or in the objective function coefficients) affect the
optimal value.
• This is crucial in decision-making and planning scenarios where
parameters might change over time.
– Stability Analysis
• Duality can be used to assess the stability of the optimal solution when
there are perturbations or modifications in the problem data.
• The dual provides insights into the sensitivity of the optimal value to
changes in the constraints or coefficients.
04/06/2025 76
Cont`d…..
– For convenience, we define the variables for:
• the max problem to be Z, x1, x2, . . . , xn and
• the min problem to be Z, y1, y2, . . . , ym.
– The dual involves setting up and solving an LP problem that is almost a
‘mirror image’ of a primal.
– Both in its formulation and solution, the dual is the flip flop version of the
primal.
– The main focus of dual is to find for each resource its best marginal value or
shadow price.
• This value reflects the scarcity of resources,
• i.e., the maximum additional prices to be paid to obtain one additional
unit of the resources to maximize profit under the resource constraints.
– If resource is not completely used, i.e., there is slack, then its marginal value
is zero.
04/06/2025 77
Cont`d…..
04/06/2025 78
A. Finding the Dual of a Normal Max or Min Problem
• To find the dual to a max problem in which all the variables are required
to be nonnegative and all the constraints are ≤ constraints (called
normal max problem) the problem may be written as,
04/06/2025 79
Cont`d…..
– The dual of a normal max problem is called a
normal min problem.
04/06/2025 80
Example
– The Abay Furniture Company manufactures desks, tables, and chairs.
The manufacture of each type of furniture requires lumber and two
types of skilled labor: finishing and carpentry. The amount of each
resource needed to make each type of furniture is given in the Table
below. Currently, 48 board feet of lumber, 20 finishing hours, and 8
carpentry hours are available. A desk sells for $60, a table for $30, and
a chair for $20. Because the available resources have already been
purchased, Abay furniture wants to maximize total revenue.
04/06/2025 81
Cont`d…..
• Resource requirement for Abay Furniture
• Let:
– x1 = number of desks produced
– x2 = number of tables produced
– x3 = number of chairs produced
04/06/2025 82
Cont`d…..
• LP Model for Abay’s Problem (Primal):
Max z = 60x1 +30x2 + 20x3
s.t.
8x1 + 6x2 + x3 ≤ 48 (Lumber constraint)
4x1 + 2x2 + 1.5x3 ≤ 20 (Finishing constraint)
2x1 + 1.5x2 + 0.5x3 ≤ 8 (Carpentry constraint)
x1, x2, x3 ≥0
• Dual Model for Abay’s Problem:
• To convert the Abay Primal in to dual:
• Let:
y1- lumber constraint
Y2- finishing constraint
Y3- carpentry constraint
Min w: 48y1 + 20y2 + 8y3
s.t.
8y1 + 4y2 +.2y3 ≥ 60
6y1 +2y2+1.5y3 ≥ 30
y1+1.5y2+0.5y3≥ 20
y1 , y 2 , y 3 ≥ 0
04/06/2025 83
Economic Interpretation of the Dual Problem
– The dual problem in linear programming has significant economic
interpretations that provide insights into the value of resources, constraints, and
the overall optimization scenario.
A. Shadow Prices
– each dual variable (also known as a shadow price or dual price) represents the
value or worth of relaxing a constraint in the primal problem.
B. Economic Interpretation
– Resource Valuation: The shadow price indicates how much the objective
function of the primal problem would increase if the right-hand side of the
corresponding constraint were increased by one unit.
• This can be seen as the value of an additional unit of a resource.
– Decision-Making: In practical terms, if a resource constraint is associated with a
high shadow price, it implies that this resource is highly valuable and improving
its availability would significantly benefit the objective function.
04/06/2025 84
Cont`d….
C. Resource Scarcity and Allocation
– Resource Scarcity:
• The shadow price can also reflect the scarcity of resources.
• A high shadow price suggests that the resource is scarce and has a high
value in the context of the optimization problem.
• Conversely, a low or zero shadow price indicates that the resource is
plentiful or does not significantly affect the objective function.
– Optimal Resource Allocation:
• By analyzing the shadow prices, decision-makers can allocate resources
more effectively.
– For example, in production planning, if a certain resource has a high
shadow price, it might be worthwhile to invest in increasing the
availability of that resource or to prioritize its use.
04/06/2025 85
Cont`d….
D. Pricing and Market Equilibrium
– Pricing:
• In economic applications, the dual variables can represent prices for
goods or services.
• For example, if the primal problem involves maximizing profit subject to
resource constraints, the dual variables (shadow prices) can be
interpreted as the prices that should be charged for those resources to
achieve optimal profit.
– Market Equilibrium:
• In market analysis, duality can help in understanding the equilibrium
prices and the impact of changes in market constraints.
• It can provide insights into how market prices might adjust in response
to changes in resource availability or other constraints.
04/06/2025 86
Cont`d….
E. Value of Constraints
– The dual problem highlights the value of constraints in the primal
problem.
– If a constraint in the primal problem is associated with a high dual
value, it indicates that the constraint is crucial for the optimal
solution.
– Conversely, if the dual value is low or zero, the constraint is less
critical.
– Economic Justification:
• This can be used to justify investments in relaxing or tightening
constraints, based on their economic value and impact on the
overall objective function.
04/06/2025 87
• Example 2
04/06/2025 88
B. Formulating the Dual when the Primal has Mixed Constraints
– In order to transform a primal problem into its dual, it is easier if all
constraints in a maximization problem are of the < variety, and in a
minimization problem, every constraint is of the > variety.
– To change the direction of a constraint, multiply both sides of the
constraints by -1. For example,
• -1(2x1 + 3x2 ≥18) is -2x1-3x2 ≤-18
04/06/2025 89
Cont`d….
• If a constraint is equality,
– it must be replaced with two constraints,
• one with a ≤sign and
• the other with a ≥ sign.
– For instance,
• 4x1 + 5x2 = 20 will be replaced by
4x1 + 5x2 ≤20
4x1 + 5x2≥ 20
• Then one of these must be multiplied by -1, depending on whether
the primal is
– maximization or
– a minimization problem.
04/06/2025 90
Cont`d…..
• Formulate the dual of the following LP model.
– Example
04/06/2025 91
Cont`d……
• Solution
– Since the problem is a max problem, put all the constraints in to the ≤ form.
– Subsequently, C2 and C3 will be first adjusted in to ≤ constraints.
• C2 will be multiplied by -1:
» -1(4x + 2x ≥16) becomes -4x - 2x ≤ -16
• C3 is equality, and must be restated as two separate constraints.
• Thus, it becomes:
» 6x +6x ≤ 30 and 6x +6x ≥30.
• Then the second of these must be multiplied by -1.
» -1(6x +6x ≥30) becomes -6x -6x ≤ -30
04/06/2025 92
Cont`d…..
– After making the above adjustments, rewrite the LP model again.
Maximize z = 50x + 80x
Subject to:
C1 3x1 + 5x2 ≤ 45
C2 -4x1 - 2x2 ≤ -16
C3 6x1 +6x2 ≤ 30
C4 -6x1 -6x2 ≤ -30
x,x ≥0
04/06/2025 93
Cont`d….
• The dual form of the problem is
04/06/2025 94
Managerial Significance of Duality
• The managerial significance of duality in linear programming (LP) is profound, as it
provides critical insights and tools for effective decision-making and optimization in
various business and organizational contexts.
• Resource Valuation and Allocation
– Economic Value of Resources: Dual variables, or shadow prices, represent the
value of an additional unit of a resource or the cost of relaxing a constraint. This
helps managers understand how valuable each resource is in the context of the
overall optimization problem.
– Resource Allocation Decisions: Knowing the shadow prices allows managers to
prioritize the allocation of scarce resources or to make decisions about investing
in additional resources based on their economic value.
– Efficient Resource Use: By understanding the impact of resource constraints on
the objective function, managers can make informed decisions about how to use
resources most effectively to maximize profits or achieve other business
04/06/2025objectives. 95
Cont`d….
• Sensitivity and Stability Analysis
– Handling Uncertainty: Duality provides tools for sensitivity analysis,
helping managers assess how changes in constraints or objective function
coefficients impact the optimal solution. This is crucial for dealing with
uncertainty and making adaptive decisions in dynamic environments.
– Scenario Analysis: Managers can use duality to perform scenario analysis,
evaluating the effects of potential changes in resource availability, costs, or
other parameters on the optimal solution.
– Strategic Planning: Understanding the sensitivity of the optimal solution to
changes helps in developing robust strategies and contingency plans.
Managers can anticipate how fluctuations in resource availability or
market conditions will affect their decisions.
04/06/2025 96
Cont`d….
• Pricing and Cost Analysis
– Setting Prices: In scenarios where the dual problem represents pricing
decisions, the dual variables can be interpreted as the prices that should
be charged for resources or products. This helps managers set optimal
prices based on the value of resources or constraints.
– Cost-Benefit Analysis: Managers can use the dual problem to perform
cost-benefit analysis, evaluating the trade-offs between different options
and making informed pricing and investment decisions.
– Budget Management: Understanding the dual values of constraints helps
managers control costs by identifying which constraints are the most
expensive to relax or tighten. This information aids in budgeting and
04/06/2025 financial planning. 97
Cont`d….
• Strategic Decision-Making
– Identifying Critical Constraints: Duality helps in identifying which
constraints are critical to the optimization problem. Managers can focus on
improving or addressing these constraints to enhance overall performance.
– Investment Decisions: Knowing the value of constraints guides investment
decisions, such as investing in new technologies or expanding facilities to
relieve critical constraints.
– Optimizing Objectives: Duality provides insights into optimizing business
objectives, such as maximizing profit, minimizing costs, or achieving
operational efficiency. Managers can align their strategies with these
insights to achieve better outcomes.
04/06/2025 98
Cont`d….
• Performance Measurement
– Benchmarking: Duality allows managers to benchmark performance
against the shadow prices of constraints. This helps in evaluating how
well the organization is performing relative to the constraints and
resources available.
– Performance Indicators: Managers can use dual variables as
performance indicators to assess the effectiveness of resource
utilization and identify areas for improvement.
04/06/2025 99
2.9. Sensitivity Analysis
• Sensitivity analysis is concerned with how changes in an LP’s
parameters affect the optimal solution.
• These parameters include:
o Profit (or cost) contributions per unit of decision variable,
o Availability of resources, and
o Consumption of resources per unit of decision variables
o They are assumed to be constant and known with certainty during a
planning period, but in reality, they are subject to change.
04/06/2025 100
Cont`d….
• Sensitivity analysis is the study of sensitivity of the optimal solution
of an LP problem due to discrete variations (changes) in its
parameters.
• It carries the LP analysis beyond the determination of the optimal
solution.
• So, it begins with the final simplex tableau.
• In this case, we may consider the original optimal solution as an
initial solution for the purpose of knowing the ranges, both lower
and upper, within which a parameter may assume a value.
04/06/2025 101
Cont`d….
• For instance, a manager may want to consider obtaining an additional
amount of scarce resource that might be available, in which case the
manager would want to know the answers to questions such as:
– Will an increase in the right hand side of this constraint affect the
objective function?
– If so, how much of the resource can be used?
– Given the answer to the preceding question, what will be the revised
optimal solution?
04/06/2025 102
Cont`d….
• To demonstrate sensitivity analysis, the microcomputer example will
again be used.
Maximize Z = 60x1 + 50x2
Subject to
4x1 + 10x2 ≤ 100 Assembly time
2x1 + 1x2 ≤ 22 Inspection time
3x1 + 3x2 ≤ 39 Storage space
X1, X2 ≥ 0
• Where X1-model-I Microcomputer, and X2=Model-II Microcomputer
04/06/2025 103
A. A Change in the RHS of a constraint
• The first step in determining how a change in the RHS (Right Hand Side) of a
constraint (resource availability) would influence the optimal solution is to
examine the shadow prices in the final simplex tableau.
• Shadow prices are the values in the Zj row in the slack columns.
• A shadow price is a marginal value; it indicates the impact that a one-unit
change in the amount of a constraint would have on the values of the
objective function.
• Lets look at the final tableau for the microcomputer problem.
04/06/2025 104
Cont`d….
• Consider the final (optimal) Simplex Tableau of the Microcomputer
problem provided below.
04/06/2025 105
Cont`d….
• As we can see in the table, the shadow prices are $0 for s1 (Assembly
time), $10 for s2 (Inspection time), and $40/3 for s3 (Storage space).
• These tell us that:
– an increase in the amount of assembly time would have no effect on
profit;
– if inspection time is increased by one hour, it will increase the profit
by $10, and
– if storage space is increased by 1 cubic foot, profit would increase by
$40/3.
– The reverse also holds true.
04/06/2025 106
Cont`d….
• What shadow prices do not tell us is the extents to which the level of a
scarce resource can be changed and still have the same impact per
unit.
• The ability to use additional amounts of a resource will disappear at
some point because of the fixed amounts of the other constraints.
• Therefore, we need to determine the range over which we can change
the RHS quantities and still have the same shadow price.
• This is called the range of feasibility.
04/06/2025 107
Cont`d….
• The key to computing the range of feasibility (ROF) for the constraint lies
in each slack column of the final simplex tableau.
• To compute the range for each constraint, the entries in the associated
slack column must be divided into the values in the Quantity column.
– The smallest positive ratio indicates how much the constraint level
can be decreased before it reaches the lower limit of its range of
feasibility, and
– The smallest negative ratio (negative ratio closest to 0) shows how
much the storage constraint can be increased before it reaches its
upper limit of feasibility.
04/06/2025 108
Cont`d….
• The general rule applied when computing the upper and lower limits on
the range of feasibility for maximization problem is:
04/06/2025 109
Cont`d….
04/06/2025 110
Cont`d….
• As long as Q3 remains in this range, the present basic solution variables
remain positive and feasible.
• However, the quantity value of those basic variables may change.
• Once we knew the limits, we proceed to assess the impact that a
contemplated change would have on the optimal solution.
• Example
– The manager in the microcomputer problem is contemplating a
change in the level of the storage constraint – an increase of 3 cubic
feet.
– Determine the revised optimal solution for the change.
04/06/2025 111
• Solution
– First, note that an increase of 3 cubic feet is within the range.
– Then, the effect of an increase of three cubic feet is computed in the
following way:
04/06/2025 112
B. A Change in an Objective Function Coefficient
• It is useful to know how much the contribution of a given decision
variable to the objective function can change without changing the
optimal solution.
• There are two cases:
1. Changes for a variable that is not currently in the solution mix, and
2. Changes for a variable that is currently in the solution mix.
• We will be computing the range of insignificance for the non-basic
decision variable and range of optimality for the basic decision variable.
04/06/2025 113
1. A Change for a non-basic decision variable
• The non-basic decision variable’s objective function coefficient should
increase by an amount that exceeds the Cj-Zj value for that variable in the
final tableau in order for it to end up as a basic variable in the optimal
solution.
• The range over which a non-basic variable’s objective function coefficient
can change without causing that variable to enter the solution mix is called
its range of insignificance.
General Rule:
Range of insignificance for a non- basic variable is the Zj value of the
variable. Allowable Increase=│C - Z │of itself
j j
04/06/2025 114
2. A Change for a basic decision variable
• The range over which objective function coefficient of a variable that is in
solution can change without changing the optimal values of the decision
variables is called Range of Optimality (ROO).
• Note, however, that such a change would change the optimal value of the
objective function.
• To find the ROO, divide the values in row C-Z by the corresponding row
values of the variable in question.
• Then follow the following rule for both maximization and minimization
problems.
04/06/2025 115
Cont`d……
• General Rules:
Allowable increase: The smallest positive ratio of C-Z value and the variable’s substitution rate.
Allowable decrease: The smallest negative ratio of C-Z value and the variable’s substitution rate.
04/06/2025 116
Solution
• The final simplex tableau of the microcomputer problem is repeated here for
convenience.
04/06/2025 117
Cont`d….
Range of Optimality for X1 (Coefficient 1 /C1/
Compute the ratio (Cj-Zj/corresponding values in X1 row)
Allowable increase= 40
Allowable decrease = -10
Add and subtract these values to and from C1, i.e. 60
Indicate the Range of Optimality for Model-I MC (C 1):
ROOX1: 50 < C1 <100
04/06/2025 118
Cont`d….
Range of Optimality for X2 (Coefficient 2 /C2/
Compute the ratio (Cj-Zj/corresponding values in X2 row)
Allowable increase= 10
Allowable decrease = -20
Add and subtract these values to and from C2, i.e. 50
Indicate the Range of Optimality for Model-II MC (C2):
ROOX2: 30 < C2 <60
04/06/2025 119
THE END
04/06/2025 120