SlideShare a Scribd company logo
An Introduction to Linear Programming Pham Minh Tri Ph.D. Candidate and Project Officer School of Computer Engineering 18 Jan 2008 presented by
An example Suppose a candy manufacturer produces chocolate covered peanuts called  Choconuts , and chocolate and caramel covered peanuts called  Carmonuts . Choconuts  require  3 pounds of chocolate  and  1.5 pounds of peanuts  to manufacture a case and sell for  $9.00 per case . Carmonuts  require  2 pounds of chocolate  and  3 pounds of peanuts  to manufacture a case and sell for  $12.00 per case . There are  300 pounds  of chocolate and  250 pounds  of peanuts available in the current shipment How many cases of each should the company produce to  maximize their profit?
An example First, let’s define our variables: X = number of cases of  Choconuts  to produce Y = number of cases of  Carmonuts  to produceSuppose a candy
An example The  Choconuts  require  3 pounds of chocolate  and the  Carmonuts  require  2 pounds of chocolate  and we only have  300 pounds of chocolate . So, the inequality that represents 3  X  + 2  Y  <= 300 The  Choconuts  require  1.5 pounds of peanuts  and the  Carmonuts  require  3 pounds of peanuts  and we only have  250 pounds of peanuts . So, the inequality that represents 1.5  X  + 3  Y  <= 250
An example Now, since we cannot produce a negative amount of either candy, we also have these constraints: X  >= 0 Y  >= 0 Let’s graph these inequalities;
An example
An example X  >= 0
An example X  >= 0 Y  >= 0
An example X  >= 0 Y  >= 0 3  X  + 2  Y  <= 300 (0,83.3) (166.7,0)
An example X  >= 0 Y  >= 0 3  X  + 2  Y  <= 300 1.5  X  + 3  Y  <= 250 (0,83.3) (100,0) (0,150) (166.7,0)
An example X  >= 0 Y  >= 0 3  X  + 2  Y  <= 300 1.5  X  + 3  Y  <= 250 (0,83.3) (100,0) (0,150) (166.7,0) Feasible region Feasible region is always a convex hull
An example A  Choconut  sells for  $9.00  and a  Carmonut  sells for  $12.00 . How many cases of each should the company produce to  maximize their profit? Profit:  P(  X ,  Y  ) = 9  X  + 12  Y
An example Profit:  P(  X ,  Y  ) = 9  X  + 12  Y Can be applied to points in region F only Problem: find point (  X ,  Y  ) in region F such that  P (  X ,  Y  )    max (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F
An example Profit:  P(  X ,  Y  ) = 9  X  + 12  Y (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F Direction Of profit increase
An example Profit:  P(  X ,  Y  ) = 9  X  + 12  Y (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F Direction Of profit increase P = 0
An example Profit:  P(  X ,  Y  ) = 9  X  + 12  Y (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F Direction Of profit increase
An example Profit:  P(  X ,  Y  ) = 9  X  + 12  Y (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F Direction Of profit increase
An example Profit:  P(  X ,  Y  ) = 9  X  + 12  Y (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F Direction Of profit increase
An example Profit:  P(  X ,  Y  ) = 9  X  + 12  Y (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F Direction Of profit increase
An example Profit:  P(  X ,  Y  ) = 9  X  + 12  Y Optimal solution: At ( X , Y )=(66,50) P(66,50) = 1192 (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F Direction Of profit increase P = 1192 (66,50) An optimal solution, always locates at one of the corners
2-variable Linear Programming Find (x 1  ,x 2 ) to: Maximize:  c 1  x 1  + c 2  x 2 Constraints: x 1  >= 0 and x 2  >= 0 a 1,1  x 1  + a 1,2  x 2  <= b 1 a 2,1  x 1  + a 2,2  x 2  <= b 2 … a M,1  x 1  + a M,2  x 2  <= b M Simple Algorithm: - Find the feasible region F (convex hull) - Choose the corner that has the highest profit
What about over 2 variables? Same idea, except that feasible region F lives in a higher dimensional space: 2-variable linear programming:  F = 2D convex hull 3-variable linear programming:  F = 3D convex hull 4-variable linear programming:  F = 4D convex hull etc
Linear Programming in general Find (x 1 , x 2 , …, x N ) to: Maximize:  c 1  x 1  + c 2  x 2 + … + c N  x N Constraints: x 1  >= 0, x 2  >= 0, …, x N  >= 0 a 1,1  x 1  + a 1,2  x 2  + … + a 1,N  x N  <= b 1 a 2,1  x 1  + a 2,2  x 2  + … + a 2,N  x N   <= b 2 … a M,1  x 1  + a M,2  x 2  + … + a M,N  x N   <= b M
Linear Programming, short form Find  (x 1 , x 2 , …, x N )  to: Maximize:  c 1  x 1  + c 2  x 2 + … + c N  x N Constraints: x 1  >= 0, x 2  >= 0, …, x N  >= 0 a 1,1  x 1  + a 1,2  x 2  + … + a 1,N  x N  <= b 1 a 2,1  x 1  + a 2,2  x 2  + … + a 2,N  x N   <= b 2 … a M,1  x 1  + a M,2  x 2  + … + a M,N  x N   <= b M Find  x  to: Maximize:  c T x Constraints: x  >=  0 A  x   <=  b
Linear Programming If we multiply each constraint with a non-negative number, and sum them up: y 1  >= 0,  y 2  >= 0, …,  y M  >= 0 y 1 (a 1,1  x 1  + a 1,2  x 2  + … + a 1,N  x N ) <=  y 1 b 1 y 2 (a 2,1  x 1  + a 2,2  x 2  + … + a 2,N  x N ) <=  y 2 b 2 … y M (a M,1  x 1  + a M,2  x 2  + … + a M,N  x N )<=  y M b M The equation  y T A  x   <=   y T b  holds for every non-negative vector  y y T A  x   <=   y T b
Linear Programming Let us limit the choices for  y  further. Suppose we are interested in only  y  such that: y 1  >= 0,  y 2  >= 0, …,  y M  >= 0 y 1 a 1,1  +  y 2 a 2,1  + … +  y M a M,1  >=  c 1 y 1 a 1,2  +  y 2 a 2,2  + … +  y M a M,2  >=  c 2 … y 1 a 1,N  +  y 2 a 2,N  + … +  y M a M,N  >=  c N This leads to:  y T A x   >=   c T x y T A  >=   c T Let’s call this feasible region G for  y
Linear Programming - Duality Hence, we have this nice property: For all: vector  x  in F, and  y  in G: c T x   <=  y T A  x   <=   y T b This leads to the following Duality theorem;
Linear Programming - Duality The following two problems are equivalent: Primal problem: Maximize  c T x Subject to  A x  <=  b ,  x  >= 0 Dual problem: Minimize  b T y Subject to  A T y  >=  c ,  y  >= 0
Linear Programming - Duality Furthermore, at the optimal solution, we have the following  complementary slackness theorem : (no proof, sorry!)  y i   (a i,1 x 1 + a i,2 x 2 + … + a i,N x N -b i ) = 0 x i   (a 1,i y 1 + a 2,i y 2 + … + a M,i y N - c i ) = 0 Using this duality, we can convert a problem with  many variables  but  a few constraints  (hard to solve) into a problem of  multiple constraints  with  a few variables  (easy to solve).
Another example A burglar breaks into a bank’s storeroom. He notices that the items in the room are in one of ten different types. Each item type has its own  value ,  volume , and  weight . The items are homogeneous and can be broken into pieces while still preserving their values. There are so many valuable items for each type that he cannot even count.  The burglar brings along with him a small bag, which can help him carry at most  M kilograms  with maximum volume of  N meter cubed .  Help him decide how many items per type he should steal to maximize  the total value .
Another example Suppose the i-th item type has value a i , weight w i , and volume v i Let’s define our variables: x 1   = number of items of type 1 x 2   = number of items of type 2 … x 10   = number of items of type 10
Another example There is no way the number of items is negative, therefore: x 1   >= 0 x 2   >= 0 … x 10   >= 0 Weight constraint: w 1   x 1  + w 2   x 2  + … + w 10  x 10   <= M Volume constraint: v 1   x 1  + v 2   x 2  + … + v 10   x 10  <= N Objective function: a 1   x 1  +  a 2   x 2  + … +  a 10   x 10
Another example The primal problem has 10 variables and 2 constraints. To solve it, we need to work with a 10D convex hull!!! If we convert into the dual problem, we have 2 variables and 10 constraints as follows: Minimize: M  y 1  + N  y 2 Subject to: y 1  >= 0,  y 2  >= 0 w 1  y 1  + v 1   y 2  >=  a 1 w 2  y 1  + v 2   y 2  >=  a 2 … w 10  y 1  + v 10   y 2  >=  a 10
Another example Once we have found optimal  y  =( y 1 ,  y 2 ), we can use the  complementary slackness theorem  to find  x  =( x 1 ,  x 2 , …,  x 10 ): y 1   (w 1 x 1 + w 2 x 2 + … + w 10 x 10 -M) = 0 y 2   (v 1 x 1 + v 2 x 2 + … + v 10 x 10 -N) = 0 x i   (w i y 1 + v i y 2 - a i ) = 0 for i = 1 to 10 Thus: In the last 10 equations, if w i y 1 + v i y 2   >   a i  then  x i  must be 0 The remaining  x i ’s can be found by solving the remaining system of linear equations.

More Related Content

PPTX
graphical method
PPT
Linear Programming 1
PPTX
LINEAR PROGRAMMING
PPSX
Graphical method
PDF
Numerical Integration
PPT
Linear programming
PDF
nonlinear programming
PPTX
Linear programming ppt
graphical method
Linear Programming 1
LINEAR PROGRAMMING
Graphical method
Numerical Integration
Linear programming
nonlinear programming
Linear programming ppt

What's hot (20)

PDF
Linear Programming Problems : Dr. Purnima Pandit
PPTX
NON LINEAR PROGRAMMING
PDF
Definition of banach spaces
PDF
Varian, microeconomic analysis, solution book
PPT
Simplex Method
PPT
simplex method
PDF
Linear Programming Problems {Operation Research}
PPTX
Lagrange's method
PDF
Partial Differential Equations, 3 simple examples
PDF
Numerical analysis kuhn tucker eqn
PDF
Chapter 2. Constrained Optimization lecture note.pdf
PPT
simplex method
PDF
3. linear programming senstivity analysis
PPTX
Addition and subtraction of fractions for grade 7
PPT
Introduction to Functions of Several Variables
PPTX
A presentation on differencial calculus
PPT
Trigonometry functions of general angles reference angles
PPTX
Linear Programming
PDF
Integer Programming, Goal Programming, and Nonlinear Programming
Linear Programming Problems : Dr. Purnima Pandit
NON LINEAR PROGRAMMING
Definition of banach spaces
Varian, microeconomic analysis, solution book
Simplex Method
simplex method
Linear Programming Problems {Operation Research}
Lagrange's method
Partial Differential Equations, 3 simple examples
Numerical analysis kuhn tucker eqn
Chapter 2. Constrained Optimization lecture note.pdf
simplex method
3. linear programming senstivity analysis
Addition and subtraction of fractions for grade 7
Introduction to Functions of Several Variables
A presentation on differencial calculus
Trigonometry functions of general angles reference angles
Linear Programming
Integer Programming, Goal Programming, and Nonlinear Programming
Ad

Similar to An Introduction to Linear Programming (20)

PDF
Linear algebra application in linear programming
PPTX
Management Science
PDF
Topic23_3p3_Galvin_2017_shortlinearp.pdf
PDF
Linear programming in matlab
PDF
Reading Materials for Operational Research
PPT
LP1 as EEM Electrial Engineering Department.ppt
PDF
LP linear programming (summary) (5s)
PDF
Theory of linear programming
PPTX
Linear Programing.pptx
PDF
Linear Models for Engineering applications
PPT
Lecture11
PDF
Operation Research
PDF
DOCX
LINEAR PROGRAMING
PPTX
MFCS2-Module1.pptx
PDF
Linear Programming
PDF
Linearprog, Reading Materials for Operational Research
PPTX
Duality in Linear Programming
PPT
BBM-501-U-II_-_Linear_Programming (1).ppt
PPTX
Chapter 3 linear programming
Linear algebra application in linear programming
Management Science
Topic23_3p3_Galvin_2017_shortlinearp.pdf
Linear programming in matlab
Reading Materials for Operational Research
LP1 as EEM Electrial Engineering Department.ppt
LP linear programming (summary) (5s)
Theory of linear programming
Linear Programing.pptx
Linear Models for Engineering applications
Lecture11
Operation Research
LINEAR PROGRAMING
MFCS2-Module1.pptx
Linear Programming
Linearprog, Reading Materials for Operational Research
Duality in Linear Programming
BBM-501-U-II_-_Linear_Programming (1).ppt
Chapter 3 linear programming
Ad

Recently uploaded (20)

PDF
Q2 2025 :Lundin Gold Conference Call Presentation_Final.pdf
PDF
illuminati Uganda brotherhood agent in Kampala call 0756664682,0782561496
PDF
Spending, Allocation Choices, and Aging THROUGH Retirement. Are all of these ...
PPTX
Unilever_Financial_Analysis_Presentation.pptx
PDF
Topic Globalisation and Lifelines of National Economy.pdf
DOCX
marketing plan Elkhabiry............docx
PDF
Bladex Earnings Call Presentation 2Q2025
PDF
Dialnet-DynamicHedgingOfPricesOfNaturalGasInMexico-8788871.pdf
PDF
way to join Real illuminati agent 0782561496,0756664682
PPTX
Antihypertensive_Drugs_Presentation_Poonam_Painkra.pptx
PDF
Corporate Finance Fundamentals - Course Presentation.pdf
PDF
discourse-2025-02-building-a-trillion-dollar-dream.pdf
PPTX
Session 14-16. Capital Structure Theories.pptx
PDF
Copia de Minimal 3D Technology Consulting Presentation.pdf
PDF
Understanding University Research Expenditures (1)_compressed.pdf
PPTX
How best to drive Metrics, Ratios, and Key Performance Indicators
PDF
Mathematical Economics 23lec03slides.pdf
PDF
Dr Tran Quoc Bao the first Vietnamese speaker at GITEX DigiHealth Conference ...
PPTX
social-studies-subject-for-high-school-globalization.pptx
PDF
ECONOMICS AND ENTREPRENEURS LESSONSS AND
Q2 2025 :Lundin Gold Conference Call Presentation_Final.pdf
illuminati Uganda brotherhood agent in Kampala call 0756664682,0782561496
Spending, Allocation Choices, and Aging THROUGH Retirement. Are all of these ...
Unilever_Financial_Analysis_Presentation.pptx
Topic Globalisation and Lifelines of National Economy.pdf
marketing plan Elkhabiry............docx
Bladex Earnings Call Presentation 2Q2025
Dialnet-DynamicHedgingOfPricesOfNaturalGasInMexico-8788871.pdf
way to join Real illuminati agent 0782561496,0756664682
Antihypertensive_Drugs_Presentation_Poonam_Painkra.pptx
Corporate Finance Fundamentals - Course Presentation.pdf
discourse-2025-02-building-a-trillion-dollar-dream.pdf
Session 14-16. Capital Structure Theories.pptx
Copia de Minimal 3D Technology Consulting Presentation.pdf
Understanding University Research Expenditures (1)_compressed.pdf
How best to drive Metrics, Ratios, and Key Performance Indicators
Mathematical Economics 23lec03slides.pdf
Dr Tran Quoc Bao the first Vietnamese speaker at GITEX DigiHealth Conference ...
social-studies-subject-for-high-school-globalization.pptx
ECONOMICS AND ENTREPRENEURS LESSONSS AND

An Introduction to Linear Programming

  • 1. An Introduction to Linear Programming Pham Minh Tri Ph.D. Candidate and Project Officer School of Computer Engineering 18 Jan 2008 presented by
  • 2. An example Suppose a candy manufacturer produces chocolate covered peanuts called Choconuts , and chocolate and caramel covered peanuts called Carmonuts . Choconuts require 3 pounds of chocolate and 1.5 pounds of peanuts to manufacture a case and sell for $9.00 per case . Carmonuts require 2 pounds of chocolate and 3 pounds of peanuts to manufacture a case and sell for $12.00 per case . There are 300 pounds of chocolate and 250 pounds of peanuts available in the current shipment How many cases of each should the company produce to maximize their profit?
  • 3. An example First, let’s define our variables: X = number of cases of Choconuts to produce Y = number of cases of Carmonuts to produceSuppose a candy
  • 4. An example The Choconuts require 3 pounds of chocolate and the Carmonuts require 2 pounds of chocolate and we only have 300 pounds of chocolate . So, the inequality that represents 3 X + 2 Y <= 300 The Choconuts require 1.5 pounds of peanuts and the Carmonuts require 3 pounds of peanuts and we only have 250 pounds of peanuts . So, the inequality that represents 1.5 X + 3 Y <= 250
  • 5. An example Now, since we cannot produce a negative amount of either candy, we also have these constraints: X >= 0 Y >= 0 Let’s graph these inequalities;
  • 8. An example X >= 0 Y >= 0
  • 9. An example X >= 0 Y >= 0 3 X + 2 Y <= 300 (0,83.3) (166.7,0)
  • 10. An example X >= 0 Y >= 0 3 X + 2 Y <= 300 1.5 X + 3 Y <= 250 (0,83.3) (100,0) (0,150) (166.7,0)
  • 11. An example X >= 0 Y >= 0 3 X + 2 Y <= 300 1.5 X + 3 Y <= 250 (0,83.3) (100,0) (0,150) (166.7,0) Feasible region Feasible region is always a convex hull
  • 12. An example A Choconut sells for $9.00 and a Carmonut sells for $12.00 . How many cases of each should the company produce to maximize their profit? Profit: P( X , Y ) = 9 X + 12 Y
  • 13. An example Profit: P( X , Y ) = 9 X + 12 Y Can be applied to points in region F only Problem: find point ( X , Y ) in region F such that P ( X , Y )  max (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F
  • 14. An example Profit: P( X , Y ) = 9 X + 12 Y (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F Direction Of profit increase
  • 15. An example Profit: P( X , Y ) = 9 X + 12 Y (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F Direction Of profit increase P = 0
  • 16. An example Profit: P( X , Y ) = 9 X + 12 Y (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F Direction Of profit increase
  • 17. An example Profit: P( X , Y ) = 9 X + 12 Y (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F Direction Of profit increase
  • 18. An example Profit: P( X , Y ) = 9 X + 12 Y (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F Direction Of profit increase
  • 19. An example Profit: P( X , Y ) = 9 X + 12 Y (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F Direction Of profit increase
  • 20. An example Profit: P( X , Y ) = 9 X + 12 Y Optimal solution: At ( X , Y )=(66,50) P(66,50) = 1192 (0,83.3) (100,0) (0,150) (166.7,0) Feasible Region F Direction Of profit increase P = 1192 (66,50) An optimal solution, always locates at one of the corners
  • 21. 2-variable Linear Programming Find (x 1 ,x 2 ) to: Maximize: c 1 x 1 + c 2 x 2 Constraints: x 1 >= 0 and x 2 >= 0 a 1,1 x 1 + a 1,2 x 2 <= b 1 a 2,1 x 1 + a 2,2 x 2 <= b 2 … a M,1 x 1 + a M,2 x 2 <= b M Simple Algorithm: - Find the feasible region F (convex hull) - Choose the corner that has the highest profit
  • 22. What about over 2 variables? Same idea, except that feasible region F lives in a higher dimensional space: 2-variable linear programming: F = 2D convex hull 3-variable linear programming: F = 3D convex hull 4-variable linear programming: F = 4D convex hull etc
  • 23. Linear Programming in general Find (x 1 , x 2 , …, x N ) to: Maximize: c 1 x 1 + c 2 x 2 + … + c N x N Constraints: x 1 >= 0, x 2 >= 0, …, x N >= 0 a 1,1 x 1 + a 1,2 x 2 + … + a 1,N x N <= b 1 a 2,1 x 1 + a 2,2 x 2 + … + a 2,N x N <= b 2 … a M,1 x 1 + a M,2 x 2 + … + a M,N x N <= b M
  • 24. Linear Programming, short form Find (x 1 , x 2 , …, x N ) to: Maximize: c 1 x 1 + c 2 x 2 + … + c N x N Constraints: x 1 >= 0, x 2 >= 0, …, x N >= 0 a 1,1 x 1 + a 1,2 x 2 + … + a 1,N x N <= b 1 a 2,1 x 1 + a 2,2 x 2 + … + a 2,N x N <= b 2 … a M,1 x 1 + a M,2 x 2 + … + a M,N x N <= b M Find x to: Maximize: c T x Constraints: x >= 0 A x <= b
  • 25. Linear Programming If we multiply each constraint with a non-negative number, and sum them up: y 1 >= 0, y 2 >= 0, …, y M >= 0 y 1 (a 1,1 x 1 + a 1,2 x 2 + … + a 1,N x N ) <= y 1 b 1 y 2 (a 2,1 x 1 + a 2,2 x 2 + … + a 2,N x N ) <= y 2 b 2 … y M (a M,1 x 1 + a M,2 x 2 + … + a M,N x N )<= y M b M The equation y T A x <= y T b holds for every non-negative vector y y T A x <= y T b
  • 26. Linear Programming Let us limit the choices for y further. Suppose we are interested in only y such that: y 1 >= 0, y 2 >= 0, …, y M >= 0 y 1 a 1,1 + y 2 a 2,1 + … + y M a M,1 >= c 1 y 1 a 1,2 + y 2 a 2,2 + … + y M a M,2 >= c 2 … y 1 a 1,N + y 2 a 2,N + … + y M a M,N >= c N This leads to: y T A x >= c T x y T A >= c T Let’s call this feasible region G for y
  • 27. Linear Programming - Duality Hence, we have this nice property: For all: vector x in F, and y in G: c T x <= y T A x <= y T b This leads to the following Duality theorem;
  • 28. Linear Programming - Duality The following two problems are equivalent: Primal problem: Maximize c T x Subject to A x <= b , x >= 0 Dual problem: Minimize b T y Subject to A T y >= c , y >= 0
  • 29. Linear Programming - Duality Furthermore, at the optimal solution, we have the following complementary slackness theorem : (no proof, sorry!) y i (a i,1 x 1 + a i,2 x 2 + … + a i,N x N -b i ) = 0 x i (a 1,i y 1 + a 2,i y 2 + … + a M,i y N - c i ) = 0 Using this duality, we can convert a problem with many variables but a few constraints (hard to solve) into a problem of multiple constraints with a few variables (easy to solve).
  • 30. Another example A burglar breaks into a bank’s storeroom. He notices that the items in the room are in one of ten different types. Each item type has its own value , volume , and weight . The items are homogeneous and can be broken into pieces while still preserving their values. There are so many valuable items for each type that he cannot even count. The burglar brings along with him a small bag, which can help him carry at most M kilograms with maximum volume of N meter cubed . Help him decide how many items per type he should steal to maximize the total value .
  • 31. Another example Suppose the i-th item type has value a i , weight w i , and volume v i Let’s define our variables: x 1 = number of items of type 1 x 2 = number of items of type 2 … x 10 = number of items of type 10
  • 32. Another example There is no way the number of items is negative, therefore: x 1 >= 0 x 2 >= 0 … x 10 >= 0 Weight constraint: w 1 x 1 + w 2 x 2 + … + w 10 x 10 <= M Volume constraint: v 1 x 1 + v 2 x 2 + … + v 10 x 10 <= N Objective function: a 1 x 1 + a 2 x 2 + … + a 10 x 10
  • 33. Another example The primal problem has 10 variables and 2 constraints. To solve it, we need to work with a 10D convex hull!!! If we convert into the dual problem, we have 2 variables and 10 constraints as follows: Minimize: M y 1 + N y 2 Subject to: y 1 >= 0, y 2 >= 0 w 1 y 1 + v 1 y 2 >= a 1 w 2 y 1 + v 2 y 2 >= a 2 … w 10 y 1 + v 10 y 2 >= a 10
  • 34. Another example Once we have found optimal y =( y 1 , y 2 ), we can use the complementary slackness theorem to find x =( x 1 , x 2 , …, x 10 ): y 1 (w 1 x 1 + w 2 x 2 + … + w 10 x 10 -M) = 0 y 2 (v 1 x 1 + v 2 x 2 + … + v 10 x 10 -N) = 0 x i (w i y 1 + v i y 2 - a i ) = 0 for i = 1 to 10 Thus: In the last 10 equations, if w i y 1 + v i y 2 > a i then x i must be 0 The remaining x i ’s can be found by solving the remaining system of linear equations.