%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% SEPTIMA RELACION DE PROBLEMAS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Maximizar=-1;
Minimizar=1;

% Probl 1: Max

A =[2 1
    1 2];
b = [3 4]';
c =Maximizar*[ 1  1]';
[sol,flag]=simplex(A,b,c)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Probl 2: Max

A=[-2 1
   -1 1
    2 1 ];
b=[ 4 1 6 ]';
c=Maximizar*[ 1 6 ]';
[sol,flag]=simplex(A,b,c)


%%%%%%%%%%%%%%%%%%
% Probl 3: min

A=[ 3  5
   -5 -2 ];
b=[ 15 -10 ]';
c=Minimizar*[ -11 -4 ]';
[sol,flag]=simplex(A,b,c)

%%%%%%%%%%%%%%%%%%
% Probl 4: min

A=[ 1  1
    -2 1
    0  1 ];
b=[ 3 -1 2]';
c=Minimizar*[ 1 -1 ]';
[sol,flag]=simplex(A,b,c)

%%%%%%%%%%%%%%%%%%
% Problema no sol

A=[ 1 -1
    1  1
    1  -2
    -1  2 ];
b=[ -1 3 4 -4]';
c=Minimizar*[ 2 1 ]';
[sol,flag]=simplex(A,b,c)

%%%%%%%%%%%%%%%%%%
% Problema segmento

A=[-1 1
   1 2
   1 -2];
b=[1 3 4]';
c=Maximizar*[1 1]';
[sol,flag]=simplex(A,b,c)
