Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Linear programming           simplex methodThis presentation will help you to solve linear      programming problems using...
This is a typical linear programming problemKeep left clicking the mouse to reveal the next part   Maximise               ...
The first step is to rewrite objective formula so it isequal to zero We then need to rewrite P = 2x + 3y + 4z as:         ...
Next we need to remove the inequalities from theconstraintsThis is done by adding slack variablesAdding slack variables s ...
Next, these equations are placed in a tableau     P       x       y      z      s      t     values                       ...
First the Objective equation  P     – 2x – 3y – 4z                 =0   P       x      y       z    s   t   values   1    ...
Next, the constraint equations       3x     +2y    +z     +s        = 10       2x     + 5y   + 3z        + t = 15   P     ...
We now have to identify the pivotFirst, we find the pivot columnThe pivot column is the column with the greatestnegative v...
The next step in identifying the pivot is tofind the pivot rowThis is done by dividing the values of theconstraints by the...
10 divided by 1 = 1015 divided by 3 = 5The lowest value gives the pivot rowThis is marked with an arrow  P     x     y    ...
The pivot is where the pivot columnand pivot row intersectThis is normally marked with a circle  P     x     y      z     ...
We now need to make the pivot equal tozeroTo do this divide the pivot row by the pivotvalue  P      x     y      z      s ...
P   x     y      z    s    t    values1   -2    -3    -4    0   0         00   3     2     1     1   0        100   2/3   ...
It is best to keep the values as fractions  P      x      y      z     s     t    values  1      -2    -3     -4     0    ...
Next we need to make the pivot columnvalues into zerosTo do this we add or subtract multiples of thepivot column  P     x ...
The pivot column in the objective functionwill go to zero if we add four times thepivot rowThe pivot column value in the o...
Subtracting 4 X the pivot row from the objective function gives: P       x        y       z      s       t      values1+  ...
Subtracting 4 X the pivot row from theobjective function gives:P      x      y     z     s      t    values1     2/3   11/...
Subtracting 1 X the pivot row from theother constraint gives:P      x      y     z     s      t    values1     2/3   11/3 ...
Subtracting 1 times the pivot row from theother constraint gives:P      x      y     z     s      t    values1     2/3   1...
This then is the first iteration of theSimplex algorithmP      x      y      z      s      t      values1     2/3    11/3 ...
If any values in the objective equation arenegative we have to repeat the wholeprocess Here, there are no negative values....
We now have to determine the values of thevariables that give the optimum solution  P     x      y     z     s     t     v...
Reading the objective function:  P      x      y     z     s      t     values  1     2/3   11/3    0     0     4/3       ...
Reading the objective function: The maximum value for P is then 20  For this to be the case x, y and t must  be zero  In g...
From the objective function x, y and t arezero – substituting these values in to theconstraint rows gives:s = 5 and z = 5 ...
The solution to the linearprogramming problem:maximise: P = 2x + 3y+ 4zsubject to:3x +2y + z ≤ 102x + 5y+ 3z ≤15x, y ≥ 0is...
There are 9 steps in the Simplex algorithm2. Rewrite objective formula so it is equal to zero3. Add slack variables to rem...
Go to this web site to solve any linearprogramme problem using the simplexmethod:For on-line exercises go here:           ...
Upcoming SlideShare
Loading in …5
×

Simplex Algorithm

54,068 views

Published on

How to solve linear equations using the simplex method

Published in: Technology

Simplex Algorithm

  1. 1. Linear programming simplex methodThis presentation will help you to solve linear programming problems using the Simplex tableau Steve Bishop 2004, 2007, 2012 1
  2. 2. This is a typical linear programming problemKeep left clicking the mouse to reveal the next part Maximise P = 2x + 3y+ 4z The objective function Subject to 3x +2y + z ≤ 10 The constraints 2x + 5y+ 3z ≤15 x, y ≥ 0 2
  3. 3. The first step is to rewrite objective formula so it isequal to zero We then need to rewrite P = 2x + 3y + 4z as: P – 2x – 3y – 4z = 0 This is called the objective equation 3
  4. 4. Next we need to remove the inequalities from theconstraintsThis is done by adding slack variablesAdding slack variables s and t to the inequalities, we can write them as equalities: 3x +2y + z + s = 10 2x + 5y+ 3z + t = 15 These are called the constraint equations 4
  5. 5. Next, these equations are placed in a tableau P x y z s t values 5
  6. 6. First the Objective equation P – 2x – 3y – 4z =0 P x y z s t values 1 -2 -3 -4 0 0 0 6
  7. 7. Next, the constraint equations 3x +2y +z +s = 10 2x + 5y + 3z + t = 15 P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2 5 3 0 1 15 7
  8. 8. We now have to identify the pivotFirst, we find the pivot columnThe pivot column is the column with the greatestnegative value in the objective equationMark this column with an arrow P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2 5 3 0 1 15 8
  9. 9. The next step in identifying the pivot is tofind the pivot rowThis is done by dividing the values of theconstraints by the value in the pivot column P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2 5 3 0 1 15 9
  10. 10. 10 divided by 1 = 1015 divided by 3 = 5The lowest value gives the pivot rowThis is marked with an arrow P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2 5 3 0 1 15 10
  11. 11. The pivot is where the pivot columnand pivot row intersectThis is normally marked with a circle P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2 5 3 0 1 15 11
  12. 12. We now need to make the pivot equal tozeroTo do this divide the pivot row by the pivotvalue P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2 5 3 0 1 15 12
  13. 13. P x y z s t values1 -2 -3 -4 0 0 00 3 2 1 1 0 100 2/3 5/3 3/3 0 1/3 15/3 13
  14. 14. It is best to keep the values as fractions P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2/3 5/3 1 0 1/3 5 14
  15. 15. Next we need to make the pivot columnvalues into zerosTo do this we add or subtract multiples of thepivot column P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2/3 5/3 1 0 1/3 5 15
  16. 16. The pivot column in the objective functionwill go to zero if we add four times thepivot rowThe pivot column value in the other constraintwill go to zero if we subtract the pivot row P x y z s t values 1 -2 -3 -4 0 0 0 0 3 2 1 1 0 10 0 2/3 5/3 1 0 1/3 5 16
  17. 17. Subtracting 4 X the pivot row from the objective function gives: P x y z s t values1+ -2+ -3+ -4+ 0+ 0+ 0+4(0) 4(2/3) 4(5/3) 4(1) 4(0) 4(1/3) 4(5) 0 3 2 1 1 0 10 0 2/3 5/3 1 0 1/3 5 17
  18. 18. Subtracting 4 X the pivot row from theobjective function gives:P x y z s t values1 2/3 11/3 0 0 4/3 200 3 2 1 1 0 100 2/3 5/3 1 0 1/3 5 18
  19. 19. Subtracting 1 X the pivot row from theother constraint gives:P x y z s t values1 2/3 11/3 0 0 4/3 200 3- 2- 1- 1- 0- 10- 2/3 5/3 1 0 1/3 50 2/3 5/3 1 0 1/3 5 19
  20. 20. Subtracting 1 times the pivot row from theother constraint gives:P x y z s t values1 2/3 11/3 0 0 4/3 200 7/3 1/3 0 1 -1/3 50 2/3 5/3 1 0 1/3 5 20
  21. 21. This then is the first iteration of theSimplex algorithmP x y z s t values1 2/3 11/3 0 0 4/3 200 7/3 1/3 0 1 -1/3 50 2/3 5/3 1 0 1/3 5 21
  22. 22. If any values in the objective equation arenegative we have to repeat the wholeprocess Here, there are no negative values. This is then the optimal solution.P x y z s t values1 2/3 11/3 0 0 4/3 200 7/3 1/3 0 1 -1/3 50 2/3 5/3 1 0 1/3 5 22
  23. 23. We now have to determine the values of thevariables that give the optimum solution P x y z s t values 1 2/3 11/3 0 0 4/3 20 0 7/3 1/3 0 1 -1/3 5 0 2/3 5/3 1 0 1/3 5 23
  24. 24. Reading the objective function: P x y z s t values 1 2/3 11/3 0 0 4/3 20 0 7/3 1/3 1 1 -1/3 5 0 2/3 5/3 1 0 1/3 5 24
  25. 25. Reading the objective function: The maximum value for P is then 20 For this to be the case x, y and t must be zero In general any variable that has a value in the objective function is zero. 25
  26. 26. From the objective function x, y and t arezero – substituting these values in to theconstraint rows gives:s = 5 and z = 5 P x y z s t values 1 2/3 11/3 0 0 4/3 20 0 7/3 1/3 0 1 -1/3 5 0 2/3 5/3 1 0 1/3 5 26
  27. 27. The solution to the linearprogramming problem:maximise: P = 2x + 3y+ 4zsubject to:3x +2y + z ≤ 102x + 5y+ 3z ≤15x, y ≥ 0is: P = 20 x = 0, y = 0 and z = 5 27
  28. 28. There are 9 steps in the Simplex algorithm2. Rewrite objective formula so it is equal to zero3. Add slack variables to remove inequalities4. Place in a tableau5. Look at the negative values to determine pivot column6. Divide end column by the corresponding pivot value in that column7. The least value is the pivot row8. Divide pivotal row by pivot value – so pivot becomes 19. Add/subtract multiples of pivot row to other rows to zero10. When top element are ≥ 0 then optimised solution 28
  29. 29. Go to this web site to solve any linearprogramme problem using the simplexmethod:For on-line exercises go here: 29

×