Beruflich Dokumente
Kultur Dokumente
Please DO practice these questions and then compare your results with
the given solutions.
max z = 3x1 + x2
s.t. 4x1 + x2 4
2x1 + x2 4
x1 + x2 = 3
x1 , x2 0
SOLUTION:
(a) Optimal solution is D (1, 2), which is shown in the following figure,
1
(b,c) The LP standard form is as follows,
max z = 3x1 + x2
s.t. 4x1 + x2 e1 = 4
2x1 + x2 + s2 = 4
x1 + x2 = 3
x1 , x2 , e1 , s2 0
We need to add artificial variable to row 1 and row 3 (in order to have an
identity matrix in the initial tableau), and penalties on these variables, and
then the new formulation is as follows,
2
max z = 3 x1 + x 2 Ma1 Ma3
s.t. 4 x1 + x 2 e1 + a1 = 4
2 x1 + x 2 + s 2 = 4
x1 + x 2 + a 3 = 3
x1 , x 2 , e1 , s 2 , a1 , a 3 0
z x1 x2 e1 s2 a1 a3 RHS BVs
1 -3 -1 0 0 M M
0 4 1 -1 0 1 0 4
0 2 1 0 1 0 0 4
0 1 1 0 0 0 1 3
z x1 x2 e1 s2 a1 a3 RHS BVs
1 -5M-3 -2M-1 M 0 0 0 -7M
0 4 1 -1 0 1 0 4 a1=4
0 2 1 0 1 0 0 4 s2=4
0 1 1 0 0 0 1 3 a3=3
z x1 x2 e1 s2 a1 a3 RHS BVs
1 0 (-3M-1)/4 (-M-3)/4 0 (5M+3)/4 0 -2M+3
0 1 1/4 -1/4 0 1/4 0 1 x1=1
0 0 1/2 1/2 1 -1/2 0 2 s2=2
0 0 3/4 1/4 0 -1/4 1 2 a3=2
z x1 x2 e1 s2 a1 a3 RHS BVs
1 0 0 -2/3 0 M+2/3 M+1/3 11/3
0 1 0 -1/3 0 1/3 -1/3 1/3 x1=1/3
0 0 0 1/3 1 -1/3 -2/3 2/3 s2=2/3
0 0 1 1/3 0 -1/3 4/3 8/3 x2=8/3
Basic solution is x1=1/3, x2=8/3, but is feasible (point C), objective value is 11/3.
z x1 x2 e1 s2 a1 a3 RHS BVs
1 0 0 0 2 M M-1 5
0 1 0 0 1 0 -1 1 x1=1
0 0 0 1 3 -1 -2 2 e1=2
0 0 1 0 -1 0 2 2 x2=2
3
2. (15 points) Consider the following LP:
SOLUTION:
4
Basic solution is x1=1, x2=2, it is feasible (point D), objective function value is 5.
Problem 4.
a) LP in standard form:
min z = 4 x1 + 4 x 2 + x3
s.t. x1 + x 2 + x3 + s1 = 2
2 x1 + x 2 + s 2 = 3
2 x1 + x 2 + 3 x3 e3 = 3
x1 , x 2 , s1 , s 2 , e3 0
We will add artificial variables to row 3 and will change objective function:
min z = 4 x1 + 4 x 2 + x3 + Ma3
s.t. x1 + x 2 + x3 + s1 = 2
2 x1 + x 2 + s 2 = 3
2 x1 + x 2 + 3 x3 e3 + a 3 = 3
x1 , x 2 , s1 , s 2 , e3 , a 3 0
z x1 x2 x3 s1 s2 e3 a3 RHS BVs
1 -4 -4 -1 0 0 0 -M
0 1 1 1 1 0 0 0 2
0 2 1 0 0 1 0 0 3
0 2 1 3 0 0 -1 1 3
z x1 x2 x3 s1 s2 e3 a3 RHS BVs
1 2M-4 M-4 3M-1 0 0 -M 0 3M
0 1 1 1 1 0 0 0 2 s1=2
0 2 1 0 0 1 0 0 3 s2=3
0 2 1 3 0 0 -1 1 3 a3=3
z x1 x2 x3 s1 s2 e3 a3 RHS BVs
1 -10/3 -11/3 0 0 0 -1/3 -M+1 1
0 1/3 2/3 0 1 0 1/3 -1/3 1 s1=1
0 2 1 0 0 1 0 0 3 s2=3
0 2/3 1/3 1 0 0 -1/3 1/3 1 x3=1
This tableau is optimal, because all variables in row 0 have nonpositive coefficients.
(b) The problem is feasible, the optimal solution is (0, 0, 1, 1, 3, 0) and objective5
value is 1.
max z = x1 + 2x2
s.t. x1 + x2 2
2x1 + x2 1
x1 , x2 0
5
(d) Derive a direction of unboundedness from the final tableau.
SOLUTION:
max z = x1 + 2x2
s.t. x1 + x2 + s1 = 2
2x1 + x2 + s2 = 1
x1 , x2 , s1 , s2 0
6
z x1 x2 s1 s2 RHS BVs
1 -1 -2 0 0 0
0 -1 1 1 0 2 s1=2
0 -2 1 0 1 1 s2=1
z x1 x2 s1 s2 RHS BVs
1 -5 0 0 2 2
0 1 0 1 -1 1 s1=1
0 -2 1 0 1 1 x2=1
z x1 x2 s1 s2 RHS BVs
1 0 0 5 -3 7
0 1 0 1 -1 1 x1=1
0 0 1 2 -1 3 x2=3
(c) This problem is unbounded because we have enter the variable s2 to the basis
according row 0, but ratio test fails because we get negative values.
(d) According the last tableau if we increase the variable s2 as possible, we always
satisfy constraints. We get two equalities:
x1 = 1 + s 2
x2 = 3 + s 2
This means that increasing variable s2 by one we increase variable x1 and x2
by one. Therefore, the direction is (1, 1).
7
SOLUTION:
(a)
Problem 8 (a)
8
max z = 5 x1 + 3x 2
s.t. 4 x1 + 2 x 2 + s1 = 12
4 x1 + x 2 + s 2 = 10
x1 + x 2 + s 3 = 4
x1 , x 2 , s1 , s 2 , s 3 0
z x1 x2 s1 s2 s3 RHS BVs
1 -5 -3 0 0 0 0
0 4 2 1 0 0 12 s1=12
0 4 1 0 1 0 10 s2=10
0 1 1 0 0 1 4 s3=4
z x1 x2 s1 s2 s3 RHS BVs
1 0 -7/4 0 5/4 0 25/2
0 0 1 1 -1 0 2 s1=2
0 1 1/4 0 1/4 0 5/2 x1=5/2
0 0 3/4 0 -1/4 1 3/2 s3=3/2
z x1 x2 s1 s2 s3 RHS BVs
1 0 0 7/4 -1/2 0 16
0 0 1 1 -1 0 2 x2=2
0 1 0 -1/4 1/2 0 2 x1=2
0 0 0 -3/4 1/2 1 0 s3=0
z x1 x2 s1 s2 s3 RHS BVs
1 0 0 1 0 0 16
0 0 1 -1/2 0 2 2 x2=2
0 1 0 1/2 0 -1 2 x1=2
0 0 0 -3/2 1 2 0 s2=0
(c) Basic feasible solutions: A (0, 0, 12, 10, 4); B (2.5, 0, 2, 0, 1.5); C (2, 2, 0, 0,
0)
(d) Yes, because one of the basic variable in optimal solution equals to zero.
(e) LP is not unbounded. It has unique optimal solution (2, 2, 0, 0, 0).
9
5. (20 points) Consider the following LP:
max z = 3x1 + 2x2
s.t. 2x1 + x2 100
x1 + x2 80
x1 40
x1 , x2 0
In order to bring the problem into standard form, we have to add the slack variables
s1 , s2 and s3 . The optimal tableau is given in the following table:
(a) Show that as long as the objective function coefficient of variable x1 is between
2 and 4, the current basis remains optimal. Find the optimal solution if the
objective function coefficient of variable x1 has value 3.5.
(b) Show that as long as the objective function coefficient of variable x2 is between
1.5 and 3, the current basis remains optimal.
(c) Show that if the RHS of the first constraint varies between 80 and 120, then
the current basis remains optimal. Find the new optimal solution if the RHS
of the first constraint changes to 90.
(d) Another variable x3 is added to the LP. The coefficient of x3 in the first
constraint is 1, in the second constraint is 2 and in the third constraint is 0.
What is the optimal solution if the objective function coefficient is 3.5?
SOLUTION:
(a) By adding a new top row and a new left most column, the tableau is as follows,
d1 d2 0 0 0
Basic z x1 x2 s1 s2 s3 RHS
0 z 1 0 0 1 1 0 180
d1 x1 0 1 0 1 -1 0 20
d2 x2 0 0 1 -1 2 0 60
0 s3 0 0 0 -1 1 1 20
Now, to compute the new entries of the Z-row in the optimal tableau, multiply
the elements of its column by the corresponding elements in the leftmost
column, add them up, and subtract the top row elements from the sum. The
new element in the z-row is as follows,
10
Basic z x1 x2 s1 s2 s3 RHS
z 1 0 0 1 + d1 d2 1 d1 + 2d2 0 180 + 20d1 + 60d2
Then, in order to keep optimality, we need to let the entries corresponding to
the variables in the Z-row stay nonnegative. If we are allowed to change the
coefficient of x1 by d1 individually, we need to have
1 + d1 0
1 d1 0
which means that 1 d1 1, and it is equivalent to have the coefficient
between 2 and 4. When the coefficient equals to 3.5, and then d1 = 1/2 and
objective value is 190.
(b) If we are allowed to change the coefficient of x2 by d2 individually, we need
to have
1 d1 0
1 + 2d1 0
which means that 1/2 d1 1, and it is equivalent to have the coefficient
between 1.5 and 3.
(c) If we are allowed to change the right hand side of the first constraint by D.
We will have the new solution as follows (How? Write the coefficients back
into equations),
(x1 , x2 , s3 ) = (20 + D, 60 D, 20 D)
SOLUTION:
11
The Dual of the above LP is as follows,
max w = 5y1 + 7y2 + 6y3 + 4y4
s.t. y1 + 2y2 + y4 4
y1 + y2 + 2y3 = 1
y3 + y4 = 2
y1 , y2 0, y3 0, y4 unrestricted
SOLUTION:
(b) It is easy to see that constraints, 2y1 + 3y2 4 and y1 + y2 1 are redundant,
the easiest way to solve it might be graphical method, which give us the
optimal solution (y1 , y2 ) = (1, 1).
(c) First, we write out the complementarity slackness,
(x1 + 2x2 + x3 + 2x4 5)y1 = 0,
(2x1 + 3x2 + x3 + 3x4 8)y1 = 0,
(y1 + 2y2 3)x1 = 0,
(2y1 + 3y2 4)x2 = 0,
(y1 + y2 1)x3 = 0,
(2y1 + 3y2 5)x4 = 0.
12
Then we can plug in the optimal values of y1 and y2 , and then we have the
following,
(x1 + 2x2 + x3 + 2x4 5) = 0,
(2x1 + 3x2 + x3 + 3x4 8) = 0,
x2 = 0,
x3 = 0.
Then we solve the above equation, which gives the optimal solution of the
primal problem (x1 , x2 , x3 , x4 ) = (1, 0, 0, 2).
8. (15 points) Consider the following LP
P: max zP = 3x1 + x2 + 2x3
s.t. x2 + 2x3 3,
x1 + 3x3 1,
2x1 3x2 2,
x1 , x2 , x3 0.
SOLUTION:
13
Hence, we can conclude the primal and dual have the same feasible region.
(c) Because they have the same feasible region and opposite objective functions,
zP (x) = zD (x), x F R,
14