\input{template}
\input{macros}
\begin{document}
\lecture{15}{Complementary slackness, Duality Theeorem}{Jay Prakash}
\section{The Duality Theorem}
\begin{center}
\begin{tabular}{r|l}
\underline{Primal} & \underline{Dual} \\
 & \\
max $c^Tx$   &    min $y^Tb$\\
$Ax \leq b$ & $A^Ty = c$ \\
 & $y \geq 0$ \\
\end{tabular}
\end{center}

\begin{Thm}
If both the primal and the dual of an LP are feasible, then their optimum values coincide 
\end{Thm}
If primal LP is feasible and bounded, there is some optimal point $x_o$. As discussed in the last class we can construct a $y \geq 0$ such that $A^Ty = c$ and $y^Tb = c^Tx$. This means that the dual is feasible and the optimum values coincide. \\

\section{Optimality Condition}
Consider an $x_0$ such that $Ax_0 \leq b$ and a $y_0$ such that $y_0 \geq 0$ and $A^Ty_0 = c$. Then the statements 
\begin{enumerate}
 \item $x_0$ and $y_0$ are optimal respectively for the primal and dual if and only if $c^Tx_0 = y_0^Tb$.\label{lec15:equalopt}
 \item $x_0$ and $y_0$ are optimal respectively for the primal and dual if and only if $(y_0)_i > 0 \Rightarrow A_ix_0 = b_i$.\label{lec15:compslack}
\end{enumerate}
are equivalent.\\
\begin{proof}
We prove \ref{lec15:equalopt} using \ref{lec15:compslack}
\begin{align}
y_0^Tb & = \sum_{j=1}^m y_{0j}b_j \notag \\
& = \sum_{j=1}^m y_{0j}(A_jx_0) \qquad \text{(using \ref{lec15:compslack})}\notag\\
& = \sum_{j=1}^m y_{0j}\left(\sum_{i=1}^n A_{ji}x_{0i}\right) \notag\\
& = \sum_{i=1}^n x_{0i}\left(\sum_{j=1}^m A_{ji}y_{0j}\right) \notag\\
& = x_0^Tc \qquad \text{(using}~ A^Ty_0 = c~\text{)}\notag\\
& = c^Tx_0 \notag
\end{align}
Proving \ref{lec15:compslack} using \ref{lec15:equalopt}\\
\begin{align}
c^Tx_0 & = x_0^Tc \notag \\
& = \sum_{i=1}^n x_{0i}\left(\sum_{j=1}^m A_{ji}y_{0j}\right) \notag \\
& = \sum_{j=1}^m y_{0j}\left(\sum_{i=1}^n A_{ji}x_{0i}\right) \notag \\
& = \sum_{j=1}^m y_{0j}(A_jx_0) \notag \\
& \leq \sum_{j=1}^m y_{0j}b_j \qquad \text{(using} ~y_{0j} \geq 0 ~\text{and} ~A_jx_0 \leq b ~\text{)} \notag \\
& = y_0^Tb \notag 
\end{align}
But we know that $c^Tx_0 = y_0^Tb$, hence, $y_0 > 0 \Rightarrow A_ix_0 = b_i$
This condition is called complementary slackness. 
\end{proof}
\section{Infeasibility and Unboundedness}
Every LP problem is either feasible or infeasible. Now, the feasible problems either have a solution or are unbounded.\\
Infeasibility implies that there is no solution to Ax $\leq$ b. Example of an unbounded LP is
\begin{align}
\text{max}~ & (-x) \notag\\
x &\leq 10.\notag 
\end{align}
\end{document}
