SlideShare a Scribd company logo
-Simplex Algorithm
 Aizaz Ahmad
 Ghaffar Farooq
 Khwaja Bilal
 Sarwan Pasha
1
Linear Programming
Overview
 Introduction
 Simplex Algorithm/Method
 Steps For Simplex Algorithm
1. Conversion to Slack Format
2. Simplex Tableau
3. Pivot Column
4. Theta Ratio and Pivot Row
5. Pivoting
1. Calculate Rownew
2. Calculate Row – C.Rownew
 Cycling – Bland’s Rule
 Software Simulation
 Efficiency
 Other Variants of the Algorithm
 Summary of Algorithm
 Links
 Acknowledgement 2
Simplex Method
 Last week, we covered on using the graphical approach in deriving solutions
for LP problem
 Question:
 Can we solve all LP problems using graphical approach ?
3
Answer is “NO”
 Why?
 Consider the following scenario:
For 10 equations with 15 variables there exists a huge number ( 10
15
𝐶 = 3003) of basic
feasible solutions. In such a case, inspection of all the solutions one-by-one is not
practically feasible.
 It is extremely difficult to use a graphical approach to find its
maximized/minimized solution.
 Thus, we need another systematic approach to solve an LP problem -
known as Simplex Method/Algorithm.
4
Simplex Method
 The most popular method used for the solution of Linear Programming Problems
(LPP) is the simplex method.
 The journal Computing in Science and Engineering listed it as one of the top 10
algorithms of the twentieth century.
 An American Mathematical Scientist, George Bernard Dantzig is known for his
development of the simplex algorithm. That’s why we also name it Dantzig’s
Algorithm.
 The algorithm is derived from the geometrical concept of Simplex
(plural simplexes or simplices).
 Simplex Algorithm can solve an equation for many variables (dimensions).
5
Steps for Simplex Algorithm
1. Conversion to Slack Form
We need to convert our standard equation into a slack format first.
We refer slack format here as.
 It must be a maximization problem.
 All constraints are in a form of “equation”
 i.e. not equation of ≥ or ≤
 All variables must be required to be nonnegative
6
Slack Format
7
Consider the following 5 types of possible equation in a LP problem:
Slack Format
8
We will tell you why we need this format later!
Where, S is a slack variable
Sample of an LP problem

9
Converting it to slack format would be like…
Slack Format

10
Difference b/w Standard and Slack Format

11
Standard Format Slack Format
Slack Variables!

More Example on Slack Format
12
 Consider the following:
We can see that min has be converted to max and slack variables are added.
Transform the following linear
equation into slack format
2. Simplex Tableau
13
Simplex Tableau
 The simplex method progresses through a series of adjacent extreme points
(basic feasible solutions) with increasing values of the objective function
 Each such point can be represented by a simplex tableau, a table storing the
information about the basic feasible solution corresponding to the extreme
point.
 For Example:
𝑚𝑎𝑥𝑖𝑚𝑖𝑧𝑒
3𝑥 + 5𝑦 + 0𝑢 + 0𝑣
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜
𝑥 + 𝑦 + 𝑢 = 4
𝑥 + 3𝑦 + + 𝑣 = 6
𝑥, 𝑦, 𝑢, 𝑣 ≥ 0.
14
𝑚𝑎𝑥𝑖𝑚𝑖𝑧𝑒
3𝑥 + 5𝑦
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜
𝑥 + 𝑦 ≤ 4
𝑥 + 3𝑦 ≤ 6
𝑥, 𝑦, 𝑢, 𝑣 ≥ 0.
Simplex Tableau
𝑢
𝑣
1 1 1 0 4
1 3 0 1 6
-3 -5 0 0 0
𝑥 𝑦 𝑢 𝑣
Initialized by the
coefficients of the
objective function. The
signs are reversed in this
row (objective row)
We have constraints + 1
rows and variables +1
columns
Pivot Column/Entering Variable.
In our example, its Y
15
Simplex Tableau
3.Pivot Column
 Objective Row:
 The objective row is used by the simplex method to check whether the current
tableau represents an optimal solution.
 It does have the optimum solution if all the entries in the objective row—except, possibly,
the one in the last column—are nonnegative.
 Pivot Column/Entering Variable:
 Select the minimum number in the objective row, such a choice yields the largest
increase in the objective function’s value per unit of change in a variable’s value.
The most negative one selected will be the pivot column with an entering variable.
It is indicated by the up arrow.
16
Simplex Tableau
4. Calculating the Theta Ratio and Departing Variable
 Departing Variable:
 Also called leaving variable or pivot row i.e., a basic variable to become non basic
in the next tableau. Indicated by
 How to calculate:
 For each positive entry in the pivot column, compute the θ-ratio by dividing the
row’s last entry by the entry in the pivot column.
 The row with the smallest θ-ratio determines the departing variable, i.e., the
variable to become non basic.
 If there are no positive entries in the pivot column, no θ-ratio can be computed,
which indicates that the problem is unbounded and the algorithm stops.
17
Simplex Tableau
Calculating the Theta Ratio and Departing Variable
𝑢
𝑣
1 1 1 0 4
1 3 0 1 6
-3 -5 0 0 0
𝑥 𝑦 𝑢 𝑣
Pivot Column/Entering Variable
𝜃 − 𝑟𝑎𝑡𝑖𝑜 =
4
1
= 4
𝜃 − 𝑟𝑎𝑡𝑖𝑜 =
6
3
= 2
The row with the smallest θ-ratio determines the
departing variable. For our example, it is variable v.
The intersecting element of Pivot Column and Pivot
Row is the pivot.
In the next tableau the intersected element will
become 1 and the rest of elements will become 0 in
the pivot column.
Departing Variable / Leaving Variable/ Pivot Row
18
5. Pivoting
 To transform the current tableau into the next one and increase the value of
the objective function to the next feasible solution. We have to take some
steps. Called Pivoting
 Pivoting, is similar to the principal step of the Gauss-Jordan elimination
algorithm for solving systems of linear equations.
 Steps:
1. First, divide all the entries of the pivot row by the pivot, its entry in the pivot
column, to obtain Rownew
2. Then, replace each of the other rows, including the objective row, by the
difference
 𝑅𝑜𝑤 − 𝑐. 𝑅𝑜𝑤 𝑛𝑒𝑤
 Where c is the row’s entry in the pivot column.
19
Pivoting
1. Calculating Rownew
𝑢
𝑣
1 1 1 0 4
1 3 0 1 6
-3 -5 0 0 0
𝑥 𝑦 𝑢 𝑣
𝑅𝑜𝑤 𝑛𝑒𝑤 =
1
3
3
3
0
3
1
3
6
3
𝑅𝑜𝑤 𝑛𝑒𝑤 =
1
3
, 1, 0,
1
3
, 2
The pivot row will be replaced by the Rownew we calculated.
20
Pivoting
2. Calculating Row – c.Rownew
 As we have calculated the 2nd row. Now we will apply this formula on the rest
of the rows. i.e. Row 1 and Row 3 in our example.
 For Row 1:
 Row 1 – C. Rownew where C = 1
 1 − 1.
1
3
1 − 1.1 1 − 1.0 0 − 1.
1
3
4 − 1.2

2
3
0 1 −
1
3
2
 For Row 3:
 Row 3 – C. Rownew where C = -5
 −3 − −5 .
1
3
− 5 − (−5). 1 0 − (−5). 0 0 − (−5).
1
3
0 − (−5). 2
 −
4
3
0 0
5
3
10
Now we will replace all the rows with their new respective rows in order to make the
new tableau.
21
Pivoting
Next Tableau
𝑢
𝑦
2/3 0 1 -1/3 2
1/3 1 0 1/3 2
-4/3 0 0 5/3 10
𝑥 𝑦 𝑢 𝑣
Now we can see that the intersected element became 1 and the rest of them
became zero in pivot column. (Canonical Unit Vector)
The Entering variable Y took the place of departing variable V.
But…
We cannot finish here, because the objective row has still a negative value. We
have to eliminate it by doing further iterations.
22
2nd Iteration
 We have to go through all the steps again. Including the selection of pivot column calculating
pivot row and then pivoting.
 So our Rownew would be: 1 0
3
2
−
1
2
3
 For Other Rows:
 For Row 2:
 Row 2 – C. Rownew where C = 1/3

1
3
−
1
3
. 1 1 −
1
3
. (0) 0 −
1
3
. (
3
2
)
1
3
−
1
3
. (−
1
2
) 2 −
1
3.
. 3
 0 1 −
1
2
1
2
1
 For Row 3:
 Row 3 – C. Rownew where C = -4/3
 −
4
3
− −
4
3
. 1 0 − −
4
3
. 0 0 − −
4
3
.
3
2
5
3
− −
4
3
. (−
1
2
) 10 − −
4
3
. 3
 0 0 2 1 14
Put in next tableau…
23
2nd Iteration Tableau
𝑥
𝑦
1 0 3/2 -1/2 3
0 1 -1/2 1/2 1
0 0 2 1 14
𝑥 𝑦 𝑢 𝑣
We can see that the last row has no negative value left. We can safely stop our
iterations here.
We can conclude our maximized solution as:
𝑥 = 3
𝑦 = 1
𝑢 = 0
𝑣 = 0
𝑀𝑎𝑥 = 14
We choose u and v equal
to 0, because their
column has all distinct
values. If they were like
x and y, they’d have
some value.
24
Cycling – Bland’s Rule
 When an objective function’s values “stall” for several iterations in a row and
that the algorithm cycles back to a previously considered point and hence
never terminate. This phenomenon is called cycling.
 Although, it rarely happens, but when it does - A simple modification of the
simplex method, called Bland’s rule, eliminates even the theoretical
possibility of cycling.
25
Cycling – Bland’s Rule
 Assuming that the variables are denoted by a subscripted letter (e.g., x1,
x2,..., xn), this rule can be stated as follows:
1. Among the columns with a negative entry in the objective row, select the
column with the smallest subscript in choosing pivot column.
2. Resolve a tie among the smallest θ-ratios by selecting the row labeled by the
basic variable with the smallest subscript in choosing pivot row.
26
Software Simulation
 Simplex Method has became so efficient that its calculation packages are
even available online. One of them is as follows:
 For ease, we will copy the same problem to the online tool and check
whether it gives us the same result:
maximize p = 3x +5y
subject to x + y = 4, x+3y = 6
 Simplex Method Online Tool
27
Efficiency
How efficient is the simplex method?
28
Efficiency of Simplex Algorithm
 Since we know that the algorithm progresses through a sequence of adjacent
points of a feasible region. Right?
 So, one should probably expect bad news because the number of extreme
points is known to grow exponentially with the problem size.
 The worst-case efficiency of the simplex method has been shown to be
exponential.
 But Fortunately!
 More than half a century of practical experience with the algorithm has
shown that the number of iterations in a typical application ranges between
m and 3m, with the number of operations per iteration proportional to mn,
where m and n are the numbers of equality constraints and variables,
respectively.
29
Other Variants of the Algorithm
 Ellipsoid Method:
 An important mile- stone in the history of such algorithms was the proof by L. G.
Khachian showing that the ellipsoid method can solve any linear programming
problem in polynomial time.
 However, ellipsoid method was much slower than the simplex method in practice
 Karmarker’s Method
 Narendra Karmarkar published an algorithm that not only had a polynomial worst-
case efficiency but also was competitive with the simplex method. This method
generates a sequence of feasible solutions that lie within the feasible region
rather than going through a sequence of adjacent extreme points as the simplex
method does. (Interior Point Methods).
30
Summary of Simplex Algorithm
 Step 0
 Initialization. Present a given linear programming problem in standard form and set up an initial
tableau with non negative entries in the rightmost column.
 Step 1
 Optimality test. If all the entries in the objective row are nonnegative—stop: the tableau
represents an optimal solution whose basic variables’ values are in the rightmost column and
the remaining, non basic variables’ values are zeros.
 Step 2
 Finding the entering variable. Select the most negative entry from among the first n elements
of the objective row.
 Step 3
 Finding the departing variable. For each positive entry in the pivot column, calculate the θ-
ratio. Find the row with the smallest θ-ratio.
 Step 4
 Forming the next tableau. Divide all the entries in the pivot row by its entry in the pivot
column. Subtract from each of the other rows, including the objective row, the new pivot row
multiplied by the entry in the pivot column of the row in question. (This will make all the
entries in the pivot column 0’s except for 1in the pivot row.) Replace the label of the pivot row
by the variable’s name of the pivot column and go back to Step 1. 31
Links
 Simplex Method Online Tool
 Online Graphical Representation Tool
 Click here to download the file
 Helpful Website on Simplex Method
 Infeasible Solution
32
Acknowledgment
The material presented in this lecture is adopted from:
 Anany Levitin. Introduction to Design and Analysis of Algorithms, 3rd Edition
 Thomas H. Cormen. Introduction to Algorithms, 3rd Edition
33
Thank You!
34

More Related Content

What's hot

Quadratic Programming : KKT conditions with inequality constraints
Quadratic Programming : KKT conditions with inequality constraintsQuadratic Programming : KKT conditions with inequality constraints
Quadratic Programming : KKT conditions with inequality constraintsMrinmoy Majumder
 
Transportation model
Transportation modelTransportation model
Transportation modelLokesh Payasi
 
Simplex Method
Simplex MethodSimplex Method
Simplex MethodSachin MK
 
Hungarian Method
Hungarian MethodHungarian Method
Hungarian MethodAritra7469
 
Transportation model
Transportation modelTransportation model
Transportation modelshakila haque
 
Linear Programming (graphical method)
Linear Programming (graphical method)Linear Programming (graphical method)
Linear Programming (graphical method)Kamel Attar
 
Sensitivity analysis linear programming copy
Sensitivity analysis linear programming   copySensitivity analysis linear programming   copy
Sensitivity analysis linear programming copyKiran Jadhav
 
Chapter 4 Simplex Method ppt
Chapter 4  Simplex Method pptChapter 4  Simplex Method ppt
Chapter 4 Simplex Method pptDereje Tigabu
 
Operation Research (Simplex Method)
Operation Research (Simplex Method)Operation Research (Simplex Method)
Operation Research (Simplex Method)Shivani Gautam
 
Simplex Method Explained
Simplex Method ExplainedSimplex Method Explained
Simplex Method ExplainedAtif Shahzad
 
Sensitivity analysis in linear programming problem ( Muhammed Jiyad)
Sensitivity analysis in linear programming problem ( Muhammed Jiyad)Sensitivity analysis in linear programming problem ( Muhammed Jiyad)
Sensitivity analysis in linear programming problem ( Muhammed Jiyad)Muhammed Jiyad
 
Two Phase Method- Linear Programming
Two Phase Method- Linear ProgrammingTwo Phase Method- Linear Programming
Two Phase Method- Linear ProgrammingManas Lad
 
Transportation problem
Transportation problemTransportation problem
Transportation problemShubhagata Roy
 
Inroduction to Decision Theory and Decision Making Under Certainty
Inroduction to Decision Theory and Decision Making Under CertaintyInroduction to Decision Theory and Decision Making Under Certainty
Inroduction to Decision Theory and Decision Making Under CertaintyAbhi23396
 
Integer Linear Programming
Integer Linear ProgrammingInteger Linear Programming
Integer Linear ProgrammingSukhpalRamanand
 

What's hot (20)

Quadratic Programming : KKT conditions with inequality constraints
Quadratic Programming : KKT conditions with inequality constraintsQuadratic Programming : KKT conditions with inequality constraints
Quadratic Programming : KKT conditions with inequality constraints
 
Transportation model
Transportation modelTransportation model
Transportation model
 
Simplex Method.pptx
Simplex Method.pptxSimplex Method.pptx
Simplex Method.pptx
 
Simplex Method
Simplex MethodSimplex Method
Simplex Method
 
Hungarian Method
Hungarian MethodHungarian Method
Hungarian Method
 
LINEAR PROGRAMMING
LINEAR PROGRAMMINGLINEAR PROGRAMMING
LINEAR PROGRAMMING
 
Transportation model
Transportation modelTransportation model
Transportation model
 
Linear Programming (graphical method)
Linear Programming (graphical method)Linear Programming (graphical method)
Linear Programming (graphical method)
 
Sensitivity analysis linear programming copy
Sensitivity analysis linear programming   copySensitivity analysis linear programming   copy
Sensitivity analysis linear programming copy
 
Chapter 4 Simplex Method ppt
Chapter 4  Simplex Method pptChapter 4  Simplex Method ppt
Chapter 4 Simplex Method ppt
 
Simplex algorithm
Simplex algorithmSimplex algorithm
Simplex algorithm
 
Operation Research (Simplex Method)
Operation Research (Simplex Method)Operation Research (Simplex Method)
Operation Research (Simplex Method)
 
Simplex Method Explained
Simplex Method ExplainedSimplex Method Explained
Simplex Method Explained
 
Linear Programming
Linear ProgrammingLinear Programming
Linear Programming
 
Linear programming
Linear programmingLinear programming
Linear programming
 
Sensitivity analysis in linear programming problem ( Muhammed Jiyad)
Sensitivity analysis in linear programming problem ( Muhammed Jiyad)Sensitivity analysis in linear programming problem ( Muhammed Jiyad)
Sensitivity analysis in linear programming problem ( Muhammed Jiyad)
 
Two Phase Method- Linear Programming
Two Phase Method- Linear ProgrammingTwo Phase Method- Linear Programming
Two Phase Method- Linear Programming
 
Transportation problem
Transportation problemTransportation problem
Transportation problem
 
Inroduction to Decision Theory and Decision Making Under Certainty
Inroduction to Decision Theory and Decision Making Under CertaintyInroduction to Decision Theory and Decision Making Under Certainty
Inroduction to Decision Theory and Decision Making Under Certainty
 
Integer Linear Programming
Integer Linear ProgrammingInteger Linear Programming
Integer Linear Programming
 

Viewers also liked

A Modular Genetic Algorithm Specialized for Linear Constraints
A Modular Genetic Algorithm Specialized for Linear ConstraintsA Modular Genetic Algorithm Specialized for Linear Constraints
A Modular Genetic Algorithm Specialized for Linear ConstraintsStefano Costanzo
 
An algorithm for solving integer linear programming problems
An algorithm for solving integer linear programming problemsAn algorithm for solving integer linear programming problems
An algorithm for solving integer linear programming problemseSAT Journals
 
Numerical analysis genetic algorithms
Numerical analysis  genetic algorithmsNumerical analysis  genetic algorithms
Numerical analysis genetic algorithmsSHAMJITH KM
 
Genetic programming
Genetic programmingGenetic programming
Genetic programmingMeghna Singh
 
Mba i qt unit-1.3_linear programming in om
Mba i qt unit-1.3_linear programming in omMba i qt unit-1.3_linear programming in om
Mba i qt unit-1.3_linear programming in omRai University
 
Transportation+method
Transportation+methodTransportation+method
Transportation+methodvideoaakash15
 
Optimization in scilab
Optimization in scilabOptimization in scilab
Optimization in scilabScilab
 
Mba i ot unit-1.1_linear programming
Mba i ot unit-1.1_linear programmingMba i ot unit-1.1_linear programming
Mba i ot unit-1.1_linear programmingRai University
 
Operation Research Techniques
Operation Research Techniques Operation Research Techniques
Operation Research Techniques Lijin Mathew
 
Foreign Exhange Rate
Foreign Exhange RateForeign Exhange Rate
Foreign Exhange RateNikhil Dhiman
 
Dynamic Programming - Part 1
Dynamic Programming - Part 1Dynamic Programming - Part 1
Dynamic Programming - Part 1Amrinder Arora
 
Karmarkar's Algorithm For Linear Programming Problem
Karmarkar's Algorithm For Linear Programming ProblemKarmarkar's Algorithm For Linear Programming Problem
Karmarkar's Algorithm For Linear Programming ProblemAjay Dhamija
 
operation research
operation researchoperation research
operation researchujal70
 
Foreign exchange rate impact (1)
Foreign exchange rate impact (1)Foreign exchange rate impact (1)
Foreign exchange rate impact (1)Mohit Bathineni
 
Simplex method
Simplex methodSimplex method
Simplex methodAbu Bashar
 

Viewers also liked (20)

Simplex Algorithm
Simplex AlgorithmSimplex Algorithm
Simplex Algorithm
 
Simplex Algorithm
Simplex AlgorithmSimplex Algorithm
Simplex Algorithm
 
A Modular Genetic Algorithm Specialized for Linear Constraints
A Modular Genetic Algorithm Specialized for Linear ConstraintsA Modular Genetic Algorithm Specialized for Linear Constraints
A Modular Genetic Algorithm Specialized for Linear Constraints
 
An algorithm for solving integer linear programming problems
An algorithm for solving integer linear programming problemsAn algorithm for solving integer linear programming problems
An algorithm for solving integer linear programming problems
 
Numerical analysis genetic algorithms
Numerical analysis  genetic algorithmsNumerical analysis  genetic algorithms
Numerical analysis genetic algorithms
 
Genetic programming
Genetic programmingGenetic programming
Genetic programming
 
Mba i qt unit-1.3_linear programming in om
Mba i qt unit-1.3_linear programming in omMba i qt unit-1.3_linear programming in om
Mba i qt unit-1.3_linear programming in om
 
Bounded var
Bounded varBounded var
Bounded var
 
Transportation+method
Transportation+methodTransportation+method
Transportation+method
 
Optimization in scilab
Optimization in scilabOptimization in scilab
Optimization in scilab
 
Dynamic programming
Dynamic programming Dynamic programming
Dynamic programming
 
Mba i ot unit-1.1_linear programming
Mba i ot unit-1.1_linear programmingMba i ot unit-1.1_linear programming
Mba i ot unit-1.1_linear programming
 
T P
T PT P
T P
 
Operation Research Techniques
Operation Research Techniques Operation Research Techniques
Operation Research Techniques
 
Foreign Exhange Rate
Foreign Exhange RateForeign Exhange Rate
Foreign Exhange Rate
 
Dynamic Programming - Part 1
Dynamic Programming - Part 1Dynamic Programming - Part 1
Dynamic Programming - Part 1
 
Karmarkar's Algorithm For Linear Programming Problem
Karmarkar's Algorithm For Linear Programming ProblemKarmarkar's Algorithm For Linear Programming Problem
Karmarkar's Algorithm For Linear Programming Problem
 
operation research
operation researchoperation research
operation research
 
Foreign exchange rate impact (1)
Foreign exchange rate impact (1)Foreign exchange rate impact (1)
Foreign exchange rate impact (1)
 
Simplex method
Simplex methodSimplex method
Simplex method
 

Similar to Simplex Algorithm

SIMPLEX METHOD.pptx
SIMPLEX METHOD.pptxSIMPLEX METHOD.pptx
SIMPLEX METHOD.pptxTista3
 
Ch06_1-2_Simplex_Method.pdf
Ch06_1-2_Simplex_Method.pdfCh06_1-2_Simplex_Method.pdf
Ch06_1-2_Simplex_Method.pdfFredCuenca
 
Wk 6 part 2 non linearites and non linearization april 05
Wk 6 part 2 non linearites and non linearization april 05Wk 6 part 2 non linearites and non linearization april 05
Wk 6 part 2 non linearites and non linearization april 05Charlton Inao
 
performance management and Resource optimization part-2.pptx
performance management and Resource optimization part-2.pptxperformance management and Resource optimization part-2.pptx
performance management and Resource optimization part-2.pptxtefera21
 
control system Lab 01-introduction to transfer functions
control system Lab 01-introduction to transfer functionscontrol system Lab 01-introduction to transfer functions
control system Lab 01-introduction to transfer functionsnalan karunanayake
 
Meeting w6 chapter 2 part 3
Meeting w6   chapter 2 part 3Meeting w6   chapter 2 part 3
Meeting w6 chapter 2 part 3mkazree
 
Meeting w6 chapter 2 part 3
Meeting w6   chapter 2 part 3Meeting w6   chapter 2 part 3
Meeting w6 chapter 2 part 3Hattori Sidek
 
Scilab as a calculator
Scilab as a calculatorScilab as a calculator
Scilab as a calculatorScilab
 
DSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-TransformDSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-TransformAmr E. Mohamed
 
Chapter 3.Simplex Method hand out last.pdf
Chapter 3.Simplex Method hand out last.pdfChapter 3.Simplex Method hand out last.pdf
Chapter 3.Simplex Method hand out last.pdfTsegay Berhe
 
Inverse laplacetransform
Inverse laplacetransformInverse laplacetransform
Inverse laplacetransformTarun Gehlot
 

Similar to Simplex Algorithm (20)

SIMPLEX METHOD.pptx
SIMPLEX METHOD.pptxSIMPLEX METHOD.pptx
SIMPLEX METHOD.pptx
 
Ch06_1-2_Simplex_Method.pdf
Ch06_1-2_Simplex_Method.pdfCh06_1-2_Simplex_Method.pdf
Ch06_1-2_Simplex_Method.pdf
 
Wk 6 part 2 non linearites and non linearization april 05
Wk 6 part 2 non linearites and non linearization april 05Wk 6 part 2 non linearites and non linearization april 05
Wk 6 part 2 non linearites and non linearization april 05
 
EPE821_Lecture3.pptx
EPE821_Lecture3.pptxEPE821_Lecture3.pptx
EPE821_Lecture3.pptx
 
performance management and Resource optimization part-2.pptx
performance management and Resource optimization part-2.pptxperformance management and Resource optimization part-2.pptx
performance management and Resource optimization part-2.pptx
 
control system Lab 01-introduction to transfer functions
control system Lab 01-introduction to transfer functionscontrol system Lab 01-introduction to transfer functions
control system Lab 01-introduction to transfer functions
 
Meeting w6 chapter 2 part 3
Meeting w6   chapter 2 part 3Meeting w6   chapter 2 part 3
Meeting w6 chapter 2 part 3
 
Meeting w6 chapter 2 part 3
Meeting w6   chapter 2 part 3Meeting w6   chapter 2 part 3
Meeting w6 chapter 2 part 3
 
Scilab as a calculator
Scilab as a calculatorScilab as a calculator
Scilab as a calculator
 
Simplex method
Simplex methodSimplex method
Simplex method
 
DSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-TransformDSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-Transform
 
L06
L06L06
L06
 
Chapter 3.Simplex Method hand out last.pdf
Chapter 3.Simplex Method hand out last.pdfChapter 3.Simplex Method hand out last.pdf
Chapter 3.Simplex Method hand out last.pdf
 
Python_Module_2.pdf
Python_Module_2.pdfPython_Module_2.pdf
Python_Module_2.pdf
 
Inverse laplacetransform
Inverse laplacetransformInverse laplacetransform
Inverse laplacetransform
 
n7-LP-simplex.ppt
n7-LP-simplex.pptn7-LP-simplex.ppt
n7-LP-simplex.ppt
 
Regression.pptx
Regression.pptxRegression.pptx
Regression.pptx
 
Regression.pptx
Regression.pptxRegression.pptx
Regression.pptx
 
Daa unit 1
Daa unit 1Daa unit 1
Daa unit 1
 
Systems of linear equations; matrices
Systems of linear equations; matricesSystems of linear equations; matrices
Systems of linear equations; matrices
 

Recently uploaded

Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePedroFerreira53928
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxricssacare
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...Denish Jangid
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxakshayaramakrishnan21
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXMIRIAMSALINAS13
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleCeline George
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryEugene Lysak
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfQucHHunhnh
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17Celine George
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...Nguyen Thanh Tu Collection
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfjoachimlavalley1
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptSourabh Kumar
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxbennyroshan06
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportAvinash Rai
 

Recently uploaded (20)

Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 

Simplex Algorithm

  • 1. -Simplex Algorithm  Aizaz Ahmad  Ghaffar Farooq  Khwaja Bilal  Sarwan Pasha 1 Linear Programming
  • 2. Overview  Introduction  Simplex Algorithm/Method  Steps For Simplex Algorithm 1. Conversion to Slack Format 2. Simplex Tableau 3. Pivot Column 4. Theta Ratio and Pivot Row 5. Pivoting 1. Calculate Rownew 2. Calculate Row – C.Rownew  Cycling – Bland’s Rule  Software Simulation  Efficiency  Other Variants of the Algorithm  Summary of Algorithm  Links  Acknowledgement 2
  • 3. Simplex Method  Last week, we covered on using the graphical approach in deriving solutions for LP problem  Question:  Can we solve all LP problems using graphical approach ? 3
  • 4. Answer is “NO”  Why?  Consider the following scenario: For 10 equations with 15 variables there exists a huge number ( 10 15 𝐶 = 3003) of basic feasible solutions. In such a case, inspection of all the solutions one-by-one is not practically feasible.  It is extremely difficult to use a graphical approach to find its maximized/minimized solution.  Thus, we need another systematic approach to solve an LP problem - known as Simplex Method/Algorithm. 4
  • 5. Simplex Method  The most popular method used for the solution of Linear Programming Problems (LPP) is the simplex method.  The journal Computing in Science and Engineering listed it as one of the top 10 algorithms of the twentieth century.  An American Mathematical Scientist, George Bernard Dantzig is known for his development of the simplex algorithm. That’s why we also name it Dantzig’s Algorithm.  The algorithm is derived from the geometrical concept of Simplex (plural simplexes or simplices).  Simplex Algorithm can solve an equation for many variables (dimensions). 5
  • 6. Steps for Simplex Algorithm 1. Conversion to Slack Form We need to convert our standard equation into a slack format first. We refer slack format here as.  It must be a maximization problem.  All constraints are in a form of “equation”  i.e. not equation of ≥ or ≤  All variables must be required to be nonnegative 6
  • 7. Slack Format 7 Consider the following 5 types of possible equation in a LP problem:
  • 8. Slack Format 8 We will tell you why we need this format later! Where, S is a slack variable
  • 9. Sample of an LP problem  9 Converting it to slack format would be like…
  • 11. Difference b/w Standard and Slack Format  11 Standard Format Slack Format Slack Variables! 
  • 12. More Example on Slack Format 12  Consider the following: We can see that min has be converted to max and slack variables are added. Transform the following linear equation into slack format
  • 14. Simplex Tableau  The simplex method progresses through a series of adjacent extreme points (basic feasible solutions) with increasing values of the objective function  Each such point can be represented by a simplex tableau, a table storing the information about the basic feasible solution corresponding to the extreme point.  For Example: 𝑚𝑎𝑥𝑖𝑚𝑖𝑧𝑒 3𝑥 + 5𝑦 + 0𝑢 + 0𝑣 𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑥 + 𝑦 + 𝑢 = 4 𝑥 + 3𝑦 + + 𝑣 = 6 𝑥, 𝑦, 𝑢, 𝑣 ≥ 0. 14 𝑚𝑎𝑥𝑖𝑚𝑖𝑧𝑒 3𝑥 + 5𝑦 𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑥 + 𝑦 ≤ 4 𝑥 + 3𝑦 ≤ 6 𝑥, 𝑦, 𝑢, 𝑣 ≥ 0.
  • 15. Simplex Tableau 𝑢 𝑣 1 1 1 0 4 1 3 0 1 6 -3 -5 0 0 0 𝑥 𝑦 𝑢 𝑣 Initialized by the coefficients of the objective function. The signs are reversed in this row (objective row) We have constraints + 1 rows and variables +1 columns Pivot Column/Entering Variable. In our example, its Y 15
  • 16. Simplex Tableau 3.Pivot Column  Objective Row:  The objective row is used by the simplex method to check whether the current tableau represents an optimal solution.  It does have the optimum solution if all the entries in the objective row—except, possibly, the one in the last column—are nonnegative.  Pivot Column/Entering Variable:  Select the minimum number in the objective row, such a choice yields the largest increase in the objective function’s value per unit of change in a variable’s value. The most negative one selected will be the pivot column with an entering variable. It is indicated by the up arrow. 16
  • 17. Simplex Tableau 4. Calculating the Theta Ratio and Departing Variable  Departing Variable:  Also called leaving variable or pivot row i.e., a basic variable to become non basic in the next tableau. Indicated by  How to calculate:  For each positive entry in the pivot column, compute the θ-ratio by dividing the row’s last entry by the entry in the pivot column.  The row with the smallest θ-ratio determines the departing variable, i.e., the variable to become non basic.  If there are no positive entries in the pivot column, no θ-ratio can be computed, which indicates that the problem is unbounded and the algorithm stops. 17
  • 18. Simplex Tableau Calculating the Theta Ratio and Departing Variable 𝑢 𝑣 1 1 1 0 4 1 3 0 1 6 -3 -5 0 0 0 𝑥 𝑦 𝑢 𝑣 Pivot Column/Entering Variable 𝜃 − 𝑟𝑎𝑡𝑖𝑜 = 4 1 = 4 𝜃 − 𝑟𝑎𝑡𝑖𝑜 = 6 3 = 2 The row with the smallest θ-ratio determines the departing variable. For our example, it is variable v. The intersecting element of Pivot Column and Pivot Row is the pivot. In the next tableau the intersected element will become 1 and the rest of elements will become 0 in the pivot column. Departing Variable / Leaving Variable/ Pivot Row 18
  • 19. 5. Pivoting  To transform the current tableau into the next one and increase the value of the objective function to the next feasible solution. We have to take some steps. Called Pivoting  Pivoting, is similar to the principal step of the Gauss-Jordan elimination algorithm for solving systems of linear equations.  Steps: 1. First, divide all the entries of the pivot row by the pivot, its entry in the pivot column, to obtain Rownew 2. Then, replace each of the other rows, including the objective row, by the difference  𝑅𝑜𝑤 − 𝑐. 𝑅𝑜𝑤 𝑛𝑒𝑤  Where c is the row’s entry in the pivot column. 19
  • 20. Pivoting 1. Calculating Rownew 𝑢 𝑣 1 1 1 0 4 1 3 0 1 6 -3 -5 0 0 0 𝑥 𝑦 𝑢 𝑣 𝑅𝑜𝑤 𝑛𝑒𝑤 = 1 3 3 3 0 3 1 3 6 3 𝑅𝑜𝑤 𝑛𝑒𝑤 = 1 3 , 1, 0, 1 3 , 2 The pivot row will be replaced by the Rownew we calculated. 20
  • 21. Pivoting 2. Calculating Row – c.Rownew  As we have calculated the 2nd row. Now we will apply this formula on the rest of the rows. i.e. Row 1 and Row 3 in our example.  For Row 1:  Row 1 – C. Rownew where C = 1  1 − 1. 1 3 1 − 1.1 1 − 1.0 0 − 1. 1 3 4 − 1.2  2 3 0 1 − 1 3 2  For Row 3:  Row 3 – C. Rownew where C = -5  −3 − −5 . 1 3 − 5 − (−5). 1 0 − (−5). 0 0 − (−5). 1 3 0 − (−5). 2  − 4 3 0 0 5 3 10 Now we will replace all the rows with their new respective rows in order to make the new tableau. 21
  • 22. Pivoting Next Tableau 𝑢 𝑦 2/3 0 1 -1/3 2 1/3 1 0 1/3 2 -4/3 0 0 5/3 10 𝑥 𝑦 𝑢 𝑣 Now we can see that the intersected element became 1 and the rest of them became zero in pivot column. (Canonical Unit Vector) The Entering variable Y took the place of departing variable V. But… We cannot finish here, because the objective row has still a negative value. We have to eliminate it by doing further iterations. 22
  • 23. 2nd Iteration  We have to go through all the steps again. Including the selection of pivot column calculating pivot row and then pivoting.  So our Rownew would be: 1 0 3 2 − 1 2 3  For Other Rows:  For Row 2:  Row 2 – C. Rownew where C = 1/3  1 3 − 1 3 . 1 1 − 1 3 . (0) 0 − 1 3 . ( 3 2 ) 1 3 − 1 3 . (− 1 2 ) 2 − 1 3. . 3  0 1 − 1 2 1 2 1  For Row 3:  Row 3 – C. Rownew where C = -4/3  − 4 3 − − 4 3 . 1 0 − − 4 3 . 0 0 − − 4 3 . 3 2 5 3 − − 4 3 . (− 1 2 ) 10 − − 4 3 . 3  0 0 2 1 14 Put in next tableau… 23
  • 24. 2nd Iteration Tableau 𝑥 𝑦 1 0 3/2 -1/2 3 0 1 -1/2 1/2 1 0 0 2 1 14 𝑥 𝑦 𝑢 𝑣 We can see that the last row has no negative value left. We can safely stop our iterations here. We can conclude our maximized solution as: 𝑥 = 3 𝑦 = 1 𝑢 = 0 𝑣 = 0 𝑀𝑎𝑥 = 14 We choose u and v equal to 0, because their column has all distinct values. If they were like x and y, they’d have some value. 24
  • 25. Cycling – Bland’s Rule  When an objective function’s values “stall” for several iterations in a row and that the algorithm cycles back to a previously considered point and hence never terminate. This phenomenon is called cycling.  Although, it rarely happens, but when it does - A simple modification of the simplex method, called Bland’s rule, eliminates even the theoretical possibility of cycling. 25
  • 26. Cycling – Bland’s Rule  Assuming that the variables are denoted by a subscripted letter (e.g., x1, x2,..., xn), this rule can be stated as follows: 1. Among the columns with a negative entry in the objective row, select the column with the smallest subscript in choosing pivot column. 2. Resolve a tie among the smallest θ-ratios by selecting the row labeled by the basic variable with the smallest subscript in choosing pivot row. 26
  • 27. Software Simulation  Simplex Method has became so efficient that its calculation packages are even available online. One of them is as follows:  For ease, we will copy the same problem to the online tool and check whether it gives us the same result: maximize p = 3x +5y subject to x + y = 4, x+3y = 6  Simplex Method Online Tool 27
  • 28. Efficiency How efficient is the simplex method? 28
  • 29. Efficiency of Simplex Algorithm  Since we know that the algorithm progresses through a sequence of adjacent points of a feasible region. Right?  So, one should probably expect bad news because the number of extreme points is known to grow exponentially with the problem size.  The worst-case efficiency of the simplex method has been shown to be exponential.  But Fortunately!  More than half a century of practical experience with the algorithm has shown that the number of iterations in a typical application ranges between m and 3m, with the number of operations per iteration proportional to mn, where m and n are the numbers of equality constraints and variables, respectively. 29
  • 30. Other Variants of the Algorithm  Ellipsoid Method:  An important mile- stone in the history of such algorithms was the proof by L. G. Khachian showing that the ellipsoid method can solve any linear programming problem in polynomial time.  However, ellipsoid method was much slower than the simplex method in practice  Karmarker’s Method  Narendra Karmarkar published an algorithm that not only had a polynomial worst- case efficiency but also was competitive with the simplex method. This method generates a sequence of feasible solutions that lie within the feasible region rather than going through a sequence of adjacent extreme points as the simplex method does. (Interior Point Methods). 30
  • 31. Summary of Simplex Algorithm  Step 0  Initialization. Present a given linear programming problem in standard form and set up an initial tableau with non negative entries in the rightmost column.  Step 1  Optimality test. If all the entries in the objective row are nonnegative—stop: the tableau represents an optimal solution whose basic variables’ values are in the rightmost column and the remaining, non basic variables’ values are zeros.  Step 2  Finding the entering variable. Select the most negative entry from among the first n elements of the objective row.  Step 3  Finding the departing variable. For each positive entry in the pivot column, calculate the θ- ratio. Find the row with the smallest θ-ratio.  Step 4  Forming the next tableau. Divide all the entries in the pivot row by its entry in the pivot column. Subtract from each of the other rows, including the objective row, the new pivot row multiplied by the entry in the pivot column of the row in question. (This will make all the entries in the pivot column 0’s except for 1in the pivot row.) Replace the label of the pivot row by the variable’s name of the pivot column and go back to Step 1. 31
  • 32. Links  Simplex Method Online Tool  Online Graphical Representation Tool  Click here to download the file  Helpful Website on Simplex Method  Infeasible Solution 32
  • 33. Acknowledgment The material presented in this lecture is adopted from:  Anany Levitin. Introduction to Design and Analysis of Algorithms, 3rd Edition  Thomas H. Cormen. Introduction to Algorithms, 3rd Edition 33