SlideShare a Scribd company logo
Combinatorial Optimization
CS-724
Lec-7:
Date: 03-03-2021
Dr. Parikshit Saikia
Assistant Professor
Department of Computer Science and Engineering
NIT Hamirpur (HP)
India
Simplex Algorithm
 [1947]. George B. Dantzig developed a technique to solve linear
programs----known as Simplex Algorithm
 The simplex method is an iterative method that generates a sequence
of basic feasible solutions (corresponding to different bases) and
eventually stops when it has found an optimal basic feasible solution.
 The given LP is in the Standard form.
𝑚𝑖𝑛𝑖𝑚𝑖𝑧𝑒 (𝑜𝑟 𝑚𝑎𝑥𝑖𝑚𝑖𝑧𝑒) 𝑐′𝑥
𝐴𝑥 = 𝑏
𝑥 ≥ 0
 𝑏 ≥ 0
 There exists a collection 𝑩 of m variables called a basis such that
 the submatrix 𝑨𝑩 of 𝑨 consisting of the columns of 𝑨 corresponding to the variables in
𝑩 is the 𝑚 × 𝑚 identity matrix and
 the cost coefficients corresponding to the variables in 𝑩 are all equal to 𝟎.
Simplex Algorithm: Tabular Method
Solve the following LP using Tabular Method
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 6𝑥1 + 5𝑥2
𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑥1 + 𝑥2 ≤ 5
3𝑥1 + 2𝑥2 ≤ 12
𝑥1, 𝑥2 ≥ 0
Simplex Algorithm: Tabular Method
The standard form of the given LP is
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 6𝑥1 + 5𝑥2 + 0. 𝑥3 + 0. 𝑥4
𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑥1 + 𝑥2 + 𝑥3 = 5
3𝑥1 + 2𝑥2 + 𝑥4 = 12
𝑥1, 𝑥2, 𝑥3, 𝑥4 ≥ 0
𝐻𝑒𝑟𝑒 𝑥3 𝑎𝑛𝑑 𝑥4 𝑎𝑟𝑒 𝑠𝑙𝑎𝑐𝑘 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒𝑠.
Simplex Algorithm: Tabular Method
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 6𝑥1 + 5𝑥2 + 0. 𝑥3 + 0. 𝑥4
𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑥1 + 𝑥2 + 𝑥3 = 5
3𝑥1 + 2𝑥2 + 𝑥4 = 12
𝑥1, 𝑥2, 𝑥3, 𝑥4 ≥ 0
6 5 0 0
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒
RHS 𝜽
0 𝒙𝟑 1 1 1 0 5
0 𝒙𝟒 3 2 0 1 12
𝐶𝑗 − 𝑍𝑗
𝑪𝒋 − 𝒁𝑱 𝒊𝒔 𝒖𝒔𝒆𝒅 𝒕𝒐 𝒑𝒊𝒄𝒌 𝒕𝒉𝒆 𝒗𝒂𝒓𝒊𝒂𝒃𝒍𝒆 𝒘𝒉𝒊𝒄𝒉 𝒘𝒊𝒍𝒍 𝒃𝒆 𝒕𝒉𝒆 𝒃𝒂𝒔𝒊𝒄 𝒗𝒂𝒓𝒊𝒂𝒃𝒍𝒆 𝒊𝒏 𝒕𝒉𝒆 𝒏𝒆𝒙𝒕 𝒊𝒕𝒆𝒓𝒂𝒕𝒊𝒐𝒏
Algorithm terminates when 𝑪𝒋 − 𝒁𝒋 ≤ 𝟎. In this state the current basic feasible solution is optimal.
Simplex Algorithm: Tabular Method
6 5 0 0
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒
RHS 𝜽
0 𝒙𝟑 1 1 1 0 5
0 𝒙𝟒 3 2 0 1 12
𝐶𝑗 − 𝑍𝑗
6 5 0 0
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒
RHS 𝜽
0 𝒙𝟑 1 1 1 0 5
0 𝒙𝟒 3 2 0 1 12
𝐶𝑗 − 𝑍𝑗 6 5 0 0 0
6 5 0 0
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒
RHS 𝜽
0 𝒙𝟑 1 1 1 0 5 5
0 𝒙𝟒 3 2 0 1 12 4
𝐶𝑗 − 𝑍𝑗 6 5 0 0 0
• 𝐿𝑎𝑟𝑔𝑒𝑠𝑡 𝐶𝑗 − 𝑍𝑗 𝑖𝑠 6 𝑎𝑛𝑑 𝑡ℎ𝑒 𝑐𝑜𝑟𝑟𝑒𝑠𝑝𝑜𝑛𝑑𝑖𝑛𝑔 𝜃 𝑣𝑎𝑙𝑢𝑒𝑠 𝑎𝑟𝑒 𝑠ℎ𝑜𝑤𝑛 𝑖𝑛 𝑡ℎ𝑒 𝑡𝑎𝑏𝑙𝑒
𝑃𝑖𝑐𝑘 𝑡ℎ𝑒 𝑣𝑎𝑙𝑢𝑒 𝑤𝑖𝑡ℎ 𝑡ℎ𝑒 𝑙𝑎𝑟𝑔𝑒𝑠𝑡 𝐶𝑗 − 𝑍𝑗.
𝑊. 𝑟. 𝑡. 𝑡ℎ𝑎𝑡 𝑐𝑜𝑙𝑢𝑚𝑛 𝑐𝑜𝑚𝑝𝑢𝑡 𝜃 =
𝑅𝐻𝑆
𝐸𝑙𝑒𝑚𝑒𝑛𝑡 𝑜𝑓 𝐶𝐽
• Pick the row with smallest 𝜃 𝑣𝑎𝑙𝑢𝑒 𝑎𝑠 𝑎 𝑝𝑖𝑣𝑜𝑡𝑒 𝑟𝑜𝑤
𝑎𝑛𝑑
• 𝑡ℎ𝑒 𝑐𝑜𝑟𝑟𝑒𝑠𝑝𝑜𝑛𝑑𝑖𝑛𝑔 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑖𝑛 𝐶𝑗 𝑤ℎ𝑖𝑐ℎ 𝑝𝑟𝑜𝑑𝑢𝑐𝑒𝑠 𝑡ℎ𝑒
smallest 𝜃 value is considered as the pivot element
Combinatorial optimization CO-7
Combinatorial optimization CO-7
Solve the following LP using Simplex Algorithm
𝑀𝑎𝑥 𝑍 = 2𝑥1 − 𝑥2 + 2𝑥3
𝑠. 𝑡. 2𝑥1 + 𝑥2 ≤ 10
𝑥1 + 2𝑥2 − 2𝑥3 ≤ 20
𝑥1 + 2𝑥3 ≤ 5
𝑥1, 𝑥2, 𝑥_3 ≥ 0

More Related Content

PPT
System of linear algebriac equations nsm
PPT
Medians and order statistics
PDF
07 Analysis of Algorithms: Order Statistics
PPTX
Medians and Order Statistics
PPTX
Triangularization method
PDF
MHT Multi Hypothesis Tracking - Part2
PPTX
median and order statistics
System of linear algebriac equations nsm
Medians and order statistics
07 Analysis of Algorithms: Order Statistics
Medians and Order Statistics
Triangularization method
MHT Multi Hypothesis Tracking - Part2
median and order statistics

What's hot (12)

PDF
4 ESO Academics - UNIT 09 - FUNCTIONS
PPTX
Introduction to Hash Tables | What is a HashTable in Algorithm
PPTX
Excel formula
PPTX
2 lesson 2 method of completing the square
PPTX
Spatial mechanism and DH parameters
PPTX
3 lesson 2 graphs of quadratic function
PPTX
L o g a r i t h m
PPTX
3 lesson 1 graphs of quadratic function
PPT
Linearization
PPTX
Algorithms
PPTX
4 ESO Academics - UNIT 09 - FUNCTIONS
Introduction to Hash Tables | What is a HashTable in Algorithm
Excel formula
2 lesson 2 method of completing the square
Spatial mechanism and DH parameters
3 lesson 2 graphs of quadratic function
L o g a r i t h m
3 lesson 1 graphs of quadratic function
Linearization
Algorithms
Ad

Similar to Combinatorial optimization CO-7 (20)

PPTX
Simplex Algorithm
PDF
Ch06_1-2_Simplex_Method.pdf
PDF
D026017036
PPT
370_13735_EA221_2010_1__1_1_Simplex method.ppt
PDF
Numerical analysis simplex method 1
PPTX
SIMPLEX METHOD.pptx
PPTX
Randomized Algorithm- Advanced Algorithm
PPTX
Solution to Non-Linear Problems for Applied Numerical
PDF
C025020029
PPT
simplex method
PPTX
Linear programming
PDF
B02402012022
PPT
Operations research
PPTX
Simplex Algorithm
PPTX
A machine learning method for efficient design optimization in nano-optics
PDF
Giới thiệu lý thuyết và ứng dụng của ogic mờ
PDF
Combinatorial optimization CO-6
PDF
M.G.Goman, A.V.Khramtsovsky (1997) - Global Stability Analysis of Nonlinear A...
PPTX
Solving Poisson Equation using Conjugate Gradient Method and its implementation
PDF
Sparsenet
Simplex Algorithm
Ch06_1-2_Simplex_Method.pdf
D026017036
370_13735_EA221_2010_1__1_1_Simplex method.ppt
Numerical analysis simplex method 1
SIMPLEX METHOD.pptx
Randomized Algorithm- Advanced Algorithm
Solution to Non-Linear Problems for Applied Numerical
C025020029
simplex method
Linear programming
B02402012022
Operations research
Simplex Algorithm
A machine learning method for efficient design optimization in nano-optics
Giới thiệu lý thuyết và ứng dụng của ogic mờ
Combinatorial optimization CO-6
M.G.Goman, A.V.Khramtsovsky (1997) - Global Stability Analysis of Nonlinear A...
Solving Poisson Equation using Conjugate Gradient Method and its implementation
Sparsenet
Ad

More from man003 (6)

PDF
Combinatorial optimization CO-3
PDF
Combinatorial optimization CO-2
PDF
Combinatorial optimization CO-1
PDF
Combinatorial optimization CO-5
PDF
Combinatorial optimization CO-4
PPTX
IOT(Internet of Things) Seminar
Combinatorial optimization CO-3
Combinatorial optimization CO-2
Combinatorial optimization CO-1
Combinatorial optimization CO-5
Combinatorial optimization CO-4
IOT(Internet of Things) Seminar

Recently uploaded (20)

PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
Geodesy 1.pptx...............................................
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
additive manufacturing of ss316l using mig welding
PPTX
OOP with Java - Java Introduction (Basics)
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
bas. eng. economics group 4 presentation 1.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Geodesy 1.pptx...............................................
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
additive manufacturing of ss316l using mig welding
OOP with Java - Java Introduction (Basics)
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
UNIT 4 Total Quality Management .pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Foundation to blockchain - A guide to Blockchain Tech
Operating System & Kernel Study Guide-1 - converted.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
bas. eng. economics group 4 presentation 1.pptx

Combinatorial optimization CO-7

  • 1. Combinatorial Optimization CS-724 Lec-7: Date: 03-03-2021 Dr. Parikshit Saikia Assistant Professor Department of Computer Science and Engineering NIT Hamirpur (HP) India
  • 2. Simplex Algorithm  [1947]. George B. Dantzig developed a technique to solve linear programs----known as Simplex Algorithm  The simplex method is an iterative method that generates a sequence of basic feasible solutions (corresponding to different bases) and eventually stops when it has found an optimal basic feasible solution.
  • 3.  The given LP is in the Standard form. 𝑚𝑖𝑛𝑖𝑚𝑖𝑧𝑒 (𝑜𝑟 𝑚𝑎𝑥𝑖𝑚𝑖𝑧𝑒) 𝑐′𝑥 𝐴𝑥 = 𝑏 𝑥 ≥ 0  𝑏 ≥ 0  There exists a collection 𝑩 of m variables called a basis such that  the submatrix 𝑨𝑩 of 𝑨 consisting of the columns of 𝑨 corresponding to the variables in 𝑩 is the 𝑚 × 𝑚 identity matrix and  the cost coefficients corresponding to the variables in 𝑩 are all equal to 𝟎.
  • 4. Simplex Algorithm: Tabular Method Solve the following LP using Tabular Method 𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 6𝑥1 + 5𝑥2 𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑥1 + 𝑥2 ≤ 5 3𝑥1 + 2𝑥2 ≤ 12 𝑥1, 𝑥2 ≥ 0
  • 5. Simplex Algorithm: Tabular Method The standard form of the given LP is 𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 6𝑥1 + 5𝑥2 + 0. 𝑥3 + 0. 𝑥4 𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑥1 + 𝑥2 + 𝑥3 = 5 3𝑥1 + 2𝑥2 + 𝑥4 = 12 𝑥1, 𝑥2, 𝑥3, 𝑥4 ≥ 0 𝐻𝑒𝑟𝑒 𝑥3 𝑎𝑛𝑑 𝑥4 𝑎𝑟𝑒 𝑠𝑙𝑎𝑐𝑘 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒𝑠.
  • 6. Simplex Algorithm: Tabular Method 𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 6𝑥1 + 5𝑥2 + 0. 𝑥3 + 0. 𝑥4 𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑥1 + 𝑥2 + 𝑥3 = 5 3𝑥1 + 2𝑥2 + 𝑥4 = 12 𝑥1, 𝑥2, 𝑥3, 𝑥4 ≥ 0 6 5 0 0 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 RHS 𝜽 0 𝒙𝟑 1 1 1 0 5 0 𝒙𝟒 3 2 0 1 12 𝐶𝑗 − 𝑍𝑗 𝑪𝒋 − 𝒁𝑱 𝒊𝒔 𝒖𝒔𝒆𝒅 𝒕𝒐 𝒑𝒊𝒄𝒌 𝒕𝒉𝒆 𝒗𝒂𝒓𝒊𝒂𝒃𝒍𝒆 𝒘𝒉𝒊𝒄𝒉 𝒘𝒊𝒍𝒍 𝒃𝒆 𝒕𝒉𝒆 𝒃𝒂𝒔𝒊𝒄 𝒗𝒂𝒓𝒊𝒂𝒃𝒍𝒆 𝒊𝒏 𝒕𝒉𝒆 𝒏𝒆𝒙𝒕 𝒊𝒕𝒆𝒓𝒂𝒕𝒊𝒐𝒏 Algorithm terminates when 𝑪𝒋 − 𝒁𝒋 ≤ 𝟎. In this state the current basic feasible solution is optimal.
  • 7. Simplex Algorithm: Tabular Method 6 5 0 0 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 RHS 𝜽 0 𝒙𝟑 1 1 1 0 5 0 𝒙𝟒 3 2 0 1 12 𝐶𝑗 − 𝑍𝑗 6 5 0 0 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 RHS 𝜽 0 𝒙𝟑 1 1 1 0 5 0 𝒙𝟒 3 2 0 1 12 𝐶𝑗 − 𝑍𝑗 6 5 0 0 0
  • 8. 6 5 0 0 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 RHS 𝜽 0 𝒙𝟑 1 1 1 0 5 5 0 𝒙𝟒 3 2 0 1 12 4 𝐶𝑗 − 𝑍𝑗 6 5 0 0 0 • 𝐿𝑎𝑟𝑔𝑒𝑠𝑡 𝐶𝑗 − 𝑍𝑗 𝑖𝑠 6 𝑎𝑛𝑑 𝑡ℎ𝑒 𝑐𝑜𝑟𝑟𝑒𝑠𝑝𝑜𝑛𝑑𝑖𝑛𝑔 𝜃 𝑣𝑎𝑙𝑢𝑒𝑠 𝑎𝑟𝑒 𝑠ℎ𝑜𝑤𝑛 𝑖𝑛 𝑡ℎ𝑒 𝑡𝑎𝑏𝑙𝑒 𝑃𝑖𝑐𝑘 𝑡ℎ𝑒 𝑣𝑎𝑙𝑢𝑒 𝑤𝑖𝑡ℎ 𝑡ℎ𝑒 𝑙𝑎𝑟𝑔𝑒𝑠𝑡 𝐶𝑗 − 𝑍𝑗. 𝑊. 𝑟. 𝑡. 𝑡ℎ𝑎𝑡 𝑐𝑜𝑙𝑢𝑚𝑛 𝑐𝑜𝑚𝑝𝑢𝑡 𝜃 = 𝑅𝐻𝑆 𝐸𝑙𝑒𝑚𝑒𝑛𝑡 𝑜𝑓 𝐶𝐽
  • 9. • Pick the row with smallest 𝜃 𝑣𝑎𝑙𝑢𝑒 𝑎𝑠 𝑎 𝑝𝑖𝑣𝑜𝑡𝑒 𝑟𝑜𝑤 𝑎𝑛𝑑 • 𝑡ℎ𝑒 𝑐𝑜𝑟𝑟𝑒𝑠𝑝𝑜𝑛𝑑𝑖𝑛𝑔 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑖𝑛 𝐶𝑗 𝑤ℎ𝑖𝑐ℎ 𝑝𝑟𝑜𝑑𝑢𝑐𝑒𝑠 𝑡ℎ𝑒 smallest 𝜃 value is considered as the pivot element
  • 12. Solve the following LP using Simplex Algorithm 𝑀𝑎𝑥 𝑍 = 2𝑥1 − 𝑥2 + 2𝑥3 𝑠. 𝑡. 2𝑥1 + 𝑥2 ≤ 10 𝑥1 + 2𝑥2 − 2𝑥3 ≤ 20 𝑥1 + 2𝑥3 ≤ 5 𝑥1, 𝑥2, 𝑥_3 ≥ 0