Variables that are unrestricted in sign

advertisement
Variables that are
unrestricted in sign
LI Xiao-lei
Preview



In solving LPs with the simplex algorithm, we
used the ratio test.
The ratio test depended on the fact that any
feasible point required all variables to be
nonnegative.
If some variables are allowed to be unrestricted
in sign (urs), the ratio test and therefore the
simplex algorithm are no longer valid.
Preview

For each urs variable xi, we begin by defining
two new variables xi’ and xi’’. Then , substitute
xi’-xi’’ for xi in each constraint and in the
objective function. Also add the sign restrictions
xi’≥0 and xi’’≥0. since all variables are now
required to be nonnegative, we can proceed with
the simplex.
Preview
For any basic feasible solution, each urs variable xi must
fall into one of the following three cases:
 Case 1 xi’>0 and xi’’=0
This case occurs if a bfs has xi>0. in this case, xi=xi’-xi’’=xi’.
Thus, xi=xi’. For example, if xi=3 in a bfs, this will be
indicated by xi’=3 and xi’’=0.

Case 2 xi’=0 and xi’’>0
This case occurs if xi<0. Since xi=xi’-xi’’, we obtain xi=-xi’’. For
example, if xi=-5 in a bfs, we will have xi’=0 and xi’’=5. then
xi=0-5=-5.

Case 3 xi’= xi’’=0
In this case, xi=0-0=0.
Example 7

A baker has 30 oz of flour and 5 packages of
yeast. Baking a loaf of bread requires 5 oz of
flour and 1 package of yeast. Each loaf of bread
can be sold for 30¢. The baker may purchase
additional flour at 4¢/oz or sell leftover flour at
the same price. Formulate and solve an LP to
help the baker maximize profits (revenues-costs).
Example 7
Solution
Define
x1= number of loaves of bread baked
x2= number of ounces by which flour supply is
increased by cash transactions
Therefore, x2>0 means that x2 oz of flour were
purchased, and x2<0 means that –x2 ounces of flour
were sold. x2=0 means no flour was bought or sold.
x1≥0 and x2 is urs.
Example 7
The appropriate LP is
max z =30x1-4x2
s.t. 5x1≤30+x2 (flour constraint)
x1≤ 5
(Yeast constraint)
x1≥0, x2 urs
since x2 is urs, we substitute x2’-x2’’ for x2 in the objective
function and constraints.
max z =30x1-4x2’+4x2’’
s.t. 5x1≤30+x2’-x2’’ (flour constraint)
x1≤ 5
(Yeast constraint)
x1,x2’,x2’’≥0
Example 7
Transforming the objective function to row 0 form and
adding slack variables to the two constraints, we obtain
the initial tableau.
z
x1
x2’
1
0
0
-30
5
4
-1
①
0
x2’’
-4
1
0
s1
s2
rhs
Basic
variable ratio
0
1
0
0
0
1
0
30
5
z=0
s1=30
s2=5
6
5*
Note: no matter how many pivots we make, the x2’
column will always be the negative of the x2’’ column.
Example 7
x1 enters the basis in row 2.
z
1
0
x1
0
0
x2’
4
-1
0
1
0
x2’’
-4
①
0
s1
0
1
s2
30
-5
Basic
rhs variable ratio
150 z=150
5
s1=5
5*
0
1
5
x2’’ enters the basis in row 1.
z
1
0
x1
0
0
x2’
0
-1
x2’’
0
1
s1
4
1
s2
10
-5
0
1
0
0
0
1
x1=5
Basic
rhs variable
170 z=170
5
x2‘’=5
5
x1=5
None
Example 7
The optimal solution to the baker’s problem is
z=170, x1=5, x2’’=5, x2’=0,s1=s2=0.
Thus, the baker can earn a profit of 170¢ by
baking 5 loaves of bread.
Since x2=x2’-x2’’=0-5=-5, the baker should sell 5
oz of flour.
Download