			
			CS525 Final Exam Solutions
			Sunday December 20, 1998

>> %%%%%%%%%%%%%%%%%%%%%%%%%%%% Problem 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

>> Q=[1 1;1 3];p=[-3;-2];A=[1 2;-1 1];b=[1;-5];
>> M=[Q -A';A zeros(2,2)];q=[p;-b];
>> H=lemketbl(M,q);
>> H=addcol(H,ones(4,1),'z0',5);
              z1         z2         z3         z4         z0         1    
       ------------------------------------------------------------------
  w1= |     1.0000     1.0000    -1.0000     1.0000     1.0000    -3.0000 
  w2= |     1.0000     3.0000    -2.0000    -1.0000     1.0000    -2.0000 
  w3= |     1.0000     2.0000     0.0000     0.0000     1.0000    -1.0000 
  w4= |    -1.0000     1.0000     0.0000     0.0000     1.0000     5.0000 
>> H=ljx(H,1,5);
              z1         z2         z3         z4         w1         1    
       ------------------------------------------------------------------
  z0= |    -1.0000    -1.0000     1.0000    -1.0000     1.0000     3.0000 
  w2= |     0.0000     2.0000    -1.0000    -2.0000     1.0000     1.0000 
  w3= |     0.0000     1.0000     1.0000    -1.0000     1.0000     2.0000 
  w4= |    -2.0000     0.0000     1.0000    -1.0000     1.0000     8.0000 
>> H=ljx(H,1,1);
              z0         z2         z3         z4         w1         1    
       ------------------------------------------------------------------
  z1= |                                                            3.0000 
  w2= |                                                            1.0000 
  w3= |                                                            2.0000 
  w4= |                                                            2.0000 
>> %Complementary tableau! x1=z1=3;x2=z2=0;u1=z3=0;u2=z4=0;
>> %Minimum value= -9/2

>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%  Problem 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%

>> % min x3+x4 subject to: -x3=<x1-x2  =<x3
>> %                       -x4=<x1+x2+5=<x4, (x1,x2,x3,x4)>=0
>> A=[1 -1 1 0;1 1 0 1;-1 1 1 0;-1 -1 0 1];b=[0 -5  0 5]';c=[0 0 1 1]';
>> H=totbl(A,b,c);
              x1         x2         x3         x4         1    
       -------------------------------------------------------
  x5= |     1.0000    -1.0000     1.0000     0.0000    -0.0000 
  x6= |     1.0000     1.0000     0.0000     1.0000     5.0000 
  x7= |    -1.0000     1.0000     1.0000     0.0000    -0.0000 
  x8= |    -1.0000    -1.0000     0.0000     1.0000    -5.0000 
       -------------------------------------------------------
   z= |     0.0000     0.0000     1.0000     1.0000     0.0000 
>> %Dual feasible so use dual simplex!
>> H=ljx(H,4,4);
              x1         x2         x3         x8         1    
       -------------------------------------------------------
  x5= |                                                 0.0000 
  x6= |                                                10.0000 
  x7= |                                                 0.0000 
  x4= |                                                 5.0000 
       -------------------------------------------------------
   z= |     1.0000     1.0000     1.0000     1.0000     5.0000 
>> %Optimal tableau! Solution: x1=0, x2=0, min=z=x3+x4=0+5=5
>> %%%%%%%%%%%%%%%%%%%%%Problem 3 Solution%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>> A=[1 -1];b=[-2];p=[1;1];q=[-1;-2];
>> H=totbl(A,b,p);
              x1         x2         1    
       ---------------------------------
  x3= |     1.0000    -1.0000     2.0000 
       ---------------------------------
   z= |     1.0000     1.0000     0.0000 
>> H=addrow(H,[q' 0],'z0',2);
              x1         x2         1    
       ---------------------------------
  x3= |     1.0000    -1.0000     2.0000 
  z0= |    -1.0000    -2.0000     0.0000 
       ---------------------------------
   z= |     1.0000     1.0000     0.0000 
>> %1-t>=0, 1-2t>=0 imply optimal tableau for 1/2>=t>-infinity
>> H=ljx(H,1,2);
              x1         x3         1    
       ---------------------------------
  x2= |     1.0000    -1.0000     2.0000 
  z0= |    -3.0000     2.0000    -4.0000 
       ---------------------------------
   z= |     2.0000    -1.0000     2.0000 
>> %2-3t>=0, -1+2t>=0 imply optimal tableau for 2/3>=t>=1/2
>> %Unbounded below for t>2/3 because column x1 is positive in row 1
>> % Summary
>> % 1/2>=t>-infinity: z(t)=0 at x1=0,x2=0
>> % 2/3>=t>=1/2: z(t)=2-4t at x1=0, x2=2
>> % t>2/3: z(t) unbounded below
>> %%%%%%%%%%%%%%%%%%%%%%%%%Problem 4 Solution %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
A solution x of the primal also solves the dual (because both problems are the same):

	max -c'u  s.t.  -Au = A'u =< c, u >= 0

Hence, c'x = -c'u = -c'x, and consequently 2c'x=0.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
