Download - 7. Linear Programming (Simplex Method)
7. Linear Programming7. Linear Programming(Simplex Method)(Simplex Method)
Objectives:
1. Slack variables2. Basic solutions - geometry3. Examples
Refs: B&Z 5.3.
Last week we saw how to solve a Linear Programming problem geometrically. This method, however, has limitations.
If we increase the number of constraints we may have hundreds of corner points.
If we have more than two decision variables we willnot even be able to sketch the graph.
Fortunately, a procedure known as the Simplex Methodwill handle all these cases efficiently.
Slack Variables
max P = 4x1+ 5x2subj to 2x1+ 3x2 ≤ 600
5x1+ 2x2 ≤ 1,200
x1 ≥ 0 x2 ≥ 0
In week 1 we learnt techniques to solve systems of linear equations. However we don’t have good techniquesfor handling systems of inequalities.Our task is to transform a system we can’t handle into one that we can.
Consider the example:
200
600
200
400
400 600
2x1+ 3x2=600
5x1+ 2x2=1,200
feasible region
In this example we have 2decision variables (x1, x2)and 2 functional constraints.
We introduce slack variables which turn our original system
The slack variables “pick up the slack” on the LHS of the inequalities. You should use a different slack variable in each constraint.
2x1 + 3x2 ≤ 600
5x1 + 2x2 ≤ 1,200
Notice that we are adding a positive value on the LHSto obtain the equality so we should say
s1≥ 0, s2≥ 0
2x1 + 3x2
5x1 + 2x2
+ s1
+ s2
= 600
= 1,200
into
So now we have an L.P. problem which is equivalent to the original (in the sense that they have the same optimalsolution) but with no inequalities.
without slack variables
max P = 4x1+ 5x2subj to 2x1+ 3x2 ≤ 600
5x1+ 2x2 ≤ 1,200
x1 ≥ 0 x2 ≥ 0 with slack variables
max P = 4x1+ 5x2 subj to 2x1+ 3x2 + s1 = 600
5x1+ 2x2 + s2 =1, 200
x1 ≥ 0, x2 ≥ 0, s1 ≥ 0, s2 ≥ 0
Let’s check the values of s1 and s2 at the corner points.
P (0, 0) = 0 s1 = 600 s2 = 1200
P (0, 200) = 1,000 s1 = 0 s2 = 800
P (240, 0) = 960 s1 = 120 s2 = 0
P (2400/11, 600/11) = (9,600 + 3,000)/11 = 12,600/11 = 1,145 5/11
s1 = 0
s2 = 0
(x1, x2, s1, s2 ) = (0, 0, 600, 1200)
(x1, x2, s1, s2 ) = (0, 200, 0, 800)
(x1, x2, s1, s2 ) = (240, 0, 120, 0)
(x1, x2, s1, s2 ) = (2400/11, 600/11, 0, 0)
Observation:
In this example there are two zeroes occurring at each corner point. In general, if we have n variables and m constraints we will have n-m zeroes at each corner point.
In the previous example we had 4 variables (2 decisionvariables and 2 slack variables) and 2 constraints:
n=4, m=2 so n-m=2 zeroes.
These solutions are called basic solutions. In fact if wehave an L.P. problem with n variables and m equations, and set any n-m variables equal to 0, we have a basic solution.
Some of these points will be non-feasible.
For example: (i) x2 = s1 = 0
x1 = 300, s2 = -300
x1 = s2 = 0x2 = 600, s1 = -1200
(ii)
The non-feasibility is indicated by the negativity of some variables.
The basic solutions consist of all corner points of thefeasible region and some non-feasible points.
The corner points are those with non-negative co-ordinates. They are called basic feasible solutions.
Example 1:
Max P = 5x1 + 6x2
Subj to 4x1 + 2x2 ≤ 200
x1 + 3x2 ≤ 150
x1≥ 0 x2≥ 0
Find all basic feasible solutions of the following system:
First add slack variables so that our new constraints are:
4x1 + 2x2 + s1 = 200
x1 + 3x2 + s2 = 150
x1≥ 0 x2≥ 0 s1≥ 0 s2≥ 0
150
100
100
4x1+2x2=200
x1+3x2=150feasible region
50
50
(30, 40)
In this example we have 2 equations and 4 variables.We find basic solutions by setting 2 variables at a time equal to zero.
x1 x2 s1 s2
0 0 200 150 1. feasible
0 50 100 0 3. feasible
0 100 0 -150 2. Not feasible
50 0 0 100 4. feasible
150 0 -400 0 5. Not feasible
30 40 0 0 6. feasible
Basic feasible solutions are: (0,0,200,150), (0,50,100,0), (50,0,0,100), (30,40,0,0)
To solve the L.P. problem we need to evaluate theobjective function at each of the basic feasible solutions.However, in practice this becomes impractical. Sayfor example we had an L.P. problem with 3 decision variables and 3 constraints (hence 3 slack variables).
Putting 6-3=3 variables equal to zero at a time gives
€
6!
3!3!= 20
basic solutions. For 4 decision variables and 5constraints, we have
€
9!
5!4!=126
basic solutions………and so on. Luckily thereis a better way!
You should now be able to complete
Q’s 1(a), (b) and (c)Example Sheet 3
from the Orange Book.