\documentclass[a4paper]{report}
\usepackage{graphics}
\usepackage[applemac]{inputenc}
\usepackage{amssymb}
\setlength{\oddsidemargin}{-.5cm}
\setlength{\textwidth}{17.5cm}
\setlength{\textheight}{25.5cm}
\setlength{\topmargin}{-1cm}

\thispagestyle{empty}

\newcommand{\A}{{\mathcal{A}}}
\newcommand{\B}{{\mathcal{B}}}
\newcommand{\N}{{\mathcal{N}}}

\begin{document}  
Verificare se la base $B=\{1,2\}$ \`e primale ammissibile per il seguente
problema e, in caso negativo, determinare una base primale ammissibile a 
partire da B:
$$\begin{array}{rrcrcr}
\max  &      &   &  x_2 &     &    \\
      &  x_1 &   &      & \le &  2 \\
      &  x_1 & - &  x_2 & \le &  2 \\
      & 2x_1 & - &  x_2 & \le &  3 \\
      &  x_1 & + &  x_2 & \le &  3 \\
      &  x_1 & + & 2x_2 & \le &  6 \\
      &      &   &  x_2 & \le &  3 \\ 
\end{array}$$

\noindent {\bf SVOLGIMENTO}

\hfill

$$A_{B} = \left[ \begin{array}{rr} 
 1 &  0  \\ 
 1 & -1 
\end{array} \right], \ 
A_{B}^{-1} = \left[ \begin{array}{rr} 
 1 &  0  \\ 
 1 & -1      
\end{array} \right], \ 
\bar{x} = A_{B}^{-1}b_{B} = \left[ \begin{array}{rr} 
  1 &  0  \\ 
  1 & -1
\end{array} \right]
\left[ \begin{array}{r} 
 2  \\ 
 2 
\end{array} \right] = 
 \left[ \begin{array}{r} 
 2  \\ 
 0 
\end{array} \right].
$$
$$
A_{N}\bar{x} = \left[ \begin{array}{rr} 
 2 & -1  \\ 
 1 &  1  \\
 1 &  2  \\
 0 &  1  \\      
\end{array} \right]
\left[ \begin{array}{r} 
 2  \\ 
 0 
\end{array} \right] = 
\left[ \begin{array}{r} 
 4  \\ 
 2  \\
 2  \\ 
 0  \\
\end{array} \right] \not \leq 
\left[ \begin{array}{r} 
 3  \\ 
 3  \\
 6  \\
 3  \\
\end{array} \right] = b_N
$$ 

\hfil Quindi $B$ non \`e primale ammissibile in quanto $A_3\bar{x} > b_3$. 

\hfill 

\noindent
Scriviamo il problema primale ausiliario per $J= \{3\}, \ H=\{4,5,6\}$:

$$
\begin{array}{rrcrcrcl} 
 \mbox{(PA) max} &      &   &      & - & \nu &    &     \\
                 &  x_1 &   &      &   &     & \le &  2 \\
                 &  x_1 & - &  x_2 &   &     & \le &  2 \\
                 & 2x_1 & - &  x_2 & - & \nu & \le &  3 \\
                 &  x_1 & + &  x_2 &   &     & \le &  3 \\
                 &  x_1 & + & 2x_2 &   &     & \le &  6 \\
                 &      &   &  x_2 &   &     & \le &  3 \\ 
                 &      &   &      & - & \nu & \le &  0
\end{array}
%\hspace*{1cm}
%\begin{array}{rrcrcrcrcrcrcrccr} 
% \mbox{(DA) min} 
%& 2y_1 & + & 2y_2 & + & 3y_3 & + & 3y_4 & + & 6y_5 & + & 3y_6 &   &     &   &    \\    
%&  y_1 & + &  y_2 & + & 2y_3 & + & y_4  & + &  y_5 &   &      &   &     & = &  0 \\ 
%&      & - &  y_2 & - &  y_3 & + & y_4  & + & 2y_5 & + &  y_6 &   &     & = &  0 \\
%&      &   &      & - &  y_3 &   &      &   &      &   &      & - & y_7 & = & -1 \\ 
%& y_i  & \ge & 0. &   &      &   &      &   &      &   &  
%\end{array}
$$
Applichiamo l'algoritmo del simplesso primale a partire dalla base 
$\B_1 = B \cup J =\{1,2,3\}$. 

\medskip 

\noindent 
it.1) $\B_1=\{1,2,3\}$ 
$$
\A_{\B_1} = 
\left[ \begin{array}{rrr} 
 1 &  0 &  0 \\ 
 1 & -1 &  0 \\
 2 & -1 & -1 
\end{array} \right], \ 
\A_{\B_1}^{-1} = 
\left[ \begin{array}{rrr} 
 1 &  0 &  0 \\ 
 1 & -1 &  0 \\
 1 &  1 & -1 
\end{array} \right], \ 
z_{\B_1} = 
\left[ \begin{array}{c} 
  x_{\B_1}   \\ 
 \nu_{\B_1}  
\end{array} \right] = 
\left[ \begin{array}{rrr} 
 1 &  0 &  0 \\ 
 1 & -1 &  0 \\
 1 &  1 & -1 
\end{array} \right]
\left[ \begin{array}{r} 
 2 \\ 
 2 \\
 3 
\end{array} \right] =
\left[ \begin{array}{r} 
 2 \\ 
 0 \\
 1 
\end{array} \right],
$$ 
$$
y_{\B_1} = 
\left[ \begin{array}{rrr} 
 0 & 0 & -1  
\end{array} \right]
\left[ \begin{array}{rrr} 
 1 &  0 &  0 \\ 
 1 & -1 &  0 \\
 1 &  1 & -1 
\end{array} \right] = 
\left[ \begin{array}{rrr} 
 -1 & 1 & 1  
\end{array} \right], \  
y^1=\left[ \begin{array}{rrrrrrr} 
 -1 & 1 & 1 & 0 & 0 & 0 & 0   
\end{array} \right], \
h=1, \ \B_1(h)=1,  
$$
$$
\xi^1 = 
\left[ \begin{array}{r} 
 -1 \\ 
 -1 \\
 -1 
\end{array} \right], \ 
\A_{\N_1}\xi^1 = 
\left[ \begin{array}{rrr} 
 1 &  1 &  0 \\ 
 1 &  2 & -1 \\ 
 0 &  1 &  0 \\ 
 0 &  0 &  1 \\
\end{array} \right]
\left[ \begin{array}{r} 
 -1 \\ 
 -1 \\
 -1 
\end{array} \right] =
\left[ \begin{array}{r} 
 -2 \\ 
 -3 \\
 -1 \\ 
  1 \\
\end{array} \right], \ 
\bar{\lambda}=\lambda_7 = 1, \ k=7.
$$  
it.2) $\B_2=\{7,2,3\}$ 
$$
\A_{\B_2} = 
\left[ \begin{array}{rrr} 
 0 &  0 &  1 \\ 
 1 & -1 &  0 \\
 2 & -1 & -1 
\end{array} \right], \ 
\A_{\B_2}^{-1} = 
\left[ \begin{array}{rrr} 
-1 & -1 & 1 \\
-1 & -2 & 1 \\
-1 &  0 & 0 \\
\end{array} \right], \ 
z_{\B_2} = 
\left[ \begin{array}{c} 
  x_{\B_2}   \\ 
 \nu_{\B_2}  
\end{array} \right] = 
\left[ \begin{array}{rrr} 
-1 & -1 & 1 \\
-1 & -2 & 1 \\
-1 &  0 & 0 \\
\end{array} \right]
\left[ \begin{array}{r} 
 0 \\ 
 2 \\
 3 
\end{array} \right] =
\left[ \begin{array}{r} 
 1 \\ 
-1 \\
 0 
\end{array} \right],
$$ 
$$
y_{\B_2} = 
\left[ \begin{array}{rrr} 
 0 & 0 & -1  
\end{array} \right]
\left[ \begin{array}{rrr} 
-1 & -1 & 1 \\
-1 & -2 & 1 \\
-1 &  0 & 0 \\
\end{array} \right] = 
\left[ \begin{array}{rrr} 
 1 & 0 & 0  
\end{array} \right], \ 
y^2= \left[ \begin{array}{rrrrrrr} 
 0 & 0 & 0 & 0 & 0 & 0 & 1   
\end{array} \right], \mbox{ STOP }  
$$
Quindi $x_{\B_2}$ \`e una soluzione di base primale ammissibile e
$B_1=\{2,3\}$ \`e la corrispondente base.  

\end{document}