\input{template}
\input{macros}
\begin{document}
\lecture{15}{Complementary slackness, infeasible primal $\Leftrightarrow$ unbounded dual, infeasible dual $\Leftrightarrow$ unbounded primal}{ Aman Parnami}

\section{Revision}
Following were done in previous lecture 
\begin{itemize}
	\item Primal and Dual
		\begin{center}
			\doublebox{
				\begin{tabular}{c||c}
					\underline{Primal} & \underline{Dual} \\
					& \\
					max $c^Tx$   &    min $y^Tb$\\
					$Ax \leq b$ & $A^Ty = c$ \\
					& $y \geq 0$ \\
				\end{tabular}
			}
		\end{center}
	\item Proof of existence of a dual for a feasible and bounded primal.
	\item \begin{Thm}[Duality Theorem]
		If both the primal and the dual of an LP are feasible, then their optimum value coincide i.e
		\end{Thm}
		\begin{center}
		\fbox{
		$c^Tx_0$ $=$ $y_{0}^{T}b$ , where $x_0 , y_0$ are optimals for Primal and Dual resp.
		} 
		\end{center}
\end{itemize}

\section{Optimality Condition}
{\large\bf Consider} an $x_0$ such that $\{A\}_{m \times n}\{x_0\}_{n \times 1} \leq \{b\}_{m \times 1}$ and a $\{y_0\}_{m \times 1}$ such that $(y_0)_i \geq 0$ and $A^Ty_0 = c$ \\ \\
Then the following statements are equivalent.
\begin{enumerate}
\item \label{opt}$x_0$ and $y_0$ are optimal $\Leftrightarrow$ \fbox{$c^Tx_0 = y_0^Tb$}
\item \label{compslack}$x_0$ and $y_0$ are optimal $\Leftrightarrow$ \fbox{$(y_0)_i > 0 \Rightarrow A_ix_0 =b_i$}
\end{enumerate}

Statement \ref{compslack} is called \textbf{Complementary Slackness}. Geometrically, it means hyperplanes corresponding to (+)ve $(y_0)_i$'s intersect at $x_0$. In the other case, $(y_0)_i = 0 \Rightarrow A_ix_0 < b_i$ i.e $A_i$ corresponds to a hyperplane which does not passes through $x_0$. \\

\newpage
\begin{proof} We use \ref{opt} as definition of Optimality.
	\begin{itemize}
		\item \textbf{\ref{compslack} $\Rightarrow$ \ref{opt}} \\
			\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}~ A_ix_0 =b_i~\text{)} \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) \qquad \text{(using}~ A^Ty_0 =  c~\text{)}.\notag\\
			& = x_0^Tc \notag\\
			& = c^Tx_0 \notag
			\end{align}
	\item \textbf{\ref{opt} $\Rightarrow$ \ref{compslack}} \\
		\begin{align}
		y_0^Tb & = x_0^Tc \notag \\
		& = \sum_{i=1}^n x_{0i}\left(\sum_{j=1}^m A_{ji}y_{0j}\right) \qquad \text{(using}~ A^Ty_0 =  c~\text{)} \notag \\
		& = \sum_{j=1}^m y_{0j}\left(\sum_{i=1}^n A_{ji}x_{0i}\right) \notag \\
		& = \sum_{j=1}^\from 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_j ~\text{)} \notag \\
		& = y_0^Tb \notag
		\end{align}
		$\Rightarrow$ for non-zero (+)ve $(y_0)_i$'s, $A_ix_0 =b_i$ otherwise inequality remains leading to contradiction.
	\end{itemize}
\end{proof}
\newpage
\section{Next Class}
Following questions were raised at the end of class and will be fully discussed in next lecture :
\begin{itemize}
\item What if any of the Primal or Dual is \textbf{infeasible} ?\\
\textit{\textbf{Infeasibility} means no point satisfies all the constraints.}
\item What if cost is \textbf{unbounded} ? \\
\textit{\textbf{Unbounded} here means no optimum value exists or that there are feasible points with arbitrary large cost.\\ Ex. max -x,x$\leq$10 \\Here optimum value for cost = -x can't be found with given constraints.}
\end{itemize}

\end{document}
