SlideShare a Scribd company logo
1 of 20
07 December, 2017 Simplex Algorithm 1
Linear Programming
Simplex Algorithm
Yunus Hatipoğlu
201671209
Çankaya University
CENG511 – Advanced Algorithm
07 December, 2017 The Simplex Algorithm 2
Content
• Linear Programming– what is that?
• The Simplex Algorithm – background
• Usage Areas in real life
• How it works (Pseudo)
• Example Question – Maximize
07 December, 2017 The Simplex Algorithm 3
Linear Programming– what is
that? A technique to
achieve optimal
distribution of
resources,
minimize costs and
maximize profits.
07 December, 2017 The Simplex Algorithm 4
The Simplex Algorithm
• based on algebraic
iteration.
• the initial simplex
table is edited
• then the operations
are continued until
it reaches the
optimal solution
07 December, 2017 The Simplex Algorithm 5
The Simplex Algorithm
• Simplex algorithm visits all 2n vertices in
worst case and this turns out to be true for
and deterministic pivot rule.
• Pivot rule takes exponential time in worst
case.
• The performance of simplex algorithm
depend on the specific pivot rule used.
07 December, 2017 The Simplex Algorithm 6
Usage Areas in real life
• limited use of resources (capacity, raw
material, labor force, etc.) and maximizing
profits or minimizing costs.
Determination of optimum
production schedule:
07 December, 2017 The Simplex Algorithm 7
Usage Areas in real life
• tries to ensure optimum application in
determining the sales, storage or purchases
of the warehouse capacity determined
within a certain time to maximize profits (or
minimize costs).
Storage problems:
07 December, 2017 The Simplex Algorithm 8
How it works?
07 December, 2017 The Simplex Algorithm 9
Maximize & Minimize
• Subjected to constraints :
• 0<= ax + by + cz + ... <= P1
• 0<= dx + ey + fz + ... <= P2
• ...
To maximize:
To minimize:
f = c1x+c2y+c3z ...
We maximize
g = -f = -(c1x+c2y+c3z ...)
07 December, 2017 The Simplex Algorithm 10
Example Question
• Constraints:
2x1 + x2 <= 14
5x1 + 5x2 <=40
x1 + 3x2 <= 18
Maximize the following
n= 50x1 + 30x2
x1, x2 >= 0
07 December, 2017 The Simplex Algorithm 11
Example Question(Cont.)
• 1. Create simplex table
– transform them into equations by adding
increasing variables to the inequalities
2x1 + x2 + s1 = 14
5x1 + 5x2+ s2 = 40
x1 + 3x2 + s3 = 18
Maximize the following
n= 50x1 + 30x2
07 December, 2017 The Simplex Algorithm 12
Example Question(Cont.)
– Write constraint equations in matrix form
2 1 1 0 0
5 5 0 1 0 =
1 3 0 0 1
Maximize the following
n= 50x1 + 30x2
x1
x2
s1
s2
s3
14
40
18
07 December, 2017 The Simplex Algorithm 13
Example Question(Cont.)
x1 x2 s1 s2 s3
2 1 1 0 0 14
5 5 0 1 0 40
1 3 0 0 1 18
-50 -30 0 0 0 0
having the greatest absolute value of negative value
indicates pivot column --> -50
Fixed values are divided
to pivot line and minimum
value determines pivot
line
14/2 = 7 which is minumum
40/5 = 8
18/1 = 18
So 2 is pivot line
07 December, 2017 The Simplex Algorithm 14
Example Question(Cont.)
x1 x2 s1 s2 s3
2 1 1 0 0 14
5 5 0 1 0 40
1 3 0 0 1 18
-50 -30 0 0 0 0
multiply the first line by 1/2 and make the pivot line 1
x1 x2 s1 s2 s3
1 1/2 1/2 0 0 7
5 5 0 1 0 40
1 3 0 0 1 18
-50 -30 0 0 0 0
07 December, 2017 The Simplex Algorithm 15
Example Question(Cont.)
• Multiply the first line by 5 and subtract from the
second line
• Substract first line from 3. line
• First line multiplied by 50 and added to forth line
• Clean pivot column.
x1 x2 s1 s2 s3
1 1/2 1/2 0 0 7
0 5/2 -5/2 1 0 5
0 5/2 -1/2 0 1 11
0 -5 25 0 0 350
x1 x2 s1 s2 s3
1 1/2 1/2 0 0 7
5 5 0 1 0 40
1 3 0 0 1 18
-50 -30 0 0 0 0
07 December, 2017 The Simplex Algorithm 16
Example Question(Cont.)
• Change basis and repeat pivotting.
• Second column pivot
• Second line pivot line
x1 x2 s1 s2 s3
1 1/2 1/2 0 0 7
0 5/2 -5/2 1 0 5
0 5/2 -1/2 0 1 11
0 -5 25 0 0 350
7 / 1/2 = 14
5 / 5/2 = 2
11 / 5/2 = 4.4
So pivot element is 5/2 which is
in second line
07 December, 2017 The Simplex Algorithm 17
Example Question(Cont.)
multiply the second line by 2/5 and make the pivot
line 1
x1 x2 s1 s2 s3
1 1/2 1/2 0 0 7
0 1 -1 2/5 0 2
0 5/2 -1.2 0 1 11
0 -5 25 0 0 350
x1 x2 s1 s2 s3
1 1/2 1/2 0 0 7
0 5/2 -5/2 1 0 5
0 5/2 -1/2 0 1 11
0 -5 25 0 0 350
07 December, 2017 The Simplex Algorithm 18
Example Question(Cont.)
• Multiply the second line by 1/2 and subtract from
the first line
• Multiply the second line by 5/2 and subtract from
third line
• Second line is multiplied by 5 and added to forth
line
x1 x2 s1 s2 s3
1 0 1 -1/5 0 6
0 1 -1 2/5 0 2
0 0 2 -1 1 6
0 0 20 2 0 360
x1 x2 s1 s2 s3
1 1/2 1/2 0 0 7
0 1 -1 2/5 0 2
0 5/2 -1/2 0 1 11
0 -5 25 0 0 350
07 December, 2017 The Simplex Algorithm 19
Example Question(Cont.)
• Since there are no negative indicators left, this is
the last table
x1 x2 s1 s2 s3
1 0 1 -1/5 0 6
0 1 -1 2/5 0 2
0 0 2 -1 1 6
0 0 20 2 0 360
x1 = 6
x2 = 2
s3 = 6
n = 360
07 December, 2017 The Simplex Algorithm 20
Question
• What is worst case complexity of Simplex Algorithm
and what kind of areas complexity algorithm can be
used?

More Related Content

Similar to Linear Programming - Simplex Algorithm by Yunus Hatipoglu

Linear programming.pptx
Linear programming.pptxLinear programming.pptx
Linear programming.pptxPrabin Pandit
 
Mb 106 quantitative techniques 6
Mb 106 quantitative techniques 6Mb 106 quantitative techniques 6
Mb 106 quantitative techniques 6KrishnaRoy45
 
Strayer mat 540 week 10 quiz 5 set 2 questions new
Strayer mat 540 week 10 quiz 5 set 2 questions newStrayer mat 540 week 10 quiz 5 set 2 questions new
Strayer mat 540 week 10 quiz 5 set 2 questions neweyavagal
 
Strayer mat 540 week 10 quiz 5 set 2 questions new
Strayer mat 540 week 10 quiz 5 set 2 questions newStrayer mat 540 week 10 quiz 5 set 2 questions new
Strayer mat 540 week 10 quiz 5 set 2 questions neweyavagal
 
2018,sem7,ala,pm,160993119017,160993119018,160993119019,160993119020,16099311...
2018,sem7,ala,pm,160993119017,160993119018,160993119019,160993119020,16099311...2018,sem7,ala,pm,160993119017,160993119018,160993119019,160993119020,16099311...
2018,sem7,ala,pm,160993119017,160993119018,160993119019,160993119020,16099311...Siddharth Modi
 
Bagian 3 PTI
Bagian 3 PTIBagian 3 PTI
Bagian 3 PTIHIMTI
 
Basic Math for Physics
Basic Math for PhysicsBasic Math for Physics
Basic Math for PhysicsTimothy Welsh
 
Integer Programming PPt.ernxzamnbmbmspdf
Integer Programming PPt.ernxzamnbmbmspdfInteger Programming PPt.ernxzamnbmbmspdf
Integer Programming PPt.ernxzamnbmbmspdfRaja Manyam
 
Integer Linear Programming
Integer Linear ProgrammingInteger Linear Programming
Integer Linear ProgrammingSukhpalRamanand
 
OR Linear Programming
OR Linear ProgrammingOR Linear Programming
OR Linear Programmingchaitu87
 
Microprocessor Week 4-5 MCS-51 Arithmetic operation
Microprocessor Week 4-5 MCS-51 Arithmetic operationMicroprocessor Week 4-5 MCS-51 Arithmetic operation
Microprocessor Week 4-5 MCS-51 Arithmetic operationArkhom Jodtang
 
Simplex Method
Simplex MethodSimplex Method
Simplex Methodkzoe1996
 

Similar to Linear Programming - Simplex Algorithm by Yunus Hatipoglu (20)

Lp graphical and simplexx892
Lp graphical and simplexx892Lp graphical and simplexx892
Lp graphical and simplexx892
 
Linear programming.pptx
Linear programming.pptxLinear programming.pptx
Linear programming.pptx
 
Mb 106 quantitative techniques 6
Mb 106 quantitative techniques 6Mb 106 quantitative techniques 6
Mb 106 quantitative techniques 6
 
Strayer mat 540 week 10 quiz 5 set 2 questions new
Strayer mat 540 week 10 quiz 5 set 2 questions newStrayer mat 540 week 10 quiz 5 set 2 questions new
Strayer mat 540 week 10 quiz 5 set 2 questions new
 
Strayer mat 540 week 10 quiz 5 set 2 questions new
Strayer mat 540 week 10 quiz 5 set 2 questions newStrayer mat 540 week 10 quiz 5 set 2 questions new
Strayer mat 540 week 10 quiz 5 set 2 questions new
 
2018,sem7,ala,pm,160993119017,160993119018,160993119019,160993119020,16099311...
2018,sem7,ala,pm,160993119017,160993119018,160993119019,160993119020,16099311...2018,sem7,ala,pm,160993119017,160993119018,160993119019,160993119020,16099311...
2018,sem7,ala,pm,160993119017,160993119018,160993119019,160993119020,16099311...
 
Bagian 3 PTI
Bagian 3 PTIBagian 3 PTI
Bagian 3 PTI
 
simplex method
simplex methodsimplex method
simplex method
 
Basic Math for Physics
Basic Math for PhysicsBasic Math for Physics
Basic Math for Physics
 
16083116
1608311616083116
16083116
 
Integer Programming PPt.ernxzamnbmbmspdf
Integer Programming PPt.ernxzamnbmbmspdfInteger Programming PPt.ernxzamnbmbmspdf
Integer Programming PPt.ernxzamnbmbmspdf
 
Integer Linear Programming
Integer Linear ProgrammingInteger Linear Programming
Integer Linear Programming
 
OR Linear Programming
OR Linear ProgrammingOR Linear Programming
OR Linear Programming
 
Ch7
Ch7Ch7
Ch7
 
Simplex Algorithm
Simplex AlgorithmSimplex Algorithm
Simplex Algorithm
 
Microprocessor Week 4-5 MCS-51 Arithmetic operation
Microprocessor Week 4-5 MCS-51 Arithmetic operationMicroprocessor Week 4-5 MCS-51 Arithmetic operation
Microprocessor Week 4-5 MCS-51 Arithmetic operation
 
LINEAR PROGRAMMING
LINEAR PROGRAMMINGLINEAR PROGRAMMING
LINEAR PROGRAMMING
 
Speed mathematics
Speed mathematicsSpeed mathematics
Speed mathematics
 
Simplex Method
Simplex MethodSimplex Method
Simplex Method
 
Chapter 7 - Linear Programming
Chapter 7 - Linear ProgrammingChapter 7 - Linear Programming
Chapter 7 - Linear Programming
 

Recently uploaded

Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxgindu3009
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...ssifa0344
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxkessiyaTpeter
 
Green chemistry and Sustainable development.pptx
Green chemistry  and Sustainable development.pptxGreen chemistry  and Sustainable development.pptx
Green chemistry and Sustainable development.pptxRajatChauhan518211
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 sciencefloriejanemacaya1
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PPRINCE C P
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​kaibalyasahoo82800
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoSérgio Sacani
 
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral AnalysisRaman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral AnalysisDiwakar Mishra
 
Botany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfBotany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfSumit Kumar yadav
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRDelhi Call girls
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsSérgio Sacani
 
A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfnehabiju2046
 
Cultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxCultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxpradhanghanshyam7136
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfSumit Kumar yadav
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCEPRINCE C P
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTSérgio Sacani
 

Recently uploaded (20)

Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
 
Green chemistry and Sustainable development.pptx
Green chemistry  and Sustainable development.pptxGreen chemistry  and Sustainable development.pptx
Green chemistry and Sustainable development.pptx
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 science
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C P
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on Io
 
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral AnalysisRaman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
 
Botany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfBotany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdf
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
 
CELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdfCELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdf
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
 
A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdf
 
Engler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomyEngler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomy
 
Cultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxCultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptx
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdf
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
 
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
 

Linear Programming - Simplex Algorithm by Yunus Hatipoglu

  • 1. 07 December, 2017 Simplex Algorithm 1 Linear Programming Simplex Algorithm Yunus Hatipoğlu 201671209 Çankaya University CENG511 – Advanced Algorithm
  • 2. 07 December, 2017 The Simplex Algorithm 2 Content • Linear Programming– what is that? • The Simplex Algorithm – background • Usage Areas in real life • How it works (Pseudo) • Example Question – Maximize
  • 3. 07 December, 2017 The Simplex Algorithm 3 Linear Programming– what is that? A technique to achieve optimal distribution of resources, minimize costs and maximize profits.
  • 4. 07 December, 2017 The Simplex Algorithm 4 The Simplex Algorithm • based on algebraic iteration. • the initial simplex table is edited • then the operations are continued until it reaches the optimal solution
  • 5. 07 December, 2017 The Simplex Algorithm 5 The Simplex Algorithm • Simplex algorithm visits all 2n vertices in worst case and this turns out to be true for and deterministic pivot rule. • Pivot rule takes exponential time in worst case. • The performance of simplex algorithm depend on the specific pivot rule used.
  • 6. 07 December, 2017 The Simplex Algorithm 6 Usage Areas in real life • limited use of resources (capacity, raw material, labor force, etc.) and maximizing profits or minimizing costs. Determination of optimum production schedule:
  • 7. 07 December, 2017 The Simplex Algorithm 7 Usage Areas in real life • tries to ensure optimum application in determining the sales, storage or purchases of the warehouse capacity determined within a certain time to maximize profits (or minimize costs). Storage problems:
  • 8. 07 December, 2017 The Simplex Algorithm 8 How it works?
  • 9. 07 December, 2017 The Simplex Algorithm 9 Maximize & Minimize • Subjected to constraints : • 0<= ax + by + cz + ... <= P1 • 0<= dx + ey + fz + ... <= P2 • ... To maximize: To minimize: f = c1x+c2y+c3z ... We maximize g = -f = -(c1x+c2y+c3z ...)
  • 10. 07 December, 2017 The Simplex Algorithm 10 Example Question • Constraints: 2x1 + x2 <= 14 5x1 + 5x2 <=40 x1 + 3x2 <= 18 Maximize the following n= 50x1 + 30x2 x1, x2 >= 0
  • 11. 07 December, 2017 The Simplex Algorithm 11 Example Question(Cont.) • 1. Create simplex table – transform them into equations by adding increasing variables to the inequalities 2x1 + x2 + s1 = 14 5x1 + 5x2+ s2 = 40 x1 + 3x2 + s3 = 18 Maximize the following n= 50x1 + 30x2
  • 12. 07 December, 2017 The Simplex Algorithm 12 Example Question(Cont.) – Write constraint equations in matrix form 2 1 1 0 0 5 5 0 1 0 = 1 3 0 0 1 Maximize the following n= 50x1 + 30x2 x1 x2 s1 s2 s3 14 40 18
  • 13. 07 December, 2017 The Simplex Algorithm 13 Example Question(Cont.) x1 x2 s1 s2 s3 2 1 1 0 0 14 5 5 0 1 0 40 1 3 0 0 1 18 -50 -30 0 0 0 0 having the greatest absolute value of negative value indicates pivot column --> -50 Fixed values are divided to pivot line and minimum value determines pivot line 14/2 = 7 which is minumum 40/5 = 8 18/1 = 18 So 2 is pivot line
  • 14. 07 December, 2017 The Simplex Algorithm 14 Example Question(Cont.) x1 x2 s1 s2 s3 2 1 1 0 0 14 5 5 0 1 0 40 1 3 0 0 1 18 -50 -30 0 0 0 0 multiply the first line by 1/2 and make the pivot line 1 x1 x2 s1 s2 s3 1 1/2 1/2 0 0 7 5 5 0 1 0 40 1 3 0 0 1 18 -50 -30 0 0 0 0
  • 15. 07 December, 2017 The Simplex Algorithm 15 Example Question(Cont.) • Multiply the first line by 5 and subtract from the second line • Substract first line from 3. line • First line multiplied by 50 and added to forth line • Clean pivot column. x1 x2 s1 s2 s3 1 1/2 1/2 0 0 7 0 5/2 -5/2 1 0 5 0 5/2 -1/2 0 1 11 0 -5 25 0 0 350 x1 x2 s1 s2 s3 1 1/2 1/2 0 0 7 5 5 0 1 0 40 1 3 0 0 1 18 -50 -30 0 0 0 0
  • 16. 07 December, 2017 The Simplex Algorithm 16 Example Question(Cont.) • Change basis and repeat pivotting. • Second column pivot • Second line pivot line x1 x2 s1 s2 s3 1 1/2 1/2 0 0 7 0 5/2 -5/2 1 0 5 0 5/2 -1/2 0 1 11 0 -5 25 0 0 350 7 / 1/2 = 14 5 / 5/2 = 2 11 / 5/2 = 4.4 So pivot element is 5/2 which is in second line
  • 17. 07 December, 2017 The Simplex Algorithm 17 Example Question(Cont.) multiply the second line by 2/5 and make the pivot line 1 x1 x2 s1 s2 s3 1 1/2 1/2 0 0 7 0 1 -1 2/5 0 2 0 5/2 -1.2 0 1 11 0 -5 25 0 0 350 x1 x2 s1 s2 s3 1 1/2 1/2 0 0 7 0 5/2 -5/2 1 0 5 0 5/2 -1/2 0 1 11 0 -5 25 0 0 350
  • 18. 07 December, 2017 The Simplex Algorithm 18 Example Question(Cont.) • Multiply the second line by 1/2 and subtract from the first line • Multiply the second line by 5/2 and subtract from third line • Second line is multiplied by 5 and added to forth line x1 x2 s1 s2 s3 1 0 1 -1/5 0 6 0 1 -1 2/5 0 2 0 0 2 -1 1 6 0 0 20 2 0 360 x1 x2 s1 s2 s3 1 1/2 1/2 0 0 7 0 1 -1 2/5 0 2 0 5/2 -1/2 0 1 11 0 -5 25 0 0 350
  • 19. 07 December, 2017 The Simplex Algorithm 19 Example Question(Cont.) • Since there are no negative indicators left, this is the last table x1 x2 s1 s2 s3 1 0 1 -1/5 0 6 0 1 -1 2/5 0 2 0 0 2 -1 1 6 0 0 20 2 0 360 x1 = 6 x2 = 2 s3 = 6 n = 360
  • 20. 07 December, 2017 The Simplex Algorithm 20 Question • What is worst case complexity of Simplex Algorithm and what kind of areas complexity algorithm can be used?