or-1 20131 simplex method (algebraic interpretation) add slack variables( 여유변수 ) to each...
TRANSCRIPT
OR-1 2013 1
Simplex method (algebraic interpretation)
Add slack variables( 여유변수 ) to each constraint to convert them to equations. (We may refer it as an augmented LP)
321 345 maximize xxx
0,,
8243
11 2 4
5 32 subject to
321
321
321
321
xxx
xxx
xxx
xxx
321 345 maximize xxx
0 ,,,,,
8 243
11 2 4
5 32 subject to
654321
6321
5321
4321
xxxxxx
xxxx
xxxx
xxxx
(1)
(2)
OR-1 2013 2
Hence we have a 1-1 mapping which maps each feasible solu-tion for (1) to a feasible solution for (2) uniquely (and con-versely) and the objective values are the same for the two so-lutions.
So solve (2) instead of (1) and disregard the values of slack variables to obtain an optimal solution to the original prob-lem.
(Surplus variable ( 잉여변수 ) :
same theare valuesobjective and
2438
2411
325 where
(2) osolution t ),,,,,( (1) osolution t ),,(
*3
*2
*1
*6
*3
*2
*1
*5
*3
*2
*1
*4
*6
*5
*4
*3
*2
*1
*3
*2
*1
xxxx
xxxx
xxxx
xxxxxxxxx
same theare valuesobjective and
(1) osolution t ),,( (2) osolution t ),,,,,( *3
*2
*1
*6
*5
*4
*3
*2
*1 xxxxxxxxx
OR-1 2013 3
Remark: If LP includes equations in the constraints, we need to
replace each equation with two inequalities to express the prob-lem in standard form as we have seen earlier. Then we may add slack or surplus variables to convert them to equations. How-ever, this procedure will increase the number of constraints and variables.
Equations in an LP can be handled directly without changing them to inequalities. Detailed method will be explained in Chap8. General LP Problems.
For the time being, we assume that we follow the standard pro-cedure to replace each equation with two inequalities to obtain a standard form.
OR-1 2013 4
Changes in the solution space when slack is added
0,
1
21
21
xx
xx0,,
1
321
321
xxx
xxx
x2
x1
x1
x3
x21
1
1
1
1
Solution set is still 2-dimensional
OR-1 2013 5
Next let
Then find solution to the following system which maximizes z (tableau form)
In the text, dictionary form is used, i.e. each dependent variable (including z) (called basic variable) is expressed as linear com-binations of indep. var. (called nonbasic variable).
0345or 345 321321 xxxzxxxz
0 ,,,,,
8 243
11 2 4
5 32
654321
6321
5321
4321
xxxxxx
xxxx
xxxx
xxxx
0 345 321 xxxz
0 ,,,,,
2438
2 411
325
654321
3216
3215
3214
xxxxxx
xxxx
xxxx
xxxx321 3450 xxxz
(Note that, unlike the text, we place the objective function in the first row. Such presentation style is used more widely and we follow that conven-tion)
OR-1 2013 6
From previous lectures, we know that if the polyhedron P has
at least one extreme point and the LP over P has a finite opti-mal value, the LP has an extreme point optimal solution. Also an extreme point of P for our problem is a basic feasible solu-tion algebraically.
We obtain a basic solution by setting x1 = x2 = x3 = 0 and find-
ing the values of x4, x5, and x6 , which can be read directly
from the dictionary. (also z values can be read.) If all values of x4, x5, and x6 are nonnegative, we obtain a basic feasible so-
lution.
OR-1 2013 7
Now, we look for another basic feasible solution (extreme point of the polyhedron) which gives a better objective value than the current solution. Such solution can be examined by setting 7 – 4 = 3 variables at 0 (called nonbasic variables) and solve the equations for the remaining 4 variables (called basic variables). Here z may be regarded as a basic variable and it remains basic at any time during the simplex iterations.
OR-1 2013 8
Initial feasible solution
To find a better solution, find a nonbasic variable having posi-tive coefficient in z row (say x1) and increase the value of the
chosen nonbasic variable while other nonbasic variables remain at 0.
We need to obtain a solution that satisfies the equations. Since increases and other nonbasic variables remain at 0, the values of basic variables must change so that the new solution satis-fies the equations and nonnegativity. How much can we in-crease x1?
0 ,,,,,
2438
2 411
325
654321
3216
3215
3214
xxxxxx
xxxx
xxxx
xxxx321 3450 xxxz
0,8,11,5 , var.)(nonbasic 0,, 654321 zxxxxxx
2/51 x
4/111 x
3/81 x
OR-1 2013 9
(continued)
x1 (5/2) most binding (called ratio test), get new solution
x1 = (5/2), x2, x3 = 0, x4 = 0, x5 = 1, x6 = (1/2), z = 25/2
This is a new basic feasible solution since x4 now can be treated
as a nonbasic variable (has value 0) and x1 is basic.
(We need a little bit of caution here in saying that the new solu-tion is a basic feasible solution since we must be able to obtain it by setting x2, x3, and x4 at 0 and obtain a unique solution after
solving the remaining system of equations)
OR-1 2013 10
Change the dictionary so that the new solution can be directly read off
x1 : 0 (5/2), x4 : 5 0
So change the role of x1 and x4 . x4 becomes independent (nonbasic) variable and x1 becomes dependent (basic) variable.
Why could we find a basic feasible solution easily?
1) all independent(nonbasic) variables appear at the right of equality (have value 0)
2) each dependent (basic) variable appears in only one equation
3) each equation has exactly one basic variable appearing
( z variable may be interpreted as a basic variable, but usually it can be treated separately since it always remains basic and it is irrelevant to the description of the feasible solutions)
So change the dictionary so that it satisfies the above proper-ties.
OR-1 2013 11
3216
3215
3214
2438
2 411
325
xxxx
xxxx
xxxx
321 3450 xxxz
421
321
223
25
1 xxxx
42
32421
321
223
25
5
251
2)(411
xx
xxxxxx
423
321
221
21
32421
321
223
25
6
24)(38
xxx
xxxxxx
425
321
227
225
22421
321
223
25
34)(5
xxx
xxxxxz
OR-1 2013 12
421
321
223
25
1 xxxx
425 2 51 xxx
423
321
221
21
6 xxxx
425
321
227
225 xxxz
421
321
223
25
1 xxxx
425 2 51 xxx
423
321
221
21
6 xxxx
425
321
227
225 xxxz
3216
3215
3214
2438
2 411
325
xxxx
xxxx
xxxx
321 3450 xxxz
3261
3251
4321
248 3
2 11 4
3 5 2
xxxx
xxxx
xxxx
321 340 5 xxxz
OR-1 2013 13
3261
3251
421
321
223
25
1
2 48 3
2 11 4
xxxx
xxxx
xxxx
321 340 5 xxxz
3261
3251
4321
248 3
2 11 4
3 5 2
xxxx
xxxx
xxxx
321 340 5 xxxz
421
321
223
25
1 xxxx
425 2 51 xxx
423
321
221
21
6 xxxx
425
321
227
225 xxxz
Equivalent to performing row operations
OR-1 2013 14
Note that the previous solution
, , , ,
and the new solution
satisfies the updated system of equations. Only difference is that the new solution can be read off directly from the new dic-tionary.
We update the dictionary to read a new basic solution directly, but the set of solutions is not changed.
421
321
223
25
1 xxxx
425 251 xxx
423
321
221
6 xxxx 21
425
321
227
225 xxxz
OR-1 2013 15
Next iteration:
Select as the nonbasic variable to increase the value (called entering nonbasic variable).
becomes 0 (changes status from basic variable to nonbasic variable)
Perform substitutions (elementary row operations)
421
321
223
25
1 xxxx
425 2 51 xxx
423
321
221
21
6 xxxx
425
321
227
225 xxxz
53 x
13 x
nrestrictio no gives
OR-1 2013 16
New solution is
It is optimal since any feasible solution must have nonnega-tive values and implies that z 13 for any nonnegative feasi-ble solution.
Hence if the coefficients of the nonbasic variables in z- row are all non-positive, current solution is optimal (note that it is a sufficient condition for optimality but not a necessary condi-tion)
13,0,1,0,1,0,2 654321 zxxxxxx
6423
425
6421
642
231
251
222
313
xxxx
xxx
xxxx
xxxz
OR-1 2013 17
Moving directions in Rn in the example
3216
3215
3214
2438
2 411
325
xxxx
xxxx
xxxx
321 3450 xxxz
421
321
223
25
1 xxxx
425 2 51 xxx
423
321
221
21
6 xxxx
425
321
227
225 xxxz
0,8,11,5 , var.)(indep. 0,, 654321 zxxxxxx
x1 = (5/2), x2, x3 = 0, x4 = 0, x5 = 1, x6 = (1/2), z = 25/2
1/2) 1, 0, 0, 0, (5/2, 8), 11, 0,5, ,0 ,0(Let 10 xx
Then we obtained , where (1, 0, 0, -2, -4, -3) and Note that the vector can be found from the dictionary.( the column for )We make as large as possible while .
OR-1 2013 18
Geometric meaning of an iteration
Notation
0,,
1
321
321
xxx
xxx
x1
x3
x2
x1=0x2=0
x3=0
OR-1 2013 19
Our example : assume x2 does not exist. It makes the polyhe-
dron 2 dimensional since we have 5 variables and 3 equations (except nonnegativity and objective row)
3216
3215
3214
2438
2 411
325
xxxx
xxxx
xxxx
321 3450 xxxz
421
321
223
25
1 xxxx
425 2 51 xxx
423
321
221
21
6 xxxx
425
321
227
225 xxxz
x1=0
x4=0
x3=0x6=0
d
A
B
We move from A, which isan extreme point defined by 3 eq. and , to B defined by the 3 eq. and .
OR-1 2013 20
Terminology
Assume that we have max , where is and full row rank.
A solution is called a basic solution ( 기저해 ) if it can be ob-tained by setting of the variables equal to 0 and then solving for the remaining m variables, where the columns of the ma-trix corresponding to the variables are linearly independent. (Hence provides a unique solution.)
In the text, basic solution is defined as the solution which can be obtained by setting the right-hand side variables (indepen-dent var.) at zero in the dictionary. This is the same definition as the one given above. But the text does not make clear dis-tinction between basic solution and basic feasible solution.
OR-1 2013 21
For a basic solution , the variables which are set to 0 are called nonbasic variables ( 비기저변수 ) (independent var.) and the remaining variables are called basic variables (기저변수 ) (dependent var.)
(1) The z-row may be considered as part of the system of equations. In that case, z variable is regarded as basic vari-able. It always remains basic during the simplex iterations.
(2) On the other hand, z-row may be regarded as a separate equation which is used to read off the objective function val-ues and other equations and nonnegativity describes the fea-sible solution set. Note that the set of feasible solutions does not change although we perform simplex iterations.
Both viewpoints are useful.
A solution is called a basic feasible solution ( 기저가능해 ) if it is a basic solution and satisfies . (feasible solution to the augmented LP)
OR-1 2013 22
The set of basic variables is called a basis ( 기저 ) of the basic
solution. (note that the set of columns in matrix correspond-ing to basic variables spans the subspace generated by the columns of matrix (which is ).)
In a simplex iteration, the nonbasic variable which becomes basic in that iteration is called entering (nonbasic) variable ( 도입변수 ) and the basic variable which becomes nonbasic is called leaving (basic) variable ( 탈락변수 )
Minimum ratio test ( 최소비율검사 ) : test to determine the leav-ing basic variable
Pivoting : computational process of constructing the new dic-tionary (elementary row operations)
OR-1 2013 23
Remarks
The basic feasible solution to the augmented form is an ex-treme point of the corresponding polyhedron. Also it corre-sponds to the extreme point of the polyhedron for standard LP (after ignoring the slack variables).
(If the given LP is not in standard form, we should be careful in saying the equivalence, especially when free variables ex-ist.)
Simplex method searches the extreme points of the polyhe-dron during the iterations.
Note that we used (though without proof) the equivalence of the extreme points (geometric definition) and the basic feasi-ble solution (algebraic definition) for augmented form LP.
OR-1 2013 24
Maximum number of b.f.s. in augmented form is .
In the simplex method, one nonbasic variable becomes basic and one basic variable becomes nonbasic in each iteration (except the z variable, it always remains basic.)
In real implementations, we do not update entire dictionary (or tableau). We maintain information about the current basis. Then entire tableau can be constructed from that information and the simplex iteration can be performed (called revised simplex method, details later in Chapter 7).
OR-1 2013 25
Obtaining all optimal solutions
425
6421
6423
251
2-22
231
xxx
xxxx
xxxx
642313 xxxz
For any feasible solution , if any of (nonbasic) is greater than 0, then the ob-
jective value is less than 13. (from row)
Hence we must have for any optimal solution. Then the current optimal solu-
tion is the only one solution which satisfies the constraints, which means it is
a unique optimal solution.
If all coefficients in the z- row are < 0, it gives a sufficient condition for the
uniqueness of the current optimal solution.
OR-1 2013 26
Another example
3526
3521
3524
294
8651
72 3
xxxx
xxxx
xxxx
3 8 xz
Any feasible solution with is an optimal solution. The set of feasible solutions with is given by
0,
0294
0651
02 3
52
526
521
524
xx
xxx
xxx
xxx
0,
429
165
32
52
52
52
52
xx
xx
xx
xx
OR-1 2013 27
Tableau format
8243
1124
532
0345
6321
5321
4321
321
xxxx
xxxx
xxxx
xxxz
8100243
11010214
5001132
0000345
8100243
11010214
2/5002/12/12/31
0000345
2/1102/32/12/10
1012050
2/5002/12/12/31
2/25002/52/12/70
OR-1 2013 28
Tableau format only maintains coefficients in the equations.
It is convenient to carry out simplex iterations in the tableau.