SlideShare a Scribd company logo
6s-1 Linear Programming
SIMPLEX METHOD
Presented by:khushbu Kumari
Deptt:Agricultural Economics
M.Sc(Ag.) Previous
6s-2 Linear Programming
 Simplex: A linear-programming algorithm that can
solve problems having more than two decision variables.
 The simplex technique involves generating a series of
solutions in tabular form, called tableaus. This process
continues as long as a positive (negative) rate of profit
(cost) exists.
 The simplex method is an iterative algorithm (a
systematic solution procedure that keeps repeating a
fixed series of steps, called, an iteration.
WDDit is always advisable to use Simplex Method to
avoid lengthy graphical procedure
Simplex Method
6s-3 Linear Programming
SIMPLEX METHOD
Step-1
Write the
standard
maximization
problem in
standard form,
introduce slack
variables to form
the initial system,
and write the
initial tableau.
Step-3
Select
the
pivot
column
Step-5
Select the
pivot
element
and
perform
the pivot
operation
STOP
The optimal solution has been found.
STOP
The linear programming problem has
no optimal solution
Step 2
Are there
any
negative
indicators
in the
bottom
row?
Step 4
Are there
any positive
elements in
the pivot
column
above the
dashed line?
Simplex algorithm for standard maximization problems
6s-4 Linear Programming
Slack Variables
 A mathematical representation of surplus
resources.” In real life problems, it’s unlikely that
all resources will be used completely, so there
usually are unused resources.
 Slack variables represent the unused resources
between the left-hand side and right-hand side of
each inequality.
6s-5 Linear Programming
Simplex algorithm
Initialization: setup to start iterations, including
finding an initial solution
Optimality test: is the current solution
optimal?
if no if yes stop
Iteration: Perform an iteration to find a
better solution
6s-6 Linear Programming
The simplex method in tabular form
 Steps:
1. Initialization:
a. transform all the constraints to equality by
introducing slack, surplus, and artificial variables as
follows:
Constraint type Variable to be added
≥ + slack (s)
≤ - Surplus (s) + artificial (A)
= + Artificial (A)
6s-7 Linear Programming
Simplex method in tabular form
b. Construct the initial simplex tableau
Basic
variable
X1 … Xn S1 …... Sn A1 …. An RHS
S
Coefficient of the constraints
b1
A bm
Z Objective function coefficient
In different signs
Z
value
6s-8 Linear Programming
2. Test for optimality:
Case 1: Maximization problem
the current basic feasible solution is optimal if
every coefficient in the objective function row
is negative
Case 2: Minimization problem
the current BF solution is optimal if every
coefficient in the objective function row is
positive.
Simplex method in tabular form
6s-9 Linear Programming
Simplex method in tabular form
3. Iteration
Step 1: determine the entering basic variable by
selecting the variable (automatically a nonbasic
variable) with the most negative value (in case of
maximization) or with the most positive (in case
of minimization) in the last row (Z-row). Put a
box around the column below this variable, and
call it the “pivot column”
6s-10 Linear Programming
Simplex method in tabular form
 Step 2: Determine the leaving basic variable by applying
the minimum ratio test as following:
1. Pick out each coefficient in the pivot column that is
strictly positive (>0)
2. Divide each of these coefficients into the right hand side
entry for the same row
3. Identify the row that has the smallest of these ratios
4. The basic variable for that row is the leaving variable, so
replace that variable by the entering variable in the basic
variable column of the next simplex tableau. Put a box
around this row and call it the “pivot row”
6s-11 Linear Programming
Simplex method in tabular form
 Step 3: Solve for the new BF solution by using
elementary row operations (multiply or divide a row by a
nonzero constant; add or subtract a multiple of one row to
another row) to construct a new simplex tableau, and then
return to the optimality test. The specific elementary row
operations are:
1. Divide the pivot row by the “pivot number” (the number
in the intersection of the pivot row and pivot column)
2. For each other row that has a negative coefficient in the
pivot column, add to this row the product of the absolute
value of this coefficient and the new pivot row.
3. For each other row that has a positive coefficient in the
pivot column, subtract from this row the product of the
absolute value of this coefficient and the new pivot row.
6s-12 Linear Programming
Simplex method
 Example (All constraints are )
Solve the following problem using the simplex method
 Maximize
Z = 3X1+ 5X2
Subject to
X1  4
2 X2  12
3X1 +2X2  18
X1 , X2  0
6s-13 Linear Programming
Simplex method
 Solution
 Initialization
1. Standard form
Maximize Z,
Subject to
Z - 3X1- 5X2 = 0
X1 + S1 = 4
2 X2 + S2 = 12
3X1 +2X2 + S3 = 18
X1 , X2, S1, S2, S3  0
6s-14 Linear Programming
Initial tableau
2. Initial tableau
Basic
variable
X1 X2 S1 S2 S3 RHS
S1 1 0 1 0 0 4
S2 0 2 0 1 0 12
S3 3 2 0 0 1 18
Z -3 -5 0 0 0 0
Pivot column
Pivot row
Pivot
number
Entering
variable
Leaving
variable
6s-15 Linear Programming
Simplex tableau
Notes:
 The basic feasible solution at the initial tableau is
(0, 0, 4, 12, 18) where:
X1 = 0, X2 = 0, S1 = 4, S2 = 12, S3 = 18, and Z = 0
Where S1, S2, and S3 are basic variables
X1 and X2 are nonbasic variables
 The solution at the initial tableau is associated to
the origin point at which all the decision
variables are zero.
6s-16 Linear Programming
Optimality test
 By investigating the last row of the initial tableau,
we find that there are some negative numbers.
Therefore, the current solution is not optimal.
6s-17 Linear Programming
Iteration
 Step 1: Determine the entering variable by
selecting the variable with the most negative in the
last row.
 From the initial tableau, in the last row (Z row),
the coefficient of X1 is -3 and the coefficient of X2
is -5; therefore, the most negative is -5.
consequently, X2 is the entering variable.
 X2 is surrounded by a box and it is called the pivot
column
6s-18 Linear Programming
Iteration
 Step 2: Determining the leaving variable by using the
minimum ratio test as following:
Basic
variable
Entering
variable X2
(1)
RHS
(2)
Ratio
(2)(1)
S1 0 4 None
S2
Leaving
2 12 6
Smallest ratio
S3 2 18 9
6s-19 Linear Programming
Iteration
 Step 3: solving for the new BF solution by using the
eliminatory row operations as following:
1. New pivot row = old pivot row  pivot number
Basic
variable
X1 X2 S1 S2 S3 RHS
S1
X2 0 1 0 1/2 0 6
S3
Z
Note that X2 becomes in the basic
variables list instead of S2
6s-20 Linear Programming
iteration
2. For the other row apply this rule:
New row = old row – the coefficient of this row in the pivot column (new pivot row).
For S1
1 0 1 0 0 4
-
0 (0 1 0 1/2 0 6)
1 0 1 0 0 4
For S3
3 2 0 0 1 18
-
2 (0 1 0 1/2 0 6)
3 0 0 -1 1 6
for Z
-3 -5 0 0 0 0
-
-5(0 1 0 1/2 0 6)
-3 0 0 5/2 0 30
6s-21 Linear Programming
Iteration
Basic
variable
X1 X2 S1 S2 S3 RHS
S1 1 0 1 0 0 4
X2 0 1 0 1/2 0 6
S3 3 0 0 -1 1 6
Z -3 0 0 5/2 0 30
The most negative
value; therefore, X1
is the entering
variable
The smallest ratio
is 6/3 =2; therefore,
S3 is the leaving
variable
This solution is not optimal, since there is a negative numbers in the last row
6s-22 Linear Programming
Iteration
 Apply the same rules we will obtain this solution:
Basic
variable
X1 X2 S1 S2 S3 RHS
S1 0 0 1 1/3 -1/3 2
X2 0 1 0 1/2 0 6
X1 1 0 0 -1/3 1/3 2
Z 0 0 0 3/2 1 36
This solution is optimal; since there is no negative solution in
the last row: basic variables are X1 = 2, X2 = 6 and S1 = 2; the
nonbasic variables are S2 = S3 = 0
Z = 36
6s-23 Linear Programming
Simplex method in case of Artificial variables
 Solve the following linear programming problem
by using the simplex method:
 Min Z =2 X1 + 3 X2
S.t.
½ X1 + ¼ X2 ≥ 4
X1 + 3X2  20
X1 + X2 = 10
X1, X2  0
6s-24 Linear Programming
.
 Solution
Step 1: standard form
Min Z,
s.t.
Z – 2 X1 – 3 X2 - M A1 -M A2 = 0
½ X1 + ¼ X2 + S1 = 4
X1 + 3X2 - S2 + A1 = 20
X1 + X2 + A2 = 10
X1, X2 ,S1, S2, A1, A2  0
6s-25 Linear Programming
.
 Step 2: Initial tableau
Basic
variables
X1
2
X2
3
S1
0
S2
0
A1
M
A2
M
RHS
S1 ½ ¼ 1 0 0 0 4
A1 1 3 0 -1 1 0 20
A2 1 1 0 0 0 1 10
Z -2 -3 0 0 -M -M 0
6s-26 Linear Programming
.
 To correct this violation before starting the simplex
algorithm, the elementary row operations are used
as follows:
New (Z row) = old (z row) ± M (A1 row) ± M (A2 row)
In our case, it will be positive since M is negative in the Z
row, as following:
Old (Z row): -2 -3 0 0 -M -M 0
M (A1 row): M 3M 0 -M M o 20M
M (A2 row): M M 0 0 0 M 10M
New (Z row):2M-2 4M-3 0 -M 0 0 30M
It becomes zero
6s-27 Linear Programming
 The initial tableau will be:
Basic
variables
X1
2
X2
3
S1
0
S2
0
A1
M
A2
M
RHS
S1 1/2 1/4 1 0 0 0 4
A1 1 3 0 -1 1 0 20
A2 1 1 0 0 0 1 10
Z 2M-2 4M-3 0 -M 0 0 30M
• Since there is a positive value in the last row, this solution is not optimal
• The entering variable is X2 (it has the most positive value in the last row)
• The leaving variable is A1 (it has the smallest ratio)
6s-28 Linear Programming
.
 First iteration
Basic
variables
X1
2
X2
3
S1
0
S2
0
A1
M
A2
M
RHS
S1
5/12 0 1 1/12 -1/12 0 7/3
X2
1/3 1 0 -1/3 1/3 0 20/3
A2
2/3 0 0 1/3 -1/3 1 10/3
Z 2/3M-1 0 0 1/3M-1 1-4/3M 0 20+10/3M
• Since there is a positive value in the last row, this solution is not optimal
• The entering variable is X1 (it has the most positive value in the last row)
• The leaving variable is A2 (it has the smallest ratio)
6s-29 Linear Programming
.
 Second iteration
Basic
variables
X1 X2 S1 S2 A1 A2 RHS
S1
0 0 1 -1/8 1/8 -5/8 1/4
X2
0 1 0 -1/2 1/2 -1/2 5
X1
1 0 0 1/2 -1/2 3/2 5
Z 0 0 0 -1/2 ½-M 3/2-M 25
This solution is optimal, since there is no positive value in the last row. The
optimal solution is:
X1 = 5, X2 = 5, S1 = ¼
A1 = A2 = 0 and Z = 25
6s-30 Linear Programming
.
 In the final tableau, if one or more artificial
variables (A1, A2, …) still basic and has a nonzero
value, then the problem has an infeasible solution.
 All other notes are still valid in the Big M method.
6s-31 Linear Programming
THANK YOU

More Related Content

PPT
Simplex Method
PPTX
Simplex method concept,
PDF
Chapter 4 Simplex Method ppt
PPTX
Big-M Method Presentation
PPTX
Two Phase Method- Linear Programming
PPTX
Big m method
PPTX
Operations Research - The Big M Method
PDF
Simplex method: Slack, Surplus & Artificial variable
Simplex Method
Simplex method concept,
Chapter 4 Simplex Method ppt
Big-M Method Presentation
Two Phase Method- Linear Programming
Big m method
Operations Research - The Big M Method
Simplex method: Slack, Surplus & Artificial variable

What's hot (20)

PPT
L20 Simplex Method
PPTX
Linear Programming
PDF
Simplex method
PPT
Simplex Method
PDF
Linear Programming (graphical method)
PDF
Unit.2. linear programming
DOC
Procedure Of Simplex Method
PDF
Duality in Linear Programming Problem
PPTX
Transportation problems
PPTX
Integer Linear Programming
PPTX
Duality in Linear Programming
PPT
Formulation Lpp
PPT
Simplex two phase
PPTX
Game Theory Operation Research
PPT
Duality
PDF
Big m method
PPT
4-The Simplex Method.ppt
PPTX
Linear programming - Model formulation, Graphical Method
PPTX
LINEAR PROGRAMMING Assignment help
PPTX
graphical method
L20 Simplex Method
Linear Programming
Simplex method
Simplex Method
Linear Programming (graphical method)
Unit.2. linear programming
Procedure Of Simplex Method
Duality in Linear Programming Problem
Transportation problems
Integer Linear Programming
Duality in Linear Programming
Formulation Lpp
Simplex two phase
Game Theory Operation Research
Duality
Big m method
4-The Simplex Method.ppt
Linear programming - Model formulation, Graphical Method
LINEAR PROGRAMMING Assignment help
graphical method
Ad

Similar to simplex method (20)

PPT
370_13735_EA221_2010_1__1_1_Simplex method.ppt
PPTX
Linear programming
PPTX
Linear programming ppt on operertion research
PPT
Solving Linear programming problem by Simplex method.ppt
PPTX
Simplex Algorithm
PPTX
SIMPLEX METHOD.pptx
PDF
Ch06_1-2_Simplex_Method.pdf
PPTX
Scientific Computing and linear programming
PPTX
Simplex algorithm
DOCX
Simplex method - Maximisation Case
PPTX
Simplex Algorithm
PPT
n7-LP-simplex.ppt
PDF
Chapter 3.Simplex Method hand out last.pdf
PPTX
linear programming
PPTX
Linear programming manzoor nabi
PPTX
Linear programming ppt
PPTX
Simplex1wwww1wwwww3w1w1wwwwww1a1wa111a1w
PPTX
performance management and Resource optimization part-2.pptx
PPTX
Unit 2.pptx
370_13735_EA221_2010_1__1_1_Simplex method.ppt
Linear programming
Linear programming ppt on operertion research
Solving Linear programming problem by Simplex method.ppt
Simplex Algorithm
SIMPLEX METHOD.pptx
Ch06_1-2_Simplex_Method.pdf
Scientific Computing and linear programming
Simplex algorithm
Simplex method - Maximisation Case
Simplex Algorithm
n7-LP-simplex.ppt
Chapter 3.Simplex Method hand out last.pdf
linear programming
Linear programming manzoor nabi
Linear programming ppt
Simplex1wwww1wwwww3w1w1wwwwww1a1wa111a1w
performance management and Resource optimization part-2.pptx
Unit 2.pptx
Ad

More from Dronak Sahu (20)

PPT
Farm credit appraisal techniques,
PPTX
3 R's OF CREDIT ANALYSIS
PPT
RURAL MARKETING
PPTX
DECISION MAKING
PPTX
GAME THEORY
PPTX
SUPPLY CHAIN MANAGEMENT
PPTX
CROP INSURANCE SCHEME
PPTX
Nabard
PPTX
Oligopoly
PPTX
Nabard
PPTX
National income
PPT
game THEORY ppt
PPTX
NABARD
PPTX
Natural resources 1
PPTX
National income
PPTX
Market failures in natural resource management
PPTX
case study of agricultural project
PPTX
VALUATION OF RENEWABLE NATURAL RESOURES
PPTX
SELF HELF GROUP
PPTX
L..p..
Farm credit appraisal techniques,
3 R's OF CREDIT ANALYSIS
RURAL MARKETING
DECISION MAKING
GAME THEORY
SUPPLY CHAIN MANAGEMENT
CROP INSURANCE SCHEME
Nabard
Oligopoly
Nabard
National income
game THEORY ppt
NABARD
Natural resources 1
National income
Market failures in natural resource management
case study of agricultural project
VALUATION OF RENEWABLE NATURAL RESOURES
SELF HELF GROUP
L..p..

Recently uploaded (20)

PPTX
Basic Concepts of Economics.pvhjkl;vbjkl;ptx
PDF
Dialnet-DynamicHedgingOfPricesOfNaturalGasInMexico-8788871.pdf
PPTX
Session 3. Time Value of Money.pptx_finance
PPTX
social-studies-subject-for-high-school-globalization.pptx
PDF
ECONOMICS AND ENTREPRENEURS LESSONSS AND
PPTX
Antihypertensive_Drugs_Presentation_Poonam_Painkra.pptx
PDF
ABriefOverviewComparisonUCP600_ISP8_URDG_758.pdf
PDF
Understanding University Research Expenditures (1)_compressed.pdf
PDF
final_dropping_the_baton_-_how_america_is_failing_to_use_russia_sanctions_and...
PPTX
Introduction to Customs (June 2025) v1.pptx
PPTX
Globalization-of-Religion. Contemporary World
PPT
E commerce busin and some important issues
PDF
financing insitute rbi nabard adb imf world bank insurance and credit gurantee
PPTX
The discussion on the Economic in transportation .pptx
PPTX
kyc aml guideline a detailed pt onthat.pptx
PPTX
Session 11-13. Working Capital Management and Cash Budget.pptx
PDF
Circular Flow of Income by Dr. S. Malini
PDF
NAPF_RESPONSE_TO_THE_PENSIONS_COMMISSION_8 _2_.pdf
PDF
Is Retirement Income a Three Dimensional (3-D) problem_ What is the differenc...
PPTX
What is next for the Fractional CFO - August 2025
Basic Concepts of Economics.pvhjkl;vbjkl;ptx
Dialnet-DynamicHedgingOfPricesOfNaturalGasInMexico-8788871.pdf
Session 3. Time Value of Money.pptx_finance
social-studies-subject-for-high-school-globalization.pptx
ECONOMICS AND ENTREPRENEURS LESSONSS AND
Antihypertensive_Drugs_Presentation_Poonam_Painkra.pptx
ABriefOverviewComparisonUCP600_ISP8_URDG_758.pdf
Understanding University Research Expenditures (1)_compressed.pdf
final_dropping_the_baton_-_how_america_is_failing_to_use_russia_sanctions_and...
Introduction to Customs (June 2025) v1.pptx
Globalization-of-Religion. Contemporary World
E commerce busin and some important issues
financing insitute rbi nabard adb imf world bank insurance and credit gurantee
The discussion on the Economic in transportation .pptx
kyc aml guideline a detailed pt onthat.pptx
Session 11-13. Working Capital Management and Cash Budget.pptx
Circular Flow of Income by Dr. S. Malini
NAPF_RESPONSE_TO_THE_PENSIONS_COMMISSION_8 _2_.pdf
Is Retirement Income a Three Dimensional (3-D) problem_ What is the differenc...
What is next for the Fractional CFO - August 2025

simplex method

  • 1. 6s-1 Linear Programming SIMPLEX METHOD Presented by:khushbu Kumari Deptt:Agricultural Economics M.Sc(Ag.) Previous
  • 2. 6s-2 Linear Programming  Simplex: A linear-programming algorithm that can solve problems having more than two decision variables.  The simplex technique involves generating a series of solutions in tabular form, called tableaus. This process continues as long as a positive (negative) rate of profit (cost) exists.  The simplex method is an iterative algorithm (a systematic solution procedure that keeps repeating a fixed series of steps, called, an iteration. WDDit is always advisable to use Simplex Method to avoid lengthy graphical procedure Simplex Method
  • 3. 6s-3 Linear Programming SIMPLEX METHOD Step-1 Write the standard maximization problem in standard form, introduce slack variables to form the initial system, and write the initial tableau. Step-3 Select the pivot column Step-5 Select the pivot element and perform the pivot operation STOP The optimal solution has been found. STOP The linear programming problem has no optimal solution Step 2 Are there any negative indicators in the bottom row? Step 4 Are there any positive elements in the pivot column above the dashed line? Simplex algorithm for standard maximization problems
  • 4. 6s-4 Linear Programming Slack Variables  A mathematical representation of surplus resources.” In real life problems, it’s unlikely that all resources will be used completely, so there usually are unused resources.  Slack variables represent the unused resources between the left-hand side and right-hand side of each inequality.
  • 5. 6s-5 Linear Programming Simplex algorithm Initialization: setup to start iterations, including finding an initial solution Optimality test: is the current solution optimal? if no if yes stop Iteration: Perform an iteration to find a better solution
  • 6. 6s-6 Linear Programming The simplex method in tabular form  Steps: 1. Initialization: a. transform all the constraints to equality by introducing slack, surplus, and artificial variables as follows: Constraint type Variable to be added ≥ + slack (s) ≤ - Surplus (s) + artificial (A) = + Artificial (A)
  • 7. 6s-7 Linear Programming Simplex method in tabular form b. Construct the initial simplex tableau Basic variable X1 … Xn S1 …... Sn A1 …. An RHS S Coefficient of the constraints b1 A bm Z Objective function coefficient In different signs Z value
  • 8. 6s-8 Linear Programming 2. Test for optimality: Case 1: Maximization problem the current basic feasible solution is optimal if every coefficient in the objective function row is negative Case 2: Minimization problem the current BF solution is optimal if every coefficient in the objective function row is positive. Simplex method in tabular form
  • 9. 6s-9 Linear Programming Simplex method in tabular form 3. Iteration Step 1: determine the entering basic variable by selecting the variable (automatically a nonbasic variable) with the most negative value (in case of maximization) or with the most positive (in case of minimization) in the last row (Z-row). Put a box around the column below this variable, and call it the “pivot column”
  • 10. 6s-10 Linear Programming Simplex method in tabular form  Step 2: Determine the leaving basic variable by applying the minimum ratio test as following: 1. Pick out each coefficient in the pivot column that is strictly positive (>0) 2. Divide each of these coefficients into the right hand side entry for the same row 3. Identify the row that has the smallest of these ratios 4. The basic variable for that row is the leaving variable, so replace that variable by the entering variable in the basic variable column of the next simplex tableau. Put a box around this row and call it the “pivot row”
  • 11. 6s-11 Linear Programming Simplex method in tabular form  Step 3: Solve for the new BF solution by using elementary row operations (multiply or divide a row by a nonzero constant; add or subtract a multiple of one row to another row) to construct a new simplex tableau, and then return to the optimality test. The specific elementary row operations are: 1. Divide the pivot row by the “pivot number” (the number in the intersection of the pivot row and pivot column) 2. For each other row that has a negative coefficient in the pivot column, add to this row the product of the absolute value of this coefficient and the new pivot row. 3. For each other row that has a positive coefficient in the pivot column, subtract from this row the product of the absolute value of this coefficient and the new pivot row.
  • 12. 6s-12 Linear Programming Simplex method  Example (All constraints are ) Solve the following problem using the simplex method  Maximize Z = 3X1+ 5X2 Subject to X1  4 2 X2  12 3X1 +2X2  18 X1 , X2  0
  • 13. 6s-13 Linear Programming Simplex method  Solution  Initialization 1. Standard form Maximize Z, Subject to Z - 3X1- 5X2 = 0 X1 + S1 = 4 2 X2 + S2 = 12 3X1 +2X2 + S3 = 18 X1 , X2, S1, S2, S3  0
  • 14. 6s-14 Linear Programming Initial tableau 2. Initial tableau Basic variable X1 X2 S1 S2 S3 RHS S1 1 0 1 0 0 4 S2 0 2 0 1 0 12 S3 3 2 0 0 1 18 Z -3 -5 0 0 0 0 Pivot column Pivot row Pivot number Entering variable Leaving variable
  • 15. 6s-15 Linear Programming Simplex tableau Notes:  The basic feasible solution at the initial tableau is (0, 0, 4, 12, 18) where: X1 = 0, X2 = 0, S1 = 4, S2 = 12, S3 = 18, and Z = 0 Where S1, S2, and S3 are basic variables X1 and X2 are nonbasic variables  The solution at the initial tableau is associated to the origin point at which all the decision variables are zero.
  • 16. 6s-16 Linear Programming Optimality test  By investigating the last row of the initial tableau, we find that there are some negative numbers. Therefore, the current solution is not optimal.
  • 17. 6s-17 Linear Programming Iteration  Step 1: Determine the entering variable by selecting the variable with the most negative in the last row.  From the initial tableau, in the last row (Z row), the coefficient of X1 is -3 and the coefficient of X2 is -5; therefore, the most negative is -5. consequently, X2 is the entering variable.  X2 is surrounded by a box and it is called the pivot column
  • 18. 6s-18 Linear Programming Iteration  Step 2: Determining the leaving variable by using the minimum ratio test as following: Basic variable Entering variable X2 (1) RHS (2) Ratio (2)(1) S1 0 4 None S2 Leaving 2 12 6 Smallest ratio S3 2 18 9
  • 19. 6s-19 Linear Programming Iteration  Step 3: solving for the new BF solution by using the eliminatory row operations as following: 1. New pivot row = old pivot row  pivot number Basic variable X1 X2 S1 S2 S3 RHS S1 X2 0 1 0 1/2 0 6 S3 Z Note that X2 becomes in the basic variables list instead of S2
  • 20. 6s-20 Linear Programming iteration 2. For the other row apply this rule: New row = old row – the coefficient of this row in the pivot column (new pivot row). For S1 1 0 1 0 0 4 - 0 (0 1 0 1/2 0 6) 1 0 1 0 0 4 For S3 3 2 0 0 1 18 - 2 (0 1 0 1/2 0 6) 3 0 0 -1 1 6 for Z -3 -5 0 0 0 0 - -5(0 1 0 1/2 0 6) -3 0 0 5/2 0 30
  • 21. 6s-21 Linear Programming Iteration Basic variable X1 X2 S1 S2 S3 RHS S1 1 0 1 0 0 4 X2 0 1 0 1/2 0 6 S3 3 0 0 -1 1 6 Z -3 0 0 5/2 0 30 The most negative value; therefore, X1 is the entering variable The smallest ratio is 6/3 =2; therefore, S3 is the leaving variable This solution is not optimal, since there is a negative numbers in the last row
  • 22. 6s-22 Linear Programming Iteration  Apply the same rules we will obtain this solution: Basic variable X1 X2 S1 S2 S3 RHS S1 0 0 1 1/3 -1/3 2 X2 0 1 0 1/2 0 6 X1 1 0 0 -1/3 1/3 2 Z 0 0 0 3/2 1 36 This solution is optimal; since there is no negative solution in the last row: basic variables are X1 = 2, X2 = 6 and S1 = 2; the nonbasic variables are S2 = S3 = 0 Z = 36
  • 23. 6s-23 Linear Programming Simplex method in case of Artificial variables  Solve the following linear programming problem by using the simplex method:  Min Z =2 X1 + 3 X2 S.t. ½ X1 + ¼ X2 ≥ 4 X1 + 3X2  20 X1 + X2 = 10 X1, X2  0
  • 24. 6s-24 Linear Programming .  Solution Step 1: standard form Min Z, s.t. Z – 2 X1 – 3 X2 - M A1 -M A2 = 0 ½ X1 + ¼ X2 + S1 = 4 X1 + 3X2 - S2 + A1 = 20 X1 + X2 + A2 = 10 X1, X2 ,S1, S2, A1, A2  0
  • 25. 6s-25 Linear Programming .  Step 2: Initial tableau Basic variables X1 2 X2 3 S1 0 S2 0 A1 M A2 M RHS S1 ½ ¼ 1 0 0 0 4 A1 1 3 0 -1 1 0 20 A2 1 1 0 0 0 1 10 Z -2 -3 0 0 -M -M 0
  • 26. 6s-26 Linear Programming .  To correct this violation before starting the simplex algorithm, the elementary row operations are used as follows: New (Z row) = old (z row) ± M (A1 row) ± M (A2 row) In our case, it will be positive since M is negative in the Z row, as following: Old (Z row): -2 -3 0 0 -M -M 0 M (A1 row): M 3M 0 -M M o 20M M (A2 row): M M 0 0 0 M 10M New (Z row):2M-2 4M-3 0 -M 0 0 30M It becomes zero
  • 27. 6s-27 Linear Programming  The initial tableau will be: Basic variables X1 2 X2 3 S1 0 S2 0 A1 M A2 M RHS S1 1/2 1/4 1 0 0 0 4 A1 1 3 0 -1 1 0 20 A2 1 1 0 0 0 1 10 Z 2M-2 4M-3 0 -M 0 0 30M • Since there is a positive value in the last row, this solution is not optimal • The entering variable is X2 (it has the most positive value in the last row) • The leaving variable is A1 (it has the smallest ratio)
  • 28. 6s-28 Linear Programming .  First iteration Basic variables X1 2 X2 3 S1 0 S2 0 A1 M A2 M RHS S1 5/12 0 1 1/12 -1/12 0 7/3 X2 1/3 1 0 -1/3 1/3 0 20/3 A2 2/3 0 0 1/3 -1/3 1 10/3 Z 2/3M-1 0 0 1/3M-1 1-4/3M 0 20+10/3M • Since there is a positive value in the last row, this solution is not optimal • The entering variable is X1 (it has the most positive value in the last row) • The leaving variable is A2 (it has the smallest ratio)
  • 29. 6s-29 Linear Programming .  Second iteration Basic variables X1 X2 S1 S2 A1 A2 RHS S1 0 0 1 -1/8 1/8 -5/8 1/4 X2 0 1 0 -1/2 1/2 -1/2 5 X1 1 0 0 1/2 -1/2 3/2 5 Z 0 0 0 -1/2 ½-M 3/2-M 25 This solution is optimal, since there is no positive value in the last row. The optimal solution is: X1 = 5, X2 = 5, S1 = ¼ A1 = A2 = 0 and Z = 25
  • 30. 6s-30 Linear Programming .  In the final tableau, if one or more artificial variables (A1, A2, …) still basic and has a nonzero value, then the problem has an infeasible solution.  All other notes are still valid in the Big M method.