\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{subfig}
\usepackage{amssymb}
\usepackage{amsmath,amsthm}
\usepackage{graphicx}
\usepackage{multicol}
\newcounter{lecnum}

\newcommand{\lecture}[4]{
   \newpage
   \setcounter{lecnum}{#1}
   \noindent

   \begin{center}
   \framebox{
      \vbox{\vspace{2mm}
    \hbox to 16cm { {\bf CS602 Applied Algorithms
                        \hfill 2019-20 Sem II} }
       \vspace{4mm}
       \hbox to 16cm { {\Large \hfill Lecture #1: #2  \hfill} }
       \vspace{2mm}
       \hbox to 16cm { {\it Scribe: #4  \hfill  Lecturer: #3} }
      \vspace{2mm}}
   }
   \end{center}
   \vspace*{4mm}
}

\newcommand{\R}{\mathbb{R}}
\newcommand{\transpose}{\mathtt{T}}

\newtheorem{theorem}{Theorem}[lecnum]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}

\DeclareMathOperator{\Cone}{cone}


\begin{document}

%\lecture{**LECTURE-NUMBER**}{**DATE**}{**LECTURER**}{**SCRIBE**}
\lecture{8}{February 3}{Rohit Gurjar}{Naman Verma}


\section{Weak Duality}
Let  $A \in \mathbb{R}^{m \times n}$,  $b \in \mathbb{R}^m$ and $w \in \mathbb{R}^n$.
\paragraph{Primal LP -} $\max  \; w^\transpose x : Ax \le b, \; x \in \mathbb{R}^n $
\paragraph{Dual LP -} $\min  \; b^\transpose y : A^\transpose y=w,  \; y \ge 0, \; y \in \mathbb{R}^m $

\paragraph{Weak Duality:}   OPT(Primal LP) $\le$  OPT(Dual LP). 

\textbf{Proof:} Let  $\alpha$ be a feasible solution for the primal LP whereas
    $\beta$ be a  feasible solution for the dual LP. 
\begin{eqnarray*}
     A \alpha &\le& b \\
    \beta^\transpose A \alpha &\le& \beta^\transpose b \quad \quad (\because \beta \geq 0) \\
     \qquad w^\transpose \alpha &\le& \beta^\transpose b  \quad  (\because  A^\transpose \beta = w) 
\end{eqnarray*}    
The above inequality, in particular, is also true when $\alpha,\beta$ are optimal solutions.
  
\section{Strong Duality}
Strong duality says that for optimal solutions the above inequality is, in fact, an equality.
If LP is feasible and has a bounded optimal value,  then there exists a dual feasible solution that has the same value as the primal optimal value.
%\textbf{Notation.} For a matrix $A$ and a column vector $b$, $(A \vert b)$ denotes a matrix whose columns are columns $A$
\begin{claim}
Let $\alpha^*$ be a optimal solution and $w^* = w^\transpose \alpha^*$ be the optimal value for the primal LP. Then
   $$ \exists  \beta^* \in \mathbb{R}^m \text{ s.t. } A^\transpose \beta^* = w , \;  \beta ^* \ge 0 \text{ (dual feasible)},  \text{ and }  b^\transpose \beta^*  = w^* .$$
   \end{claim}
\begin{proof}
Recall the corollary from previous class, that gives a separating hyperplane for a cone.
For any cone  $ C = \Cone(v_1, v_2, ..., v_k) \in \mathbb{R}^n$ 
and for a vector $u \in \R^n$,
$$  u \notin C \implies \exists q \in {\R}^n \text{ s.t. } q^\transpose u > 0   \text { and }q^\transpose v_i \le 0, \; \forall 1 \le i \le k .$$
Consider the augmented matrix $(A \vert b)$.
%
We want to show that there is a $\beta^* \geq 0$ such that 
$$ (A \vert b)^\transpose \beta^* = (w,w^*)  .$$
%
Here $(w,w^*) \in \R^{n+1}$ denotes a column vector whose first $n$ entries come from $w$ and the last entry is $w^*$.
%
Let $(a_1,b_1), (a_2,b_2), \dots, (a_m,b_m) \in \R^{n+1}$ be the columns of $(A \vert b)^\transpose$.
%
What is want to show is equivalent to 
$$ (w,w^*) \in \Cone( (a_1,b_1), (a_2,b_2), \dots, (a_m,b_m)). $$
For the sake of contradiction, let it not be true. Then by above mentioned corollary, there exist $ q \in \R^n $ and $r \in \R$ such that
$$ (q,r)^\transpose (w,w^*) > 0   \text { and } (q,r)^\transpose (a_i,b_i) \le 0, \; \forall 1 \le i \le m .$$
Equivalently,
$$  q^\transpose w  > -r w^*    \text { and } q^\transpose a_i  \leq - r b_i, \; \forall 1 \le i \le m.  $$
Which is same as
\begin{equation}
 w^\transpose q > -r w^*    \text { and }  a_i^\transpose q \leq - r b_i, \; \forall 1 \le i \le m .
 \label{eq:q}
 \end{equation}
%Let $ {a_1 \choose b_1} {a_2 \choose b_2} ... {a_m \choose b_m} $ be columns of ${A_T \choose b_T} $ \\\\
%We want ${A_T \choose b_T} \beta^x = {w \choose w^*} \iff {w \choose w^*} = Cone({a_1 \choose b_1} {a_2 \choose b_2} ... {a_m \choose b_m}) $\\

%\paragraph{} For the sake of contradiction,
   % Let's assume $ {w \choose w^{*}} \notin Cone ({a_1 \choose b_1}{a_2 \choose b_2}...{a_m \choose b_m}) $
%\\\\
%Using the corollary from previous lecture, \\
%$ \exists (q^\transpose,q_{n+1}) st  (q^\transpose,q_{n+1}){w \choose w^*} > 0 $ and $ (q^\transpose,q_{n+1}){a_i \choose b_i} \le 0, \quad 1 \le i \le m $
%\\
%$$ \implies  q^\transpose w + q_{n+1} w^* > 0 $$ 
%$$ \implies  q^\transpose a_i + q_{n+1} b_i \le 0 $$
%$$ \implies  a_i^\transpose q \le - q_{n+1} b_i $$
%$$ \implies  w^\transpose q > - q_{n+1} w^* $$
Now, we consider two cases depending on the sign of $r$. In both the cases, we will show that 
there is a primal feasible solution $\alpha$ with value greater than $w^*$, contradicting the optimality of $\alpha^*$.

\paragraph{Case 1:} $ r < 0 $. 
Divide  (\ref{eq:q}) by $ - r $
and define $ \alpha= q /- r $. 
We get 
$$  a_i^\transpose  \alpha \le b_i \; \forall i, 
\text{ and }   w^\transpose \alpha > w^* ,$$ 
which is a contradiction.


\paragraph{Case 2:} $ r \geq 0 $, which means
$r+1 >0$. 
%We can actually have Unbounded optimal.
Now,
consider $\alpha = (r+1)\alpha^* + q$.
Since $\alpha^*$ is primal optimal, we know
$$ (r+1)  a_i^\transpose \alpha^* \le (r+1)b_i, \; \forall i,
\text{ and }  (r+1) w^\transpose \alpha^* = (r+1)w^*  .$$
Combining this with (\ref{eq:q}), we get
$$ a_i^\transpose \alpha = 
(r+1)  a_i^\transpose \alpha^* + a_i^\transpose q \le (r+1)b_i -r b_i = b_i, \; \forall i . $$
And
$$ w^\transpose \alpha = (r+1) w^\transpose \alpha^* + w^\transpose q > (r+1)w^*-rw^* = w^*. $$
%- $ a_{i}^\transpose \alpha ^* \le b_i $ \\
%$ w^\transpose \alpha^* = w^* $ \\
%$ \implies a_i^\transpose (\alpha^* + q) \le b_i $ \\
%$ \implies w^\transpose (\alpha^* + q) > w^* $ \\
This gives us a contradiction.
%\columnbreak

%\textbf{Case 3:} $ q_{n+1} > 0 $ \\
%Divide by $ q_{n+1} $ \\
%Define $ q^{'} = q/q_{n+1} $ \\
%$\implies  a_i^\transpose q^{'} \le - b_i $ \\
%$\implies  w^\transpose q^{'} > - w^* $ \\
%Let $\alpha^*$ be OPT(LP), \\$ \implies  2 a_i^\transpose \alpha^* + a_i^\transpose q_i^{'} \le b_i $ \\
%$ \implies  2 w^\transpose w^* + w^\transpose q^{'} > w^* $ \\
%point $ (2\alpha^* + q^{'}) $ gives contradiction

\end{proof}
\section{Various Forms of LP}

\begin{table}[ht]

\begin{center}
\begin{tabular}[20mm]{c|c}
\hline
      Primal & Dual \\
       \hline 
\rule{0pt}{10pt} $\max \; w^\transpose x: Ax \le b$ & $ \min \; b^\transpose y: A^\transpose y = w, \; y \ge 0 $ \\
    \hline
\rule{0pt}{10pt} $\max \; w^\transpose x: Ax=b, \; x \ge 0 $  &  $ \min \; b^\transpose y: A^\transpose y \ge w $ \\
    \hline
\rule{0pt}{10pt} $\max \; w^\transpose x: Ax \le b, \; x \ge 0 $ &  $\min \; b^\transpose y: A^\transpose y \ge w, \; y \ge 0 $\\
    \hline
\end{tabular}
\end{center}
\label{tab:multicol}
\end{table}


\end{document}