
\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage[colorlinks = true,
            linkcolor = blue,
            urlcolor  = blue,
            citecolor = blue,
            anchorcolor = blue]{hyperref}
\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}
}

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




\begin{document}

%\lecture{**LECTURE-NUMBER**}{**DATE**}{**LECTURER**}{**SCRIBE**}
\lecture{5}{January 27}{Rohit Gurjar}{Rohit Choudhary}


Feasibility $\iff$ Optimization 

Optimization reduces to feasibility via  binary search.
\begin{table}[h]
    \centering
    \begin{tabular}{l|c}
    \textbf{$\qquad\qquad\qquad\quad$Feasibility} & \textbf{Optimization} \\
    $\begin{array}{cc} A^\prime x \le b^\prime\end{array}$ &  \\
    $\begin{array}{cc}  W^Tx \geq W_o \end{array}$ & $A^\prime x \le b^\prime$ \\
    \begin{minipage}[t]{0.4\textwidth}
    \begin{itemize}
    \item if feasible then pick $W_1 > W_o$ 
    \item if not feasible then pick $W_1 < W_o$ \\
    \end{itemize}
  \end{minipage} &   max $W^Tx$ \\
    Terminate when $\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad$ & $\qquad\qquad\qquad\qquad\qquad\qquad\qquad$  \\
    \begin{minipage}[t]{0.4\textwidth}
    \begin{itemize}
    \item $W^Tx \geq W_o \Longrightarrow$ feasible
    \item $W^Tx \le W_o + \epsilon \Longrightarrow$  not feasible\\
    \end{itemize}
  \end{minipage} & \\
where $\epsilon \rightarrow \frac{1}{exp(m,n)}$ & \\

\end{tabular}

\end{table}

\paragraph{HW} Prove that number of steps after which algorithm stops is equal to poly$(m,n)$. 


\section*{Feasibility algorithm}
\paragraph{Given Input} Matrix $A$ of size $m \times n$, with each entry being at most $B$.

\paragraph{Algorithm}We can look for the vertices of the polyhedron $Ax \le b$
\begin{itemize}
    \item[] To look for vertices, choose a subset of size $n$ say $A^\prime , b^\prime.$ Then solve $A^\prime x = b^\prime$ and check whether the solution satisfies other inequalities i.e., $Ax \le b$
    \item[] Since we are searching among all the subsets, time complexity of the above algorithm will be ${m \choose n}$ which is exponential.
    \item[] If no such vertices exists then number of linearly independent constraints $<$ number of variables. In this case, we can reduce the number of variables in the LP. Replace each LHS expression with a new variable. 
     \begin{eqnarray}
        y_1 = a_1^Tx \le b_1 \nonumber \\
        y_2 = a_2^Tx \le b_2 \nonumber \\
        y_3 = a_3^Tx \le b_3 \nonumber \\
        . \qquad\qquad \nonumber \\
        . \qquad\qquad \nonumber \\
        . \qquad\qquad \nonumber 
    \end{eqnarray}
    But if $a_3^T$ is dependent on $a_1^T$ and $a_2^T$ then $a_3^T$ can be written as linear combination of $a_1^T$ and $a_2^T$ which implies that $y_3$ can be written as a linear combination of $y_1$ and $y_2$, thus in this way we can reduce number of variables.
\end{itemize}
\pagebreak
\section*{Feasibility $\in$ NP?}
\begin{itemize}
    \item[] If $Ax \le b$ is feasible then can someone give easily verifiable proof/certificate for this?
    \item[] The certificate for feasibility is a solution $x$ which satisfies $Ax \le b$\\
            But then how do we ensure that $x$ is polynomial many bits?
    \item If $x$ is a vertex then there are $n$ linearly independent tight constraints for $x$.
            \begin{eqnarray}
              A^\prime x = b \Longrightarrow x = A^{\prime-1} b \nonumber
            \end{eqnarray}
            and therefore number of bits in $x$ is polynomial of input size.
    \item If $x$ is not a vertex then we can make use of the following result.
    \item[] \textbf{Claim:} If there is a solution of $Ax \le b$ then there exists a subset ($A^\prime, b^\prime$) s.t. any solution of $A^\prime x = b^\prime$ is a feasible solution. (Proved in the lecture \href{https://www.cse.iitb.ac.in/~rgurjar/CS602/HW/Lecture5HW.pdf}{notes}.)
    \item[] The solution to the equality $A^\prime x = b^\prime$ can now be used as the certificate of feasibility. The bit complexity can again be bounded using the fact that inverse of a matrix has polynomially bounded bit complexity.
\end{itemize}
    This shows that feasibility $\in$ NP.


\section*{Feasibility $\in$ coNP?}
\begin{itemize}
    \item[] If $Ax \le b$ is not feasible then can someone give easily verifiable proof/certificate for this?
    \item[] Ex: The following system of inequalities is not feasible.
    \begin{eqnarray}
                  x_1 + x_2 \ge 1  \\
                  x_1 \leq 0 \\
                  x_2 \leq 0
    \end{eqnarray}
    \item[] The proof of the same is given below
    \item []Add eqn (2) and (3)
    \begin{eqnarray}
                  x_1 + x_2 \leq 0
    \end{eqnarray}
    \item[] From eqn (1) and (4)
    \begin{eqnarray}
                  -1 \geq 0 \rightarrow contradiction
    \end{eqnarray}
    \item[] But can we find the proof in general form of any given system of inequalities? (To be continued in next lecture.)
\end{itemize}
\end{document}