
\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{subfig}
\usepackage{amssymb}
\usepackage{amsmath,amsthm}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{enumerate}
\usepackage{float}
\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{16}{March 12}{Rohit Gurjar}{Aman Jain}

\hspace{-15pt}Steiner Tree/Forest: $(s_1,t_1),(s_1,t_1),...,(s_k,t_k)$ are given. Interesting cuts : $S \subseteq V$ s.t. $\exists i$, $ s_i \in S$ and $t_i \in \overline{S}$.
\section*{Primal Dual For Steiner Tree Problem}
The Primal LP for our Steiner Tree problem as discussed in previous class will be:
\begin{eqnarray*}
\min & \sum_{e \in E} w_e x_e & \text{s.t.}  \\
\text{ for each } e \in E, & x_e \geq 0 &\\
\text{ for each interesting cut }  S \subseteq V , & \sum_{e \in \delta(S)}  x_e \geq 1 & 
\end{eqnarray*}
Note that the constraint $x_e \leq 1$ would be redundant.
Now, the corresponding Dual LP would be:
\begin{eqnarray*}
\max  & \displaystyle\sum_{\substack{ S \subset V \\ S \text{ is interesting}}} y_S  & \text{s.t.} \\
\text{for each interesting } S \subseteq V & y_S \geq 0, \\
\text{and for each } e \in E, & \displaystyle\sum_{ \substack{ S  \subseteq V \\
S  \text{ is interesting } \\ \text{and } e \in \delta(S)}}  y_S \leq w_e &
\end{eqnarray*}

\section*{Complementary Slackness conditions:}
% \subsection*{I.} $$ x_e \neq 0 \implies  \displaystyle\sum_{ \substack{ S  \subseteq V \\
% S  \text{ is interesting } \\ \text{and } e \in \delta(S)}}  y_S \eq w_e  $$
\begin{enumerate}[I]
    \item Dual complementary slackness:$$ x_e \neq 0 \implies  \displaystyle\sum_{ \substack{ S  \subseteq V \\
S  \text{ is interesting } \\ \text{and } e \in \delta(S)}}  y_S = w_e  $$ \label{eq:1}
    \item Primal complementary slackness:$$ y_s \neq 0 \implies \sum_{e \in \delta(S)}  x_e = 1$$\label{eq:2}

\end{enumerate}

\section*{Primal Dual Algorithm}
\begin{itemize}
\item[--]Start with some feasible dual solution (say $y_s = 0 \forall s $). Look for primal feasible solution(integral) X which satisfies \textbf{I}
 (if an edge is tight ($\sum_S y_S = w_e$) you can take $x_e = 1$).
\item[--]If success, then done.
\item[--]If fail, then try improving the dual. How to do this? Suppose you find some $S$ s.t. 
all edges in $\delta(S)$ are non-tight. Then increase $y_s$ such that you get atleast one more tight edge. 
Now the question is how to find this $S$?  %We will address this later.\\
Take the subgraph of tight edges $G'$ and see if for each $i$, $s_i$ is connected with $t_i$, $s_i{\raise.17ex\hbox{$\scriptstyle\sim$}} t_i$. If not,
then there will be an interesting cut $S$ such that   $\delta(S)$ is empty in $G'$, that is, all egdes in $\delta(S)$ are non-tight.
\item[--]Finally, say we have a primal feasible \textbf{x}. 
Suppose $x$ satisfies the primal complementary slackness approximately. That is, let $\gamma$ be such that $$y_s \neq 0 \implies \sum_{e \in \delta(S)}  x_e \leq \gamma$$
Then,
\item \textbf{Claim:} \textbf{x} is $\gamma$-optimal (Homework)
\end{itemize}

\section*{Example run of Algorithm}
\begin{figure}[H]
  \includegraphics[width=60mm,scale=0.75]{example.JPG}
%   \caption{A boat.}
%   \label{fig:boat1}
\end{figure}
The following four will be interesting cuts with corresponding dual variables $y_1, y_2, y_3, y_4$.
\begin{eqnarray*}
y_1   &  \{s_1\}  \qquad   \{t_1,a,b\}  \quad \ \ [e1,e2,e3]  &  x_{e_1}+x_{e_2}+x_{e_3} \geq 1 \\
y_2   &  \{s_1,a\}  \qquad  \{t_1,b \} \qquad \ [e1,e2]  &  x_{e_1}+x_{e_2} \geq 1  \\
y_3   &  \{s_1,b \} \qquad \{t_1,a\} \qquad \ [e1,e3]  &  x_{e_1}+x_{e_3} \geq 1 \\
y_4   &  \{s_1,a,b\}  \qquad  \{t_1\} \qquad \quad \ [e1] &   x_{e_1} \geq 1 \\
\end{eqnarray*}

\textbf{Dual} : \begin{itemize}
    \item $y_1+y_2+y_3+y_4 \leq 3$
    \item $y_1+y_2 \leq 1$
    \item $y_1+y_3 \leq 1$
    \end{itemize}
    % \item[] 
    \underline{Initially} : $y_1 = y_2 = y_3 = y_4 = 0$. No tight edges. \\
    % \item[] 
    \underline{Increase $y_2$} (chosen arbitrarily) : $y_1 = y_3 = y_4 = 0$, $y_2 = 1$. $e_2$ becomes tight. 
    Set $x_{e_2} = 1$. Not feasible still. Improve the dual. \\ 
    \underline{Increase $y_4$} : $y_1 = y_3 = 0$, $y_2 = 1$, $y_4 = 2$. $e_1$ becomes tight. Set $x_{e_1} = 1$. Feasible.\\
    You can throw out $e_2$ out of the final solution.
    
\section*{Improvement ideas}
\begin{enumerate}
    \item Pruning: Once you get a feasible \textbf{x}. go back in reverse order over all edges in \textbf{x} (reverse since the higher cost edges are added later). Set $x_e = 0$ if it remains feasible.
    \item Increase many dual variables simultaneously.
\end{enumerate}

\begin{figure}[H]
  \includegraphics[width=80mm,scale=1]{example2.JPG}
\end{figure}


\begin{itemize}
    \itemsep-0.5em
  \item[] Find current set of connected components (in the subgraph of tight edges). Consider interesting cuts $T_1,T_2,...,T_m$
  \item[]  increasing all the dual $y_{T_i}$ simultaneously.
  \end{itemize}
More details will follow in the next lecture. 

\end{document}
