CS 525: Linear Programming 1993 Final Exam Solution
CS 525: Linear Programming 1993 Final Exam Solution
1.
max x21 + x1 x2 x22 4x1 + x2
2 2
s.t. x1 + x2 2
x1 ; x2 0
What is the maximum value and where is it attained ?
Solution: This is a maximization problem.
max x21 + x1 x2 x22 4x1 + x2 min x21 x1 x2 + x22 + 4x1 x2
2 2 2 2
so that
rx L(x; u) = x1 x2 u + 4
x1 + x2 u 1
with corresponding LCP(M; q)
2 3 2 3
x1 x1 x2 u + 4
0 4 x2 5 ? 4 x1 + x2 u 1 50
u x1 + x2 2
Using this to dene M and q we get the following steps.
>> M=[1 -1 -1;-1 1 -1;1 1 0];
>> q =[4 -1 -2]';
>> H = lemketbl(M,q);
z1 z2 z3 1
--------------------------------------------
w1= | 1.0000 -1.0000 -1.0000 4.0000
w2= | -1.0000 1.0000 -1.0000 -1.0000
w3= | 1.0000 1.0000 0.0000 -2.0000
1
>> H = addcol(H,[1 1 1]','z0',4);
z1 z2 z3 z0 1
-------------------------------------------------------
w1= | 1.0000 -1.0000 -1.0000 1.0000 4.0000
w2= | -1.0000 1.0000 -1.0000 1.0000 -1.0000
w3= | 1.0000 1.0000 0.0000 1.0000 -2.0000
>> H = ljx(H,3,4);
z1 z2 z3 w3 1
-------------------------------------------------------
w1= | 0.0000 -2.0000 -1.0000 1.0000 6.0000
w2= | -2.0000 0.0000 -1.0000 1.0000 1.0000
z0= | -1.0000 -1.0000 -0.0000 1.0000 2.0000
>> H = ljx(H,2,3);
z1 z2 w2 w3 1
-------------------------------------------------------
w1= | 2.0000 -2.0000 1.0000 0.0000 5.0000
z3= | -2.0000 0.0000 -1.0000 1.0000 1.0000
z0= | -1.0000 -1.0000 0.0000 1.0000 2.0000
>> H = ljx(H,3,2);
z1 z0 w2 w3 1
-------------------------------------------------------
w1= | 4.0000 2.0000 1.0000 -2.0000 1.0000
z3= | -2.0000 -0.0000 -1.0000 1.0000 1.0000
z2= | -1.0000 -1.0000 0.0000 1.0000 2.0000
2
x1 x2 1
---------------------------------
x3= | -1.0000 1.0000 1.0000
x4= | -1.0000 0.0000 2.0000
---------------------------------
z= | -2.0000 4.0000 0.0000
>> H = addrow(H,[q' 0],'z0',3);
x1 x2 1
---------------------------------
x3= | -1.0000 1.0000 1.0000
x4= | -1.0000 0.0000 2.0000
z0= | 1.0000 0.0000 0.0000
---------------------------------
z= | -2.0000 4.0000 0.0000
>> %
>> % If t >= 2 then this is an optimal tableau
>> % An optimal solution is (x1, x2) =(0, 0)
>> % Note: The optimal value is -(0t + 0) = 0
>> %
>> % If t < 2
>> H = ljx(H,1,1);
x3 x2 1
---------------------------------
x1= | -1.0000 1.0000 1.0000
x4= | 1.0000 -1.0000 1.0000
z0= | -1.0000 1.0000 1.0000
---------------------------------
z= | 2.0000 2.0000 -2.0000
>> % If -2<= t <= 2 then this is an optimal tableau
>> % An optimal solution is (x1, x2) =(1, 0)
>> % Note: The optimal value is -(t - 2) = -t + 2
>> % If t < -2
>> H = ljx(H,2,2);
x3 x4 1
---------------------------------
x1= | 0.0000 -1.0000 2.0000
x2= | 1.0000 -1.0000 1.0000
z0= | 0.0000 -1.0000 2.0000
---------------------------------
z= | 4.0000 -2.0000 0.0000
>> % If t <= -2 then this is an optimal tableau
>> % An optimal solution is (x1, x2) =(2, 1)
>> % Note: The optimal value is -(2t) = -2t
3
Summary
Parameter t Range Minimum Value z (t) Solution Point x(t)
t2 0 (0; 0)
2t<2 2 t (1; 0)
t 2 2t (2; 1)
3. For each claim below, state rst whether it is true or false. Then in no
more two sentences or a simple 0ne- or two-line counterexample ( for the
false case), justify your answer. An unjustied \True" or \False" answer
gets no credit.
(a) If a primal LP is infeasible then the dual LP is also infeasible.
Answer : False min x s.t. x 1; x 0, max u s.t. u 1; u 0
(b) A solvable quadratic program must have a vertex solution.
Answer : False min x2 s.t. 1 x 1
(c) The problem minx kAx bk1 s:t:x 0 always has a solution where
A is any m n matrix.
Answer : True Feasible LP with objective bounded below by zero.
(d) Let A = A0; then the linear program :
max
x
b0 x s.t. Ax b; x 0
is solvable if it is feasible.
Answer : True Because dual is feasible:
min
u
b0 u s.t. A0 u = Au b; u 0