SlideShare a Scribd company logo
1 of 17
421
0011 0010 1010 1101 0001 0100 1011
Solving Linear
Programming Problems
Shubhagata Roy
421
0011 0010 1010 1101 0001 0100 1011
Q. What is a Linear Programming Problem?
A. A Linear Programming Problem(LPP) is a problem in
which we are asked to find the maximum (or minimum) value
of a linear objective function
Z = aX1 + bX2 + cX2 + ... (e.g. Z = 3X1 + 2X2 + X3)
Subject to one or more linear constraints of the form
AX1+ BX2 + CX3 + . . <or= N (e.g. X1 + X2 + 3X3 <or= 12)
The desired largest (or smallest) value of the objective
function is called the optimal value, and a collection of values
of X1,X2,X3, . . . that gives the optimal value constitutes an
optimal solution.The variables X1, X2, X3, . . are called the
decision variables.
421
0011 0010 1010 1101 0001 0100 1011
Simplex Method
The most frequently used method to solve LP problems is the
Simplex Method. Before going into the method, we must get
familiarized with some important terminologies :
Standard Form- A linear program in which all the constraints
are written as equalities.
Slack Variable- A variable added to the LHS of “Less than or
equal to” constraint to convert it into an equality.
Surplus Variable- A variable subtracted from the LHS of
“More than or equal to” constraint to convert it into an equality.
Basic Solution- For a system of m linear equations in n
variables (n>m),a solution obtained by setting (n-m) variables
equal to zero and solving the system of equations for
remaining m variables.
Basic Feasible Solution(BFS)- If all the variables in basic
solution are more than or equal to zero.
421
0011 0010 1010 1101 0001 0100 1011
Optimum Solution- Any BFS which optimizes(maximizes
or minimizes) the objective function.
Tableau Form- When a LPP is written in a tabular form
prior to setting up the Initial Simplex Tableau.
Simplex Tableau- A table which is used to keep track of
the calculations made at each iteration when the simplex
method is employed.
Net EvaluationRow(Cj-Zj )- The row containing net profit or
loss.The nos.in this row are also known as shadow prices.
Pivotal Column- The column having largest positive(or
negative) value in the Net Evaluation Row for a
maximization(or minimization) problem.
Pivotal Row- The row corresponding to variable that will
leave the table in order to make room for another variable.
Pivotal Element- Element at the intersection of pivotal row
and pivotal column.
421
0011 0010 1010 1101 0001 0100 1011
To understand the method,let us take an example
containing two decision variables and two constraints.
Example:
Maximize Z = 7X1+5X2 , subject to the constraints,
X1+2X2 < or = 6
4X1+3X2 < or = 12 and X1 & X2 are non-negative.
Step1: Convert the LP problem into a system of
linear equations.
We do this by rewriting the constraint inequalities as
equations by adding new "slack variables" and assigning
them zero coefficients(profits) in the objective function as
shown below:
X1+2X2+S1 = 6
4X1+3X2 +S2 = 12
And the Objective Function would be:
Z=7X1+5X2+0.S1+0.S2
421
0011 0010 1010 1101 0001 0100 1011
Step 2: Obtain a Basic Solution to the problem.
We do this by putting the decision variables X1=X2=0,
so that
S1= 6 and S2=12.
These are the initial values of slack variables.
Step 3: Form the Initial Tableau as shown.
Cj 7 5 0 0
CB
Basic
Variable
(B)
Basic
Soln(XB)
X1 X2 S1 S2
0 S1 6 1 2 1 0 6/1=6
0 S2 12 4 3 0 1 12/4=3
0 0 0 0
7 5 0 0
Initial Tableau
Min.Ratio
(XB/Pivotal
Col.)
Zj
(Net Evaluation)Cj - Zj
421
0011 0010 1010 1101 0001 0100 1011Step 4: Find (Cj-Zj) having highest positive value.
The column corresponding to this value,is called the Pivotal
Column and enters the table. In the previous table,column
corresponding to variable X1 is the pivotal column.
Step 5: Find the Minimum Positive Ratio.
Divide XB values by the corresponding values of Pivotal
Column.The row corresponding to the minimum positive
value is the Pivotal Row and leaves the table. In the
previous table,row corresponding to the slack variable S2 is
the pivotal row.
421
0011 0010 1010 1101 0001 0100 1011
Step 6: First Iteration or First Simplex Tableau.
In the new table,we shall place the incoming variable(X1)
instead of the outgoing variable(S2). Accordingly,new values of
this row have to be obtained in the following way :
R2(New)=R2(Old)/Pivotal Element = R2(Old)/4
R1(New)=R1(Old) - (Intersecting value of R1(Old) & Pivotal
Col)*R2(New)
=R1(Old) - 1*R2(New)
Cj 7 5 0 0
CB
Basic
Variable
(B)
Basic
Soln(XB)
X1 X2 S1 S2
0 S1 3 0 5 4 1 - 1/4
7 X1 3 1 3/4 0 1/4
7 21 4 0 7 4
0 - 1/4 0 -74
Zj
(Net Evaluation)Cj - Zj
Min.Ratio
(XB/Pivotal
Col.)
421
0011 0010 1010 1101 0001 0100 1011
Step 7: If all the (Cj-Zj) values are zero or
negative,an optimum point is reached
otherwise repeat the process as given in
Step 4,5 & 6.
Since all the (Cj-Zj) values are either negative or
zero,hence an optimum solution has been achieved.The
optimum values are:
X1=3,
X2=0 and,
Max Z=21.
421
0011 0010 1010 1101 0001 0100 1011
Big-M Method of solving LPP
The Big-M method of handling instances with artificial
variables is the “commonsense approach”. Essentially, the
notion is to make the artificial variables, through their
coefficients in the objective function, so costly or unprofitable
that any feasible solution to the real problem would be
preferred....unless the original instance possessed no feasible
solutions at all. But this means that we need to assign, in the
objective function, coefficients to the artificial variables that are
either very small (maximization problem) or very large
(minimization problem); whatever this value,let us call it Big M.
In fact, this notion is an old trick in optimization in general; we
simply associate a penalty value with variables that we do not
want to be part of an ultimate solution(unless such an outcome
Is unavoidable).
421
0011 0010 1010 1101 0001 0100 1011
Indeed, the penalty is so costly that unless any of the
respective variables' inclusion is warranted algorithmically,
such variables will never be part of any feasible solution.
This method removes artificial variables from the basis. Here,
we assign a large undesirable (unacceptable penalty)
coefficients to artificial variables from the objective function
point of view. If the objective function (Z) is to be minimized,
then a very large positive price (penalty, M) is assigned to
each artificial variable and if Z is to be minimized, then a very
large negative price is to be assigned. The penalty will be
designated by +M for minimization problem and by –M for a
maximization problem and also M>0.
421
0011 0010 1010 1101 0001 0100 1011
Example: Minimize Z= 600X1+500X2
subject to constraints,
2X1+ X2 >or= 80
X1+2X2 >or= 60 and X1,X2 >or= 0
Step1: Convert the LP problem into a system of
linear equations.
We do this by rewriting the constraint inequalities as
equations by subtracting new “surplus & artificial variables"
and assigning them zero & +M coefficientsrespectively in the
objective function as shown below.
So the Objective Function would be:
Z=600X1+500X2+0.S1+0.S2+MA1+MA2
subject to constraints,
2X1+ X2-S1+A1 = 80
X1+2X2-S2+A2 = 60
X1,X2,S1,S2,A1,A2 >or= 0
421
0011 0010 1010 1101 0001 0100 1011
Step 2: Obtain a Basic Solution to the problem.
We do this by putting the decision variables X1=X2=S1=S2=0,
so that A1= 80 and A2=60.
These are the initial values of artificial variables.
Step 3: Form the Initial Tableau as shown.
Cj 600 500 0 0 M M
CB
Basic
Variab
le (B)
Basic
Soln(XB)
X1 X2 S1 S2 A1 A2
M A1 80 2 1 -1 0 1 0 80
M A2 60 1 2 0 -1 0 1 60
3M 3M M M M M
600-3M 500-3M M M 0 0
Min.Ratio
(XB/Pivotal
Col.)
Zj
Cj - Zj
421
0011 0010 1010 1101 0001 0100 1011
It is clear from the tableau that X2 will enter and A2 will
leave the basis. Hence 2 is the key element in pivotal
column. Now,the new row operations are as follows:
R2(New) = R2(Old)/2
R1(New) = R1(Old) - 1*R2(New)
Cj 600 500 0 0 M
CB
Basic
Variab
le (B)
Basic
Soln(XB)
X1 X2 S1 S2 A1
M A1 50 3 2 0 -1 1 2 1 100/3
500 X2 30 1 2 1 0 - 1/2 0 60
3M/2+250 500 M M/2-250 M
350-3M/2 0 M 250-M/2 0
Min.Ratio
(XB/Pivota
l Col.)
Zj
Cj - Zj
421
0011 0010 1010 1101 0001 0100 1011
It is clear from the tableau that X1 will enter and A1 will
leave the basis. Hence 2 is the key element in pivotal
column. Now,the new row operations are as follows:
R1(New) = R1(Old)*2/3
R2(New) = R2(Old) – (1/2)*R1(New)
Cj 600 500 0 0
CB
Basic
Varia
ble
(B)
Basic
Soln(XB)
X1 X2 S1 S2
600 X1 100/3 1 0 2 3 1 3
500 X2 40/3 0 1 1 3 2 3
600 500 700 3 400 3
0 0 700 3 400 3
Zj
Cj - Zj
Min.
Ratio
(XB/P
ivotal
Col.)
421
0011 0010 1010 1101 0001 0100 1011
Since all the values of (Cj-Zj) are either zero or positive
and also both the artificial variables have been removed,
an optimum solution has been arrived at with X1=100/3 ,
X2=40/3 and Z=80,000/3.
421
0011 0010 1010 1101 0001 0100 1011

More Related Content

What's hot

Simplex method - Maximisation Case
Simplex method - Maximisation CaseSimplex method - Maximisation Case
Simplex method - Maximisation CaseJoseph Konnully
 
Simplex Method
Simplex MethodSimplex Method
Simplex MethodSachin MK
 
Chapter 4 Simplex Method ppt
Chapter 4  Simplex Method pptChapter 4  Simplex Method ppt
Chapter 4 Simplex Method pptDereje Tigabu
 
Special Cases in Simplex Method
Special Cases in Simplex MethodSpecial Cases in Simplex Method
Special Cases in Simplex MethodDivyansh Verma
 
Simplex method concept,
Simplex method concept,Simplex method concept,
Simplex method concept,Dronak Sahu
 
Module 3 lp-simplex
Module 3 lp-simplexModule 3 lp-simplex
Module 3 lp-simplexraajeeradha
 
Simplex Method in Maximization Case
Simplex Method in Maximization CaseSimplex Method in Maximization Case
Simplex Method in Maximization CaseSemih Gümüşbaş
 
the two phase method - operations research
the two phase method - operations researchthe two phase method - operations research
the two phase method - operations research2013901097
 
Graphical Method
Graphical MethodGraphical Method
Graphical MethodSachin MK
 
Artificial Variable Technique –
Artificial Variable Technique –Artificial Variable Technique –
Artificial Variable Technique –itsvineeth209
 
Simplex Method Explained
Simplex Method ExplainedSimplex Method Explained
Simplex Method ExplainedAtif Shahzad
 
LPP, Duality and Game Theory
LPP, Duality and Game TheoryLPP, Duality and Game Theory
LPP, Duality and Game TheoryPurnima Pandit
 
Duality in Linear Programming
Duality in Linear ProgrammingDuality in Linear Programming
Duality in Linear Programmingjyothimonc
 
Simplex method: Slack, Surplus & Artificial variable
Simplex method:  Slack, Surplus & Artificial variableSimplex method:  Slack, Surplus & Artificial variable
Simplex method: Slack, Surplus & Artificial variableDevyaneeDevyanee2007
 

What's hot (20)

Big m method
Big m methodBig m method
Big m method
 
Simplex method - Maximisation Case
Simplex method - Maximisation CaseSimplex method - Maximisation Case
Simplex method - Maximisation Case
 
Simplex Method
Simplex MethodSimplex Method
Simplex Method
 
Chapter 4 Simplex Method ppt
Chapter 4  Simplex Method pptChapter 4  Simplex Method ppt
Chapter 4 Simplex Method ppt
 
Simplex method
Simplex methodSimplex method
Simplex method
 
Special Cases in Simplex Method
Special Cases in Simplex MethodSpecial Cases in Simplex Method
Special Cases in Simplex Method
 
Lp simplex 3_
Lp simplex 3_Lp simplex 3_
Lp simplex 3_
 
Simplex method concept,
Simplex method concept,Simplex method concept,
Simplex method concept,
 
Big-M Method Presentation
Big-M Method PresentationBig-M Method Presentation
Big-M Method Presentation
 
Module 3 lp-simplex
Module 3 lp-simplexModule 3 lp-simplex
Module 3 lp-simplex
 
Simplex Method in Maximization Case
Simplex Method in Maximization CaseSimplex Method in Maximization Case
Simplex Method in Maximization Case
 
the two phase method - operations research
the two phase method - operations researchthe two phase method - operations research
the two phase method - operations research
 
Graphical Method
Graphical MethodGraphical Method
Graphical Method
 
Concept of Duality
Concept of DualityConcept of Duality
Concept of Duality
 
Artificial Variable Technique –
Artificial Variable Technique –Artificial Variable Technique –
Artificial Variable Technique –
 
Simplex Method Explained
Simplex Method ExplainedSimplex Method Explained
Simplex Method Explained
 
LPP, Duality and Game Theory
LPP, Duality and Game TheoryLPP, Duality and Game Theory
LPP, Duality and Game Theory
 
simplex method
simplex methodsimplex method
simplex method
 
Duality in Linear Programming
Duality in Linear ProgrammingDuality in Linear Programming
Duality in Linear Programming
 
Simplex method: Slack, Surplus & Artificial variable
Simplex method:  Slack, Surplus & Artificial variableSimplex method:  Slack, Surplus & Artificial variable
Simplex method: Slack, Surplus & Artificial variable
 

Similar to Simplex algorithm

Simplex part 2 of 4
Simplex part 2 of 4Simplex part 2 of 4
Simplex part 2 of 4Ed Dansereau
 
SIMPLEX METHOD.pptx
SIMPLEX METHOD.pptxSIMPLEX METHOD.pptx
SIMPLEX METHOD.pptxTista3
 
Unit.3. duality and sensetivity analisis
Unit.3. duality and sensetivity analisisUnit.3. duality and sensetivity analisis
Unit.3. duality and sensetivity analisisDagnaygebawGoshme
 
Management Science
Management ScienceManagement Science
Management Sciencelisa1090
 
Mb 106 quantitative techniques 5
Mb 106 quantitative techniques 5Mb 106 quantitative techniques 5
Mb 106 quantitative techniques 5KrishnaRoy45
 
Ch06_1-2_Simplex_Method.pdf
Ch06_1-2_Simplex_Method.pdfCh06_1-2_Simplex_Method.pdf
Ch06_1-2_Simplex_Method.pdfFredCuenca
 
Solve given LP problem using simplex method and find maximum value o.pdf
Solve given LP problem using simplex method and find maximum value o.pdfSolve given LP problem using simplex method and find maximum value o.pdf
Solve given LP problem using simplex method and find maximum value o.pdfaminbijal86
 
Procedure Of Simplex Method
Procedure Of Simplex MethodProcedure Of Simplex Method
Procedure Of Simplex Methoditsvineeth209
 

Similar to Simplex algorithm (20)

Big m method
Big   m methodBig   m method
Big m method
 
2. lp iterative methods
2. lp   iterative methods2. lp   iterative methods
2. lp iterative methods
 
Linear programming
Linear programmingLinear programming
Linear programming
 
Simplex part 2 of 4
Simplex part 2 of 4Simplex part 2 of 4
Simplex part 2 of 4
 
Chap07
Chap07Chap07
Chap07
 
Combined
CombinedCombined
Combined
 
Simplex two phase
Simplex two phaseSimplex two phase
Simplex two phase
 
Chapter four
Chapter fourChapter four
Chapter four
 
5163147.ppt
5163147.ppt5163147.ppt
5163147.ppt
 
SIMPLEX METHOD.pptx
SIMPLEX METHOD.pptxSIMPLEX METHOD.pptx
SIMPLEX METHOD.pptx
 
Unit.3. duality and sensetivity analisis
Unit.3. duality and sensetivity analisisUnit.3. duality and sensetivity analisis
Unit.3. duality and sensetivity analisis
 
Management Science
Management ScienceManagement Science
Management Science
 
Mb 106 quantitative techniques 5
Mb 106 quantitative techniques 5Mb 106 quantitative techniques 5
Mb 106 quantitative techniques 5
 
Ch06_1-2_Simplex_Method.pdf
Ch06_1-2_Simplex_Method.pdfCh06_1-2_Simplex_Method.pdf
Ch06_1-2_Simplex_Method.pdf
 
Graphical method
Graphical methodGraphical method
Graphical method
 
Solve given LP problem using simplex method and find maximum value o.pdf
Solve given LP problem using simplex method and find maximum value o.pdfSolve given LP problem using simplex method and find maximum value o.pdf
Solve given LP problem using simplex method and find maximum value o.pdf
 
12001319032_OR.pptx
12001319032_OR.pptx12001319032_OR.pptx
12001319032_OR.pptx
 
aaoczc2252
aaoczc2252aaoczc2252
aaoczc2252
 
Simplex method
Simplex methodSimplex method
Simplex method
 
Procedure Of Simplex Method
Procedure Of Simplex MethodProcedure Of Simplex Method
Procedure Of Simplex Method
 

More from School of Management Sciences Lucknow (20)

Gandhi
GandhiGandhi
Gandhi
 
Product strategies[1]
Product strategies[1]Product strategies[1]
Product strategies[1]
 
Consumer Behaviour
Consumer BehaviourConsumer Behaviour
Consumer Behaviour
 
Consumer[1]
Consumer[1]Consumer[1]
Consumer[1]
 
Sales promotion analysis
Sales promotion analysisSales promotion analysis
Sales promotion analysis
 
Chapter 15 mergers and acquisitions
Chapter 15   mergers and acquisitionsChapter 15   mergers and acquisitions
Chapter 15 mergers and acquisitions
 
Chap1 operations iipm
Chap1 operations iipmChap1 operations iipm
Chap1 operations iipm
 
Best-companies-best-practices
 Best-companies-best-practices Best-companies-best-practices
Best-companies-best-practices
 
9 quality-tools(2)
9 quality-tools(2)9 quality-tools(2)
9 quality-tools(2)
 
Bpr ch vii
Bpr ch viiBpr ch vii
Bpr ch vii
 
Bpr ch xi
Bpr ch xiBpr ch xi
Bpr ch xi
 
Bpr 2
Bpr 2Bpr 2
Bpr 2
 
Bpr i
Bpr iBpr i
Bpr i
 
Bpr 1
Bpr 1Bpr 1
Bpr 1
 
Bpr 1
Bpr 1Bpr 1
Bpr 1
 
Bpr
BprBpr
Bpr
 
Bpr
BprBpr
Bpr
 
Industrial revolution
Industrial revolutionIndustrial revolution
Industrial revolution
 
Strategies based on distinctive
Strategies based on distinctiveStrategies based on distinctive
Strategies based on distinctive
 
Production systems
Production systemsProduction systems
Production systems
 

Recently uploaded

Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Developmentchesterberbo7
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvRicaMaeCastro1
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1GloryAnnCastre1
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptxAneriPatwari
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxMichelleTuguinay1
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 

Recently uploaded (20)

Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Development
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 

Simplex algorithm

  • 1. 421 0011 0010 1010 1101 0001 0100 1011 Solving Linear Programming Problems Shubhagata Roy
  • 2. 421 0011 0010 1010 1101 0001 0100 1011 Q. What is a Linear Programming Problem? A. A Linear Programming Problem(LPP) is a problem in which we are asked to find the maximum (or minimum) value of a linear objective function Z = aX1 + bX2 + cX2 + ... (e.g. Z = 3X1 + 2X2 + X3) Subject to one or more linear constraints of the form AX1+ BX2 + CX3 + . . <or= N (e.g. X1 + X2 + 3X3 <or= 12) The desired largest (or smallest) value of the objective function is called the optimal value, and a collection of values of X1,X2,X3, . . . that gives the optimal value constitutes an optimal solution.The variables X1, X2, X3, . . are called the decision variables.
  • 3. 421 0011 0010 1010 1101 0001 0100 1011 Simplex Method The most frequently used method to solve LP problems is the Simplex Method. Before going into the method, we must get familiarized with some important terminologies : Standard Form- A linear program in which all the constraints are written as equalities. Slack Variable- A variable added to the LHS of “Less than or equal to” constraint to convert it into an equality. Surplus Variable- A variable subtracted from the LHS of “More than or equal to” constraint to convert it into an equality. Basic Solution- For a system of m linear equations in n variables (n>m),a solution obtained by setting (n-m) variables equal to zero and solving the system of equations for remaining m variables. Basic Feasible Solution(BFS)- If all the variables in basic solution are more than or equal to zero.
  • 4. 421 0011 0010 1010 1101 0001 0100 1011 Optimum Solution- Any BFS which optimizes(maximizes or minimizes) the objective function. Tableau Form- When a LPP is written in a tabular form prior to setting up the Initial Simplex Tableau. Simplex Tableau- A table which is used to keep track of the calculations made at each iteration when the simplex method is employed. Net EvaluationRow(Cj-Zj )- The row containing net profit or loss.The nos.in this row are also known as shadow prices. Pivotal Column- The column having largest positive(or negative) value in the Net Evaluation Row for a maximization(or minimization) problem. Pivotal Row- The row corresponding to variable that will leave the table in order to make room for another variable. Pivotal Element- Element at the intersection of pivotal row and pivotal column.
  • 5. 421 0011 0010 1010 1101 0001 0100 1011 To understand the method,let us take an example containing two decision variables and two constraints. Example: Maximize Z = 7X1+5X2 , subject to the constraints, X1+2X2 < or = 6 4X1+3X2 < or = 12 and X1 & X2 are non-negative. Step1: Convert the LP problem into a system of linear equations. We do this by rewriting the constraint inequalities as equations by adding new "slack variables" and assigning them zero coefficients(profits) in the objective function as shown below: X1+2X2+S1 = 6 4X1+3X2 +S2 = 12 And the Objective Function would be: Z=7X1+5X2+0.S1+0.S2
  • 6. 421 0011 0010 1010 1101 0001 0100 1011 Step 2: Obtain a Basic Solution to the problem. We do this by putting the decision variables X1=X2=0, so that S1= 6 and S2=12. These are the initial values of slack variables. Step 3: Form the Initial Tableau as shown. Cj 7 5 0 0 CB Basic Variable (B) Basic Soln(XB) X1 X2 S1 S2 0 S1 6 1 2 1 0 6/1=6 0 S2 12 4 3 0 1 12/4=3 0 0 0 0 7 5 0 0 Initial Tableau Min.Ratio (XB/Pivotal Col.) Zj (Net Evaluation)Cj - Zj
  • 7. 421 0011 0010 1010 1101 0001 0100 1011Step 4: Find (Cj-Zj) having highest positive value. The column corresponding to this value,is called the Pivotal Column and enters the table. In the previous table,column corresponding to variable X1 is the pivotal column. Step 5: Find the Minimum Positive Ratio. Divide XB values by the corresponding values of Pivotal Column.The row corresponding to the minimum positive value is the Pivotal Row and leaves the table. In the previous table,row corresponding to the slack variable S2 is the pivotal row.
  • 8. 421 0011 0010 1010 1101 0001 0100 1011 Step 6: First Iteration or First Simplex Tableau. In the new table,we shall place the incoming variable(X1) instead of the outgoing variable(S2). Accordingly,new values of this row have to be obtained in the following way : R2(New)=R2(Old)/Pivotal Element = R2(Old)/4 R1(New)=R1(Old) - (Intersecting value of R1(Old) & Pivotal Col)*R2(New) =R1(Old) - 1*R2(New) Cj 7 5 0 0 CB Basic Variable (B) Basic Soln(XB) X1 X2 S1 S2 0 S1 3 0 5 4 1 - 1/4 7 X1 3 1 3/4 0 1/4 7 21 4 0 7 4 0 - 1/4 0 -74 Zj (Net Evaluation)Cj - Zj Min.Ratio (XB/Pivotal Col.)
  • 9. 421 0011 0010 1010 1101 0001 0100 1011 Step 7: If all the (Cj-Zj) values are zero or negative,an optimum point is reached otherwise repeat the process as given in Step 4,5 & 6. Since all the (Cj-Zj) values are either negative or zero,hence an optimum solution has been achieved.The optimum values are: X1=3, X2=0 and, Max Z=21.
  • 10. 421 0011 0010 1010 1101 0001 0100 1011 Big-M Method of solving LPP The Big-M method of handling instances with artificial variables is the “commonsense approach”. Essentially, the notion is to make the artificial variables, through their coefficients in the objective function, so costly or unprofitable that any feasible solution to the real problem would be preferred....unless the original instance possessed no feasible solutions at all. But this means that we need to assign, in the objective function, coefficients to the artificial variables that are either very small (maximization problem) or very large (minimization problem); whatever this value,let us call it Big M. In fact, this notion is an old trick in optimization in general; we simply associate a penalty value with variables that we do not want to be part of an ultimate solution(unless such an outcome Is unavoidable).
  • 11. 421 0011 0010 1010 1101 0001 0100 1011 Indeed, the penalty is so costly that unless any of the respective variables' inclusion is warranted algorithmically, such variables will never be part of any feasible solution. This method removes artificial variables from the basis. Here, we assign a large undesirable (unacceptable penalty) coefficients to artificial variables from the objective function point of view. If the objective function (Z) is to be minimized, then a very large positive price (penalty, M) is assigned to each artificial variable and if Z is to be minimized, then a very large negative price is to be assigned. The penalty will be designated by +M for minimization problem and by –M for a maximization problem and also M>0.
  • 12. 421 0011 0010 1010 1101 0001 0100 1011 Example: Minimize Z= 600X1+500X2 subject to constraints, 2X1+ X2 >or= 80 X1+2X2 >or= 60 and X1,X2 >or= 0 Step1: Convert the LP problem into a system of linear equations. We do this by rewriting the constraint inequalities as equations by subtracting new “surplus & artificial variables" and assigning them zero & +M coefficientsrespectively in the objective function as shown below. So the Objective Function would be: Z=600X1+500X2+0.S1+0.S2+MA1+MA2 subject to constraints, 2X1+ X2-S1+A1 = 80 X1+2X2-S2+A2 = 60 X1,X2,S1,S2,A1,A2 >or= 0
  • 13. 421 0011 0010 1010 1101 0001 0100 1011 Step 2: Obtain a Basic Solution to the problem. We do this by putting the decision variables X1=X2=S1=S2=0, so that A1= 80 and A2=60. These are the initial values of artificial variables. Step 3: Form the Initial Tableau as shown. Cj 600 500 0 0 M M CB Basic Variab le (B) Basic Soln(XB) X1 X2 S1 S2 A1 A2 M A1 80 2 1 -1 0 1 0 80 M A2 60 1 2 0 -1 0 1 60 3M 3M M M M M 600-3M 500-3M M M 0 0 Min.Ratio (XB/Pivotal Col.) Zj Cj - Zj
  • 14. 421 0011 0010 1010 1101 0001 0100 1011 It is clear from the tableau that X2 will enter and A2 will leave the basis. Hence 2 is the key element in pivotal column. Now,the new row operations are as follows: R2(New) = R2(Old)/2 R1(New) = R1(Old) - 1*R2(New) Cj 600 500 0 0 M CB Basic Variab le (B) Basic Soln(XB) X1 X2 S1 S2 A1 M A1 50 3 2 0 -1 1 2 1 100/3 500 X2 30 1 2 1 0 - 1/2 0 60 3M/2+250 500 M M/2-250 M 350-3M/2 0 M 250-M/2 0 Min.Ratio (XB/Pivota l Col.) Zj Cj - Zj
  • 15. 421 0011 0010 1010 1101 0001 0100 1011 It is clear from the tableau that X1 will enter and A1 will leave the basis. Hence 2 is the key element in pivotal column. Now,the new row operations are as follows: R1(New) = R1(Old)*2/3 R2(New) = R2(Old) – (1/2)*R1(New) Cj 600 500 0 0 CB Basic Varia ble (B) Basic Soln(XB) X1 X2 S1 S2 600 X1 100/3 1 0 2 3 1 3 500 X2 40/3 0 1 1 3 2 3 600 500 700 3 400 3 0 0 700 3 400 3 Zj Cj - Zj Min. Ratio (XB/P ivotal Col.)
  • 16. 421 0011 0010 1010 1101 0001 0100 1011 Since all the values of (Cj-Zj) are either zero or positive and also both the artificial variables have been removed, an optimum solution has been arrived at with X1=100/3 , X2=40/3 and Z=80,000/3.
  • 17. 421 0011 0010 1010 1101 0001 0100 1011