SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
Chapter 10:   Iterative Improvement   Simplex Method The Design and Analysis of Algorithms
Iterative Improvement Introduction  Linear Programming The Simplex Method Standard Form of LP Problem Basic Feasible Solutions Outline of the Simplex Method Example Notes on the Simplex Method Improvements
Introduction   Algorithm design technique for solving optimization problems   Start with a feasible solution Repeat the following step until no improvement can be found: change the current feasible solution to a feasible solution with a better value of the objective function Return the last feasible solution as optimal
Introduction Note:  Typically, a change in a current solution is “small” ( local search )  Major difficulty:  Local optimum vs. global optimum
Important Examples   Simplex method  Ford-Fulkerson algorithm for maximum flow problem Maximum matching of graph vertices Gale-Shapley algorithm for the stable marriage problem
Linear Programming   Linear programming  (LP) problem is to optimize a linear function of several variables subject to linear constraints: maximize (or minimize)  c 1   x 1   + ...+ c n   x n   subject to   a i1 x 1 + ...+ a in   x n   ≤  (or  ≥  or =)  b i  ,  i =  1,..., m , x 1   ≥ 0 , ... , x n  ≥  0 The function  z = c 1   x 1   + ...+ c n   x n   is called the  objective function ; constraints  x 1   ≥ 0 , ... , x n  ≥  0 are called  non-negativity constraints
Example maximize  3x + 5y subject to  x +  y  ≤ 4   x + 3y  ≤ 6 x ≥ 0,  y ≥ 0 Feasible region  is the set of points defined by the constraints
Geometric solution   maximize  3x + 5y subject to  x +  y  ≤ 4   x + 3y  ≤ 6 x ≥ 0,  y ≥ 0 Extreme Point Theorem   Any LP problem with a nonempty bounded feasible region has an optimal solution;  moreover, an optimal solution can always be found at an  extreme point  of the problem's feasible region.
Possible outcomes in solving an LP problem has a finite optimal solution , which may not be unique unbounded :  the objective function of maximization (minimization) LP problem is unbounded from above (below) on its feasible region  infeasible :  there are no points satisfying all the constraints, i.e. the constraints are contradictory
The Simplex Method Simplex method  is the classic method for solving LP problems, one of the most important algorithms ever invented Invented by  George Dantzig  in 1947 (Stanford University) Based on the  iterative improvement  idea: Generates a sequence of adjacent points of the problem’s feasible region with improving values of the objective function until   no further improvement is possible
Standard form of LP problem must be a  maximization  problem all constraints (except the non-negativity constraints) must be in the form of  linear equations all the variables must be required to be  nonnegative Thus, the general linear programming problem in standard form with  m  constraints and  n  unknowns ( n  ≥  m ) is maximize  c 1   x 1   + ...+ c n   x n   subject to   a i1 x 1 + ...+ a in   x n   =  b i  ,   ,  i =  1,..., m ,     x 1   ≥ 0 , ... , x n  ≥  0 Every LP problem can be represented in such form
Example maximize  3 x  + 5 y   maximize  3 x  + 5 y  +  0 u  + 0 v subject to  subject to x  +  y  ≤ 4  x  +  y  +  u   = 4  x  + 3 y  ≤ 6   x  + 3 y  +  v   = 6  x ≥0,  y ≥0    x ≥0,  y ≥0,  u ≥0,  v ≥0 Variables  u  and  v , transforming inequality constraints into  equality constrains, are called  slack variables
Basic feasible solutions   A  basic solution  to a system of  m  linear equations in  n   unknowns ( n  ≥  m ) is obtained by setting  n  –  m   variables to 0 and solving the resulting system to get the values of the other  m  variables.  The variables set to 0 are called  nonbasic ;   the variables obtained by solving the system are called  basic .   A basic solution is called  feasible   if all its (basic) variables are nonnegative.  Example  x +  y + u   = 4    x +  3 y  + v   = 6    (0,  0,  4,  6) is basic feasible solution  ( x ,  y  are nonbasic;  u ,  v   are basic)
Simplex Tableau   maximize  z  = 3 x  + 5 y  + 0 u  + 0 v subject to  x  +  y  +  u   = 4  x  + 3 y   +  v   = 6  x ≥0,  y ≥0,  u ≥0,  v ≥0
Outline of the Simplex Method   Step 0 [Initialization]   Present a given LP problem in standard form and set up initial tableau.  Step 1 [Optimality test]  If all entries in the objective row are nonnegative — stop: the tableau represents an optimal solution. Step 2 [Find entering variable]  Select (the most) negative entry in the objective row.  Mark its column to indicate the  entering  variable and the pivot column.
Outline of the Simplex Method Step 3 [Find departing variable]   For each positive entry in the pivot column, calculate the  θ -ratio by dividing that row's entry in the rightmost column by its entry in the pivot column.  (If there are no positive entries in the pivot column — stop: the problem is unbounded.)  Find the row with the smallest  θ -ratio, mark this row to indicate the departing variable and the pivot row.  Step 4 [Form 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.  Replace the label of the pivot row by the variable's name of the pivot column and go back to Step 1.
Example of Simplex Method  maximize  z  = 3 x  + 5 y  + 0 u  + 0 v subject to  x  +  y  +  u   = 4  x  + 3 y   +  v   = 6  x ≥0,  y ≥0,  u ≥0,  v ≥0 basic feasible sol.  (0, 0, 4, 6) z =  0 basic feasible sol.  (0, 2, 2, 0) z =  10 basic feasible sol.  (3, 1, 0, 0) z =  14
Notes on the Simplex Method   Finding an initial basic feasible solution may pose a problem Theoretical possibility of cycling  Typical number of iterations is between  m  and 3 m , where  m  is the number of equality constraints in the standard form. Number of operations per iteration:  O(nm) Worse-case efficiency is exponential
Improvements   L. G. Khachian introduced an  ellipsoid method  (1979) that seemed to overcome some of the simplex method's limitations.  O(n 6 ).   Disadvantage – runs with the same complexity on all problems   Narendra K. Karmarkar of AT&T Bell Laboratories proposed  in1984  a new very efficient  interior-point algorithm  -  O( n  3.5 ).  In empirical tests it performs competitively with the simplex method.

More Related Content

PPT
simplex method
PPT
Simplex Method
PDF
LPP, Duality and Game Theory
PPTX
Simplex method concept,
PPT
Artificial Variable Technique –
PPTX
LP special cases and Duality.pptx
PPT
simplex method
PPT
Simplex Method
simplex method
Simplex Method
LPP, Duality and Game Theory
Simplex method concept,
Artificial Variable Technique –
LP special cases and Duality.pptx
simplex method
Simplex Method

What's hot (20)

PPTX
Big m method
PDF
Big m method
PPT
Simplex two phase
PPTX
Linear Programming
PPTX
Branch and Bound technique to solve Integer Linear Programming
PDF
Simplex method
PPT
4-The Simplex Method.ppt
PPT
Formulation Lpp
PPTX
Operations Research - The Two Phase Method
PPTX
Duality in Linear Programming
PPT
Graphical Method
PPTX
Big-M Method Presentation
PDF
Duality in Linear Programming Problem
DOC
Procedure Of Simplex Method
PDF
PPT
Duality
PPT
Simplex method
PPTX
Integer Linear Programming
PPTX
Linear programming - Model formulation, Graphical Method
DOCX
Simplex method - Maximisation Case
Big m method
Big m method
Simplex two phase
Linear Programming
Branch and Bound technique to solve Integer Linear Programming
Simplex method
4-The Simplex Method.ppt
Formulation Lpp
Operations Research - The Two Phase Method
Duality in Linear Programming
Graphical Method
Big-M Method Presentation
Duality in Linear Programming Problem
Procedure Of Simplex Method
Duality
Simplex method
Integer Linear Programming
Linear programming - Model formulation, Graphical Method
Simplex method - Maximisation Case
Ad

Viewers also liked (20)

PPT
DOCX
PPT
Metrology and Measurements unit 2
PPTX
Operation Research (Simplex Method)
PPTX
DOCX
Instructionformatreport 110419102141-phpapp02
PPTX
Measurement of force, torque and strain
PDF
FPDE presentation
DOCX
PPTX
PPTX
Types of Error in Mechanical Measurement & Metrology (MMM)
PPTX
LINEAR ALGEBRA BEHIND GOOGLE SEARCH
PPTX
Mechanical measurement
PPTX
PPTX
Biometrics
PPTX
Special Cases in Simplex Method
PPTX
Automation and robotics
PDF
PPT
Robots & Automation
PPTX
Operations research - an overview
Metrology and Measurements unit 2
Operation Research (Simplex Method)
Instructionformatreport 110419102141-phpapp02
Measurement of force, torque and strain
FPDE presentation
Types of Error in Mechanical Measurement & Metrology (MMM)
LINEAR ALGEBRA BEHIND GOOGLE SEARCH
Mechanical measurement
Biometrics
Special Cases in Simplex Method
Automation and robotics
Robots & Automation
Operations research - an overview
Ad

Similar to L20 Simplex Method (20)

PDF
Design and analysis of algorithm chapter 10
PPTX
SIMPLEX METHOD.pptx
PDF
Ch06_1-2_Simplex_Method.pdf
PPT
n7-LP-simplex.ppt
PDF
LP linear programming (summary) (5s)
PDF
Linearprog, Reading Materials for Operational Research
PDF
Support Vector Machines is the the the the the the the the the
PDF
Boyd 4.6, 4.7
PPT
5163147.ppt
PPTX
Scientific Computing and linear programming
PPTX
Chapter 2 II SIMPLEX METHOD OF SOLVING LPP.pptx
PDF
CMR_Graphical Method -Special cases.pdf
PPTX
5. advance topics in lp
PDF
A Regularized Simplex Method
PDF
Linear Programming
PPTX
14-dynamic-programming-work-methods.pptx
PPTX
Lecture5-7_12946_Linear Programming The Graphical Method.pptx
Design and analysis of algorithm chapter 10
SIMPLEX METHOD.pptx
Ch06_1-2_Simplex_Method.pdf
n7-LP-simplex.ppt
LP linear programming (summary) (5s)
Linearprog, Reading Materials for Operational Research
Support Vector Machines is the the the the the the the the the
Boyd 4.6, 4.7
5163147.ppt
Scientific Computing and linear programming
Chapter 2 II SIMPLEX METHOD OF SOLVING LPP.pptx
CMR_Graphical Method -Special cases.pdf
5. advance topics in lp
A Regularized Simplex Method
Linear Programming
14-dynamic-programming-work-methods.pptx
Lecture5-7_12946_Linear Programming The Graphical Method.pptx

Recently uploaded (20)

PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Encapsulation theory and applications.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Cloud computing and distributed systems.
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Spectroscopy.pptx food analysis technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Review of recent advances in non-invasive hemoglobin estimation
MIND Revenue Release Quarter 2 2025 Press Release
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Encapsulation theory and applications.pdf
Electronic commerce courselecture one. Pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
sap open course for s4hana steps from ECC to s4
Per capita expenditure prediction using model stacking based on satellite ima...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
The AUB Centre for AI in Media Proposal.docx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Cloud computing and distributed systems.
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
Building Integrated photovoltaic BIPV_UPV.pdf
Spectroscopy.pptx food analysis technology

L20 Simplex Method

  • 1. Chapter 10: Iterative Improvement Simplex Method The Design and Analysis of Algorithms
  • 2. Iterative Improvement Introduction Linear Programming The Simplex Method Standard Form of LP Problem Basic Feasible Solutions Outline of the Simplex Method Example Notes on the Simplex Method Improvements
  • 3. Introduction Algorithm design technique for solving optimization problems Start with a feasible solution Repeat the following step until no improvement can be found: change the current feasible solution to a feasible solution with a better value of the objective function Return the last feasible solution as optimal
  • 4. Introduction Note: Typically, a change in a current solution is “small” ( local search ) Major difficulty: Local optimum vs. global optimum
  • 5. Important Examples Simplex method Ford-Fulkerson algorithm for maximum flow problem Maximum matching of graph vertices Gale-Shapley algorithm for the stable marriage problem
  • 6. Linear Programming Linear programming (LP) problem is to optimize a linear function of several variables subject to linear constraints: maximize (or minimize) c 1 x 1 + ...+ c n x n subject to a i1 x 1 + ...+ a in x n ≤ (or ≥ or =) b i , i = 1,..., m , x 1 ≥ 0 , ... , x n ≥ 0 The function z = c 1 x 1 + ...+ c n x n is called the objective function ; constraints x 1 ≥ 0 , ... , x n ≥ 0 are called non-negativity constraints
  • 7. Example maximize 3x + 5y subject to x + y ≤ 4 x + 3y ≤ 6 x ≥ 0, y ≥ 0 Feasible region is the set of points defined by the constraints
  • 8. Geometric solution maximize 3x + 5y subject to x + y ≤ 4 x + 3y ≤ 6 x ≥ 0, y ≥ 0 Extreme Point Theorem Any LP problem with a nonempty bounded feasible region has an optimal solution; moreover, an optimal solution can always be found at an extreme point of the problem's feasible region.
  • 9. Possible outcomes in solving an LP problem has a finite optimal solution , which may not be unique unbounded : the objective function of maximization (minimization) LP problem is unbounded from above (below) on its feasible region infeasible : there are no points satisfying all the constraints, i.e. the constraints are contradictory
  • 10. The Simplex Method Simplex method is the classic method for solving LP problems, one of the most important algorithms ever invented Invented by George Dantzig in 1947 (Stanford University) Based on the iterative improvement idea: Generates a sequence of adjacent points of the problem’s feasible region with improving values of the objective function until no further improvement is possible
  • 11. Standard form of LP problem must be a maximization problem all constraints (except the non-negativity constraints) must be in the form of linear equations all the variables must be required to be nonnegative Thus, the general linear programming problem in standard form with m constraints and n unknowns ( n ≥ m ) is maximize c 1 x 1 + ...+ c n x n subject to a i1 x 1 + ...+ a in x n = b i , , i = 1,..., m , x 1 ≥ 0 , ... , x n ≥ 0 Every LP problem can be represented in such form
  • 12. Example maximize 3 x + 5 y maximize 3 x + 5 y + 0 u + 0 v subject to subject to x + y ≤ 4 x + y + u = 4 x + 3 y ≤ 6 x + 3 y + v = 6 x ≥0, y ≥0 x ≥0, y ≥0, u ≥0, v ≥0 Variables u and v , transforming inequality constraints into equality constrains, are called slack variables
  • 13. Basic feasible solutions A basic solution to a system of m linear equations in n unknowns ( n ≥ m ) is obtained by setting n – m variables to 0 and solving the resulting system to get the values of the other m variables. The variables set to 0 are called nonbasic ; the variables obtained by solving the system are called basic . A basic solution is called feasible if all its (basic) variables are nonnegative. Example x + y + u = 4 x + 3 y + v = 6 (0, 0, 4, 6) is basic feasible solution ( x , y are nonbasic; u , v are basic)
  • 14. Simplex Tableau maximize z = 3 x + 5 y + 0 u + 0 v subject to x + y + u = 4 x + 3 y + v = 6 x ≥0, y ≥0, u ≥0, v ≥0
  • 15. Outline of the Simplex Method Step 0 [Initialization] Present a given LP problem in standard form and set up initial tableau. Step 1 [Optimality test] If all entries in the objective row are nonnegative — stop: the tableau represents an optimal solution. Step 2 [Find entering variable] Select (the most) negative entry in the objective row. Mark its column to indicate the entering variable and the pivot column.
  • 16. Outline of the Simplex Method Step 3 [Find departing variable] For each positive entry in the pivot column, calculate the θ -ratio by dividing that row's entry in the rightmost column by its entry in the pivot column. (If there are no positive entries in the pivot column — stop: the problem is unbounded.) Find the row with the smallest θ -ratio, mark this row to indicate the departing variable and the pivot row. Step 4 [Form 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. Replace the label of the pivot row by the variable's name of the pivot column and go back to Step 1.
  • 17. Example of Simplex Method maximize z = 3 x + 5 y + 0 u + 0 v subject to x + y + u = 4 x + 3 y + v = 6 x ≥0, y ≥0, u ≥0, v ≥0 basic feasible sol. (0, 0, 4, 6) z = 0 basic feasible sol. (0, 2, 2, 0) z = 10 basic feasible sol. (3, 1, 0, 0) z = 14
  • 18. Notes on the Simplex Method Finding an initial basic feasible solution may pose a problem Theoretical possibility of cycling Typical number of iterations is between m and 3 m , where m is the number of equality constraints in the standard form. Number of operations per iteration: O(nm) Worse-case efficiency is exponential
  • 19. Improvements L. G. Khachian introduced an ellipsoid method (1979) that seemed to overcome some of the simplex method's limitations. O(n 6 ). Disadvantage – runs with the same complexity on all problems Narendra K. Karmarkar of AT&T Bell Laboratories proposed in1984 a new very efficient interior-point algorithm - O( n 3.5 ). In empirical tests it performs competitively with the simplex method.