The Simplex Algorithm An Algorithm for solving Linear

  • Slides: 15
Download presentation
The Simplex Algorithm An Algorithm for solving Linear Programming Problems

The Simplex Algorithm An Algorithm for solving Linear Programming Problems

We Start with a Linear Programming Problem • • Maximise P = 4 x

We Start with a Linear Programming Problem • • Maximise P = 4 x +5 y +3 z Subject to the constraints 8 x + 5 y +2 z 4 x +2 y +3 z 1

Setting up the Tableau • First rearrange the equation for P so that it

Setting up the Tableau • First rearrange the equation for P so that it is equal to zero : • P - 4 x - 5 y - 3 z = 0

Introduce Slack variables • • • 8 x + 5 y +2 z 4

Introduce Slack variables • • • 8 x + 5 y +2 z 4 becomes 8 x + 5 y + 2 z + s = 4 x +2 y +3 z 1 becomes x +2 y +3 z + t = 1 s and t are called the slack variables

This is the Tableau (Fancy word for table)

This is the Tableau (Fancy word for table)

Finding a pivot • Chose any negative number in the first row • Consider

Finding a pivot • Chose any negative number in the first row • Consider the positive values in the column below it • Divide the value in the last column by the corresponding value in the chosen column and see which gives you the least • That tells you which is the pivot. . . it goes like this:

4/8 =1/2 1/1=1 1/2 is the least so 8 is the pivot

4/8 =1/2 1/1=1 1/2 is the least so 8 is the pivot

The next step is to reduce the pivot to 1 by dividing equation by

The next step is to reduce the pivot to 1 by dividing equation by 8

We now reduce the other elements in the column of the pivot to zero:

We now reduce the other elements in the column of the pivot to zero:

We have now completed the first iteration of the algorithm • This tells us

We have now completed the first iteration of the algorithm • This tells us that • P = 2 when y = z = s = 0 and x = 1/2, t= 1/2 • P= 2 is not the optimal solution as we still have negative numbers in the first row.

We now repeat the process: chose a negative number in the first row and

We now repeat the process: chose a negative number in the first row and find a new pivot: So is the pivot

We now repeat the process: choose a negative number in the first row and

We now repeat the process: choose a negative number in the first row and find a new pivot:

Reduce the pivot to 1 by dividing equation ‘ by 13/8 to get equation

Reduce the pivot to 1 by dividing equation ‘ by 13/8 to get equation ”

Reduce the other elements in the column of the pivot to zero

Reduce the other elements in the column of the pivot to zero

We have now completed the second iteration of the algorithm • This tells us

We have now completed the second iteration of the algorithm • This tells us that • P = 210/11 when z = s = t=0 and x = 3/11, y= 4/11 • P= 210/11 is the optimal solution as we have no negative numbers in the first row. • P= 210/11 is the maximum value; we have finished!