\documentclass[11pt]{article}
\usepackage{amsmath,amsfonts,latexsym,graphicx}
\usepackage{fullpage,color}
\usepackage{algo,tikz}
\usepackage{url,hyperref}
\pagestyle{empty}
\setlength{\oddsidemargin}{0in}
\setlength{\topmargin}{0in}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{8.8in}
\newtheorem{fact}{Fact}
\newtheorem{lemma}{Lemma}
\newtheorem{theorem}[lemma]{Theorem}
\newtheorem{assumption}[lemma]{Assumption}
\newtheorem{corollary}[lemma]{Corollary}
\newtheorem{prop}[lemma]{Proposition}
\newtheorem{claim}[lemma]{Claim}
\newtheorem{remark}[lemma]{Remark}
\newtheorem{prob}{Problem}
\newtheorem{conjecture}{Conjecture}
\newenvironment{note}[1]{\medskip\noindent \textbf{#1:}}%
{\medskip}
\newenvironment{proof}{\vspace{-0.05in}\noindent{\bf Proof:}}%
{\hspace*{\fill}$\Box$\par}
\newenvironment{proofsketch}{\noindent{\bf Proof Sketch.}}%
{\hspace*{\fill}$\Box$\par\vspace{4mm}}
\newenvironment{proofof}[1]{\smallskip\noindent{\bf Proof of #1.}}%
{\hspace*{\fill}$\Box$\par}
\newcommand{\etal}{{\em et al.}\ }
\newcommand{\assign}{\leftarrow}
\newcommand{\eps}{\epsilon}
\newcommand{\NP}{\textbf{NP}}
\newcommand{\opt}{\textrm{\sc OPT}}
\newcommand{\script}[1]{\mathcal{#1}}
\newcommand{\ceil}[1]{\lceil #1 \rceil}
\newcommand{\floor}[1]{\lfloor #1 \rfloor}
\begin{document}
\setlength{\fboxrule}{.5mm}\setlength{\fboxsep}{1.2mm}
\newlength{\boxlength}\setlength{\boxlength}{\textwidth}
\addtolength{\boxlength}{-4mm}
\begin{center}\framebox{\parbox{\boxlength}{\bf
CS 598CSC: Approximation Algorithms \hfill Lecture date: January 21, 2009\\
Instructor: Chandra Chekuri \hfill Scribe: Nitish Korula}}\end{center}
\vspace{5mm}
\section{Introduction/Administrivia}
\begin{itemize}
\item Course website:
\url{http://www.cs.uiuc.edu/class/sp09/cs598csc/}. Join the newsgroup!
\item Text book (recommended): \textit{Approximation Algorithms} by
Vijay Vazirani, Springer-Verlag, 2004.
\item 6 homework sets, the first 3 required. The last 3 sets can be
replaced by a project.
\end{itemize}
\subsection*{Course Objectives}
\begin{enumerate}
\item To appreciate the rich landscape of optimization problems. \NP\
optimization problems, identical in terms of exact solvability,
can appear very different from the approximation point of view.
This sheds light on why, in practice, some optimization problems
(such as {\sc Knapsack}) are easy, while others (like {\sc
Clique}) are extremely difficult.
\item To learn techniques for design and analysis of approximation
algorithms, via some fundamental problems.
\item To build a toolkit of broadly applicable algorithms/heuristics
that can be used to solve a variety of problems.
\item To understand reductions between optimization problems, and to
develop the ability to relate new problems to known ones.
\end{enumerate}
\bigskip
The complexity class \textbf{P} contains the set of problems that can
be solved in polynomial time. From a theoretical viewpoint, this
describes the class of tractable problems, that is, problems that can
be solved efficiently. The class \NP\ is the set of problems
that can be solved in \emph{non-deterministic} polynomial time, or
equivalently, problems for which a solution can be \emph{verified} in
polynomial time.
\NP\ contains many interesting problems that often arise in practice,
but there is good reason to believe \textbf{P} $\neq$ \NP. That is, it is
unlikely that there exist algorithms to solve \NP\ optimization
problems efficiently, and so we often resort to heuristic methods
to solve these problems.
Commonly used heuristic approaches include mathematical programming,
local seach, genetic algorithms, tabu search, simulated annealing,
etc. Some methods are guaranteed to find an optimal solution, though
they may take exponential time; others are guaranteed to run in
polynomial time, though they may not return an optimal
solution. Approximation algorithms fall in the latter category;
however, though they do not find an optimal solution, we can give
guarantees on the \emph{quality} of the solution found.
\subsection*{Approximation Ratio}
To give a guarantee on solution quality, one must first define what we
mean by the quality of a solution. We discuss this more carefully in
the next lecture; for now, note that each \emph{instance} of an
optimization problem has a set of feasible solutions. The optimization
problems we consider have an \textbf{objective function} which assigns
a (real/rational) number/value to each feasible solution of each instance
$I$; this measures the quality of solutions.
For each instance $I$ of a problem, let $\opt(I)$ denote the value of
an optimal solution to instance $I$. We say that an algorithm
$\script{A}$ is an {\color{red} $\alpha$-approximation algorithm} for
a problem if, for \emph{every} instance $I$, the value of the feasible
solution returned by $\script{A}$ is within a (multiplicative) factor
of $\alpha$ of $\opt(I)$. Equivalently, we say that $\script{A}$ is an
approximation algorithm with {\color{red} \emph{approximation ratio}
$\alpha$}.
\begin{note}{Notes}
\begin{enumerate}
\item The approximation ratio of an algorithm is the \emph{maximum}
(or supremum), over all instances of the problem, of the ratio
between the values of the optimal solution and the solution
returned by the algorithm. Thus, it is a bound on the
\emph{worst-case} performance of the algorithm.
\item The approximation ratio $\alpha$ can depend on the size of the
instance $I$, so one should technically write $\alpha(|I|)$.
\end{enumerate}
\end{note}
\subsection*{Pros and Cons of the Approximation Approach}
Some advantages to the approximation approach include:
\begin{enumerate}
\item It explains why problems can vary considerably in difficulty.
\item The analysis of problems and problem instances distinguishes
easy cases from difficult ones.
\item The worst-case ratio is \emph{robust} in many ways. It allows
\emph{reductions} between problems.
\item Algorithmic ideas/tools are valuable in developing heuristics,
including many that are practical and effective.
\end{enumerate}
As a bonus, many of the ideas are beautiful and sophisticated, and
involve connections to other areas of mathematics and computer
science.
\bigskip
Disadvantages include:
\begin{enumerate}
\item The focus on \emph{worst-case measures} risks ignoring
algorithms or heuristics that are practical or perform well \emph{on
average}.
\item Unlike, for example, integer programming, there is often no
incremental/continuous tradeoff between the running time and
quality of solution.
\item Approximation algorithms are often limited to cleanly stated
problems.
\item The framework does not apply to decision problems or those
that are inapproximable.
\end{enumerate}
\subsection*{Approximation as a Broad Lens}
The use of approximation algorithms is not restricted solely to
\NP-Hard optimization problems. In general, ideas from approximation
can be used to solve many problems where finding an exact solution
would require too much of any resource.
A resource we are often concerned with is \emph{time}. Solving
\NP-Hard problems exactly would (to the best of our knowledge) require
exponential time, and so we use approximation algorithms. However, for
large data sets, even polynomial running time is sometimes
unacceptable. As an example, the best exact algorithm known for the
{\sc Matching} problem in general graphs requires $O(n^3)$ time; on
large graphs, this may be too long. In contrast, the greedy algorithm
takes linear time and outputs a matching at least $1/2$ the size of
the maximum matching.
Another often limited resource is \emph{space}. In the area of data
streams/streaming algorithms, we are often only allowed to read the
input in a single pass, and given a small amount of additional storage
space. Consider a network switch that wishes to compute statistics
about the packets that pass through it. It is easy to exactly compute
the average packet length, but one cannot compute the median length
exactly. Surprisingly, though, many statistics can be approximately
computed.
Other resources include programmer time (as for the {\sc Matching}
problem, the exact algorithm may be significantly more complex than
one that returns an approximate solution), or communication
requirements (for instance, if the computation is occurring across
multiple locations).
\section{The Steiner Tree Problem}
In the {\sc Steiner Tree} problem, the input is a graph $G(V,E)$,
together with a set of \emph{terminals} $S \subseteq V$, and a cost
$c(e)$ for each edge $e \in E$. The goal is to find a minimum-cost
tree that connects all terminals, where the cost of a subgraph is
the sum of the costs of its edges.
The {\sc Steiner Tree} problem is \NP-Hard, and also \textbf{APX}-Hard
\cite{LowerBound}. The latter means that there is a constant $\delta >
1$ such that it is \NP-Hard to approximate the solution to within a
ratio of less than $\delta$; it is currently known that it is hard to
approximate the {\sc Steiner Tree} problem to within a ratio of
$95/94$ \cite{ChlebikC}.\footnote{Variants of the {\sc Steiner Tree}
problem, named after Jakob Steiner, have been studied by Fermat,
Weber, and others for centuries. The front cover of the course
textbook contains a reproduction of a letter from Gauss to
Schumacher on a Steiner tree question.}
\begin{note}{Note}
If $|S| = 2$ (that is, there are only 2 terminals), an optimal
Steiner Tree is simply a shortest path between these 2 terminals. If
$S = V$ (that is, all vertices are terminals), an optimal solution
is simply a minimum spanning tree of the input graph. In both these
cases, the problem can be solved exactly in polynomial time.
\end{note}
\begin{note}{Question}
Can you find an efficient algorithm to exactly solve the Steiner
Tree problem with 3 terminals?
\end{note}
Observe that to solve the {\sc Steiner Tree} problem on a graph $G$,
it suffices to solve it on the metric completion of $G$, defined
below. (Why is this true?)
\begin{note}{Definition}
Given a connected graph $G(V,E)$ with edge costs, the \emph{metric
completion} of $G$ is a complete graph $H(V,E')$ such that for
each $u,v \in V$, the cost of edge $uv$ in $H$ is the cost of the
shortest path in $G$ from $u$ to $v$.
The graph $H$ with edge costs is \emph{metric}, because the edge
costs satisfy the triangle inequality: $\forall u,v,w, \quad
cost(uv) \le cost(uw) + cost(wv)$.
\end{note}
\begin{figure}[h]
\begin{center}
\begin{tikzpicture}
\tikzstyle{vtx}=[circle,draw,inner sep=4pt];
\begin{scope}[xshift=-4cm]
\node (a) at (0,-0.4) [vtx] {}; \node (b) at (-1.3,-1.5) [vtx] {};
\node (c) at (1.3,-1.5) [vtx] {}; \node (d) at (0,1) [vtx] {};
\draw (d) -- (a) -- (b) -- (c) -- (a);
\node at (0.15,0.2) {5}; \node at (0,-1.75) {4};
\node at (-0.4,-0.95) {1}; \node at (0.4,-0.95) {2};
\end{scope}
\begin{scope}[xshift=4cm]
\node (a) at (0,-0.4) [vtx] {}; \node (b) at (-1.3,-1.5) [vtx] {};
\node (c) at (1.3,-1.5) [vtx] {}; \node (d) at (0,1) [vtx] {};
\draw (d) -- (a) -- (b) -- (c) -- (a); \draw[red] (b) -- (d) -- (c);
\node at (0.15,0.2) {5}; \node[color=red] at (0,-1.75) {3};
\node at (-0.4,-0.95) {1}; \node at (0.4,-0.95) {2};
\node[color=red] at (-0.95,-0.25) {6}; \node[color=red] at (0.95,-0.25) {7};
\end{scope}
\end{tikzpicture}
\end{center}
\vspace{-0.75cm}
\caption{On the left, a graph. On the right, its metric completion,
with new edges and modified edge costs in red.}
\end{figure}
\medskip
We now look at two approximation algorithms for the {\sc Steiner Tree} problem.
\subsection*{The MST Algorithm}
The following algorithm, with an approximation ratio of $2$ is due to
\cite{MST2}:
\begin{algo}
\underline{\sc SteinerMST($G(V,E), S \subseteq V$)}:\\
Let $H(V,E') \assign$ metric completion of $G$. \\
Let $T \assign$ MST of $H[S]$.\\
Output $T$.
\end{algo}
\noindent (Here, we use the notation $H[S]$ to denote the subgraph of $H$
induced by the set of terminals $S$.)
\bigskip
\begin{figure}[h]
\begin{center}
\begin{tikzpicture}
\tikzstyle{vtx}=[circle,draw,inner sep=4pt];
\tikzstyle{stnr}=[circle,draw,fill=black,inner sep=4pt];
\begin{scope}[xshift=-4cm]
\node (a) at (0,-0.4) [stnr] {}; \node (b) at (-1.3,-1.5) [vtx] {};
\node (c) at (1.3,-1.5) [vtx] {}; \node (d) at (0,1) [vtx] {};
\draw (d) -- (a) -- (b) -- (c) -- (a);
\node at (0.15,0.2) {5}; \node at (0,-1.75) {4};
\node at (-0.4,-0.95) {1}; \node at (0.4,-0.95) {2};
\node at (0,-2.3) {Graph $G$};
\end{scope}
\begin{scope}[xshift=0cm]
\node (a) at (0,-0.4) [stnr] {}; \node (b) at (-1.3,-1.5) [vtx] {};
\node (c) at (1.3,-1.5) [vtx] {}; \node (d) at (0,1) [vtx] {};
\draw (d) -- (a) -- (b) -- (c) -- (a); \draw (b) -- (d) -- (c);
\node at (0.15,0.2) {5}; \node at (0,-1.75) {3};
\node at (-0.4,-0.95) {1}; \node at (0.4,-0.95) {2};
\node at (-0.95,-0.25) {6}; \node at (0.95,-0.25) {7};
\node at (0,-2.3) {Metric Completion $H$};
\end{scope}
\begin{scope}[xshift=4cm]
\node (b) at (-1.3,-1.5) [vtx] {};
\node (c) at (1.3,-1.5) [vtx] {}; \node (d) at (0,1) [vtx] {};
\draw (d) -- (c) -- (b) -- (d);
\node at (0,-1.75) {3};
\node at (-0.95,-0.25) {6}; \node at (0.95,-0.25) {7};
\node at (0,-2.3) {$H[S]$};
\end{scope}
\begin{scope}[xshift=8cm]
\node (b) at (-1.3,-1.5) [vtx] {};
\node (c) at (1.3,-1.5) [vtx] {}; \node (d) at (0,1) [vtx] {};
\draw (d) -- (b) -- (c);
\node at (0,-1.75) {3}; \node at (-0.95,-0.25) {6};
\node at (0,-2.3) {Output Tree $T$};
\end{scope}
\end{tikzpicture}
\end{center}
\vspace{-0.75cm}
\caption{Illustrating the MST Heuristic for {\sc Steiner Tree}}
\end{figure}
\bigskip
The following lemma is central to the analysis of the algorithm {\sc SteinerMST}.
\begin{lemma}\label{lem:spanningTree}
For any instance $I$ of {\sc Steiner Tree}, let $H$ denote the
metric completion of the graph, and $S$ the set of terminals. There
exists a spanning tree in $H[S]$ (the graph induced by terminals) of
cost at most $2(1 - \frac{1}{|S|}) \opt$, where $\opt$ is the cost
of an optimal solution to instance $I$.
\end{lemma}
Before we prove the lemma, we note that if there exists \emph{some
spanning tree} in $H[S]$ of cost at most $2(1 - \frac{1}{|S|})\opt$,
the minimum spanning tree has at most this cost. Therefore,
Lemma~\ref{lem:spanningTree} implies that the algorithm {\sc SteinerMST} is a $2(1
- \frac{1}{|S|})$-approximation for the {\sc Steiner Tree} problem.
\bigskip
\begin{proofof}{Lemma~\ref{lem:spanningTree}}
Let $T^*$ denote an optimal solution in $H$ to the given instance,
with cost $c(T^*)$. Double all the edges of $T^*$ to obtain an
Eulerian graph, and fix an Eulerian Tour $W$ of this graph. (See
Fig. 3 above.) Now, shortcut edges of $W$ to obtain a tour $W'$ of
the vertices in $T^*$ in which each vertex is visited exactly
once. Again, shortcut edges of $W'$ to eliminate all non-terminals;
this gives a walk $W''$ that visits each terminal exactly once.
\begin{figure}[h]
\begin{center}
\begin{tikzpicture}
\tikzstyle{vtx}=[circle,draw,fill=white,inner sep=3pt];
\tikzstyle{stnr}=[circle,draw,fill=black,inner sep=3pt];
\begin{scope}[xshift=-4.25cm,yscale=0.6]
\node (s0) at (-1,0) [stnr] {}; \node (s1) at (2,0) [stnr] {};
\node (s2) at (-2,-2) [stnr] {};
\node (t0) at (1,-2) [vtx] {}; \node (t1) at (3,-2) [vtx] {};
\node (t2) at (-3.5,-4) [vtx] {}; \node (t3) at (-2,-4) [vtx] {};
\node (t4) at (-0.5,-4) [vtx] {};
\draw (t4) -- (s2) -- (t3); \draw (t2) -- (s2) -- (s0) -- (s1);
\draw (t0) -- (s1) -- (t1);
\node at (-0.25,-5) {Optimal Tree $T^*$};
\end{scope}
\begin{scope}[xshift=4.25cm,yscale=0.6,->,>=latex]
\tikzstyle{every node} = [font=\small];
\node (s0) at (-1,0) [stnr] {}; \node (s1) at (2,0) [stnr] {};
\node (s2) at (-2,-2) [stnr] {};
\node (t0) at (1,-2) [vtx] {}; \node (t1) at (3,-2) [vtx] {};
\node (t2) at (-3.5,-4) [vtx] {}; \node (t3) at (-2,-4) [vtx] {};
\node (t4) at (-0.5,-4) [vtx] {};
%Edges
\draw (t2) to [out=75,in=195] node[left] {1} (s2);
\draw (s2) -- node[below] {14} (t2) ;
%\draw (t2) .. controls +(0.5,1.5) .. node[left] {1} (s2);
\draw (s2) to [out=75,in=210] node[left] {2} (s0);
\draw (s0) -- node[below] {9} (s2) ;
%.. controls +(0.2,1.3) ..
\draw (s0) to [out=30,in=150] node[above] {3} (s1);
\draw (s1) -- node[below] {8} (s0);
%.. controls +(1.5,0.5) ..
\draw (s1) to[out=-30,in=105] node[above] {4} (t1);
\draw (t1) -- node[below] {5} (s1);
%.. controls +(0.7,-0.8) ..
\draw (s1) to[out=255,in=30] node[below] {6} (t0);
\draw (t0) -- node[left] {7} (s1);
\draw (s2) to [out=-15,in=105] node[above] {10} (t4);
\draw (t4) -- node[below] {11} (s2);
\draw (s2) to[out=285,in=75] node[right=-4pt] {12} (t3);
\draw (t3) -- node[left=-3pt] {13} (s2);
\node at (-0.25,-5)[font=\normalsize] {Eulerian Walk $W$};
\end{scope}
\begin{scope}[xshift=-4.25cm,yshift=-4.25cm,yscale=0.6,->,>=latex]
\tikzstyle{every node} = [font=\small,black];
\node (s0) at (-1,0) [stnr] {}; \node (s1) at (2,0) [stnr] {};
\node (s2) at (-2,-2) [stnr] {};
\node (t0) at (1,-2) [vtx] {}; \node (t1) at (3,-2) [vtx] {};
\node (t2) at (-3.5,-4) [vtx] {}; \node (t3) at (-2,-4) [vtx] {};
\node (t4) at (-0.5,-4) [vtx] {};
%Edges
\draw[blue] (t2) to [out=75,in=195] node[left] {1} (s2);
\draw (s2) -- node[below] {14} (t2) ;
\draw[blue] (s2) to [out=75,in=210] node[left] {2} (s0);
\draw (s0) -- node[below] {9} (s2) ;
\draw[blue] (s0) to [out=30,in=150] node[above] {3} (s1);
\draw (s1) -- node[below] {8} (s0);
\draw[blue] (s1) to[out=-30,in=105] node[above] {4} (t1);
\draw (t1) -- node[below] {5} (s1);
\draw (s1) to[out=255,in=30] node[below] {6} (t0);
\draw (t0) -- node[left] {7} (s1);
\draw (s2) to [out=-15,in=105] node[above] {10} (t4);
\draw (t4) -- node[below] {11} (s2);
\draw (s2) to[out=285,in=75] node[right=-4pt] {12} (t3);
\draw (t3) -- node[left=-3pt] {13} (s2);
\draw[blue] (t1) -- (t0); \draw[blue] (t0) -- (t4);
\draw[blue] (t4) -- (t3); \draw[blue] (t3) -- (t2);
\node at (-0.25,-5)[font=\normalsize] {Blue edges show
shortcut tour $W'$};
\end{scope}
\begin{scope}[xshift=4.25cm,yshift=-4.25cm,yscale=0.6,->,>=latex]
\node (s0) at (-1,0) [stnr] {}; \node (s1) at (2,0) [stnr] {};
\node (s2) at (-2,-2) [stnr] {};
\node (t0) at (1,-2) [vtx] {}; \node (t1) at (3,-2) [vtx] {};
\node (t2) at (-3.5,-4) [vtx] {}; \node (t3) at (-2,-4) [vtx] {};
\node (t4) at (-0.5,-4) [vtx] {};
%Edges
\draw[blue] (t2) to [out=75,in=195] (s2);
\draw[blue] (s2) to [out=75,in=210] (s0);
\draw[blue] (s0) to [out=30,in=150] (s1);
\draw[blue] (s1) to[out=-30,in=105] (t1);
\draw[red,thick] (t1) -- (t0); \draw[red,thick] (t0) -- (t4);
\draw[red,thick] (t4) -- (t3); \draw[red,thick] (t3) -- (t2);
\draw[red,thick] (t2) to[out=57,in=153] (t1);
\node at (-0.25,-5) {Red edges show shortcut walk $W''$ on
terminals};
\end{scope}
\end{tikzpicture}
\end{center}
\vspace{-0.7cm}
\caption{Doubling edges of $T^*$ and shortcutting gives a low-cost
spanning tree on terminals.}
\end{figure}
It is easy to see that $c(W'') \le c(W') \le c(W) = 2c(T^*)$, where
the inequalities follow from the fact that by shortcutting, we can
only decrease the length of the walk. (Recall that we are working in
the metric completion $H$.) Now, delete the heaviest edge of $W''$ to
obtain a path through all the terminals in $S$, of cost at most $(1 -
\frac{1}{|S|}) c(W'')$. This path is a spanning tree of the terminals,
and contains \emph{only} terminals; therefore, there exists a spanning
tree in $H[S]$ of cost at most $2(1 - \frac{1}{|S|}) c(T^*)$.
\end{proofof}
\paragraph{A tight example:}
The following example (Fig. 4 below) shows that this analysis is tight; there are
instances of {\sc Steiner Tree} where the {\sc SteinerMST} algorithm
finds a tree of cost $2(1-\frac{1}{S})\opt$. Here, each pair of
terminals is connected by an edge of cost 2, and each terminal is
connected to the central non-terminal by an edge of cost 1. The
optimal tree is a star containing the central non-terminal, with edges
to all the terminals; it has cost $|S|$. However, the only trees in
$H[S]$ are formed by taking $|S| - 1$ edges of cost 2; they have cost
$2(|S| - 1)$.
\begin{figure}[h]
\begin{center}
\begin{tikzpicture}[scale=0.9]
\tikzstyle{vtx}=[circle,draw,fill=white,inner sep=3pt];
\tikzstyle{stnr}=[circle,draw,fill=black,inner sep=3pt];
\begin{scope}[xshift=-5.5cm,scale=0.9]
\node (s) at (0,0) [stnr] {};
\draw (0,0) circle (2cm);
\foreach \theta in {0,30,...,330}
{
\draw (0,0) -- (\theta:2cm);
\node at (\theta:2cm) [vtx] {};
\node at (\theta+8:1.25cm) {1};
\node at (\theta+15:2.2cm) {2};
}
\node at (0,-3) {Graph $G$; not all edges shown};
\end{scope}
\begin{scope}[xshift=0cm,scale=0.9]
\draw (0,0) circle (2cm);
\foreach \theta in {0,30,...,330}
{
\node at (\theta:2cm) [vtx] {};
\node at (\theta+15:2.2cm) {2};
}
\node at (0.5,-3) {$H[S]$; not all edges shown.};
\end{scope}
\begin{scope}[xshift=5.5cm,scale=0.9]
\draw (2,0) arc (0:330:2cm);
\foreach \theta in {0,30,...,330}
{
\node at (\theta:2cm) [vtx] {};
\node at (\theta+15:2.2cm) {2};
}
\node at (0,-3) {An MST of $H[S]$.};
\end{scope}
\end{tikzpicture}
\end{center}
\vspace{-0.8cm}
\caption{A tight example for the {\sc SteinerMST} algorithm }
\end{figure}
\subsection*{The Greedy/Online Algorithm}
We now describe another simple algorithm for the {\sc Steiner Tree}
problem, due to \cite{Greedy}:
\begin{algo}
\underline{\sc GreedySteiner($G(V,E), S \subseteq V$)}:\\
Let $\{s_1, s_2, \ldots s_{|S|}\}$ be an arbitrary ordering of the
terminals.\\
Let $T \assign \{s_1\}$\\
For ($i$ from $2$ to $|S|$): \+ \\
Let $P_i$ be the shortest path in $G$ from $s_i$ to $T$.\\
Add $P_i$ to $T$. \-
\end{algo}
{\sc GreedySteiner} is a $\ceil{\log_2 n}$-approximation algorithm;
here, we prove a slightly weaker result.
\begin{theorem}\label{thm:greedy}
The algorithm {\sc GreedySteiner} has an approximation ratio of
$2H_{|S|} \approx 2 \ln |S|$, where $H_i$ denotes the $i$th
harmonic number.
\end{theorem}
Note that this is an {\color{red} \emph{online}} algorithm; terminals are
considered in an arbitrary order, and when a terminal is considered,
it is immediately connected to the existing tree. Thus, even if the
algorithm \emph{could not see the entire input at once}, but instead
terminals were revealed one at a time and the algorithm had to produce
a Steiner tree at each stage, the algorithm {\sc GreedySteiner}
outputs a tree of cost no more than $O(\log |S|)$ times the cost of the
optimal tree.
\bigskip
To prove Theorem~\ref{thm:greedy}, we introduce some notation. Let
$c(i)$ denote the cost of the path $P_i$ used in the $i$th iteration
to connect the terminal $s_i$ to the already existing tree. Clearly,
the total cost of the tree is $\sum_{i=1}^{|S|} c(i)$. Now, let
$\{i_1, i_2, \ldots i_{|S|}\}$ be a permutation of $\{1, 2, \ldots
|S|\}$ such that $c(i_1) \ge c(i_2) \ge \ldots \ge c(i_{|S|})$. (That
is, relabel the terminals in decreasing order of the cost paid to
connect them to the tree that exists when they are considered by the
algorithm.)
\begin{claim}
For all $j$, the cost $c(i_j)$ is at most $2 \opt/j$, where $\opt$
is the cost of an optimal solution to the given instance.
\end{claim}
\begin{proof}
Suppose by way of contradiction this were not true; since $s_{i_j}$
is the terminal with $j$th highest cost of connection, there must be
$j$ terminals that each pay more than $2 \opt/j$ to connect to the
tree that exists when they are considered. Let $S' = \{s_{i_1}, s_{i_2},
\ldots s_{i_j}\}$ denote this set of terminals.
We argue that no two terminals in $S' \cup \{s_1\}$ are within
distance $2 \opt/j$ of each other. If some pair $x,y$ were within
this distance, one of these terminals (say $y$) must be considered
later by the algorithm than the other. But then the cost of
connecting $y$ to the already existing tree (which includes $x$)
must be at most $2 \opt/j$, and we have a contradiction.
Therefore, the minimum distance between any two terminals in $S'
\cup \{s_1\}$ must be greater than $2 \opt /j$. Since there must be
$j$ edges in any MST of these terminals, an MST must have cost
greater than $2 \opt$. But the MST of a subset of terminals cannot
have cost more than $2 \opt$, exactly as argued in the proof of
Lemma~\ref{lem:spanningTree}. Therefore, we obtain a contradiction.
\end{proof}
Given this claim, it is easy to prove Theorem~\ref{thm:greedy}.
\[ \sum_{i=1}^{|S|} c(i) = \sum_{j=1}^{|S|} c(i_j) \le
\sum_{j=1}^{|S|} \frac{2 \opt}{j} = 2\opt \sum_{j=1}^{|S|}
\frac{1}{j} = 2H_{|S|} \cdot \opt. \]
\begin{note}{Note}
We emphasize again that this algorithm considers vertices in
\emph{any} order. A natural variant might be to adaptively order the
terminals so that in each iteration $i$ , the algorithm picks the
terminal $s_i$ to be the one closest to the already existing tree
$T$ built in the first $i$ iterations. Do you see that this is
equivalent to using the MST Heuristic with Prim's algorithm for MST?
\end{note}
\subsection*{Other Results on Steiner Trees}
The 2-approximation algorithm using the MST Heuristic is not the best
approximation algorithm for the {\sc Steiner Tree} problem currently
known. Some other results on this problem are listed below.
\begin{enumerate}
\item The first algorithm to obtain a ratio of better than 2 was due
to due to Alexander Zelikovsky \cite{Zelikovsky}; the approximation
ratio of this algorithm was $11/6 \approx 1.83$. Currently, the best
known approximation ratio in general graphs is $1 + \frac{\ln 3}{2}
\approx 1.55$; this is achieved by an algorithm of
\cite{RobinsZelikovsky} that combines the MST heuristic with Local
Search.
\item The \emph{bidirected cut} LP relaxation for the {\sc Steiner
Tree} was proposed by \cite{Edmonds}; it has an integrality gap of
at most $2(1-\frac{1}{|S|})$, but it is conjectured that the gap is
smaller. No algorithm is currently known that exploits this LP
relaxation to obtain an approximation ratio better than that of the
{\sc SteinerMST} algorithm. Though the true integrality gap is not
known, there are examples due to \cite{Goemans, KPT} that show it is
at least $8/7 \approx 1.14$.
\item For many applications, the vertices can be modeled as points on
the plane, where the distance between them is simply the Euclidean
distance. The MST-based algorithm performs fairly well on such
instances; it has an approximation ratio of $2/\sqrt{3} \approx
1.15$ \cite{DuHwang}. One can do better still for instances in the
plane (or in any Euclidean space of small-dimensions); for any
$\eps > 0$, there is a $1+\eps$-approximation algorithm that runs in
polynomial time \cite{Arora}.
\end{enumerate}
\bibliographystyle{plain}
%% To add references, uncomment the following two lines and
%% add the relevant bibitems.
\begin{thebibliography}{99}
\bibitem{Arora}
S. Arora.
\newblock Polynomial-time Approximation Schemes for Euclidean TSP and
other Geometric Problems.
\newblock {\em J. of the ACM} 45(5): 753--782, 1998.
\bibitem{LowerBound}
M. Bern and P. Plassmann.
\newblock The Steiner problems with edge lengths 1 and 2.
\newblock {\em Information Processing Letters} 32, 171--176, 1989.
\bibitem{ChlebikC}
M. Chlebik and J. Chlebikova.
\newblock Approximation Hardness of the Steiner Tree Problem on
Graphs.
\newblock {\em Proc. 8th Scandinavian Workshop on Algorithm Theory},
Springer-Verlag, 170--179, 2002.
\bibitem{DuHwang}
D. Z. Du and F. K. Hwang.
\newblock A proof of Gilbert-Pollak's conjecture on the Steiner
ratio.
\newblock {\em Algorithmica}, 7: 121--135, 1992.
\bibitem{Edmonds}
J. Edmonds.
\newblock Optimum branchings.
\newblock {\em J. of Research of the National Bureau of
Standards, Section B}, 71:233--240, 1967.
\bibitem{Goemans}
M. Goemans.
\newblock Unpublished Manuscript, 1996.
\bibitem{Greedy}
M. Imaze and B.M. Waxman.
\newblock Dynamic Steiner tree problem.
\newblock {\em SIAM J. on Discrete Math.}, 4(3): 369--184, 1991.
\bibitem{KPT}
J. Konemann, D. Pritchard, and K. Tan.
\newblock A partition based relaxation for Steiner trees.
\newblock Manuscript, 2007. {\tt arXiv:0712.3568},
\url{http://arxiv.org/abs/0712.3568v1}
\bibitem{RobinsZelikovsky}
G. Robins and A. Zelikovsky.
\newblock Tighter Bounds for Graph Steiner Tree Approximation.
\newblock {\em SIAM J. on Discrete Math.}, 19(1): 122--134, 2005.
\bibitem{MST2}
J. Takahashi and A. Matsuyama.
\newblock An approximate solution for the Steiner problem in graphs.
\newblock {\em Math. Jap.}, 24: 573--577, 1980.
\bibitem{Zelikovsky}
A. Zelikovsky.
\newblock An $11/6$-approximation algorithm for the network Steiner
problem.
\newblock {\em Algorithmica}, 9: 463--470, 1993.
\end{thebibliography}
\end{document}