%\documentclass[handout]{beamer}
\documentclass{beamer}
%%\mode{
  %\usetheme{Stockton}%{Hannover}
% \usetheme{Singapore}
 \usetheme{CambridgeUS}
%%  \usetheme[department=winuk]{tue}
% \usecolortheme{rose}
% \usefonttheme{professionalfonts}
% %\useinnertheme[shadow]{rounded}
%% \useoutertheme{shadow}
% \setbeamercovered{dynamic}
%%}
%\usetheme{Farshi}
%\usecolortheme{Farshi2}
 \usefonttheme{professionalfonts}
 %\useinnertheme[shadow]{rounded}
% \useoutertheme{shadow}
 \setbeamercovered{dynamic}
%}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amsfonts,amstext}
%\usepackage{algorithm2e}  %[slide]
%\usepackage[algosection,lined,ruled,linesnumbered]{algorithm2e}
%\usepackage{algorithm2e}
\usepackage[named]{algo}
\usepackage{amsmath}
\graphicspath{{./Fig/}}
\newcommand{\Reals}{{\mathbb{R}}}            % real numbers
\def\OO{{\cal O}}
\def\B{{\cal B}}
\newcommand{\C}{\ensuremath{\mathcal{C}}}
\newcommand{\D}{\ensuremath{\mathcal{D}}}
\newcommand{\F}{\ensuremath{\mathcal{F}}}
\newcommand{\G}{\ensuremath{\mathcal{G}}}
\newcommand{\T}{\ensuremath{\mathcal{T}}}
\newcommand{\PP}{P }%{\ensuremath{\mathcal{P}}\xspace}
\newcommand{\myS}{\ensuremath{\mathcal{S}}\xspace}
%\newcommand{\SS}{\ensuremath{\mathcal{S}}}
\newcommand{\Q}{\ensuremath{\mathcal{Q}}\xspace}
\newcommand{\tree}{\ensuremath{\mathcal{T}}}
\newcommand{\myH}{\ensuremath{\mathcal{H}}}
\newcommand{\Htwo}{\ensuremath{\mathcal{HH}}}
\newcommand{\graph}{G}
\DeclareMathOperator{\compl}{c}
%\newcommand{\cgraph}[1]{\graph_{\compl}(#1)}   % complete graph
\newcommand{\cgraph}[1]{\graph_{\compl}}   % complete graph
\newcommand{\cgr}{\cgraph{\pointset}}
\newcommand{\mymin}{\setminus}
\newcommand{\mystrut}{\raisebox{-4pt}{\rule{0pt}{16pt}}}
\newcommand{\cft}{$\C$-fault tolerant\xspace}
\newcommand{\fft}{$\F$-fault tolerant\xspace}
\newcommand{\hft}{$\myH$-fault tolerant\xspace}
\newcommand{\hhft}{$\Htwo$-fault tolerant\xspace}
\newcommand{\dft}{$\D$-fault tolerant\xspace}
\newcommand{\gft}{geodesic fault tolerant\xspace}
\DeclareMathOperator{\CH}{{\cal CH}}
\DeclareMathOperator{\TSP}{TSP}
\DeclareMathOperator{\MST}{MST}
\newcommand{\ch}[1]{\CH(#1)}                     % convex hull
\newcommand{\triang}{T}
\newcommand{\myminus}{\ominus}
\newcommand{\GminusFault}[2]{#1{\myminus}#2}
\newcommand{\quadtree}{quadtree\xspace}
\newcommand{\qtree}{\tree}
\newcommand{\cqtree}{\tree^*}
\newcommand{\curve}[1]{\stackrel{\frown}{#1}}
\newcommand{\mynode}{\nu}                      % node
\DeclareMathOperator{\Findpairs}{\mbox{\sc Findpairs}}
\newcommand{\regionof}[1]{{\cal R}(#1)}
\def\dist{\mathbf{d}}
\def\lpar{{par_l}}
\def\parent{{par}}
\def\AFT{AFT}
\def\pointset{V}
\def\edgeset{E}
\def\faultarea{{F}}
\def\region{{R}}
\def\asp{asp}
\def\aspnot{{\alpha}}
\newcommand{\kd}{\mathord{\it kd}}
\def\levelset{{\myS}}
\def\EXP{{\mbox{E}}}
\def\Pr{{\mbox{Pr}}}
\def\t{{(1+\eps)}}
\def\tcondition{{\eps>0}}
\def\path{\Pi}
\DeclareMathOperator{\area}{area}
\DeclareMathOperator{\diam}{diam}
\DeclareMathOperator{\radius}{radius}
%\DeclareMathOperator{\dist}{dist}
\newcommand{\etal}{{\emph{et al.}\xspace}}
\usepackage{graphicx, fleqn, tabularx, wrapfig,color}
\usepackage[english]{babel}
%\usepackage{Arial}
\hypersetup{
  pdfauthor={M. Farshi},
  pdftitle={Computational Geometry Course},
  pdfsubject={1390-1391},
  pdfkeywords={Computational Geometry},
  pdfpagemode={FullScreen}
}
\definecolor{BrickRed}{rgb}{0.85,0,0}
\newcommand{\eps}{\varepsilon}
\newcommand{\onepluseps}{(1+\eps)}
\newenvironment{descrsf}[1]
  {\begin{list}{}{\renewcommand{\makelabel}[1]{\textsf{##1}\hfil}
                  \setlength{\itemsep}{0.5em}
                  \setlength{\parsep}{0pt}
                  \settowidth{\labelwidth}{\textsf{#1}}
                  \setlength{\labelsep}{10pt}
                  \setlength{\leftmargin}{\labelwidth}
                  \addtolength{\leftmargin}{\labelsep}
                 }
  }
  {\end{list}}

%\renewcommand{\descriptionlabel}[1]%
%   {\hspace{\labelsep}\textsf{#1}}
%\setbeamertemplate{footline}[page number]
\setbeamertemplate{footline}[frame number]
\setbeamertemplate{navigation symbols}[vertical]{}
\begin{document}
%\pagestyle{plain}
%\insertpagenumber
%\pagenumbering
%\title[\insertlogo\\ Yazd Univ.\\ \vspace*{5mm} Computational Geometry]{Computational Geometry \\ (Master Course)}
%\author[]{Mohammad Farshi}
%\institute[CS Dept. \\ Yazd -U.]{Department of Computer Science,\\ Yazd University}
\date{\small  1390-2\\[0.5cm]}
\title[\insertlogo\\ Yazd Univ.\\  \vspace*{5mm} Computational Geometry]{Polygon Triangulation}
%Doubly Connected Edge List (DCEL)}
%\logo{\includegraphics[height=17mm]{YU-LOGO-Trans.png}}%{YU-Logo}}%{logo_yazduni.pdf}}
\logo{\includegraphics[height=17mm]{YU-Logo-Ipe-6-Trans.png}}%{YU-Logo}}%{logo_yazduni.pdf}}
%\logo{\includegraphics[height=17mm]{YU-Logo}}%{logo_yazduni.pdf}}
%%%%%%%%%%%m%%%%%%%%%%%%%%%%%%%5
%\section{Doubly Connected Edge List (DCEL)}
%\subsection }
\begin{frame}
 \titlepage
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\section{The Art Gallery Problem}
\begin{frame}[t]{Motivation:}{ The Art Gallery Problem}
\begin{center}
\includegraphics<1>[width=\textwidth]{Art-Gallery-small}
\includegraphics<2>[width=\textwidth]{Plan-camera}
\includegraphics<3>[width=0.9\textwidth]{Camera-visibility}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Triangulating Polygons}{Definitions}
\begin{itemize}
\item Simple polygon: Regions enclosed by a single closed
polygonal chain that does not intersect itself. \pause
\item Question: How many cameras do we need to guard a simple polygon?

    Answer: Depends on the polygon.\pause
\item One solution: Decompose the polygon to parts which are simple to guard.
\end{itemize}
\begin{center}
\includegraphics<1>[width=0.8\textwidth]{Polygons}
\includegraphics<2>[width=0.7\textwidth]{Convex-poly}
\includegraphics<3>[width=\textwidth]{Comp-poly}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Triangulating Polygons}{Definitions}
\begin{itemize}
\item diagonals:\pause
\item Triangulation: A decomposition of a polygon into triangles by a maximal set of non-intersecting diagonals.
%\item One solution: Decompose the polygon to parts which are simple to guard.
\end{itemize}
\begin{center}
\includegraphics<1>[width=0.8\textwidth]{diagonal}
\includegraphics<2>[width=0.85\textwidth]{polygon-triang-1}
\includegraphics<3>[width=0.85\textwidth]{polygon-triang-2}
\includegraphics<4>[width=0.85\textwidth]{polygon-triang-3}
%\includegraphics<3>[width=\textwidth]{Comp-poly}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Guarding and Triangulations}
\begin{frame}[t]{Triangulating Polygons}{Definitions}
\begin{itemize}
\item Guarding after triangulation:\pause
%\item Triangulation: A decomposition of a polygon into triangles by a maximal set of non-intersecting diagonals.
%\item One solution: Decompose the polygon to parts which are simple to guard.
\end{itemize}
\begin{center}
%\includegraphics<1>[width=0.8\textwidth]{diagonal}
\includegraphics<2>[width=0.85\textwidth]{polygon-guarding}
\includegraphics<3>[width=0.85\textwidth]{polygon-guarding-2}
\includegraphics<4>[width=0.85\textwidth]{polygon-guarding-3}
\includegraphics<5>[width=0.85\textwidth]{polygon-guarding-4}
%\includegraphics<3>[width=\textwidth]{Comp-poly}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{}
\begin{block}{Questions:}
\begin{itemize}
\item Does a triangulation always
exist?
\item How many triangles can there be in a triangulation?
\end{itemize}
\end{block}
\pause
\begin{block}{Theorem 3.1}
Every simple polygon admits a triangulation, and any triangulation
of a simple polygon with $n$ vertices consists of exactly $n-2$ triangles.

{\bf Proof.} By induction.
\end{block}
\includegraphics<3>[width=\textwidth]{thm31}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Guarding a triangulated polygon}
\begin{itemize}
\item $\T_P$: A triangulation of a simple polygon $P$. \pause
\item Select $S\subseteq $ the vertices of $P$, such
that any triangle in $\T_P$ has at least one vertex in $S$, and place the cameras at vertices in $S$.\pause
\item To find such a subset: find a $3$-coloring of a
triangulated polygon.\pause
\item In a 3-coloring of $\T_P$, every triangle
has a blue, a red, and a black vertex. Hence, if we place cameras at all red
vertices, we have guarded the whole polygon. \pause
\item By choosing the smallest
color class to place the cameras, we can guard $P$ using at most $\lfloor n/3\rfloor$
 cameras.
\end{itemize}
\vspace*{-3cm}

\begin{center}
\includegraphics<3>[width=0.7\textwidth]{3coloring}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Does a $3$-coloring always exist?}
\vspace*{-5mm}

\begin{block}{Dual graph:}
\begin{itemize}
\item This graph $\G(\T_P)$ has a node for every
triangle in $\T_P$.
\item There is an arc between two nodes $\nu$ and $\mu$ if $t(\nu)$ and $t(\mu)$ share a diagonal.
\item $\G(\T_P)$ is a tree.
\end{itemize}
\end{block}
\begin{center}
\includegraphics<1>[width=0.7\textwidth]{dual-graph}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Does a $3$-coloring always exist?}
\vspace*{-5mm}

\begin{block}{For $3$-coloring:}
\begin{itemize}
\item Traverse the dual graph (DFS).
\item Invariant: so far everything is nice. %all vertices of the already encountered
%triangles have been colored, and no two connected vertices
%have received the same color.
\item Start from any node of $\G(\T_P)$; color the vertices.% of the corresponding triangle.
\item  When we reach a node
 $\nu$ in $\G$, coming from node $\mu$. Only one vertex of $t(\nu)$ remains to be colored.
\end{itemize}
\end{block}
\begin{center}
\includegraphics<1>[width=0.7\textwidth]{dual-graph}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Art Gallery Theorem}
\begin{block}{Theorem 3.2 (Art Gallery Theorem)}
For a simple polygon with $n$ vertices,
$\lfloor n/3\rfloor$ cameras are occasionally necessary and always sufficient to have every
point in the polygon visible from at least one of the cameras.
\end{block}
\begin{center}
\includegraphics<1>[width=0.7\textwidth]{prongs}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Art Gallery Theorem}
\begin{block}{We will show:}
How to compute a triangulation in $\OO(n\log n)$ time.
\end{block}

Therefore:

\begin{block}{Theorem 3.3}
 Let $P$ be a simple polygon with $n$ vertices. A set of $\lfloor n/3\rfloor$  camera positions in $P$ such that any point inside $P$ is visible from at least one of the cameras can be computed in $\OO(n\log n)$ time.
\end{block}
%\begin{center}
%\includegraphics<1>[width=0.7\textwidth]{prongs}
%\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\section{Computing triangulation}
\subsection{Partitioning a Polygon into Monotone Pieces}
\begin{frame}{}
\begin{block}{}
\centerline{How can we compute a triangulation of a given polygon?}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{}
\begin{block}{Triangulation algorithms}
\begin{itemize}
\item A really naive algorithm: check all
$n\choose 2$ choices for a diagonal, each takes  $\OO(n)$
time. Time complexity: $\OO(n^3)$.%Repeat this $n- 1$ times.
\item A better naive algorithm: find an
ear in $\OO(n)$ time, then recurse. Total time:  $\OO(n^2)$.
\item First non-trivial algorithm: $\OO(n \log n)$ (1978).
\item  A long series of papers and algorithms in
80s until Chazelle produced an optimal
$\OO(n)$ algorithm in 1991.
\item  Linear time algorithm insanely complicated; there are randomized, expected linear time that are more accessible.
\item Here we present a $\OO(n \log n)$ algorithm.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Algorithm Outline}
\begin{block}{Algorithm Outline}
\begin{enumerate}
\item  Partition polygon into monotone polygons.
%\item  Convert trapezoids into monotone
%subdivision.
\item  Triangulate each monotone piece.
\end{enumerate}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Monotone polygon}
\begin{block}{$\ell$-monotone polygon}
$P$ is called monotone w. r. t. $\ell$ if $\forall \ell'$ perpendicular to $\ell$ the intersection of $P$ with $\ell$ is connected (a line segment, a point, or empty).
\end{block}
\begin{center}
\includegraphics<2>[width=0.5\textwidth]{y-monotone}
\includegraphics<3>[width=0.5\textwidth]{y-monotone-prime}
\includegraphics<4>[width=0.5\textwidth]{y-monotone-2}
\includegraphics<5>[width=0.5\textwidth]{y-monotone-2-prime}
\includegraphics<6>[width=0.5\textwidth]{not-monotone}
\includegraphics<7>[width=0.5\textwidth]{not-monotone-prime}
\end{center}
\begin{block}<8>{Definition:}
\begin{itemize}
\item A point $p$ is \textcolor{red}{below} another point $q$ if $p_y < q_y$ or $p_y = q_y$ and $p_x > q_x$.
\item   $p$ is \textcolor{red}{above} $q$ if $p_y > q_y$ or
$p_y = q_y$ and $p_x < q_x$.
\end{itemize}
\end{block}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Partition $P$ into monotone pieces}
\begin{center}
\includegraphics<1>[width=\textwidth]{5-type}
%\includegraphics<3>[width=0.5\textwidth]{y-monotone-2}
%\includegraphics<4>[width=0.5\textwidth]{not-monotone}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Partition $\mathcal{P}$ into monotone pieces}
\begin{block}{Lemma 3.4}
 $P$ is $y$-monotone if it has no split or merge vertices.
\end{block}
{\bf Proof.} Assume $\mathcal{P}$ is not $y$-monotone.
\begin{center}
\includegraphics<2->[width=\textwidth]{lemma34}
%\includegraphics<3>[width=0.5\textwidth]{y-monotone-2}
%\includegraphics<4>[width=0.5\textwidth]{not-monotone}
\end{center}

\begin{block}<3>{}
$P$ has been partitioned into $y$-monotone pieces once
we get rid of its split and merge vertices.
\end{block}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Removing split/merge vertices:}
\vspace*{-0.5cm}

\begin{block}{Removing split vertices:}
\begin{itemize}
\item A sweep line algorithm. Events: all the points \pause
\item Goal: To add diagonals from each split vertex to a vertex
lying above it. \pause
\item $helper(e_j)$: The lowest vertex above the sweep line such that the horizontal segment connecting the vertex to $e_j$ lies inside $P$.
\end{itemize}
\end{block}
\begin{center}
\includegraphics<3->[width=0.5\textwidth]{split-vertices}
%\includegraphics<3>[width=0.5\textwidth]{y-monotone-2}
%\includegraphics<4>[width=0.5\textwidth]{not-monotone}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Removing split/merge vertices:}
\vspace*{-0.5cm}

\begin{block}{Removing merge vertices:}
\begin{itemize}
\item Connect each merge vertex to the highest vertex below the sweep line in between $e_j$ and $e_k$.\pause
\item But we do not know the point. \pause
\item When we reach a vertex $v_m$ that replaces the helper of $e_j$, then this is the vertex we are looking for.
\end{itemize}
\end{block}
\begin{center}
\includegraphics<3->[width=0.6\textwidth]{merge-vertices}
%\includegraphics<3>[width=0.5\textwidth]{y-monotone-2}
%\includegraphics<4>[width=0.5\textwidth]{not-monotone}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Data Structure:}
For this approach, we need to find the edge to the left of each vertex. To do that:
\begin{block}{}
\begin{enumerate}
\item We store the edges of $P$ intersecting the sweep line in the leaves of a dynamic binary search tree $\T$.\pause
\item Because we are only interested in edges to the left of split and merge vertices we only need to store edges in $\T$ that have the interior of $P$ to their right.\pause
\item With each edge in $\T$ we store its helper.\pause
\item We store $P$ in DCEL form and make changes such that it remains valid.
\end{enumerate}

\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Make Monotone Algorithm:}
\vspace*{-5mm}

\begin{algorithm}{{\sc MakeMonotone}(\PP)}{\label{alg:MakeMonotone}
\qinput{A simple polygon \PP\ stored in a DCEL %doubly-connected edge list 
\D.}
\qoutput{A partitioning of \PP into monotone subpolygons, stored in \D.} }
Construct a priority queue \Q on the vertices of \PP, using their $y$-coordinates as priority.
If two points have the same $y$-coordinate, the one with smaller $x$-coordinate has higher
priority.\\
Initialize an empty binary search tree \T.\\
\qwhile \Q is not empty\\
Remove the vertex $v_i$ with the highest priority from \Q.\\
Call the appropriate procedure to handle the vertex, depending on its type.
 \qelihw 
%\qreturn $G'=(V,E\cup \{e\})$.
\end{algorithm}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Make Monotone Algorithm:}
\vspace*{-5mm}

\begin{algorithm}{{\sc HandleStartVertex}($v_i$)}{\label{alg:Handle-Start}}
%\qinput{A simple polygon \PP stored in a doubly-connected edge list \D.}
%\qoutput{A partitioning of \PP into monotone subpolygons, stored in \D.} }
Insert $e_i$ in \T\ and set $helper(e_i)$ to $v_i$.
%\qreturn $G'=(V,E\cup \{e\})$.
\end{algorithm}
\begin{center}
\includegraphics[width=0.5\textwidth]{MakeMonotone-Exmple}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Make Monotone Algorithm:}
\vspace*{-5mm}

\begin{algorithm}{{\sc HandleEndVertex}($v_i$)}{\label{alg:Handle-End}}
%\qinput{A simple polygon \PP stored in a doubly-connected edge list \D.}
%\qoutput{A partitioning of \PP into monotone subpolygons, stored in \D.} }
%Insert ei in \T and set $helper(e_i)$ to $v_i$.
\qif $helper(e_{i-1})$ is a merge vertex\\
 \qthen Insert the diagonal connecting $v_i$ to $helper(e_{i-1})$ in \D.
\qfi \\
 Delete $e_{i-1}$ from \T.
 %\qreturn $G'=(V,E\cup \{e\})$.
\end{algorithm}
\vspace*{-5mm}

\begin{flushright}
\includegraphics[width=0.5\textwidth]{MakeMonotone-Exmple}
\end{flushright}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Make Monotone Algorithm:}
\vspace*{-3mm}

\begin{algorithm}{{\sc HandleSplitVertex}($v_i$)}{\label{alg:Handle-Split}}
%\qinput{A simple polygon \PP stored in a doubly-connected edge list \D.}
%\qoutput{A partitioning of \PP into monotone subpolygons, stored in \D.} }
%Insert ei in \T and set $helper(e_i)$ to $v_i$.
 Search in \T\ to find the edge $e_j$ directly left of $v_i$.\\
Insert the diagonal connecting $v_i$ to $helper(e_j)$ in \D.\\
 $helper(e_j)\leftarrow v_i$.\\
Insert $e_i$ in \T\ and set $helper(e_i)$ to $v_i$.
 %\qreturn $G'=(V,E\cup \{e\})$.
\end{algorithm}
\vspace*{-3mm}

\begin{flushright}
\includegraphics[width=0.45\textwidth]{MakeMonotone-Exmple}
\end{flushright}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Make Monotone Algorithm:}
\vspace*{-5mm}

{\footnotesize
\begin{algorithm}{{\sc HandleMergeVertex}($v_i$)}{\label{alg:Handle-Merge}}
%\qinput{A simple polygon \PP stored in a doubly-connected edge list \D.}
%\qoutput{A partitioning of \PP into monotone subpolygons, stored in \D.} }
\qif $helper(e_{i-1})$ is a merge vertex\\
\qthen Insert the diag. $v_i$ to $helper(e_{i-1})$ in \D.\qfi \\
Delete $e_{i-1}$ from \T.\\
Search in \T\  to find  $e_j$ directly left of $v_i$.\\
\qif $helper(e_j)$ is a merge vertex\\
\qthen Insert the diag. $v_i$ to $helper(e_j)$ in \D. \qfi \\
$helper(e_j)\leftarrow v_i$.
 %\qreturn $G'=(V,E\cup \{e\})$.
\end{algorithm}
}
\vspace*{-7mm}

\begin{flushright}
\includegraphics[width=0.45\textwidth]{MakeMonotone-Exmple}
\end{flushright}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Make Monotone Algorithm:}
\vspace*{-5mm}

{\footnotesize
\begin{algorithm}{{\sc HandleRegularVertex}($v_i$)}{\label{alg:Handle-Merge}}
%\qinput{A simple polygon \PP stored in a doubly-connected edge list \D.}
%\qoutput{A partitioning of \PP into monotone subpolygons, stored in \D.} }
\qif the interior of \PP lies to the right of $v_i$\\
\qthen \qif $helper(e_{i-1})$ is a merge vertex\\
\qthen Insert the diag. $v_i$ to $helper(e_{i-1})$ in \D. \qfi \\
Delete $e_{i-1}$ from \T.\\
Insert $e_i$ in \T\  and set $helper(e_i)$ to $v_i$.\\
\qelse Search in \T\  to find  $e_j$ directly left of $v_i$.\\
\qif $helper(e_j)$ is a merge vertex\\
\qthen Insert the diag. $v_i$ to $helper(e_j)$ in \D. \qfi \\
 $helper(e_j)\leftarrow v_i$ \qfi
 %\qreturn $G'=(V,E\cup \{e\})$.
\end{algorithm}
}
\vspace*{-7mm}

\begin{flushright}
\includegraphics[width=0.4\textwidth]{MakeMonotone-Exmple}
\end{flushright}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\begin{frame}[t]{Make Monotone Algorithm:}
%\vspace*{-5mm}
%
%\begin{center}
%\includegraphics<1>[width=1.2\textwidth]{MakeMonotone}
%\includegraphics<2>[width=\textwidth]{HandleStartVertex}
%\includegraphics<3>[width=\textwidth]{HandleEndVertex}
%\includegraphics<4>[width=\textwidth]{HandleSplitVertex}
%\includegraphics<5>[width=\textwidth]{HandleMergeVertex}
%\includegraphics<6>[width=\textwidth]{HandleRegularVertex}
%
%\includegraphics<2-3>[width=0.5\textwidth]{MakeMonotone-Exmple}
%\includegraphics<4-6>[width=0.4\textwidth]{MakeMonotone-Exmple}
%\end{center}
%
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{}
\begin{block}{Lemma 3.5}
 Algorithm {\sc MakeMonotone} adds a set of non-intersecting diagonals
that partitions $\PP$\ into monotone subpolygons.
\end{block}
{\bf Proof.} (For split vertices) (other cases are similar)
\begin{itemize}
\item No intersection between $v_iv_m$ and edges of $P$.\pause \pause\pause
\item No intersection between $v_iv_m$ and previous edges.
\end{itemize}
\begin{center}
\includegraphics<1>[width=0.6\textwidth]{lemma35}
\includegraphics<2>[width=0.6\textwidth]{lemma35-2}
\includegraphics<3>[width=0.6\textwidth]{lemma35-3}
\includegraphics<4>[width=0.6\textwidth]{lemma35}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Running time/ Space complexity}
\begin{block}<1->{Running time:}
\begin{itemize}
\item  Constructing the priority
queue $Q$: $\OO(n)$ time.
\item Initializing $\T$: $\OO(1)$ time.
\item To handle an event, we perform:
    \begin{enumerate}
        \item one operation on $Q$: $\OO(\log n)$ time.
        \item at most one query on $\T$: $\OO(\log n)$ time.
        \item one insertion, and one deletion on $\T$: $\OO(\log n)$ time.
        \item we insert at most two diagonals into $\D$: $\OO(1)$ time.
    \end{enumerate}
\end{itemize}
%
%The total time{  $\OO(n\log n)$ time.
\end{block}

\begin{block}<2>{Space Complexity:}
The amount of storage used by the algorithm is clearly linear: every vertex is stored at most once in $Q$, and every edge is stored at most once in $\T$.
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Monotone Decomposition:}
\begin{block}{Theorem 3.6}
 A simple polygon with $n$ vertices can be partitioned into $y$-monotone
polygons in $\OO(n\log n)$ time with an algorithm that uses $\OO(n)$ storage.
\end{block}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Triangulating a Monotone Polygon}
\begin{frame}{}
\centerline{Triangulating a Monotone Polygon}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Triangulating a Monotone Polygon}
\begin{block}{Triangulation Algorithm:}
\begin{enumerate}
\item The algorithm handles the vertices in order of decreasing $y$-coordinate. (Left to right for points with same $y$-coordinate). \pause
\item The algorithm requires a stack $\myS$ as auxiliary data structure. It keeps the points that handled but might need more diagonals.\pause
\item When we handle a vertex we add as many diagonals
from this vertex to vertices on the stack as possible.\pause
\item Algorithm invariant: the part of $P$ that still needs to be triangulated, and lies above the last vertex that
has been encountered so far,  looks like a funnel turned
upside down.
\end{enumerate}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Triangulating a Monotone Polygon}
\begin{center}
\includegraphics<1>[width=0.45\textwidth]{triang-monotone}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Triangulating a Monotone Polygon}%{Case1: $v_j$ and top od stack on different chains}
{Case~1: $v_j$ and top of stack on different chains}

\begin{center}
%\includegraphics<1>[width=0.45\textwidth]{triang-monotone}
\includegraphics<2>[width=0.8\textwidth]{triang-monotone-case1-1}
\includegraphics<3>[width=0.8\textwidth]{triang-monotone-case1-2}
\includegraphics<4>[width=0.8\textwidth]{triang-monotone-case1-3}
\includegraphics<5>[width=0.8\textwidth]{triang-monotone-case1-4}
\includegraphics<6>[width=0.8\textwidth]{triang-monotone-case1-5}
%\includegraphics<7>[width=\textwidth]{triang-monotone-case2}
%\includegraphics<4>[width=1.1\textwidth]{TriangulateMonotone}
%\includegraphics<3>[width=0.6\textwidth]{lemma35-3}
%\includegraphics<4>[width=0.6\textwidth]{lemma35}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Triangulating a Monotone Polygon}%{Case1: $v_j$ and top od stack on different chains}
{Case~2: $v_j$ and top of stack on same chain}

\begin{center}
\includegraphics<1>[width=0.7\textwidth]{triang-monotone-case2-1}
\includegraphics<2>[width=0.7\textwidth]{triang-monotone-case2-2}
%\includegraphics<4>[width=1.1\textwidth]{TriangulateMonotone}
%\includegraphics<3>[width=0.6\textwidth]{lemma35-3}
%\includegraphics<4>[width=0.6\textwidth]{lemma35}
\end{center}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Triangulating a Monotone Polygon}%{Triangulation Algorithm:}
\vspace*{-5mm}

{\footnotesize 
\begin{algorithm}{{\sc TriangulateMonotonePolygon}($P$)}{\label{alg:triang-mono}
\qinput{A strictly $y$-monotone polygon \PP\ stored in %a doubly-connected edge list 
\D.}
\qoutput{A triangulation of \PP\ stored in %the doubly-connected edge list
 \D.} }
Merge the vertices on the left chain and the vertices on the right chain 
of \PP\ into one sequence, sorted on decreasing $y$-coordinate. 
%If two vertices have the same $y$-coordinate,
%then the leftmost one comes first. 
Let $u_1,\ldots,u_n$ 
denote the sorted sequence.\\
Initialize an empty stack \myS, and push $u_1$ and $u_2$ onto it.\\
\qfor $j\leftarrow 3$ \qto $n-1$\\
	\qif $u_j$ and the vertex on top of \myS are on different chains\\
\qthen Pop all vertices from \myS.\\
Insert into \D\ a diagonal from $u_j$ to each popped vertex, 
except the last one.\\
Push $u_{j-1}$ and $u_j$ onto \myS.\\
\qelse Pop one vertex from \myS.\\
Pop the other vertices from \myS as long as the diagonals from 
$u_j$ to them are inside \PP. Insert these diagonals into \D. 
Push the last vertex that has been popped back onto \myS.\\
Push $u_j$ onto \myS.\qfi \qrof \\
Add diagonals from $u_n$ to all stack vertices except the first and the 
last one.
 %\qreturn $G'=(V,E\cup \{e\})$.
\end{algorithm}
}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Polygon Triangulation}
\vspace*{-5mm}

\begin{block}<1->{Theorem 3.8}
 A simple polygon with $n$ vertices can be triangulated in $\OO(n\log n)$
time with an algorithm that uses $O(n)$ storage.
\end{block}
\begin{block}<2->{Theorem 3.9}
 A planar subdivision with $n$ vertices in total can be triangulated
 in $\OO(n\log n)$ time with an algorithm that uses $\OO(n)$ storage.
\end{block}
\begin{center}
\includegraphics<2>[width=0.6\textwidth]{triang-subd}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{}
\centerline{\LARGE END.}
\end{frame}

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{}

\end{frame}















%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{}
\begin{block}{}
\begin{itemize}
\item We have solved the easiest case of the map overlay problem, where the two maps are networks represented as collections of line segments.
\item In general, maps have a more complicated structure: they are subdivisions of the plane into labeled regions.
\end{itemize}
\end{block}
\begin{center}
\includegraphics[width=0.8\textwidth]{Canada-map}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{}
\begin{block}{}
\begin{itemize}
\item Before we can give an algorithm for computing the overlay of two subdivisions, we must develop a suitable representation for a subdivision.
\item Storing a subdivision as a collection of line segments is not such a good idea.
\item Operations like reporting the boundary of a region would be rather complicated.
\item Add topological information: which segments bound a given region, which regions are adjacent, and so on.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{}
\begin{center}
\includegraphics<1>[width=0.8\textwidth]{face}
\includegraphics<2->[width=0.65\textwidth]{face-incident}
\end{center}
\begin{block}<1>{Complexity of a subdivision}
 \#faces+\#edges+\#vertices.
 \end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{}
\begin{block}{What kind of queries?}
\begin{itemize}
\item What is the face containing a given point? (TOO MUCH!)
\item Walking around the boundary of a given face,
\item Find the face from an adjacent one if we are given a common
edge,
\item Visit all the edges around a given vertex.
\end{itemize}
\end{block}

\begin{block}{}
The representation that we shall discuss supports these operations.
It is called the doubly-connected edge list (DCEL).
\end{block}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{DCEL}

\begin{block}{DCEL contains:}
\begin{itemize}
\item a record for each edge,
\item a record for each vertex,
\item a record for each face,
\item plus attribute information.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{}
\begin{center}
\includegraphics<1>[width=0.65\textwidth]{half-edge}
\includegraphics<2->[width=0.65\textwidth]{hole}
\end{center}
\begin{block}<3>{}
To be able to traverse the boundary of a face, we need to keep a pointer to a half-edge of any boundary component and isolated points.
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{DCEL}
%
\vspace*{-5mm}

\begin{block}{DCEL contains:}
\begin{itemize}
\item a record for each vertex, \pause
    \begin{enumerate}
        \item $Coordinates(v)$: the coordinates of $v$,
        \item $IncidentEdge(v)$: a pointer  to an arbitrary
half-edge that has $v$ as its origin.
    \end{enumerate}
\pause
\item a record for each face,\pause
    \begin{enumerate}
        \item $OuterComponent(f)$: to some
half-edge on its outer boundary (nil if unbounded),
        \item $InnerComponents(f)$:  a pointer to some half-edge on the boundary of the hole, for each hole.
    \end{enumerate}
\item a record for each half-edge $\overrightarrow{e}$, \pause
    \begin{enumerate}
        \item $Origin(\overrightarrow{e})$: a pointer to its origin,
        \item  $Twin(\overrightarrow{e})$ a pointer to its twin half-edge,
        \item $IncidentFace(\overrightarrow{e})$: a pointer  to
the face that it bounds.
        \item $Next(\overrightarrow{e})$ and $Prev(\overrightarrow{e})$: a pointer
to the next and previous edge on the boundary of $IncidentFace(\overrightarrow{e})$.
    \end{enumerate}
%
%\item plus attribute information.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{DCEL}
\begin{center}
\includegraphics[width=0.65\textwidth]{DCEL-records}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{DCEL:Example}
\vspace*{-5mm}

\begin{center}
\includegraphics[width=0.97\textwidth]{DCEL-exmp}
\end{center}
\end{frame}
\section{Computing the Overlay of Two Subdivisions}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Computing the Overlay of Two Subdivisions}
\begin{center}
\includegraphics[width=\textwidth]{Overlay-exmp}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Computing the Overlay of Two Subdivisions}
\begin{center}
\includegraphics[width=0.8\textwidth]{Overlay-sweep}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Computing the Overlay of Two Subdivisions}{Updating half-edges}
\begin{center}
\includegraphics[width=\textwidth]{Handle-events}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Computing the Overlay of Two Subdivisions}{Updating half-edges}
\begin{tabular}{cc}
\begin{minipage}[b]{0.6\textwidth}
\vspace*{-2cm}

\begin{block}{}
\begin{itemize}
\item $Next()$ pointers of the two new half-edges each copy the $Next()$ pointer of the old half-edge that is not its twin.
\item The half-edges to which these pointers point
must also update their $Prev()$ pointer and set it to the new half-edges.
\end{itemize}
\end{block}
\end{minipage}
&
%\begin{center}
\includegraphics[width=0.4\textwidth]{Handle-events-2}
%\end{center}
\end{tabular}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Computing the Overlay of Two Subdivisions}{Updating half-edges}
\begin{tabular}{cc}
\begin{minipage}[b]{0.6\textwidth}
%\vspace*{-2cm}

\begin{block}{}
\begin{itemize}
\item The half-edge for
$e'$ that has $v$ as its destination must be linked to the first half-edge, seen clockwise from $e'$, with $v$ as its origin. \pause
\item The half-edge for $e'$ with $v$ as its origin must be linked to the first counterclockwise half-edge with $v$ as its destination.\pause
\item The same for $e''$. \pause
\item Time complexity: $\OO(m)$ ($m$: degree of $v$).
\end{itemize}
\end{block}
\end{minipage}
&
%\begin{center}
\includegraphics[width=0.4\textwidth]{Handle-events-3}
%\end{center}
\end{tabular}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Computing the Overlay of Two Subdivisions}{Updating faces}
\begin{block}{}
\begin{itemize}
\item  $\#$ faces= $\#$ outer boundaries +1 (unbounded face).\pause
\item From half-edges we can construct the boundaries.\pause
\item To determine weather the boundary is outer boundary or boundary of a hole:
\end{itemize}
\end{block}
\begin{center}
\includegraphics[width=0.6\textwidth]{Outer-or-hole}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Computing the Overlay of Two Subdivisions}{Updating faces}
\begin{block}{Which boundary cycles bound the same face?}
\begin{itemize}
\item Construct a graph \G. \pause
\item Every boundary cycle is a node in \G. \pause
\item One node for the imaginary outer boundary of the unbounded
face. \pause
\item Add an arc between two cycles if and only if one of the cycles is the boundary of a hole and the other cycle has a half-edge immediately to the left of the leftmost vertex of that hole cycle. \pause
\item    If there is no half-edge to the left of the
leftmost vertex of a cycle, then the node representing the cycle is linked to the node of the unbounded face.
\end{itemize}
\end{block}
%\begin{center}
%\includegraphics[width=0.6\textwidth]{Outer-or-hole}
%\end{center}
%
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Computing the Overlay of Two Subdivisions}{Updating faces}
\vspace*{-1cm}

\begin{center}
\includegraphics[width=0.9\textwidth]{graph}
\end{center}
%
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Computing the Overlay of Two Subdivisions}{Updating faces}
\begin{block}{Lemma 2.5} Each connected component of the graph \G \ corresponds exactly to
the set of cycles incident to one face.
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Computing the Overlay of Two Subdivisions}{Computing \G}
\begin{center}
\includegraphics[width=0.5\textwidth]{computing-G}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Computing the Overlay of Two Subdivisions}
\begin{block}{Theorem 2.6} Let $S_1$ be a planar subdivision of complexity $n_1$, let $S_2$ be a
subdivision of complexity $n_2$, and let $n := n_1 +n_2$. The overlay of $S_1$ and $S_2$
can be constructed in $\OO(n\log n+k \log n)$ time, where $k$ is the complexity of the overlay.
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Application:Boolean Operations}
\begin{center}
\includegraphics[width=\textwidth]{Boolean}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{}

\centerline{END.}
\end{frame}

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{}

\end{frame}




















%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Problem}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Problem}
\begin{block}{Line segment intersection problem:}
Given two sets of line segments, compute all intersections between a segment from one set and a segment from the other.
\end{block}
$\star$ We consider the segments to be closed.
\pause
\begin{block}{Simplified version:}
\begin{minipage}[b]{0.65\textwidth}
\vspace*{-2cm}

Given a set $S$ of $n$ closed segments in the plane, report
all intersection points among the segments in~$S$.
\end{minipage}
%\begin{center}
\includegraphics[height=30mm]{LSI-exm}
%\end{center}

\end{block}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{1st algorithm}
\begin{itemize}
\item The brute-force algorithm clearly requires $\OO(n^2)$ time. \pause
\item In a sense this is optimal: when each pair of segments intersects any algorithm must take $\Omega(n^2)$ time, because it has to report all intersections.
\end{itemize}
\begin{center}
\includegraphics<2>[width=0.5\textwidth]{lower-bound}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Output sensitive algorithm}
\begin{block}{Definition:}
An algorithm whose running time depends not only on the number of segments in the input, but also on the number of intersection points.
\end{block}
\begin{block}<2>{In our case:}
We want an algorithm that runs faster when the number of intersections is sub-quadratic.
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Plane sweep algorithm}
%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}

\begin{block}{$y$-intervals}
\begin{minipage}[b]{0.7\textwidth}
\begin{itemize}
\item Define the $y$-interval of a segment to be its orthogonal projection onto the $y$-axis.
\item When the $y$-intervals of a pair of segments do not overlap then they cannot intersect.
\item To find segments whose y-intervals overlap we use a {\bf Plane sweep algorithm}.
\end{itemize}
\end{minipage}
%\begin{center}
\includegraphics[height=30mm]{y-intervals}
%\end{center}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{block}{Plane sweep algorithm}
%\begin{minipage}[b]{0.7\textwidth}
\begin{itemize}
\item We imagine sweeping a line $\ell$ downwards over the plane, starting from a position above all segments. \pause
\item While we sweep the imaginary line, we keep track of all segments
intersecting it so that we can find the pairs we need.
%\item
%\item
\end{itemize}
\end{block}
%\end{minipage}
\begin{center}
\includegraphics<1>[height=45mm]{Sweep-line-1}
\includegraphics<2>[height=45mm]{Sweep-line-2}
\end{center}

\end{frame}
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{block}{when the sweep line reaches an event point:}
\begin{itemize}
\item If the event point is the upper endpoint of a segment, then a new segment starts intersecting the sweep line and must be added to the status.
\item If the event point is a lower endpoint, a segment stops intersecting the sweep line and must be deleted from the status.
\item If the algorithm test pairs of segments for which
there is a horizontal line that intersects both segments. (still quadratic).
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{block}{New algorithm:}
\begin{itemize}
\item Order the segments from left to right as they intersect the sweep line. \pause
\item Test adjacent segments in the horizontal ordering for intersection. \pause
\item To maintain the sorted list, we need to take care of new event points.
\end{itemize}
\end{block}
\begin{center}
\includegraphics<3>[height=40mm]{New-event-points}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{block}{Do we still find all intersections?}
{\bf Lemma 2.1} Let $s_i$ and $s_j$ be two non-horizontal segments whose
interiors intersect in a single point $p$, and assume there is no third
segment passing through $p$. Then there is an event point above $p$ where
$s_i$ and $s_j$ become adjacent and are tested for intersection.
%\begin{itemize}
%
%\end{itemize}
\end{block}
\begin{center}
\includegraphics<2>[height=40mm]{lemma21}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{block}{Handling event points:}
The event point is the upper endpoint of a segment:
\begin{itemize}
\item Insert the new segment in the sorted list.
\item Check for intersection between the new segment and the segment before and after it in the sorted list.
\end{itemize}
\end{block}
\begin{center}
\includegraphics<2>[height=45mm]{event-point-upper}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{block}{Handling event points:}
The event point is an intersection:
\begin{itemize}
\item Change the order of intersected segments in the sorted list.
\item For each intersected segment, check for intersection between  the segment and the new neighbor in the  sorted list.
\end{itemize}
\end{block}
\begin{center}
\includegraphics<2>[height=40mm]{event-point-inter}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{block}{Handling event points:}
The event point is a lower endpoint:
\begin{itemize}
\item Remove the segments from the sorted list.
\item  check for intersection between  the neighboring segments.
\end{itemize}
\end{block}
\begin{center}
\includegraphics<2>[height=45mm]{event-point-lower}
\end{center}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{block}{A data structure for handling event:}
We need an event queue  \Q such that:
\begin{enumerate}
\item find and removes the next event that will occur from~\Q. If two event points have the same $y$-coordinate, then the one with smaller $x$-coordinate will be returned. \pause
\item Insert an event point in \Q. An insertion must be able to check whether an event is already present in \Q.
\end{enumerate}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{block}{Implementation of the event queue:}
\begin{enumerate}
\item Define an order $\prec$ on event points:  $p \prec q$ if and only if $p_y > q_y$ holds or $p_y = q_y$ and $p_x < q_x$ holds. \pause
\item We store the event points in a balanced binary search tree,
ordered according to $\prec$. \pause
\item Fetching the next event and inserting  an event  and
testing whether a given event is already present in \Q take $\OO(\log m)$ time, where $m$ is the number of events in~\Q.
\end{enumerate}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{block}{To maintain the sorted list of segments (status of the algorithm): }
\begin{enumerate}
\item The status structure must be dynamic:  segments must be inserted into or deleted from the structure.\pause
\item We use a balanced binary search tree as status structure. \pause
\item At each internal node, we store the segment
from the rightmost leaf in its left subtree.
\end{enumerate}
\end{block}
\vspace*{-5mm}

\begin{center}
\includegraphics<2->[width=1.1\textwidth]{status-structure}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{block}{To search in {$\mathcal{T}$} for the
segment immediately to the left of some point $p$: }
\begin{enumerate}
\item Traverse the tree until you meet a leaf.
\item This leaf, or the leaf immediately to the left
of it, stores the segment we are searching for.
\item Therefore each update and neighbor search operation takes $\OO(\log n)$ time.
\end{enumerate}
\end{block}
\vspace*{-5mm}

\begin{center}
\includegraphics<2->[width=1.1\textwidth]{status-structure}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Plane sweep algorithm}
\vspace*{-5mm}

\begin{center}
\includegraphics[width=1.2\textwidth]{FindIntersection}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{center}
\includegraphics[width=1.1\textwidth]{HandleEvents}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{center}
\includegraphics[width=1.1\textwidth]{FindNewEvent}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{center}
\includegraphics[width=1.1\textwidth]{HandleEvents-exmp}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{block}{Lemma 2.2} Algorithm {\sc FindIntersections} computes all intersection points and the segments that contain it correctly.
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{block}{Lemma 2.3}
 The running time of Algorithm {\sc FindIntersections} for a set $S$
of $n$ line segments in the plane is $\OO(n\log n+I \log n)$, where $I$ is the number of intersection points of segments in~$S$.
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Plane sweep algorithm}
\vspace*{-5mm}

\begin{block}{Theorem 2.4}
Let $S$ be a set of $n$ line segments in the plane. All intersection
points in $S$, with for each intersection point the segments involved in it, can be reported in $\OO(n\log n+I \log n)$ time and $\OO(n)$ space, where $I$ is the number of intersection points.
\end{block}
\end{frame}
\begin{frame}{}
%The Doubly-Connected Edge List

\centerline{THE END.}
\end{frame}

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{}

\end{frame}







































\begin{frame}[t]{Convex Set}
\begin{block}{Definition:}
A subset $S$ of the plane is called convex if and only if for any pair of points $p,q\in S$, the line segment $\overline{pq}$ is completely contained in~$S$.
\end{block}
\begin{center}
\includegraphics<2>[height=25mm]{convex}
\end{center}

\begin{block}<3->{Convex Hull:}
 The convex hull $\CH(S)$ of a set $S$ is the smallest convex set that contains~$S$. To be more precise,
 it is the intersection of all convex sets that contain~$S$.
 \end{block}
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[t]{Computing CH:}
\begin{block}{Observation:}
It is the unique convex polygon
whose vertices are points from $P$ and that contains all points of $P$.
\end{block}
\begin{center}
\includegraphics<2>[height=35mm]{rubber-ban}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Computing CH:}
\begin{block}{Problem:}
given a set $P = \{p_1, p_2, \ldots , p_n\}$ of points in the plane, compute a list that contains those
points from $P$ that are the vertices of $\CH(P)$, listed in clockwise order.
\end{block}
\begin{center}
\includegraphics<2>[width=\textwidth]{convex-hull-in-out}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Geometry of problem}
\begin{frame}[t]{Geometry of the problem}
\begin{block}{Property:}
If we direct the line through $p$ and $q$ such that $\CH(P)$ lies to the right, then all the points of P must lie to the right of this line. The reverse is also true: if all points
of $P\setminus\{p,q\}$ lie to the right of the directed line through $p$ and $q$, then $pq$ is an
edge of $\CH(P)$.
\end{block}
\begin{center}
\includegraphics<2>[width=0.7\textwidth]{convex-hull-prop}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{1st algorithm}
\begin{frame}[t]{First algorithm}
\vspace*{-1cm}

\begin{center}
\includegraphics[width=1.3\textwidth]{Slow-convex-hull}
\end{center}
\begin{block}<2>{Clarify:}
\begin{enumerate}
\item How do we test whether a point lies to the left or to the
right of a directed line? (See Exercise 1.4)
\item How can we construct $\cal L$ from $E$?
\end{enumerate}
\end{block}
\end{frame}

\begin{frame}[t]{Computing $\cal L$:}
\begin{center}
\includegraphics[width=0.6\textwidth]{Computing-L}
\end{center}

\end{frame}
\begin{frame}[t]{Complexity of the algorithm}
\vspace*{-1cm}

\begin{center}
\includegraphics[width=1.3\textwidth]{Slow-convex-hull}
\end{center}
\begin{block}<2>{}
Running time: $\OO(n^3)+\OO(n^2)=\OO(n^3)$.
\end{block}
\end{frame}
\begin{frame}[t]{Degenerate case (or Degeneracy)}
\begin{block}{Degenerate Case:}
A point $r$ does not always lie to the right or to the
left of the line through $p$ and $q$, it can also happen that it {\bf lies  on} this line. What should we do then?
\end{block}
\begin{center}
\includegraphics[width=0.3\textwidth]{collinear}
\end{center}
\pause
\begin{block}{Solution:}
 A directed edge $\overrightarrow{pq}$ is an edge of
$\CH(P)$ if and only if all other points $r\in P$ lie either strictly to the right of the directed line through $p$ and $q$,  or they lie on the open line segment $\overline{pq}$.
\end{block}
\end{frame}
\begin{frame}[t]{Robustness:}
\begin{block}{Robustness:}
If the points are given in floating point coordinates and
the computations are done using floating point arithmetic,
then there will be rounding errors that may distort the outcome of tests.
\end{block}
\begin{center}
\includegraphics[width=\textwidth]{robustness}
\end{center}
\pause

\textcolor{red}{This algorithm is not robust!}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{2nd algorithm}
\begin{frame}[t]{$2$nd algorithm: incremental}

\begin{center}
\includegraphics[width=0.8\textwidth]{upper-lower-ch}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{$2$nd algorithm: incremental}

\begin{center}
\includegraphics[width=0.8\textwidth]{incremental-ch}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{$2$nd algorithm: incremental}
\vspace*{-1cm}

\begin{center}
\includegraphics[width=1.2\textwidth]{Convex-hull-alg}
\end{center}

\end{frame}
\begin{frame}[t]{$2$nd algorithm: incremental}
\begin{block}{Special cases:}
\begin{enumerate}
\item Two points have same $x$-coordinate. \pause
\item Three points on a line
\end{enumerate}
\end{block}

\begin{block}<1>{Solution:}
 Use the lexicographic order.
\end{block}
\begin{block}<2>{Solution:}
\begin{center}
\includegraphics[width=0.4\textwidth]{collinear-2}
\end{center}

\end{block}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{frame}
\begin{frame}[t]{Robustness:}
\begin{block}{What does the algorithm do in the presence of rounding errors in the floating point arithmetic?}
\begin{itemize}
\item When such errors occur, it can happen that a point is removed
from the convex hull although it should be there, or that a point inside the real convex hull is not removed. But the structural integrity of the algorithm is unharmed: it will compute a closed polygonal chain.
\item The only problem that can still occur is
that, when three points lie very close together, a turn that is actually a sharp left turn can be interpreted as a right turn. This might result in a dent in the
resulting polygon.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Proof of correctness}
\begin{frame}[t]{Proof of correctness:}
\vspace*{-5mm}

{\bf Theorem:} The convex hull of a set of n points in the plane can be computed in $\OO(n\log n)$ time.
\begin{block}<2>{Proof of correctness:}
\begin{center}
\includegraphics[width=0.4\textwidth]{convex-proof}
\end{center}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Proof of correctness:}
\vspace*{-5mm}

{\bf Theorem:} The convex hull of a set of n points in the plane can be computed in $\OO(n\log n)$ time.
\begin{block}{Time Complexity:}
\begin{itemize}
\item Sorting: $\OO(n\log n)$.
\item The for-loop is executed a linear number of times.
\item For each execution of the
for-loop the while-loop is executed at least once. For any extra execution a point is deleted from the current hull.
\item So the time complexity for computing upper hull and lower hull is $\OO(n)$.
\item Total running time: $\OO(n\log n)$.
\end{itemize}
\end{block}
\begin{block}<2>{Lower bound:}
An $\Omega(n\log n)$ lower bound is known for the convex hull problem.
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Other algorithms}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{Other algorithms:}
\begin{block}{}
\begin{tabular}{|c|c|c|}\hline
Algorithm &		Speed &		Discovered By  \\ \hline
Brute Force	&	$\OO(n^4)$ &		[Anon, the dark ages]\\ \hline
Gift Wrapping	&	$\OO(nh)$	&	[Chand \& Kapur, 1970]\\ \hline
Graham Scan	&	$\OO(n \log n)$ &	[Graham, 1972]\\ \hline
Jarvis March	&	$\OO(nh)$	&	[Jarvis, 1973]\\ \hline
QuickHull	&	$\OO(nh)$ &		{\footnotesize [Eddy, 1977], [Bykat, 1978]}\\ \hline
{\footnotesize Divide-and-Conquer} &	$\OO(n \log n)$ &	{\footnotesize [Preparata \& Hong, 1977]}\\ \hline
Monotone Chain	&	$\OO(n \log n)$ &	[Andrew, 1979]\\ \hline
Incremental	&	$\OO(n \log n)$ &	[Kallay, 1984]\\ \hline
{\tiny Marriage-before-Conquest} &	$\OO(n \log h)$ &	{\footnotesize [Kirkpatrick \& Seidel, 1986]}\\ \hline
\end{tabular}
\vspace*{5mm}

$n$: number of points

$h$: number of points on the boundary of convex hull
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Higher dimensions}
\begin{frame}[t]{Higher dimensions:}
\begin{itemize}
\item The convex hull can be defined in any dimension.
\item Convex hulls in $3$-dimensional space can still be computed in $\OO(n\log n)$ time (Chapter 11).
\item For dimensions higher than $3$, however, the complexity of the
convex hull is no longer linear in the number of points.
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{}
\centerline{ END.}
\end{frame}

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]{}

\end{frame}

















\begin{frame}{Textbooks:}
%$$\begin{array}{cc}
\begin{tabular}{cc}
 \begin{minipage}{0.7\textwidth}
1) Mark de Berg, Otfried Cheong, Marc van Kreveld, Mark Overmars, {\bf Computational Geometry Algorithms and Applications}, 3rd Edition, Springer-Verlag Berlin Heidelberg, 2008.
\end{minipage}
 & \includegraphics[height=25mm]{CG-book-3ed} \\
 \begin{minipage}{0.7\textwidth}
  2) Giri Narasimhan, Michiel Smid, {\bf Geometric Spanner Networks}, CAMBRIDGE UNIVERSITY PRESS, 2007.
   \end{minipage}
    & \includegraphics[height=25mm]{spannerbook}\\
\end{tabular}
%    \end{array}$$
%\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Grading and webpage:}
\begin{block}{Grading:}
\begin{itemize}
\item Midterm exam: 7
\item Final exam: 8
\item Presentation: 3
\item Homework: 2
\end{itemize}
\end{block}
\begin{block}{Course Webpage:}
http://pweb.yazduni.ac.ir/science/farshi/Teaching/CG/CG.html
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
\begin{frame}
\begin{block}{}
\begin{center}
\Huge
Introduction
\end{center}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{What is CG?}
\begin{block}{Computational Geometry}
Computational geometry is a branch of computer science devoted to the study of algorithms which can be stated in terms of geometry.
\end{block}
\begin{block}<2->{Applications}
\begin{itemize}
\item Computer graphics,
\item Computer-aided design and manufacturing (CAD/CAM),
\item Robotics (motion planning and visibility problems),
\item Geographic Information Systems (GIS) (geometrical location and search, route planning),
\item Integrated Circuit design (IC geometry design and verification),
\item and so on.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{What is CG?}
\begin{block}{The main branches of computational geometry are:}
\begin{itemize}
\item {\bf Combinatorial computational geometry}, also called {\bf algorithmic geometry}, which deals with geometric objects as discrete entities.
     A groundlaying book in the subject by Preparata and Shamos dates the first use of the term "computational geometry" in this sense by 1975.
\item {\bf Numerical computational geometry}, also called {\bf machine geometry}, computer-aided geometric design (CAGD), or geometric modeling, which deals primarily with representing real-world objects in forms suitable for computer computations in CAD/CAM systems. This branch may be seen as a further development of descriptive geometry and is often considered a branch of computer graphics or CAD.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{What is CG?}
\begin{block}{Combinatorial computational geometry}
\begin{itemize}
\item The primary goal is to develop {\em efficient algorithms} and {\em data structures} for {\em solving problems} stated in terms of basic geometrical objects: points, line segments, polygons, polyhedra, etc.\pause
\item Example: The closest pair problem:  Given $n$ points in the plane, find the two with the smallest distance from each other.
The brute-force algorithm takes $\OO(n^2)$ time.  A classic result: an algorithm that takes $\OO(n \log n)$ time. Also randomized algorithms that take $\OO(n)$ expected time, as well as a deterministic algorithm that takes $\OO(n \log \log n)$ time. \pause
\item Computational geometry focuses heavily on {\em computational complexity} since the algorithms are meant to be used on very large data sets containing tens or hundreds of millions of points.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{What is CG?}
\begin{block}{Problem classes}
\begin{itemize}
\item Static problems
    \begin{enumerate}
     \item Convex hull: Given a set of points, find the smallest convex polyhedron/polygon containing all the points.
     \item Line segment intersection: Find the intersections between a given set of line segments.
    \item  Delaunay triangulation
     \item Voronoi diagram: Given a set of points, partition the space according to which point is closest.
    \item Linear programming
     \item Closest pair of points: Given a set of points, find the two with the smallest distance from each other.
     \item Euclidean shortest path: Connect two points in a Euclidean space (with polyhedral obstacles) by a shortest path.
     \item Polygon triangulation: Given a polygon, partition its interior into triangles
     \end{enumerate}
%
%The computational complexity for this class of problems is estimated by the time and space (computer memory) required to solve a given problem instance.
%\pause
\end{itemize}
\end{block}

\end{frame}

\begin{frame}{What is CG?}
\begin{block}{Problem classes}
\begin{itemize}

\item Geometric query problems

%In geometric query problems, commonly known as geometric search problems, the input consists of two parts: the search space part and the query part, which varies over the problem instances. The search space typically needs to be preprocessed, in a way that multiple queries can be answered efficiently.
%
%Some fundamental geometric query problems are:
    \begin{enumerate}
     \item Range searching: Preprocess a set of points, in order to efficiently count the number of points inside a query region.
     \item Point location: Given a partitioning of the space into cells, produce a data structure that efficiently tells in which cell a query point is located.
     \item Nearest neighbor: Preprocess a set of points, in order to efficiently find which point is closest to a query point.
     \item Ray tracing: Given a set of objects in space, produce a data structure that efficiently tells which object a query ray intersects first.
    \end{enumerate}
%If the search space is fixed, the computational complexity for this class of problems is usually estimated by:
%
%    * the time and space required to construct the data structure to be searched in
%    * the time (and sometimes an extra space) to answer queries.
%
%For the case when the search space is allowed to vary, see "Dynamic problems".
%\pause
\end{itemize}
\end{block}

\end{frame}

\begin{frame}{What is CG?}
\begin{block}{Problem classes}
\begin{itemize}

\item Dynamic problems
%Yet another major class is the dynamic problems, in which the goal is to find an efficient algorithm for finding a solution repeatedly after each incremental modification of the input data (addition or deletion input geometric elements). Algorithms for problems of this type typically involve dynamic data structures. Any of the computational geometric problems may be converted into a dynamic one. For example, the range searching problem may be converted into the dynamic range searching problem by providing for addition and/or deletion of the points. The dynamic convex hull problem is to keep track of the convex hull, e.g., for the dynamically changing set of points, i.e., while the input points are inserted or deleted.
%The computational complexity for this class of problems is estimated by:
%    * the time and space required to construct the data structure to be searched in
%    * the time and space to modify the searched data structure after an incremental change in the search space
%    * the time (and sometimes an extra space) to answer a query.
\pause
\item Variations
%
%Some problems may be treated as belonging to either of the categories, depending on the context. For example, consider the following problem.
    \begin{itemize}
     \item Point in polygon: Decide whether a point is inside or outside a given polygon.
    \end{itemize}
%In many applications this problem is treated as a single-shot one, i.e., belonging to the first class. For example, in many applications of computer graphics a common problem is to find which area on the screen is clicked by a mouse cursor. However in some applications the polygon in question is invariant, while the point represents a query. For example, the input polygon may represent a border of a country and a point is a position of an aircraft, and the problem is to determine whether the aircraft violated the border. Finally, in the previously mentioned example of computer graphics, in CAD applications the changing input data are often stored in dynamic data structures, which may be exploited to speed-up the point-in-polygon queries.

%In some contexts of query problems there are reasonable expectations on the sequence of the queries, which may be exploited either for efficient data structures or for tighter computational complexity estimates. For example, in some cases it is important to know the worst case for the total time for the whole sequence of N queries, rather than for a single query. See also "amortized analysis".
\end{itemize}
\end{block}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Journals:}
\begin{block}{Journals}
\begin{enumerate}
\item Computational Geometry: Theory and Applications (CGTA)
\item Discrete \& Computational Geometry (DCG)
\item International Journal of Computational Geometry and Applications (IJCGA)
\item Journal of Computational Geometry (NEW)
\item Other algorithmic journals
\end{enumerate}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Conferences:}
\begin{block}{Conferences}
\begin{enumerate}
\item  ACM Symposium on Computational Geometry (SOCG)
\item Canadian Conference on Computational Geometry (CCCG)
\item European Workshop on Computational Geometry  (EWCG)
\item International Conference on Computational Geometry and Computer Vision
\item Others, like SODA, STOC, ESA.
\end{enumerate}
\end{block}

\end{frame}

\end{document}




























\section{Introduction}
\begin{frame}
\frametitle{Example of networks}
\begin{center}
\includegraphics<1>[width=\textwidth]{London-Subway}
\vspace*{3mm}

London Underground Network
\end{center}
\end{frame}
\begin{frame}
\frametitle{Example of networks}
\begin{center}
\includegraphics<1>[width=\textwidth]{adhocnet}
\vspace*{3mm}

Ad hoc Network
\end{center}
\end{frame}
\begin{frame}
\frametitle{Example of networks}
\begin{center}
\includegraphics<1>[width=0.6\textwidth]{yeast}
\vspace*{3mm}

Yeast Protein Interaction Network
\end{center}
\end{frame}
\begin{frame}
\frametitle{Example of networks}
\begin{center}
\includegraphics<1>[width=0.9\textwidth]{lesmis-ipe}
%\includegraphics<5>[width=\textwidth]{Social-Network-1}
%\includegraphics<4->[width=\textwidth]{t-spanner-def-3}
%\vspace*{3mm}

A Social Network (Les Miserables characters)
\end{center}
\end{frame}
%%%%%%%%%%%%%
\begin{frame}
\frametitle{Geometric Network}
\vspace*{-1cm}

\begin{center}
\includegraphics<1>[width=0.8\textwidth]{Scand}
\includegraphics<2>[width=0.8\textwidth]{Scand2}
\includegraphics<3>[width=0.8\textwidth]{Scand3}
\includegraphics<4->[width=0.8\textwidth]{Scand4-1}
\end{center}
\end{frame}

\begin{frame}
\frametitle{Geometric Network}
\begin{columns}[c]
\begin{column}[c]{0.45\textwidth}
\hspace*{-0.4cm}
%\begin{center}
\includegraphics<1>[width=\textwidth]{EG}
%\end{center}
\end{column}
\hspace*{-5mm}
\begin{column}{0.59\textwidth}
%\vspace*{-5mm}
\begin{block}<1->{Geometric Network} %(Euclidean Graph)}
Weighted undirected graph  $G(V,E)$ s.t.
\begin{itemize}
\item $\pointset\subset \mathbb{R}^d$.
\item  $\forall e=(u,v)\in E$, $wt(e)=|uv|$.
\end{itemize}
\end{block}
\end{column}
\end{columns}
\end{frame}
\begin{frame}[t]
\frametitle{Network Quality}

\begin{center}
\includegraphics<1>[width=.8\textwidth]{EintoGro-map2}
%\includegraphics<4->[width=\textwidth]{t-spanner-def-3}
\end{center}
\vspace*{-0.8cm}

\begin{block}<1>{}
\begin{itemize}
\item Driving distance: 256 km.
\hfill
Actual distance: 198 km.
\item $\frac{\mbox{Driving distance}}{\mbox{Actual distance}}=$1.27.
\end{itemize}
\end{block}

\end{frame}

\begin{frame}[t]
%\frametitle{Introduction}
\frametitle{Network Quality}
\begin{center}
\includegraphics<1>[width=.95\textwidth]{EIN-ENSCHEDE-MAP}
%\includegraphics<4->[width=\textwidth]{t-spanner-def-3}
\end{center}
\vspace*{-.7cm}

\begin{block}<1>{}
\begin{itemize}
\item Driving distance: 180 km.
\hfill
Actual distance: 136 km.
\item $\frac{\mbox{Driving distance}}{\mbox{Actual distance}}=$1.32.
\end{itemize}
\end{block}
\end{frame}

\begin{frame}[t]
%\frametitle{Introduction}
\frametitle{Network Quality}
\begin{center}
\includegraphics<1>[width=0.8\textwidth]{EIN-DENHAAG-MAP}
%\includegraphics<4->[width=\textwidth]{t-spanner-def-3}
\end{center}
\vspace*{-0.7cm}

\begin{block}<1>{}
\begin{itemize}
\item Driving distance: 143 km.
\hfill
Actual distance: 100 km.
\item $\frac{\mbox{Driving distance}}{\mbox{Actual distance}}=$1.43.
\end{itemize}
\end{block}
\end{frame}

\begin{frame}
%\frametitle{Introduction}
\frametitle{Network Quality}
\begin{columns}[c]
\begin{column}[c]{0.5\textwidth}
\hspace*{-0.5cm}
%\begin{center}
\includegraphics<1>[width=1.03\textwidth]{t-spanner-def}
\includegraphics<2>[width=1.03\textwidth]{t-spanner-def-2}
\includegraphics<3->[width=1.03\textwidth]{t-spanner-def-3}
%\end{center}
\end{column}
\hspace*{-10mm}
\begin{column}{0.55\textwidth}
 %\pause
 %\vspace*{5mm}
%\begin{block}<2->{t-Spanner}
%For each { $u,v\in V}, there is a path between $u$ and $v$ of
%length $\leq t \times |uv|$. %Eucl. dist($u,v$).
%\hfill \textcolor{red}{($t$-path)}
%\end{block}
\begin{block}<1->{Dilation (stretch factor)}
\begin{itemize}
\item between a pair of vertices= %\\
%The distance between a pair of points in the graph divided by the Euclidean distance between them.
$$\frac{\mbox{Distance in the graph}}{\mbox{Euclidean distance}}$$
\item<4-> of a network=
maximum dilation between all pairs. %of vertices in the graph.
\end{itemize}
\end{block}
\vspace*{2mm}

\begin{block}<5->{$t$-spanner}
A network with dilation at most~$t$, or \\
 $\forall u,v\in \pointset$, there is a path between $u$ and $v$ of
length $\leq t \times |uv|$. \hfill \textcolor{red}{($t$-path)}
\end{block}
%\pause %\vspace*{0.5cm}

%\begin{block}<5>{}
% $(1+\eps)$-Spanners \textcolor{red}{approximate}
%the complete graphs with error $\eps$.
%\end{block}
\end{column}
\end{columns}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
%\frametitle{Introduction} \framesubtitle{Example}
\frametitle{Example}
%\vspace*{-5cm}
\includegraphics<1>[width=\textwidth]{USAt10}
\includegraphics<2>[width=\textwidth]{USAt5}
\includegraphics<3>[width=\textwidth]{USAt3}
\includegraphics<4>[width=\textwidth]{USAt2}
\includegraphics<5>[width=\textwidth]{USAt15}
%\includegraphics<5>[width=\textwidth]{USAt1-25}
\begin{center}
\only<1>{10-spanner for 532 US-cities}
\only<2>{5-spanner for 532 US-cities}
\only<3>{3-spanner for 532 US-cities}
\only<4>{2-spanner for 532 US-cities}
\only<5>{1.5-spanner for 532 US-cities}
%\only<5>{1.25-spanner\\[5mm] for\\[5mm] 532 US-cities}
\end{center}

\end{frame}

\section{Applications}
\begin{frame}
\frametitle{Applications}
\end{frame}
\subsection{Designing approximation algorithms with spanners}
\begin{frame}[t]
\frametitle{Applications}
\framesubtitle{Designing approximation algorithms with spanners}
\vspace*{-3mm}

\begin{block}<1->{Traveling Salesperson Problem (TSP)}
Find the \textcolor{red}{shortest} tour that visits each point exactly once and return to the starting point.
\end{block}
\begin{center}
\includegraphics<1>[width=0.5\textwidth]{TSP-example}
\end{center}
\only<2->{\vspace*{-1.3cm}

}
\begin{block}<2->{Known results:}
\begin{itemize}
\item The problem is NP-hard even in $\Reals^d$.
\item A $2$-approximation algorithm for metric spaces by Rosenkrantz \etal\  (1977).
\item A $1.5$-approximation algorithm  by Christofides \etal\  (1976).
\item A PTAS ($\t$-approx. Alg.) for geometric case by Arora (1998) and Mitchell (1999).
\item A PTAS for geometric case using spanners by Rao and Smith (1998).
\end{itemize}
\end{block}
\end{frame}
\begin{frame}[t]
\frametitle{Applications}
\framesubtitle{Designing approximation algorithms with spanners}
\begin{block}<1->{Definition:}
If $\graph$ is a graph with vertex
set $P$, then a tour of $P$ in $\graph$ is a (possibly non-simple) cycle in $\graph$ that visits each
point of $P$ at least once.
\end{block}
\begin{block}<2->{Observation:}
For any $t$-spanner $\graph$ for $P$, there is a tour of $P$ in $\graph$, whose weight is at most
$t\cdot wt(\TSP(P))$.
\end{block}
\begin{block}<3->{Theorem (Rao and Smith, 1998)}
Given a $\t$-spanner of a setr of $n$ points with $\OO(n)$ size and $\OO(wt(\MST))$ weight, we can compute a $\t$-approximation of $\TSP(P)$ in $\OO(n\log n)$ time.
\end{block}
\end{frame}
\subsection{Metric space searching}
\begin{frame}[t]
\frametitle{Applications}
\framesubtitle{Metric space searching}
\vspace*{-.6cm}

\begin{center}
\includegraphics<1->[width=0.7\textwidth]{MSS-example}
\end{center}
\vspace*{-0.5cm}

\begin{block}<2->{Approximate proximity searching:}
\begin{itemize}
\item Multimedia information retrieval,
\item Data mining,
\item Pattern recognition,
\item Machine learning,
\item Computer vision and
\item Biomedical databases. %data compression and statistical data analysis.
\end{itemize}
\end{block}
\end{frame}
\begin{frame}
\frametitle{Applications}
\framesubtitle{Metric space searching}
\begin{block}{What is the role of spanners?}
\begin{itemize}
\item A meter show the similarity between any two object.
\item But evaluating the distances are expensive.
\item One way to speedup is computing the distance between any two object at save them, but it need $\OO(n^2)$ space (AESA).
\item A $t$-spanner can be used as a sparse data structure to reduce the space.
\end{itemize}
\end{block}
\end{frame}


\subsection{Protein Visualization}
\begin{frame}
\frametitle{Applications}
\framesubtitle{Protein Visualization}
\begin{center}
\includegraphics<1->[width=0.7\textwidth]{Protein}
\end{center}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%\frametitle{Introduction} \framesubtitle{Example}
%\begin{columns}[c]
%\begin{column}[c]{0.2\textwidth}
%\begin{center}
%\only<1>{10-spanner\\[5mm] for\\[5mm] 532 US-cities}
%\only<2>{5-spanner\\[5mm] for\\[5mm] 532 US-cities}
%\only<3>{3-spanner\\[5mm] for\\[5mm] 532 US-cities}
%\only<4>{2-spanner\\[5mm] for\\[5mm] 532 US-cities}
%\only<5>{1.5-spanner\\[5mm] for\\[5mm] 532 US-cities}
%%\only<5>{1.25-spanner\\[5mm] for\\[5mm] 532 US-cities}
%\end{center}
%\end{column}
%\begin{column}[c]{0.8\textwidth}
%\vspace*{-3mm}
%
%%\vspace*{-5cm}
%
%\includegraphics<1>[width=\textwidth]{USAt10}
%\includegraphics<2>[width=\textwidth]{USAt5}
%\includegraphics<3>[width=\textwidth]{USAt3}
%\includegraphics<4>[width=\textwidth]{USAt2}
%\includegraphics<5>[width=\textwidth]{USAt15}
%%\includegraphics<5>[width=\textwidth]{USAt1-25}
%\end{column}
%\end{columns}
%\end{frame}
\begin{frame}[t]
\frametitle{How to compute a good spanner?}
\vspace*{-0.4cm}

\hspace*{-2cm}
$$\begin{array}{lcc}
\includegraphics[width=0.4\textwidth]{points}
&
\includegraphics[width=0.1\textwidth]{Arrow}
&
\includegraphics[width=0.4\textwidth]{spanner}\\
\mbox{ Given a set } \pointset \mbox{ and } t>1 & & \mbox{ Sparse $t$-Spanner }\\
& &
\includegraphics[width=0.4\textwidth]{complete-graph}
\end{array}
$$
\vspace*{-3.8cm}

 \begin{minipage}{0.59\textwidth}
\begin{block}<2->{Quality measurement:}
\begin{itemize}
\item Number of edges (size)
\item Weight (compared with  MST)
\item Maximum degree
\item Diameter
\end{itemize}
\end{block}
 \end{minipage}

%\mbox{\textcolor{red}{Quality:}}%Sparseness:}}
%\begin{itemize}
%\item Linear size (number of edges)
%\item Bounded degree
%\item Low weight
%\item Low diameter
%\end{itemize}
\end{frame}

%%%%%%%\widehat{}%%%%%%%%%%%%%%%%%%%%%
\begin{frame} %[t]
\frametitle{How to compute a good spanner?}
\begin{block}<1->{ Constructing  sparse t-spanners: %\hfill \textcolor{red}{(Theoretical)}
}
%\begin{block}
%\vspace*{0.3cm}
%
%{Most well-known algorithms:} \vspace*{0.3cm}
%
\begin{itemize}
\item \textcolor{blue}{Greedy}  (Bern (1989) and  Alth{\"o}fer et al.
    (1993)).
\item \textcolor{blue}{$\Theta$-graph} (Clarkson (1987) and Keil
    (1988)).
\item \textcolor{blue}{Ordered $\Theta$-graph} (Bose et. al. (2004)).
\item \textcolor{blue}{Well-Separated Pair Decomposition}  (Arya et.
    al. (1995)).
\end{itemize}
%\end{block}
\end{block}
%\vspace*{5mm}
%
%\begin{block}<2->{Quality measurement:}
%\begin{itemize}
%\item Number of edges (size)
%\item Weight (compared with weight of MST)
%\item Maximum degree
%\item Diameter
%\end{itemize}
%\end{block}
%\pause
%\vspace*{-0.85\textheight}
%
%\begin{center}
%\includegraphics<3->[height=0.9\textheight]{spanner-book}
%\end{center}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%\frametitle{Introduction} \framesubtitle{Previous experimental works}
%\centerline{\textcolor{red}{\huge Very few experimental works!}}
%\begin{block}{Previous Experimental Works:}
%\begin{itemize}
%\item Navarro and Paredes (2003) -- 4 algorithms on general metric
%    spaces.\pause
%\item Sigurd and Zachariasen (2004) -- minimum weight spanner vs.
%    greedy spanner for general metric spaces.% \pause
%%\item Farshi and Gudmundsson (2005) -- Comparison on graph quality.
%%\begin{itemize}
%%\item 4 major geometric t-spanner algorithms.
%%\item point sets in 2-dimension with size between 100 and 13,000.
%%\item 4 different t between 1.05 and 2.
%%\item 5 different distributions.
%%\item comparison on: size, weight, maximum degree, diameter and
%%    number of crosses.
%%\end{itemize}
%\end{itemize}
%\end{block}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%\begin{frame}
%\frametitle{Introduction} %\framesubtitle{In this talk}
%\begin{block}{\centerline{\textcolor{red}{\huge In this talk:}}}
%\begin{itemize}
%%\begin{itemize}
%\item 6 major geometric t-spanner algorithms.
%\item point sets in 2-dimension with size between 100 and 13,000.
%\item 4 different $t$ between 1.05 and 2.
%\item 5 different distributions.
%\item Comparison on
%\begin{itemize}
%\item Quality: size, weight, maximum degree, diameter and
%    number of crosses.
%%\end{itemize}
%\item Running time.
%\begin{itemize}
%\item Two speedup strategy for the greedy algorithm:
%%\begin{itemize}
%   % \item
%improved greedy algorithm %. \item
%and hybrid algorithms.
%%\end{itemize}
%\item Speedup strategies vs. approximate greedy algorithm.
%\end{itemize}
%\end{itemize}
%\end{itemize}
%\end{block}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}
%\frametitle{Overview}
%\begin{block}{Overview}
%\begin{itemize}
%\item Fast review of algorithms.
%\item Speedup strategy for the greedy algorithm.
%\item \textcolor{blue}{Comparing the quality of the resulting graphs.}
%\end{itemize}
%\end{block}
%\begin{block}{Quality measures:}
%\begin{itemize}
%\item Number of edges
%\item Total weight %(compared with weight of MST)
%\item Maximum degree
%\item Diameter
%\end{itemize}
%\end{block}
%%\item Hybrid algorithms and the quality of their results.
%%\end{itemize}
%%\end{block}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Algorithms Review}
\subsection{Greedy Algorithm (Org. and  Imp.)} %

%%\input{Greedyslide3}
\begin{frame}[fragile]
\frametitle{(Org.) Greedy Algorithm}
%\frametitle{t=2}
\begin{center}
\includegraphics<1>[width=0.7\textwidth]{greedy1}%
\includegraphics<2>[width=0.7\textwidth]{greedy2}%
\includegraphics<3>[width=0.7\textwidth]{greedy3}%
\includegraphics<4>[width=0.7\textwidth]{greedy4}%
\includegraphics<5>[width=0.7\textwidth]{greedy5}%
\includegraphics<6>[width=0.7\textwidth]{greedy6}%
\includegraphics<7>[width=0.7\textwidth]{greedy7}%
\includegraphics<8>[width=0.7\textwidth]{greedy8}%
\includegraphics<9>[width=0.7\textwidth]{greedy9}%
\includegraphics<10>[width=0.7\textwidth]{greedy10}%
\includegraphics<11>[width=0.7\textwidth]{greedy11}%
\includegraphics<12>[width=0.7\textwidth]{greedy12}%
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{(Org.) Greedy Algorithm}
\begin{block}{{\sc Org. Greedy}}
\begin{algorithm}[H]%{{\sc Greedy}$(V,t)$}{}
\SetLine \KwIn{$V$ and $t>1$} \KwOut{$t$-spanner $G(V,E)$}
 Sort pairs of points by non-decreasing order of distance\;
$E :=\emptyset$\; $G := (V, E)$ \; \For{each pair $(u,v)$ of points (in
sorted order)} {
    \If{{\sc ShortestPath}$(G, u, v)> t \cdot |uv|$} %\\ %\qthen\\
    {
        Add $(u,v)$ to $E$\;
    }
} \Return{$G(V,E)$}\; %\caption{{\sc Org. Greedy}}
\end{algorithm}
\end{block}
\pause

\medskip
 \textcolor{blue}{\large Time Complexity:} $\OO(n^3\log n)$.
%
%\textcolor{blue}{\large (There exist an $\OO(n\log n)$ algorithm but it is
%too complicated.)}
%\pause
\medskip

%\hfill
 \textcolor{blue}{\large Storage Complexity:} $\OO(n^2)$.
\end{frame}

%\subsection{Imp. Greedy Algorithm}
\begin{frame}[t]
\frametitle{Imp. Greedy Algorithm} \vspace*{-5mm}

\begin{block}{{\sc Org. Greedy}}
 {\small
\begin{algorithm}[H]%{{\sc Greedy}$(V,t)$}{}
\SetLine \KwIn{$\pointset$ and $t>1$} \KwOut{$t$-spanner $G(\pointset,E)$}
 Sort pairs of points by non-decreasing order of distance\;
$E :=\emptyset$; $G := (V, E)$ \; \textcolor{red}{\For{each pair $(u,v)$
of points (in sorted order)} {
    \If{{\sc ShortestPath}$(G, u, v)> t \cdot |uv|$} %\\ %\qthen\\
    {
        Add $(u,v)$ to $E$\;
    }
    }
} \Return{$G(V,E)$}\;%\caption{{\sc Org. Greedy}}
\end{algorithm}
}
\end{block}
%\pause
%\medskip
\vspace*{-1mm}

%\only<2->
{\centerline{\textcolor{blue}{Number of shortest path queries:
$\Theta(n^2)$.}}} %\pause
%\medskip
\vspace*{-2mm}

\only<2>{\begin{block}{Observations:}
\begin{itemize}
\item \textcolor{blue}{ We only want to know if there is a t-path
    between $u$ and $v$.}
\item \textcolor{blue}{The graph is only updated  $\OO(n)$ times.}
\end{itemize}
\end{block}
}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{Imp. Greedy Algorithm} %\vspace*{-0.5cm}

%\parbox{0.6\textwidth}
\begin{block}{{\sc Imp. Greedy}}
{\small
\begin{algorithm}[H]%{{\sc Greedy}$(V,t)$}{}
\SetLine \KwIn{$\pointset$ and $t>1$} \KwOut{$t$-spanner $G(\pointset,E)$}
\textcolor{red}{\lFor{ each pair $(u,v)\in V^2$}{ Set
$\mbox{\emph{Weight}}(u,v):=\infty$}\;}
 Sort pairs of points by non-decreasing order of distance\;
$E :=\emptyset$;  $G := (V, E)$ \; \For{each pair $(u,v)$ of points (in
sorted order)} {

%    \If{\textcolor{red}{{{\sc Is-There-t-Path}$(G, u, v,t,
%    \mbox{\emph{Weight}})$}=false}}
%    {
%        Add $(u,v)$ to $E$\;
%    }

\textcolor{red}{\eIf{$\mbox{\emph{Weight}}(u,v)\leq t\cdot|uv|$}{ Skip $(u,v)$\;}
{ Compute single source shortest path with source $u$\; \lFor{each
$w$}{update $\mbox{\emph{Weight}}(u,w)$ and $\mbox{\emph{Weight}}(w,u)$\;}
\lIf{$\mbox{\emph{Weight}}(u,v)\leq t\cdot|uv|$}{ Skip $(u,v)$\;}\lElse{ Add $(u,v)$ to $E$\;}}
}
} \Return{$G(V,E)$}\;%\caption{{\sc Imp. Greedy}}
\end{algorithm}
}
\end{block}
% \pause \medskip
%\hrule
%%\vspace*{-\textheight} \hspace*{0.7\textwidth}
%%\parbox{0.4\textwidth}
%{\small
% {\sc Is-There-t-Path}$(G,u,v,t,Weight)$
%\begin{algorithm}[H]%{{ Is-There-t-Path}$(G,u,v,t,Weight)$}{}
%\SetLine \eIf{$\mbox{\emph{Weight}}(u,v)\leq t\cdot|uv|$}{ \Return true}{
%Compute Single source shortest path with source $u$\; for {each $w$}\ \
%{update $\mbox{\emph{Weight}}(u,w)$ and $\mbox{\emph{Weight}}(w,u)$}\;
%\eIf{$\mbox{\emph{Weight}}(u,v)\leq t\cdot|uv|$}{ \Return true}{ \Return
%false}}
%\end{algorithm}
%}

% \ifWEA %\vspace*{-0.3cm}
%\vspace*{-5mm}
%
% \only<2>{
% \begin{block}{}%{Conjecture:}
% {\Large \textcolor{blue}{Conjecture:} {\textcolor{red}{$\OO(n)$} shortest path queries is
%sufficient.}} \end{block} }
%% \fi

\end{frame}
\begin{frame}{Imp. Greedy Algorithm}
 \begin{block}<1->{Conjecture:}
 The running time of {\sc Imp. Greedy} is {\textcolor{red}{$\OO(n^2\log n)$}.} \end{block}

 \begin{block}<1->{Bose, Carmi, Farshi, Maheshvari and Smid~(2008)}
 \begin{itemize}
 \item The conjecture is wrong!
 \item They presented an algorithm which computes the greedy spanner in $\OO(n^2\log n)$ time (even for points from some metric spaces).
 \end{itemize}
 \end{block}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\ifWEA \else
%\begin{frame}
%\frametitle{Imp. Greedy Algorithm}
%\begin{block}{}
%{\sc Is-There-t-Path}$(G,u,v,t,Weight)$
%\begin{algorithm}[H]
%\SetLine
%\eIf{$\mbox{\emph{Weight}}(u,v)\leq t\cdot|uv|$}{ \Return
%true\;}{ Compute single source shortest path with source $u$\; \For{each
%$w$}{update $\mbox{\emph{Weight}}(u,w)$ and $\mbox{\emph{Weight}}(w,u)$}
%\eIf{$\mbox{\emph{Weight}}(u,v)\leq t\cdot|uv|$}{ \Return true\;}{ \Return
%false\;}}
%
%\end{algorithm}
%\end{block}
%\pause
%\medskip
%
%\textcolor{blue}{Conjecture: $\OO(n)$ shortest path queries is sufficient.}
%
%\end{frame}
%\fi
\subsection{Apx. Greedy Algorithm}
%\ifWEA \else
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%\begin{frame}
%\frametitle{Apx. Greedy Algorithm}
%\begin{block}{}
%\begin{algorithm}[H]
%\SetLine \KwIn{$\pointset$ and $t>1$} \KwOut{$t$-spanner $G(\pointset,E)$}
%Choose $t'\in (1,t)$\; Construct a $\sqrt{t/t'}$-spanner $G'(V,E')$ with
%$\OO(n)$ edges and constant degree with an $\OO(n\log n)$-time algorithm\;
% Sort the edges in $E'$ by non-decreasing order of length\;
%$E :=\emptyset$;\ $G := (V, E)$ \; \For{each edge $(u,v)\in E'$  (in
%sorted order)} {
%    \If{{\sc Apx.ShortestPath}$(G, u, v)> \sqrt{t\cdot t'} \cdot |uv|$} %\\ %\qthen\\
%    {
%        Add $(u,v)$ to $E$\;
%    }
%} \Return{$G(V,E)$}\;
%\end{algorithm}
%\end{block}
%\pause
%
%%\smallskip
%
% \textcolor{blue}{\large Time Complexity: $\OO(n\log^2 n)$}
%%\pause
%%\medskip
%%
%\hfill \textcolor{blue}{\large Storage Complexity: $\OO(n)$.}
%\end{frame}
%\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{Apx. Greedy Algorithm} \vspace*{1.5cm}

\includegraphics<1>[width=\textwidth]{ApxGreedy1}
\includegraphics<2>[width=\textwidth]{ApxGreedy2}
\includegraphics<3->[width=\textwidth]{ApxGreedy3}
%\includegraphics<4>[width=\textwidth]{hybrid3.pdf}
%\pause

%\smallskip
\vspace*{-1cm} \only<4>{ \textcolor{blue}{\large Time Complexity:
$\OO(n\log^2 n)$}
%\pause
\medskip
%
%\hfill

\textcolor{blue}{\large Storage Complexity: $\OO(n)$.} }
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\subsection{Hybrid Algorithms}
%\begin{frame}[t]
%\frametitle{Hybrid Algorithms} \vspace*{1.5cm}
%
%\includegraphics<1>[width=\textwidth]{hybrid0}
%\includegraphics<2>[width=\textwidth]{Hybrid}
%\includegraphics<3->[width=\textwidth]{Hybrid2}
%%\includegraphics<4>[width=\textwidth]{Hybrid3.pdf}
%\vspace*{-1cm}
%
%\only<4>{ \textcolor{blue}{\large Time Complexity: $\OO(n^2\log n)$}
%%\pause
%%\medskip
%%
%%\hfill
%
%\textcolor{blue}{\large Storage Complexity: $\OO(n)$.} }
%
%\end{frame}
%
%******************************************************************

\subsection{(Ordered) $\Theta$-Graph Algorithm (Sink and Skip-list spanner)}

%\input{Theta-Graph3}
\begin{frame}[fragile]
\frametitle{$\Theta$-Graph Algorithm}
\framesubtitle{$t=3 , \Theta=\pi/6$}
\vspace*{-1.9cm}

\begin{flushright}
\includegraphics<1>[width=\textwidth]{theta1}%
\includegraphics<2>[width=\textwidth]{theta2}%
\includegraphics<3>[width=\textwidth]{theta3}%
\includegraphics<4>[width=\textwidth]{theta4}%
\includegraphics<5>[width=\textwidth]{theta5}%
\includegraphics<6>[width=\textwidth]{theta6}%
\includegraphics<7>[width=\textwidth]{theta7}%
\includegraphics<8>[width=\textwidth]{theta8}%
\includegraphics<9>[width=\textwidth]{theta9}%
\includegraphics<10->[width=\textwidth]{theta10}%
%\includegraphics<11>[width=\textwidth]{theta11}%
%\includegraphics<12>[width=\textwidth]{theta12}%
\end{flushright}
%\ifWEA \only<11>{\vspace*{-2.5cm}
%\begin{block}{}
%\textcolor{blue}{Time Complexity: $\OO(n\log n)$} \hfill
%\textcolor{blue}{Storage Complexity: $\OO(n)$.} \end{block}} \fi
\end{frame}
%
%\ifWEA \else
\begin{frame}
\frametitle{$\Theta$-Graph Algorithm}
\begin{block}{{\sc $\Theta$-Graph}}
\begin{algorithm}[H]
\KwIn{$\pointset$ and $t>1$} \KwOut{$t$-spanner $G(\pointset,E)$}
\SetLine
Set $k$:= the smallest integer such that $t=\frac {1} {\cos \theta -\sin
\theta}$ for $\theta=2\pi/k$\;
$E:=\emptyset$\;
\For{each point $u\in
V$}{  $C_1, \ldots , C_k:=$ non-overlapping cones
                with angle $\theta$ and with apex at $u$\;
\For{each cone $C_i$}{
 Connect $u$ to the closest point in $C_i$\;
 %Find the point $v$ within $C_i$ with shortest distance to $u$\;
 %Add $(u,v)$ to $E$\;
}} \Return $G(V,E)$\;
\end{algorithm}
\end{block}
\pause

 \textcolor{blue}{Time Complexity:} $\OO(n\log n)$.
%\pause
%\hfill

\textcolor{blue}{Storage Complexity:} $\OO(n)$.
\end{frame}
%\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\subsection{(R.) Ordered $\Theta$-Graph Algorithm}
\begin{frame}
%\ifWEA
 \frametitle{Variants of $\Theta$-Graph Algorithm}
% \vspace*{-3mm}
% \else
% \frametitle{(R.) Ordered $\Theta$-Graph Algorithm}
% \fi


\begin{block}{Ordered $\Theta$-Graph-- $\OO(\log n)$ maximum degree}
Same as the $\Theta$-graph algorithm, except we  add points one by one in
a special order. %Maximum degree: $\OO(\log n)$.
\end{block}

%\ifWEA \else \vspace*{2cm} \fi

\pause
\begin{block}{Random Ordered $\Theta$-Graph-- $\OO(\log n)$ spanner diameter}
We  add points one by one in a random order.%\\ Spanner diameter: $\OO(\log n)$.
\end{block}

%\ifWEA
\pause
\begin{block}{Sink Spanner-- bounded degree}
Decrease the degree of nodes by replacing some edges by paths  within
other nodes.
\end{block}
\pause
\begin{block}{Skip-List Spanner-- $\OO(\log n)$ spanner diameter}
Decrease the diameter of $\Theta$-graph by adding some extra edges.
\end{block}
%\else  \fi
\end{frame}

%\ifWEA \else
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%\subsection{Sink Spanner}
%\begin{frame}[t]
%\frametitle{Sink Spanner} \framesubtitle{ A variant of $\Theta$-graph with
%bounded degree}
%\begin{block}{}
%\begin{algorithm}[H]
%\KwIn{$\pointset$ and $t>1$} \KwOut{$t$-spanner $G(\pointset,E)$} \SetLine
%Construct a directed $\sqrt{t}$-spanner $\overrightarrow{G}$ with bounded
%out-degree\; \For{each point $q\in V$}{
% Replace the ``star'' pointing to $q$ by a $\sqrt{t}$-$q$-sink spanner
%} \Return $G(V,E)$\;
%\end{algorithm}
%\end{block}
%\pause
%
% \textcolor{blue}{Time Complexity: $\OO(n\log n)$}
%%\pause
%\hfill \textcolor{blue}{Storage Complexity: $\OO(n)$.}
%
%%\vspace*{-1cm}
%%
%% \pause
%%\centerline{\includegraphics<-1>[width=0.5\textwidth]{sink1}}%
%%\centerline{\includegraphics<2>[width=0.5\textwidth]{sink2}}%
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%\subsection{Skip-List Spanner}
%\begin{frame}[t]
%\frametitle{Skip-List Spanner}\framesubtitle{ A variant of $\Theta$-graph
%with $\OO(\log n)$ spanner diameter}
%\begin{block}{}
%\begin{algorithm}[H]
%\KwIn{$\pointset$ and $t>1$} \KwOut{$t$-spanner $G(\pointset,E)$} \SetLine
%Set $V_0:=V$; $i:=1$\; \While{$V_{i-1}\not=\emptyset$} {$V_i$ contains
%each points of $V_{i-1}$ with probability $1/2$\;} \For{each $i$}{
%Construct a $t$-spanner $G_i(V_i,E_i)$ using the $\Theta$-graph
%algorithm\; } $E=\cup_iE_i$\; \Return $G(V,E)$\;
%\end{algorithm}
%\end{block}
%\pause
%
% \textcolor{blue}{Time Complexity: $\OO(n\log n)$}
%%\pause
%\hfill \textcolor{blue}{Storage Complexity: $\OO(n)$.}
%
%\end{frame}
%\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{WSPD-based Algorithm}
%\ifWEA \else
%\begin{frame}
%\frametitle{Well Separated Pair Decomposition Algorithm}
%\framesubtitle{Well Separated Pair Decomposition}
%
%\begin{block}{Well Separated Pair:}
%Let $s>0$  and $A,B\subset \Bbb{R}^d$.
%$A$ and $B$ are \textcolor{blue}{Well Separated} with respect to $s$, {if
%there exist two disjoint balls, $C_A$ and $C_B$ with same radius $\rho$
%such that}
%
%\begin{itemize}
%\item<2-> $A\subseteq C_A$ and $B\subseteq C_B$.
%\item<3-> The distance between $C_A$ and $C_B$ is at least
%    $s\times\rho$.
%\end{itemize}
%\end{block}
%%$s$: Separation constant
%\vspace*{-0.3cm}
%
%\begin{center}
%\includegraphics<1>[width=0.7\textwidth]{WSP1.pdf}
%\includegraphics<2>[width=0.7\textwidth]{WSP2.pdf}
%\includegraphics<3>[width=0.7\textwidth]{WSP3.pdf}
%\end{center}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{Well Separated Pair Decomposition (WSPD)}
\vspace*{-3mm}

\begin{block}<2->{\textcolor{blue}{Well Separated Pair:}}
 $A,B\subset \Bbb{R}^d$ are \textcolor{blue}{$s$-well separated} ($s>0$), {if  $\exists$ disjoint balls, $D_A$ and $D_B$ such that}
\begin{itemize}
\item \only<3->{$A\subseteq D_A$ and $B\subseteq D_B$.}
%\pause
\item \only<4->{$\dist(D_A,D_B)\geq s\times \max(\radius(D_A),\radius(D_B)).$}
%The distance between $C_A$ and $C_B$ is at least $s\times\rho$.}
\end{itemize}
\end{block}
%\only<4->{$s$: {Separation constant}}
%\vspace*{-0.5cm}
\vfill

\begin{center}
\includegraphics<2>[width=\textwidth]{New-WSP1}
\includegraphics<3>[width=\textwidth]{New-WSP2}
\includegraphics<4->[width=\textwidth]{New-WSP3}
\end{center}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
%\frametitle{Well Separated Pair Decomposition Algorithm}
\frametitle{Well Separated Pair Decomposition (WSPD)}

\begin{block}{\textcolor{red}{W}ell \textcolor{red}{S}eparated
\textcolor{red}{P}air \textcolor{red}{D}ecomposition:} Let $V\subset
\mathbb{R}^d$ and $s>0$.
A WSPD for $V$ with respect to $s$ is a set $\{(A_i,B_i)\}_{i=1}^m$ of
pairs of non-empty subsets of $V$ such that \pause
\begin{itemize}
\item $\forall i$, $A_i$ and $B_i$ are $s$-well separated, \pause
\item  $\forall p, q \in V$, there is
    \textcolor{red}{exactly} one index $i$ s. t.
\begin{itemize}
\item $p\in A_i$ and $q\in B_i$  or
\item $q\in A_i$ and $p\in B_i$.
\end{itemize}
\end{itemize}
\end{block}
\pause \vspace*{1mm}
{$m:$ \textcolor{blue}{Size of WSPD.}}
%\begin{itemize}
%\item Does a WSPD exist for each set $V$ with respect to each $s>0$?  \textcolor{blue}{YES.}
%\item Does a WSPD with small size exist for each set $V$?  \textcolor{blue}{YES.}
\medskip  \pause

\begin{block}{Callahan \& Kosaraju (1995)}
For each set of $n$ points, we can construct a WSPD of size $\OO(s^d\cdot n)$ in
$\OO(n\log n)$ time using $\OO(s^d\cdot n)$ space.
\end{block}
\end{frame}
%\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{WSPD-based Algorithm} %\ifWEA \
%\framesubtitle{WSPD=Well Separated Pair Decomposition} %\fi
\begin{block}{WSPD Algorithm}
\begin{algorithm}[H]
\KwIn{$\pointset$ and $t>1$} \KwOut{$t$-spanner $G(\pointset,E)$}
\SetLine
Set ${\cal W}:=$ WSPD of
                $\pointset$ w.r.t. $s:=\frac {4(t+1)} {t-1}$\;
Set $E=\emptyset$\; \For{each $(A_i,B_i)\in {\cal W}$}{ Select an
arbitrary node $u\in A_i$ and an arbitrary node $v\in B_i$\;
 Add edge $(u,v)$ to $E$.
}
\Return $G(V,E)$.
\end{algorithm}
\end{block}
\medskip
\pause

 \textcolor{blue}{Time Complexity: $\OO(n\log n)$.}
%\pause
%\hfill

 \textcolor{blue}{Storage Complexity: $\OO(n)$.}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\section{Results}
%\ifWEA \else
%\subsection{Theoretical bounds}
\begin{frame}
\frametitle{Theoretical bounds} {\scriptsize
\begin{tabular}{|@{}c@{}|@{}c@{}|c|c|c|}
\hline
\mystrut -  & Size & Weight & Degree %& Diameter
& Time \\
\hline \hline  \mystrut Greedy spanner
                    & $\OO(n)$
                      & $\OO(wt(\MST))$
                      & $\OO(1)$
                     % & $\Theta(n)$
%                      & $\OO(n^3 \log n)$\\
%\cline{2-5} \mystrut   & $\OO(n)$
%              & $\OO(wt(\MST))$
%                      & $\OO(1)$
%                     % & $\Theta(n)$
                      & $\OO(n^2 \log n)$\\
\hline \mystrut  Apx. greedy spanner &
$\OO(n)$
                           & $\OO(wt(\MST))$
                           & $\OO(1)$
                        %   & $\Theta(n)$
                           & $\OO(n\log n)$\\
\hline \mystrut $\Theta$-graph  & $\OO(n)$
                         & $\Theta(n\cdot wt(\MST))$
                         & $\Theta(n)$
                         %& $\Theta(n)$
                         & $\OO(n\log n)$ \\
\hline \mystrut O. $\Theta$-graph & $\OO(n)$
                           & $\OO(n\cdot wt(\MST))$
                           & $\OO(\log n)$
                           %& $\Theta(n)$
                           & $\OO(n\log n)$ \\
\hline \mystrut WSPD spanner & $\OO(n)$
                           & $\OO(\log n\cdot wt(\MST))$
                           & $\Theta(n)$
                           %& $\Theta(n)$
                           & $\OO(n\log n)$\\
\hline \mystrut Sink-spanner & $\OO(n)$
                             & $\OO(n\cdot wt(\MST))$
                             & $\OO(1)$
                             %& $\Theta(n)$
                             & $\OO(n\log n)$\\
\hline \mystrut Skip-list spanner & $\OO(n)^*$
                           & $\Theta(n\cdot wt(\MST))^*$
                           & $\Theta(n)$
                           %& $\OO(\log n)$$^*$
                           & $\OO(n\log n)^*$\\
\hline
\end{tabular}
%\vspace*{-4mm}
}
%\end{center}}
%\caption{Summarizing the known bounds for the algorithms presented in the
%paper.
%

\medskip
(*): Expected with high probability\\
%($\dagger$): The versions implemented has an additional $\log n$-factor in
%their running times.
%
%} \label{tab} \vspace*{-4mm}
%\end{table*}
%
\end{frame}
\begin{frame}
%\frametitle{Experimental results}
\frametitle{Size-- Uniform-- $t=2$}
\begin{columns}[c]
\begin{column}[c]{0.31\textwidth}
\begin{block}{$n=13,000$}
%\begin{itemize}
%\item
$\frac{\mbox{WSPD}}{\Theta\mbox{-graph}}=10.4$\\[1cm]
%\item
$\frac{\Theta\mbox{-graph}}{\mbox{Org. greedy}}=7$
%\end{itemize}
\end{block}
\end{column}
\begin{column}{0.7\textwidth}
\begin{center}
\vspace*{-0.7cm}

\includegraphics<1>[width=0.95\textwidth]{size-uniform-t2-ver3}
\includegraphics<2>[width=0.95\textwidth]{size-uniform-t2-ww-ver3}
\includegraphics<3>[width=0.95\textwidth]{Size-uniform-t2-greedy-Ipe}
\end{center}
\end{column}
\end{columns}
%
%\pause \vspace*{3mm}
%
%\only<4>{\vspace*{-0.5\textwidth}
%
%\centerline{ $n=13,000$, $\frac{WSPD}{\Theta-Graph}=10.4$ and
%$\frac{\Theta-Graph}{Greedy}=7$.}}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
%\frametitle{Experimental results}
\frametitle{Size-- Uniform-- $t=1.1$}
\begin{columns}[c]
\begin{column}[c]{0.31\textwidth}
\begin{block}{$n=8,000$}
%\begin{itemize}
%\item
$\frac{\mbox{WSPD}}{\Theta\mbox{-graph}}=30$\\[1cm]
%\item
$\frac{\Theta\mbox{-graph}}{\mbox{Org. greedy}}=10$
%\end{itemize}
\end{block}
\end{column}
\begin{column}{0.7\textwidth}
\begin{center}
\vspace*{-0.7cm}
\includegraphics<1>[height=0.9\textwidth]{size-uniform-t11-Ipe}
\includegraphics<2>[height=0.9\textwidth]{size-uniform-t11-ww-Ipe}
\end{center}
\end{column}
\end{columns}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
%\frametitle{Experimental results}
\frametitle{ Weight/Weight of MST-- Uniform-- $t=2$}
\begin{columns}[c]
\begin{column}[c]{0.33\textwidth}
\begin{block}{$n=13,000$}
%\begin{itemize}
%\item
$\frac{\mbox{WSPD}}{\Theta\mbox{-graph}}=68.5$\\[1cm]
%\item
$\frac{\Theta\mbox{-graph}}{\mbox{Org. greedy}}=~16.5$
%\end{itemize}
\end{block}
\end{column}
\begin{column}{0.7\textwidth}
\begin{center}
\vspace*{-0.7cm}

\includegraphics<1>[width=0.95\textwidth]{ww-uniform-t2-Ipe}
\includegraphics<2>[width=0.95\textwidth]{ww-uniform-t2-ww-Ipe}
\includegraphics<3>[width=0.95\textwidth]{ww-uniform-t2-greedy-Ipe}
\end{center}
\end{column}
\end{columns}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
%\frametitle{Experimental results}
\frametitle{ Weight/Weight of MST-- Uniform-- $t=1.1$}
\begin{columns}[c]
\begin{column}[c]{0.31\textwidth}
\begin{block}{$n=13,000$}
%\begin{itemize}
%\item
$\frac{\mbox{WSPD}}{\Theta\mbox{-graph}}=308$\\[1cm]
%\item
$\frac{\Theta\mbox{-graph}}{\mbox{Org. greedy}}=31$
%\end{itemize}
\end{block}
\end{column}
\begin{column}{0.7\textwidth}
\begin{center}
\vspace*{-0.7cm}

\includegraphics<1>[height=0.85\textwidth]{ww-uniform-t11-Ipe}
\includegraphics<2>[height=0.85\textwidth]{ww-uniform-t11-ww-Ipe}
\end{center}
\end{column}
\end{columns}

%\vspace*{3mm} \pause
%
% \centerline{ $n=13,000$, $\frac{WSPD}{\Theta-Graph}=68.6$
%and $\frac{\Theta-Graph}{Greedy}=16.3$.}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
%\frametitle{Experimental results}
\frametitle{Maximum Degree-- Uniform-- $t=2$}
\begin{columns}[c]
\begin{column}[c]{0.31\textwidth}
\begin{block}{$n=13,000$}
%\begin{itemize}
%\item
$\frac{\mbox{WSPD}}{\Theta\mbox{-graph}}=15$\\[1cm]
%\item
$\frac{\Theta\mbox{-graph}}{\mbox{Org. greedy}}=8$
%\end{itemize}
\end{block}
\end{column}
\begin{column}{0.7\textwidth}
\begin{center}
\vspace*{-0.7cm}

\includegraphics<1>[height=0.85\textwidth]{maxdeg-uniform-t2-Ipe}
\includegraphics<2>[height=0.85\textwidth]{maxdeg-uniform-t2-ww-Ipe}
\end{center}
\end{column}
\end{columns}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
%\frametitle{Experimental results}
\frametitle{Maximum Degree-- Uniform-- $t=1.1$}
\begin{columns}[c]
\begin{column}[c]{0.31\textwidth}
\begin{block}{$n=13,000$}
%\begin{itemize}
%\item
$\frac{\mbox{WSPD}}{\Theta\mbox{-graph}}=51$\\[1cm]
%\item
$\frac{\Theta\mbox{-graph}}{\mbox{Org. greedy}}=~8.5$
%\end{itemize}
\end{block}
\end{column}
\begin{column}{0.7\textwidth}
\begin{center}
\vspace*{-0.7cm}

\includegraphics<1>[height=0.85\textwidth]{maxdeg-uniform-t11-Ipe}
\includegraphics<2>[height=0.85\textwidth]{maxdeg-uniform-t11-ww-Ipe}
\end{center}
\end{column}
\end{columns}
\end{frame}

%%%%%%%%%%%%%%%
%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%
\section{Some Results}
\begin{frame}
\frametitle{Some Results }
%\framesubtitle{Theoretical results}
    \begin{itemize}
        \item Designing a sparse networks which is fault-tolerant under convex region faults.
        \item Optimal one-edge augmentation of a network.
   %     \item Optimal one-edge removal from a cycle.
    %    \item An algorithm for computing spanner diameter of a $t$-spanner.
    \end{itemize}
\end{frame}
\subsection{Region-Fault Tolerant Spanners}
\begin{frame}[t]
\frametitle{$k$-Fault-tolerant spanners}
%\begin{block}<1->{}
%\centerline{\large How can we incorporate fault-tolerance into
%$t$-spanners?}
%\end{block}
%\vspace*{5mm}

\only<2->{\textcolor{red}{Vertex and edge fault-tolerant:}}
\vspace*{10mm}

\includegraphics<2>[width=0.45\textwidth]{edge-vertex-example}%\hfill
\includegraphics<3>[width=0.45\textwidth]{edge-vertex-example2}%\hfill
\includegraphics<3>[width=0.45\textwidth]{edge-vertex-example-comp-2}
\includegraphics<4>[width=0.45\textwidth]{edge-vertex-example3}%\hfill
\includegraphics<4>[width=0.45\textwidth]{edge-vertex-example-comp-3}
%\vspace*{-13mm}

\only<2>{\hspace*{0.8in} $\graph$}%\GminusFault{\cgr}{F}$$
\only<3>{\hspace*{0.8in} $\graph$\hspace*{1.6in} $\graph_c$}
\only<4>{\hspace*{-.1in} $\graph\myminus$ red vertices and
edges\hspace*{0.1in} $\graph_c\myminus$ red vertices and edges}
%$$\hspace*{0.1in}\graph \hspace*{3in}  \GminusFault{\cgr}{F}$$
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{$k$-Fault-tolerant spanners}
%\begin{block}<1->{}
%\centerline{\large How can we incorporate fault-tolerance into
%$t$-spanners?}
%\end{block}
%\vspace*{5mm}

{\textcolor{red}{Vertex and edge fault-tolerant:}} \vspace*{5mm}

\begin{block}{\textcolor{blue}{Previous results}} %\vspace*{2mm}

\begin{itemize}
\item $k$-fault-tolerant spanner with size $\OO(k n \log n)$
    (Levcopolous \etal).
\item Lukovski improved it to $\OO(kn)$ edges (optimal).
%\item Czumaj and Zhao showed that the greedy approach produce $k$-fault tolerant geometric spanner with degree $\OO(k)$ and total weight $\OO(k^2\cdot wt(MST))$.
\item The greedy approach produce $k$-fault tolerant geometric spanner
    with degree $\OO(k)$ and total weight $\OO(k^2\cdot wt(\MST))$
    (Czumaj \& Zhao).
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\section{Region fault-tolerant spanners}
\begin{frame}[t]
\frametitle{Region fault-tolerant spanners}
%\begin{block}<1->{}
%\centerline{\large How can we incorporate fault-tolerance into
%$t$-spanners?}
%\end{block}
%\vspace*{5mm}

\textcolor{red}{Region fault-tolerant:}
\vspace*{5mm}

\includegraphics<2>[width=0.45\textwidth]{G} %\hfill
\includegraphics<2>[width=0.45\textwidth]{Gc}
\includegraphics<3>[width=0.45\textwidth]{GwithF} %\hfill
\includegraphics<3>[width=0.45\textwidth]{GcwithF}
\includegraphics<4->[width=0.45\textwidth]{GminusF} %\hfill
\includegraphics<4->[width=0.45\textwidth]{GcminusF}

\only<2>{$\hspace*{0.8in}\graph \hspace*{1.7in} \graph_c$}
\only<3>{$\hspace*{0.8in}\graph %\hspace*{2.2in} \GminusFault{\graph}{F}
\hspace*{1.7in} \graph_c$}
\only<4->{$\hspace*{0.8in}\GminusFault{\graph}{F} %\hspace*{2.2in} \GminusFault{\graph}{F}
\hspace*{1.4in} \GminusFault{\graph_c}{F}$}

\only<5-7>{\vspace*{-4cm}
\begin{center}
\includegraphics<5>[width=0.5\textwidth]{counter-example1}
\includegraphics<6>[width=0.5\textwidth]{counter-example2}
\includegraphics<7>[width=0.5\textwidth]{counter-example3}
\end{center}
}
\only<8>{%\vspace*{-2cm}
\medskip

\begin{block}{}
%\textcolor{blue}
{ $\graph$ is  \fft ($\F$ is some regions) if it is fault-tolerant
under each area fault $\faultarea\in \F$.}
\end{block}
}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{Region fault-tolerant spanners}
\begin{block}{}
\textcolor{red}{No sparse region-fault tolerant spanners with respect to non-convex faults.}
\end{block}
%\vspace*{1mm}
\begin{columns}[c]
\begin{column}[c]{0.4\textwidth}

$\Htwo$: The family of regions that are union of two half-planes

\vspace*{1cm}
\pause
\begin{block}{}
\textcolor{red}{Complete graph is the only \hhft spanner.}
\end{block}
%\vspace*{-5mm}
\end{column}
\hspace*{-5mm}
\begin{column}{0.6\textwidth}
\vspace*{-5mm}

\begin{center}
\includegraphics<1>[width=\textwidth]{HH1-new}
\includegraphics<2>[width=\textwidth]{HH1-new}
\includegraphics<3>[width=\textwidth]{HH2-new}
\includegraphics<4>[width=\textwidth]{HH3-new}
\includegraphics<5->[width=\textwidth]{HH4-new}
\end{center}
%\includegraphics[width=2.3in]{Figures/HH15.pdf}\hfill
%\includegraphics[width=2.3in]{Figures/HH2.pdf}
\end{column}
\end{columns}

\only<6>{
\vspace*{-0.3cm}

\begin{block}{}
%\centerline
{We consider  $\F=\C$  (the family of convex sets).}
\end{block}
}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{\cft  spanners}
\vspace*{-0.5cm}

\begin{block}<1->{\textcolor{blue}{Proposition.}}
If $\myH$ be the family of half-planes then\\
\centerline{$\graph$ is \cft $\iff$ $\graph$ is \hft.}
\end{block}
%\vspace*{-1cm}
%
\pause
\begin{columns}[t]
\begin{column}[t]{0.5\textwidth}
\textcolor{blue}{Proof.}
\begin{itemize}
\item[] $(\Rightarrow)$ Obvious.
\pause
%\vspace*{3mm}

\item[] $(\Leftarrow)$ Let $\graph$ be an \hft and $\faultarea\in \C$ and arb. points $u$ and $v$.
\pause
\vspace*{3mm}

    \begin{itemize}
     \item[Case 1:] $u$ and $v$ are \textcolor{red}{disconnected} in $\cgraph{\pointset}\myminus \faultarea$. \hspace*{1cm}\textcolor{red}{Done!}
\pause
\vspace*{3mm}

     \item[Case 2:] $u$ and $v$ are \textcolor{red}{connected} in $\cgraph{\pointset}\myminus \faultarea$. Let $\path$ be the shortest path.
    \end{itemize}
\end{itemize}
\end{column}
%\hspace*{-5mm}
\begin{column}{0.5\textwidth}
%\vspace*{-5mm}
\begin{center}
%\includegraphics<1-5>[width=\textwidth]{empty}
\includegraphics<6>[width=\textwidth]{HC1}
\includegraphics<7>[width=\textwidth]{HC2}
\includegraphics<8>[width=\textwidth]{HC3}
\includegraphics<9>[width=\textwidth]{HC4}
\includegraphics<10>[width=\textwidth]{HC45}
%\includegraphics[width=3in]{Figures/HC6.pdf}
\includegraphics<11>[width=\textwidth]{HC7}
\only<12>{ \vspace*{1cm}

\textcolor{blue}{We will talk about} \\[3mm]  \textcolor{red}{\hft} \\[3mm]  \textcolor{blue}{instead of}\\[3mm]  \textcolor{red}{\cft.}}
\end{center}
\end{column}
\end{columns}
%\vspace*{-1cm}
%
%\begin{block}<12>{}\centerline{We will talk about \hft instead of \cft!}\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{\cft spanners}
\framesubtitle{WSPD-based  Algorithm}
\vspace*{-3mm}

\textcolor{blue}{Main idea:} WSPD-based algorithm.
\vspace*{-2mm}

%\begin{algorithm}{}
%Compute WSPD of $\pointset$ w. r. t. $s:=\frac {4(2+\eps)} {\eps}$. \\
%%Set $E=\emptyset$. \\
%\For{each well-separated pair $(A_i,B_i)$}{
%Add edge between arbitrary nodes $u\in A_i$ and $v\in B_i$.%\\
%%Add edge $(u,v)$ to $E$.
%}
%\Return $\graph(P,E)$.
%\caption{\sc WSPD-graph$(\pointset,\eps)$}
%\end{algorithm}
\begin{block}{WSPD Algorithm}
\begin{algorithm}[H]
%\KwIn{$\pointset$ and $t>1$} \KwOut{$t$-spanner $G(\pointset,E)$}
\SetLine
Set ${\cal W}:=$ WSPD of
                $\pointset$ w.r.t. $s:=\frac {4(t+1)} {t-1}$\;
%Set $E=\emptyset$\;
\For{each $(A_i,B_i)\in {\cal W}$}{
%Select an arbitrary node $u\in A_i$ and an arbitrary node $v\in B_i$\;
 Add edge $(u,v)$ to $E$, for  $u\in A_i$ and  $v\in B_i$\;
}
\Return $G(V,E)$.
\end{algorithm}
\end{block}
\vspace*{-1mm}
%\vspace*{4mm}

\pause
\begin{block}{\textcolor{red}{Observations:}}
\begin{itemize}
\item[1)] What remains from a WSPD after a half-plane fault is still a WSPD.
\item[2)] It is sufficient to have a connection between each surviving  pair.
\item[3)] Any triangulation remains connected after each half-plane fault.
\end{itemize}
\end{block}
\end{frame}
\begin{frame}[t]
\frametitle{\cft spanners}
\framesubtitle{WSPD-based Algorithm}
\vspace*{-4mm}

%\begin{algorithm}{\sc WSPD-Fault-Tolerant$(\pointset,\eps)$}{}
%Compute WSPD of $\pointset$ w. r. t. $s:=\frac {4(2+\eps)} {\eps}$. \\
%%Set $E=\emptyset$. \\
%\qfor each well-separated pair $(A_i,B_i)$\\
%%Select arbitrary nodes $u\in A_i$ and $v\in B_i$.\\
%Triangulate the space in between $\ch{A_i}$ and $\ch{B_i}$.
%%Add edge $(u,v)$ to $E$.
%\qrof\\
%\qreturn $\graph(P,E)$.
%\end{algorithm}
\begin{block}{WSPD Fault-Tolerant Algorithm}
\begin{algorithm}[H]
%\KwIn{$\pointset$ and $t>1$} \KwOut{\cft $t$-spanner $G(\pointset,E)$}
\SetLine
Set ${\cal W}:=$ WSPD of
                $\pointset$ w.r.t. $s:=\frac {4(t+1)} {t-1}$\;
%Set $E=\emptyset$\;
\For{each $(A_i,B_i)\in {\cal W}$}{
%Select an arbitrary node $u\in A_i$ and an arbitrary node $v\in B_i$\;
 %Add edge $(u,v)$ to $E$.
Triangulate the space in between $\ch{A_i}$ and~$\ch{B_i}$\;
}
\Return $G(V,E)$\;
\end{algorithm}
\end{block}

\vspace*{-2mm}

%\pause
\begin{center}
\includegraphics<2>[width=\textwidth]{WSTriangulate}
\end{center}
\vspace*{-1.2cm}

%%\pause
%
%\begin{columns}[c]
%\begin{column}[c]{0.4\textwidth}
%\only<3>{\textcolor{red}{No example which generates graph with superlinear size yet.}}
%\begin{center}
%\includegraphics<4>[width=\textwidth]{WSPD-convex-pos}
%\end{center}
%\end{column}
%\begin{column}[c]{0.6\textwidth}
%
%%\vspace*{-1cm}
%
%\begin{block}<3->{\textcolor{blue}{Size:}}
%\begin{itemize}
%\item<3> Sum of the points on the convex hulls of WSPD (could be  $\sum_{i}(|A_i|+|B_i|)=\OO(n^2)$).% but \textcolor{red}{No specific example yet}).
%\item<4> For the points in convex position it is $\OO(n/\eps^2)$.
%\item<5> For uniformly distributed points the expected size is $\OO(n/\eps^2)$.
%\end{itemize}
%\end{block}
%\end{column}
%\end{columns}

\end{frame}
\begin{frame}[t]
\frametitle{\cft spanners}
\framesubtitle{WSPD-based Algorithm}
\begin{block}<1->{\textcolor{blue}{Size:}}
\begin{itemize}
\item<1> Sum of the points on the convex hulls of WSPD (could be  $\sum_{i}(|A_i|+|B_i|)=\OO(n^2)$).% but \textcolor{red}{No specific example yet}).
\item<2-5> For the points in convex position it is $\OO(n/\eps^2)$.
\item<6> For uniformly distributed points the expected size is $\OO(n/\eps^2)$.
\end{itemize}
\end{block}
%\pause

\only<1>{\vspace*{2mm}

\textcolor{red}{No example which generates graph with superlinear size yet.}}
\begin{center}
\includegraphics<2>[width=0.7\textwidth]{WSPD-convex-pos-1}
\includegraphics<3>[width=0.7\textwidth]{WSPD-convex-pos-2}
\includegraphics<4>[width=0.7\textwidth]{WSPD-convex-pos-3}
\includegraphics<5>[width=0.7\textwidth]{WSPD-convex-pos-4}
\end{center}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{\cft \textcolor{red}{Steiner} spanners}
\begin{columns}[t]
\begin{column}[t]{0.5\textwidth}

\textcolor{blue}{Main idea:} Add Steiner points s.t. all sets in the WSPD
have bounded complexity.\\
\vspace*{3mm}

We use the WSPD constructed by \textcolor{red}{compressed quadtree} (Fisher and Har-Peled).

%\pause
\vspace*{3mm}

\only<2->{\textcolor{red}{Quadtree:}
Split each square to four equal squares if it contains > 1 point.}

%\pause
\vspace*{3mm}

\only<7->{\textcolor{red}{Compressed Quadtree:}
Keep squares that has $>1$ non-empty child.}

\end{column}
\begin{column}[t]{0.5\textwidth}
\begin{center}
\includegraphics<2>[width=\textwidth]{quadtree-points}
\includegraphics<3>[width=\textwidth]{quadtree-const-1}
\includegraphics<4>[width=\textwidth]{quadtree-const-2}
\includegraphics<5>[width=\textwidth]{quadtree-const-3}
\includegraphics<6>[width=\textwidth]{quadtree}
\includegraphics<7>[width=\textwidth]{compress-quadtree}
\end{center}
%\vspace*{-3.5in}
\end{column}
\end{columns}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{\cft \textcolor{red}{Steiner} spanners}

\begin{columns}[c]
\begin{column}[c]{0.4\textwidth}
Add corner points for each internal node.
\vspace*{0.5cm}

\begin{block}<5->{Lemma:}
Convex hull of any node contains $\leq$ four points.
\end{block}
\vspace*{0.5cm}

\begin{block}<6->{Theorem:}
By adding $\OO(n)$ Steiner point we get a \cft Steiner spanner of $\OO(n)$ size.
\end{block}

\end{column}
\begin{column}[c]{0.6\textwidth}
\includegraphics<1>[width=\textwidth]{Steiner1}
\includegraphics<2>[width=\textwidth]{Steiner2}
\includegraphics<3>[width=\textwidth]{Steiner3}
\includegraphics<4->[width=\textwidth]{Steiner4}
\end{column}
\end{columns}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
\subsubsection{SSPD-based Algorithm}
\begin{frame}[t]
\frametitle{\textcolor{red}{Back to } \cft spanners}

\textcolor{blue}{Main idea:} Same as the WSPD algorithm.

\vspace*{0.5cm}

\begin{center}
\includegraphics[width=0.8\textwidth]{WSTriangulate}
\end{center}
\vspace*{0.2cm}

\centerline{\textcolor{red}{But the size might be $\sum_{i}(|A_i|+|B_i|)=\OO(n^2)$.}}

\vspace*{0.4cm}

\begin{block}{Now}

\begin{itemize}
\item We use a relaxed version of the WSPD called SSPD.
\item   Some ideas from $\Theta$-graphs.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{Semi Separated Pair Decomposition}
%\vspace*{4mm}
\vspace*{-0.3cm}

\begin{block}{Semi Separated Pair:}
$A,B\subset \Bbb{R}^d$ are \textcolor{blue}{$s$-semi separated} ($s>0$), {if  $\exists$ disjoint balls, $D_A$ and $D_B$ such that}
\begin{itemize}
\item \only<2->{$A\subseteq D_A$ and $B\subseteq D_B$.}
%\pause
\item \only<3->{$\dist(D_A,D_B)\geq s\times \textcolor{red}{\min}(\radius(D_A),\radius(D_B)).$}
%The distance between $C_A$ and $C_B$ is at least $s\times\rho$.}
\end{itemize}
%Let $s>0$ be a real number and $A,B\subset \Bbb{R}^d$.
%$A$ and $B$ are \textcolor{blue}{Semi~Separated} w.r.t. $s$, if $\exists$
%two disjoint balls, $D_A$ and $D_B$ s. t.
%\begin{itemize}
%\item \only<2->{$A\subseteq D_A$ and $B\subseteq D_B$.}
%%\pause
%\item \only<3->{$\dist(D_A,D_B)\geq s\times \min(\radius(D_A),\radius(D_B)).$}
%\end{itemize}
\end{block}

\vspace*{-0.1cm}

\begin{center}
\includegraphics<1>[width=0.9\textwidth]{SSP1}
\includegraphics<2>[width=0.9\textwidth]{SSP2}
\includegraphics<3>[width=0.9\textwidth]{SSP3}
\end{center}

\only<4->{\vspace*{-1.2cm}}

\begin{block}<4->{\textcolor{red}{Well Separated Pair:}}
if $\dist(D_A,D_B)\geq s\times \textcolor{red}{\max}(\radius(D_A),\radius(D_B)).$
\end{block}
%\vspace*{2in}

\begin{block}<5->{\textcolor{red}{S}emi \textcolor{red}{S}eparated
\textcolor{red}{P}air \textcolor{red}{D}ecomposition:}
 Just replace WS by SS in WSPD.
%With this formulation $A$ and $B$ are \textcolor{red}{well-separated} if
%$$\dist(D_A,D_B)\geq s\times \max(\radius(D_A),\radius(D_B)).$$
\end{block}
%\vspace*{0.1cm}

\begin{block}<6->{}
%\centerline
{We can construct an SSPD $\{(A_i,B_i)\}_{i=1}^m$ such that
\vspace*{-3mm}

$$\sum_{i}(|A_i|+|B_i|)=\OO(n\log n).$$
\vspace*{-4mm}

}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{\cft spanners}
\framesubtitle{SSPD-based  Algorithm}
\vspace*{-3mm}
\begin{block}{SSPD-Fault-Tolerant Algorithm}
\begin{algorithm}[H]
%\KwIn{$\pointset$ and $t>1$} \KwOut{\cft $t$-spanner $G(\pointset,E)$}
\SetLine
Set ${\cal S}:=$ SSPD of
                $\pointset$ w.r.t. $s:=f(t)$\;
%Set $E=\emptyset$\;
\For{each $(A_i,B_i)\in {\cal S}$}{
%Select an arbitrary node $u\in A_i$ and an arbitrary node $v\in B_i$\;
 %Add edge $(u,v)$ to $E$.
%Triangulate the space in between $\ch{A_i}$ and $\ch{B_i}$.
Do the following\;
}
\Return $G(V,E)$.
\end{algorithm}
\end{block}
%
%\begin{algorithm}{\sc SSPD-Fault-Tolerant$(\pointset,\eps)$}{}
%Compute SSPD of $\pointset$ w. r. t. $s:=f(\eps)$. \\
%%Set $E=\emptyset$. \\
%\qfor each semi-separated pair $(A,B)$\\
%%Select arbitrary nodes $u\in A_i$ and $v\in B_i$.\\
%%Triangulate the space in between $\ch{A_i}$ and $\ch{B_i}$.
%Do the following.
%%Add edge $(u,v)$ to $E$.
%\qrof\\
%\qreturn $\graph(P,E)$.
%\end{algorithm}
\vspace*{-1cm}

\begin{center}
\includegraphics<2>[width=0.8\textwidth]{SSPD-Alg1}
\includegraphics<3>[width=0.8\textwidth]{SSPD-Alg2}
\includegraphics<4>[width=0.8\textwidth]{SSPD-Alg3}
\includegraphics<5>[width=0.8\textwidth]{SSPD-Alg4}
\includegraphics<6>[width=0.8\textwidth]{SSPD-Alg5}
\includegraphics<7>[width=0.8\textwidth]{SSPD-Alg6}
\includegraphics<8>[width=0.8\textwidth]{SSPD-Alg7}
\includegraphics<9>[width=0.8\textwidth]{SSPD-Alg8}
\includegraphics<10>[width=0.8\textwidth]{SSPD-Alg9}
\includegraphics<11>[width=0.8\textwidth]{SSPD-Alg10}
\includegraphics<12>[width=0.8\textwidth]{SSPD-Alg-first-cone-comp}
\end{center}
%
%\vspace*{1cm}
%
%\begin{block}<13>{ Theorem:}
%For any set $\pointset$ of $n$ points and any $\eps>0$, there exist a
%\cft $\t$-spanner of $\pointset$ with $\OO(n\log n)$ edges.
%\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{\cft spanners}
%\frametitle{The generated graph \graph is \hft $t$-spanner.}
\vspace*{-3mm}

\begin{block}{The generated graph \graph\  is \hft $t$-spanner.}
Proof.

$h$: arbitrary half-plane, $p$ and $q$: arbitrary points outside~$h$.

$\exists (A,B)\in SSPD$ s. t. $p\in A$ and $q\in B$.

\textcolor{red}{Proof by induction on $\max\{weight(A), weight(B)\}$.}

\begin{itemize}
\item \textcolor{blue}{Ind. base:} If $\max\{weight(A), weight(B)\}=1$ done!
\item \textcolor{blue}{Ind. hypothesis:} assume it holds for all points in pairs with maximum weight $<k$.
\item \textcolor{blue}{Ind. step:} suppose $\max\{weight(A), weight(B)\}=k$
\end{itemize}
\end{block}
\vspace*{-3mm}

\begin{center}
\includegraphics<2>[width=0.6\textwidth]{Lemma-33-1}
\includegraphics<3>[width=0.6\textwidth]{Lemma-33-2}
\includegraphics<4>[width=0.6\textwidth]{Lemma-33-3}

\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{\cft spanners}
$q_j$: the closest point in the cone to $O_A$ %which lies
outside~$h$.

\begin{block}{\textcolor{blue}{Claim:} $\exists$ an edge connecting $q_j$ to a point of $A$ outside $h$.}
\begin{itemize}
\item<1-> $q_j$ lies outside $\mbox{CH}(A\cup \{q_1,\ldots,q_{j-1}\})$.
\item<4-> $q_j$ is connected to a point in $A\setminus h$.
\end{itemize}
\end{block}

\begin{center}
\includegraphics<2>[width=0.8\textwidth]{Lemma-32-1}
\includegraphics<3>[width=0.8\textwidth]{Lemma-32-2}
\includegraphics<4>[width=0.8\textwidth]{Lemma-32-3}

\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{\cft spanners}
\begin{block}{ Theorem:}
For any set $\pointset$ of $n$ points and any $t>1$, there exist a
\cft $t$-spanner of $\pointset$ with $\OO(n\log n)$ edges.
\end{block}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\section{Conclusion \& open problem}
\begin{frame}[t]
\frametitle{Conclusion \& open problem}
\begin{block}{Conclusion}
\begin{itemize}
\item In convex area faults:
    \begin{itemize}
        \item \textcolor{red}{Without Steiner points}
        \begin{itemize}
            \item \textcolor{blue}{$\OO(n\log n)$ size spanner for
            general point sets.}
            \item \textcolor{blue}{$\OO(n)$ size spanner just in
            special cases. }
        \end{itemize}
        \item \textcolor{red}{With Steiner points}
        \begin{itemize}
            \item \textcolor{blue}{$\OO(n)$ size spanner with $\OO(n)$ Steiner points.}
        \end{itemize}
    \end{itemize}
%\item Geodesic case:
%    \begin{itemize}
%    \item \textcolor{blue}{$\OO(n)$ size disk-fault tolerant
%         spanners with $\OO(n)$ Steiner points.}
%    \end{itemize}
\end{itemize}
\end{block}
\vspace*{0.5cm}
\begin{block}{Open Problem}
\begin{itemize}
\item Can we improve $\OO(n\log n)$ bound to $\OO(n)$ for general point sets?
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\section{Optimal edge augmentation}
%\begin{frame}[t]
%\frametitle{Optimal edge augmentation}
%\vspace*{1cm}
%%Most known t-spanner algorithms:
%Several algorithm are known to construct sparse network with low stretch factor, like:
%\begin{itemize}
%%\item either construct a spanner given a point set
%%\begin{itemize}
%\item \textcolor{blue}{Greedy} Algorithm. (Bern'89 and  Alth{\"o}fer et al.'93).
%\item \textcolor{blue}{$\Theta$-graph} Algorithm. (Clarkson'87 and Keil'88).
%%\item \textcolor{blue}{Order $\Theta$-graph} Algorithm. (Bose et. al. (2004)).
%\item \textcolor{blue}{\small Well-Separated Pair Decomposition} Algorithm. (Callahan and Kosaraju'93).
%%\end{itemize}
%%
%%\item or prune a given graph
%%\begin{itemize}
%%\item \textcolor{blue}{Greedy} Algorithm. %(Bern (1989) and  Alth{\"o}fer et al. (1993)).
%%\item \textcolor{blue}{Well-Separated Pair Decomposition} Algorithm. %(Arya et. al. (1995)).
%%\end{itemize}
%
%\end{itemize}
%\vspace*{1cm}
%\large
%
%\begin{center}
%\textcolor{red}{\large But in many applications the network already exists}
%\\ \textcolor{red}{\large and we want to improve it by adding one edge.}
%\end{center}
%\end{frame}
%%\newpage
%%\addtocounter{page}{-1}
%\begin{frame}[t]
%\frametitle{Optimal edge augmentation}
%\vspace*{-5mm}
%
%\begin{center}
%\includegraphics<1>[width=0.5\textwidth]{SC-Scand.pdf}
%\includegraphics<2>[width=0.5\textwidth]{SC-Scand2.pdf}
%\includegraphics<3>[width=0.5\textwidth]{SC-Scand3.pdf}
%\includegraphics<4->[width=0.5\textwidth]{SC-Scand4.pdf}
%\vfill
%
%\begin{block}<5>{Problem (Giri Narasimhan, 2002)}
%
%%\textcolor{blue}
%{Given a geometric network $G$, construct a graph
%    $G'$ by adding an edge to $G$ such that the stretch factor
%    of $G'$ is minimized.}
%\end{block}
%\end{center}
%\end{frame}
%%\newpage
%\begin{frame}
%\frametitle{Optimal edge augmentation}
%\begin{block}{Example}
%%\vspace*{-5mm}
%
%\begin{center}
%\includegraphics<1>[width=0.7\textwidth]{Example1.pdf}
%\includegraphics<2>[width=0.7\textwidth]{Example2.pdf}
%\includegraphics<3>[width=0.7\textwidth]{Example3.pdf}
%\end{center}
%\end{block}
%\end{frame}
%\subsection{Exact Algorithm}
%\begin{frame}[t]{}
%\frametitle{Optimal edge augmentation}
%\framesubtitle{Exact Algorithm}
%\vspace*{-5mm}
%\begin{block}{ {\bf Algorithm} {\sc ExpandGraph}}
%\begin{algorithm}[H]
%\SetLine
%%\KwIn{Weighted graph $\negraph=(\nepointset,\needges)$.}
%%\KwOut{Weighted graph $\negraph'=(\nepointset,\needges\cup\{e\})$.}
%%
%% $M:=$  distance matrix of $G$;
% $t:=\infty$\;
% \ForEach{$(x,y)\in V^2\setminus E$ }{
%    $t':=$ {\sc Dilation}($G\cup {(x,y)}$)\;
%    \lIf{$t'<t$}{
%     $t:= t'$ and $e:= (x,y)$
%     }
% }
%\Return{$G'=(V,E\cup \{e\})$}\;
%%\caption{{\sc ExpandGraph}}%\label{alg:addSpannerEdge}
%\end{algorithm}
%\end{block}
%%
%%\begin{block}{Trivial Exact Algorithm}
%%
%%\begin{algorithm}{{\sc Trivial}$(G)$}{}
%%
%%\qfor each pair $(u,v)\in V^2\setminus E$  \\%\qdo\\
%%Compute the stretch factor of the graph $G'(V,E\cup\{(u,v)\})$ %\hspace*{2cm}(All Pair Shortest Path of $G'$).
%%\qrof\\
%%\qreturn the best edge found.
%%\end{algorithm}
%%\end{block}
%%
%\only<2>{\centerline{\textcolor{blue}{Time Complexity:} $\OO(mn^3+n^4\log n)$\hspace*{0.2cm}
%\textcolor{blue}{Space Complexity:} $\OO(n)$}}
%\vspace*{-2mm}
%
%\begin{block}<3->{Improvement}
%%\\%[5mm]
%By computing APSP of $G$ and storing the result in a matrix, say $M$, we can answer each shortest-path query in $G'$ in constant time.
%%
%%\vspace*{5mm}
%\only<4->{\centerline{\textcolor{blue}{Time Complexity:} $\OO(n^4)$\hspace*{1cm}
%\textcolor{blue}{Space Complexity:} $\OO(n^2)$}}
%\end{block}
%\vspace*{-3mm}
%
%\begin{block}<5>{\textcolor{red}{New Result}}
%An $\OO(n^3\log n)$ time algorithm by Christian Wulff-Nilsen (EWCG 2008).
%%Computing the Dilation of Edge-Augmented Graphs in Metric Spaces
%\end{block}
%\end{frame}
%\subsection{$(1+\eps)$-approx. Algorithm}
%
%\begin{frame}[t]
%\frametitle{Optimal edge augmentation}
%\framesubtitle{$(1+\eps)$-approx. Algorithm}
%\vspace*{-3mm}
%
%\begin{block}{Approx. Stretch Factor (Narasimhan-Smid (2000))}
%We can compute a $(1+\eps)$-approximation of stretch factor of a geometric network by computing stretch factor between $\OO(n/\eps)$ pairs.
%\end{block}
%\begin{block}<2->{ {\bf Algorithm} {\sc Approx-ExpandGraph}}
%\begin{algorithm}[H]
%\SetLine
%%\KwIn{Weighted graph $\negraph=(\nepointset,\needges)$.}
%%\KwOut{Weighted graph $\negraph'=(\nepointset,\needges\cup\{e\})$.}
%
% $M:=$  distance matrix of $G$;
% $t:=\infty$\;
% \ForEach{$(x,y)\in V^2\setminus E$ }{
%    $t':=$ {\sc Approx-Dilation}($G,M,{x,y}$)\;
%    \lIf{$t'<t$}{
%     $t:= t'$ and $e:= (x,y)$
%     }
% }
%\Return{$G'=(V,E\cup \{e\})$}\;
%%\caption{{\sc ExpandGraph}}%\label{alg:addSpannerEdge}
%\end{algorithm}
%\end{block}
%%\begin{block}<2->{$(1+\eps)$-approx. Algorithm}
%%
%%\begin{algorithm}{{\sc Approx}$(G)$}{}
%%$M:=$ APSP of $G$\\
%%\qfor each pair $(u,v)\in V^2\setminus E$  \\%\qdo\\
%%Compute the approximate stretch factor of the graph $G'(V,E\cup\{(u,v)\})$ %\hspace*{2cm}(All Pair Shortest Path of $G'$).
%%\qrof\\
%%\qreturn the best edge found.
%%\end{algorithm}
%%\end{block}
%\vspace*{1mm}
%
%\only<3->{\centerline{\textcolor{blue}{Time Complexity:} $\OO(n^3/\eps)$\hspace*{1cm}
%\textcolor{blue}{Space Complexity:} $\OO(n^2)$}}
%\end{frame}
%
%\subsection{$3$-approx. Algorithm}
%%\begin{frame}
%%\centerline{{\Large 3-approximation algorithm}}
%%\end{frame}
%
%
%\begin{frame}[t]
%\frametitle{Optimal edge augmentation}
%\framesubtitle{$3$-approx. Algorithm}
%\begin{block}{\textcolor{red}{\Large Notations}}
%%\vspace*{1cm}
%\begin{center}
%\includegraphics<1>[width=0.7\textwidth]{SC-G.pdf}
%\includegraphics<2>[width=0.7\textwidth]{G2.pdf}
%\includegraphics<3>[width=0.7\textwidth]{G_B.pdf}
%\includegraphics<4>[width=0.7\textwidth]{G_Opt.pdf}
%%\includegraphics<2>[width=0.7\textwidth]{G.pdf}
%\end{center}
%\vspace*{1cm}
%\only<1-2>{\centerline{\Large \textcolor{red}{$t$ : Stretch factor of $G$.}}}
%\only<3>{\centerline{\Large \textcolor{red}{$t_{\cal B}$ : Stretch factor of $G_{\cal B}$.}}}
%\only<4>{\centerline{\Large \textcolor{red}{$t_{opt}$ : Stretch factor of $G_{opt}$.}}}
%\end{block}
%\end{frame}
%
%\begin{frame}[t]{}%{$3$-approx. Algorithm}%{3-approximation}
%\frametitle{Optimal edge augmentation}
%\framesubtitle{$3$-approx. Algorithm}
%%\vspace*{-2mm}
%
%\textcolor{blue}{\Large Lemma:} {\Large $t_{\B}< 3t_{opt}$.}
%
%\only<2->{\textcolor{red}{\large Proof.}\\}
%\only<2->{{\bf Case 1:} $t< 3t_{opt}$  Done! (because $t_{\B}\leq t$)\\}
%\only<3->{{\bf Case 2:} $t\geq 3t_{opt}$}
%\vspace*{-0.5cm}
%
%\begin{flushright}
%\includegraphics<4>[width=0.6\textwidth]{pre1-2.pdf}
%\includegraphics<5>[width=0.6\textwidth]{pre2.pdf}
%\includegraphics<6>[width=0.6\textwidth]{pre3.pdf}
%\includegraphics<7>[width=0.6\textwidth]{pre4.pdf}
%\includegraphics<8>[width=0.6\textwidth]{pre5.pdf}
%\includegraphics<9>[width=0.6\textwidth]{pre6.pdf}
%\includegraphics<10>[width=0.6\textwidth]{pre7.pdf}
%\includegraphics<11>[width=0.6\textwidth]{pre8.pdf}
%\includegraphics<12->[width=0.6\textwidth]{pre9.pdf}
%\end{flushright}
%
%\only<4>{\vspace*{-5mm}
%
%\hspace*{0.45\textwidth}\textcolor{blue}{\small $(a,b)$: Pair with maximum dilation in $G_{\cal B}$}
%%\vspace*{-1cm}
%
%}
%
%\vspace*{-1.5cm}
%
%
%\begin{eqnarray*}
%\only<4->{t_{\B}\cdot |ab|&\!=\!&d_{G_{\B}}(a,b)\\}
%\only<5->{ &\! \leq\!&  d_G(a,x)}\only<6->{+d_G(x,u)}\only<7->{+|uv|}\only<8->{+d_G(v,y)}\only<9->{+d_G(y,b)}\\
%\only<11->{ &\!  =\!   & d_{G_{opt}}(a,b)}\only<11->{+d_{G_{opt}}(u,v)\\}
%%                              \hspace{1.6cm}\hfill \mbox{(from (\ref{eq:e}))} \\
%\only<13->{ &\! \leq\! & t_{opt}\left(|ab|+|uv|\right)\\}
%%                              \hspace{2.6cm}\hfill \mbox{(from (\ref{eq:e}))} \\
%\only<14->{ &\! <\! & 3 t_{opt}|ab| \hspace*{0.2\textwidth} (\mbox{ since } |uv|<2|ab|)}
%        %   \hspace{3.8cm} \mbox{(from (\ref{eq:d}))}
%\end{eqnarray*}
%
%\end{frame}
%
%\begin{frame}[t]{}%{3-approximation}
%\frametitle{Optimal edge augmentation}
%\framesubtitle{$3$-approx. Algorithm}
%%\vspace*{-2mm}
%
%\textcolor{blue}{\Large Lemma:} {\Large $t_{\B}< 3t_{opt}$.}
%\vspace*{2mm}
%
%\only<-5>{Ansgar Gr{\"u}ne (2005) showed that this bound  is tight.}
%
%\begin{flushright}
%\includegraphics<2>[width=0.5\textwidth]{tightlowerboundgraph}
%\includegraphics<3>[width=0.5\textwidth]{tightlowerboundgraphb}
%\includegraphics<4-5>[width=0.5\textwidth]{tightlowerboundgraphc}
%\end{flushright}
%
%\vspace*{-4cm}
%
%\only<2-5>{\Large $t=\frac{1}{\eps'}$}
%
%\only<3-5>{\Large $t_{\B}=\frac{1}{\eps'}$}
%
%\only<4-5>{\Large $t_{opt}\leq \frac{\eps'+1}{\eps'(3-\eps')}$}
%
%\only<5>{\Large
%\begin{eqnarray*}
%  \frac{t_{\cal B}}{t_{opt}}
%  \geq
%  \frac{3-\eps'}{\eps'+1}
%  \stackrel{\scriptsize \eps' \to 0}\nearrow 3
%  \;
%\end{eqnarray*}
%}
%
%\vspace*{5cm}
%
%\begin{block}<6>{Theorem}
%In $\OO(mn+n^2 \log n)$ time, using
%  $\OO(n)$ space, we can compute a $t_{\B}$-spanner $G'=(V,E\cup\{e\})$
%  where $t_{\B} < 3 t_{opt}$.
%  \end{block}
%\end{frame}
%\begin{frame}
%\frametitle{Open Problems}
%%\vspace*{1cm}
%
%\begin{itemize}
%\item {Is there an exact algorithm with running time $o(n^4)$ using linear space?}
%\pause
%\item {Can we achieve a $(1+\eps)$-approximation within the same time
%bound as $(2+\eps)$-approximation?} %\textcolor{red}{<<<< Partially Solved.}%in Theorem~\ref{thm:mainAPX}?
%\pause
%\item {A natural extension is to allow more than one edge to be added.
%Can we generalize our results to this case?}
%\pause
%\item What about edge removal? \vspace{.3cm}
%\end{itemize}
%\end{frame}
%

%\section{}
%\begin{frame}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{More about geometric spanners ...}
\vspace*{-3mm}

\begin{center}
\includegraphics[height=0.9\textheight]{spanner-book}
\end{center}
\end{frame}
\section{}
\begin{frame}
\begin{center}
\includegraphics<1>[width=0.2\textwidth]{QM}%{mwq}
\end{center}
\vspace*{5mm}


\centerline{\textcolor{red}{\Large  Thank You.}}
\end{frame}
\end{document}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}
%\frametitle{Outline} \tableofcontents[pausesections]
%\end{frame}
%
%\begin{frame}
%\frametitle{Outline}
%\begin{itemize}
%\item BAR tree and its properties.
%\item Compute SSPD.
%\item Show that its size is linear.
%\item Show that its total size is $\OO(n\log n)$.
%\item Applications
%    \begin{itemize}
%        \item Min-cost perfect matching (Varadarajan).
%        \item Region-fault tolerant  spanners.
%        \item low diameter spanners.
%    \end{itemize}
%\end{itemize}
%%\begin{itemize}
%%\item Introduction
%%\item Previous works
%%    \begin{itemize}
%%        \item \textcolor{blue}{ Vertex-edge fault tolerant spanners.}
%%    \end{itemize}
%%\item Region-fault tolerant geometric spanners
%%    \begin{itemize}
%%        \item \textcolor{blue}{$\OO(n\log n)$ size  spanner under convex area faults.}
%%        \item \textcolor{blue}{Linear size spanner under convex area faults \textcolor{red}{(in special cases)}. }
%%        \item \textcolor{blue}{Linear size \textcolor{red}{Steiner} spanner under convex area faults.}
%%        \item \textcolor{blue}{Linear size disk-fault tolerant \textcolor{red}{geodesic} Steiner spanners}
%%    \end{itemize}
%%\item Conclusion and open problem
%%\end{itemize}
%\end{frame}

\section{Introduction}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{WSPD}
%\begin{frame}
%\begin{block}{}\centerline{{\Large Well Separated Pair Decomposition}} \end{block}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{Well Separated Pair Decomposition (WSPD)}
\vspace*{-3mm}

\begin{block}<2->{\textcolor{blue}{Well Separated Pair:}}
 $A,B\subset \Bbb{R}^d$ are \textcolor{blue}{$s$-well separated} ($s>0$), {if  $\exists$ disjoint balls, $D_A$ and $D_B$ such that}
\begin{itemize}
\item \only<3->{$A\subseteq D_A$ and $B\subseteq D_B$.}
%\pause
\item \only<4->{$\dist(D_A,D_B)\geq s\times \max(\radius(D_A),\radius(D_B)).$}
%The distance between $C_A$ and $C_B$ is at least $s\times\rho$.}
\end{itemize}
\end{block}
%\only<4->{$s$: {Separation constant}}
%\vspace*{-0.5cm}
\vfill

\begin{center}
\includegraphics<2>[width=\textwidth]{WSP1}
\includegraphics<3>[width=\textwidth]{WSP2}
\includegraphics<4->[width=\textwidth]{WSP3}
\end{center}
\end{frame}
\begin{frame}[t]
\frametitle{Well Separated Pair Decomposition (WSPD)}
\begin{block}{\textcolor{blue}{\textcolor{red}{W}ell \textcolor{red}{S}eparated \textcolor{red}{P}air \textcolor{red}{D}ecomposition:}}
%Let $\pointset\subset \Bbb{R}^d$.
A WSPD for $\pointset\subset \Bbb{R}^d$ w.~r.~t. $s>0$ is a set $\{(A_i,B_i)\}_{i=1}^m$ of pairs of non-empty subsets of $\pointset$ such that
\begin{itemize}
\item For each $i$, $A_i$ and $B_i$ are $s$-well separated,
\item For any two distinct point $p$ and $q$ of $\pointset$, there is \textcolor{red}{exactly} one  $i$ s. t.
\begin{itemize}
\item $p\in A_i$ and $q\in B_i$  or
\item $q\in A_i$ and $p\in B_i$.
\end{itemize}
\end{itemize}
\end{block}
\vspace*{1mm}

\pause
$m:$ \textcolor{blue}{Size of WSPD.}
%\begin{itemize}
%\item Does a WSPD exist for each set $V$ with respect to each $s>0$?  \textcolor{blue}{YES.}
%\item Does a WSPD with small size exist for each set $V$?  \textcolor{blue}{YES.}
\pause

\vspace*{0.3cm}

\begin{block}{}
%Callahan and Kosaraju found an algorithm that
We can construct a WSPD of size $\OO(s^d\cdot n)$ for each point set in $\OO(n\log n)$ time using $\OO(n)$ space. (Callahan \& Kosaraju '95)
%\end{itemize}
\end{block}
\end{frame}

\begin{frame}[t]
%About quadratic total size of WSPD.
\begin{block}{Total size of WSPD}
%The number of pairs in WSPD is linear but
There are point sets such that for any WSPD $\{(A_i,B_i)\}_i$ of them,
$$\sum_i (|A_i|+|B_i|)=\Omega(n^2).$$
\end{block}
\begin{center}
\includegraphics<1>[width=\textwidth]{WSPD-quadratic-size}
\includegraphics<2>[width=\textwidth]{WSPD-quadratic-size-2}
\includegraphics<3>[width=\textwidth]{WSPD-quadratic-size-3}
\includegraphics<4>[width=\textwidth]{WSPD-quadratic-size-4}
%\includegraphics<2>[width=0.7\textwidth]{SSP2}
%\includegraphics<3>[width=0.7\textwidth]{SSP3}
\end{center}

\only<4>{$A_i$ and $B_i$ are not $s$-well-separated ($s>2$) because
$$\dist(D_{A_i},D_{B_i})\not\geq s\times 1/2.$$
So $A_i$ is singleton.}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{SSPD}
%\subsubsection{Definition of SSPD}
\begin{frame}[t]
\frametitle{Semi Separated Pair Decomposition}
%\vspace*{4mm}
\vspace*{-0.3cm}

\begin{block}{Semi Separated Pair:}
%Let $s>0$ and $A,B\subset \Bbb{R}^d$.
$A, B\subset \Bbb{R}^d$ are \textcolor{blue}{$s$-semi~separated} ($s>0$), if $\exists$
 disjoint balls, $D_A$ and $D_B$ such that
\begin{itemize}
\item \only<2->{$A\subseteq D_A$ and $B\subseteq D_B$.}
%\pause
\item \only<3->{$\dist(D_A,D_B)\geq s\times \textcolor{red}{\min}(\radius(D_A),\radius(D_B)).$}
\end{itemize}
\end{block}
%\vspace*{-0.1cm}
%\vfill

\begin{center}
\includegraphics<1>[width=0.7\textwidth]{SSP1-new}
\includegraphics<2>[width=0.7\textwidth]{SSP2-new}
\includegraphics<3>[width=0.7\textwidth]{SSP3-new}
\end{center}

%\only<4->{\vspace*{-1.2cm}}
%
%\begin{block}<4->{\textcolor{red}{Well Separated Pair:}}
%if $\dist(D_A,D_B)\geq s\times \textcolor{red}{\max}(\radius(D_A),\radius(D_B)).$
%\end{block}
%%\vspace*{2in}
\end{frame}

\begin{frame}
\frametitle{Semi Separated Pair Decomposition}
\begin{block}<1->{\textcolor{red}{S}emi \textcolor{red}{S}eparated
\textcolor{red}{P}air \textcolor{red}{D}ecomposition:}
 Just replace WS by SS in WSPD definition.
%With this formulation $A$ and $B$ are \textcolor{red}{well-separated} if
%$$\dist(D_A,D_B)\geq s\times \max(\radius(D_A),\radius(D_B)).$$
\end{block}
\vspace*{0.5cm}

\begin{block}<2->{The goal:}
To construct an SSPD $\{(A_i,B_i)\}_{i=1}^m$   such that

\begin{itemize}
\item $m=\OO(n)$,
\item $\sum_{i}(|A_i|+|B_i|)$ is subquadratic. %=\OO(n\log n)$.
\end{itemize}
\end{block}
\vspace*{0.5cm}

\begin{block}<3->{Note:}
The summation $\sum_{i}(|A_i|+|B_i|)$ has $\Omega(n\log n)$ lower bound for  any SSPD or WSPD of any set of $n$ point.
\end{block}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
%\frametitle{Applications of SSPD}
\frametitle{SSD (Varadarajan, FOCS'98)}
\vspace*{-6mm}

\begin{block}<-3>{Semi Separated Pair:}
%Let $s>0$ and $A,B\subset \Bbb{R}^d$.
$A, B\subset \Bbb{R}^d$ are \textcolor{blue}{$s$-semi~separated} ($s>0$), if $\exists$
 $D_A$  s. t.
\begin{itemize}
\item \only<2-3>{$A\subseteq D_A$,}
%\pause
\item \only<3>{$B$ is outside the ball with %the same center as $D_A$ but
radius $s\times r_A$. }
\end{itemize}
\end{block}
\vspace*{-0.3cm}
%\vfill

\begin{center}
\includegraphics<1>[width=0.65\textwidth]{V-SSP1}
\includegraphics<2>[width=0.65\textwidth]{V-SSP2}
\includegraphics<3>[width=0.65\textwidth]{V-SSP3}
%\includegraphics<4>[width=0.4\textwidth]{V-SSP4}
\end{center}
\end{frame}
\begin{frame}
%\frametitle{Applications of SSPD}
%SSD (Varadarajan, FOCS'98)
\frametitle{SSD (Varadarajan, FOCS'98)}

\textcolor{red}{Refined} SSD: Replace  $(A,B)$ by $(A,B_1), \ldots, (A,B_8)$.

\begin{center}
\includegraphics<1>[width=0.8\textwidth]{V-SSP35}
\includegraphics<2>[width=0.8\textwidth]{V-SSP4}
\includegraphics<3->[width=0.8\textwidth]{V-SSP5}
\end{center}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\begin{block}{}\centerline{{\Large How to compute an SSPD?}} \end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%
\section{Computing SSPD}
\begin{frame}
\frametitle{Computing SSPD}
\begin{block}{Computing SSPD:}
\begin{itemize}
\item The algorithm is the same as the algorithm for computing WSPD.
\item We use BAR-tree instead of fair split tree.
\end{itemize}
\end{block}
\vfill

\begin{block}<2->{Balanced Aspect Ratio tree (Duncan, Goodrich, Kobourov,'01)}
\begin{itemize}
\item a binary space partition (BSP) tree,
\item the region associated to each node is ``fat'' and convex (like quadtree or Octree),
\item depth of the tree is $\OO(\log n)$ (like k-d tree),
\item the tree has $\OO(n)$ size,
\item each leaf region contains at most one point.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%
%\subsection{BAR tree}
%\begin{frame}
%\frametitle{BAR tree}
%Cut set:= $\{ |, -\hspace*{-1mm}-, /, \backslash \}$
%
%\begin{center}
%\includegraphics<1>[width=0.5\textwidth]{region-1}
%\includegraphics<2>[width=0.5\textwidth]{region-2}
%\includegraphics<3>[width=0.5\textwidth]{region-3}
%\includegraphics<4>[width=0.5\textwidth]{region-4}
%\includegraphics<5>[width=0.5\textwidth]{region-5}
%\includegraphics<6>[width=0.5\textwidth]{region-6}
%\includegraphics<7>[width=0.5\textwidth]{region-7}
%\includegraphics<8>[width=0.5\textwidth]{region-8}
%\includegraphics<9>[width=0.9\textwidth]{region-9}
%\end{center}
%\end{frame}
%%%%%%%%%%%%%%%%
%\begin{frame}
%\frametitle{BAR tree}
%\vspace*{-3mm}
%
%%Cut set:= $\{ |, -\hspace*{-1mm}-, /, \backslash \}$
%\begin{block}{Theorem: (Duncan, Goodrich, Kobourov,'01)}
%For any region $R$ and a constant $\beta\in (1/2,1)$, we can cut~$R$
%\begin{itemize}
%\item into two  regions s.~t. $|R_1|\leq \beta |R|$ and $|R_2|\leq \beta |R|$, or
%\item  twice into three regions s.~t. $|R_1|\leq \beta |R|$ and $|R_3|\leq \beta |R|$, and  $|R_4|\leq \beta |R|$.
%\end{itemize}
%\textcolor{red}{All the generated regions are ``fat''.}
%\end{block}
%\begin{center}
%\includegraphics<1->[width=0.9\textwidth]{2-cuttable}
%\end{center}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\subsection{Algorithm}
%\begin{frame}[t]
%\frametitle{Computing SSPD}
%\vspace*{-3mm}
%
%Assume $\tree$ is a BAR tree on the point set. We make $\tree'$ from $\tree$ by the following changes:
%\begin{itemize}
%\item remove ``heavy'' nodes, \pause
% \only<-2>{   \begin{itemize} %<2>
%    \item the degree of each node is at most 3,
%    \item the number  of points in the node at level $i$ of the tree is at most $\beta^in$.
%    \end{itemize}
%    }
%    \pause
%\item repeat ``light'' nodes.
%\end{itemize}
%\begin{center}
%\includegraphics<1>[width=\textwidth]{2-cuttable}
%\includegraphics<2>[width=\textwidth]{change-tree}
%\includegraphics<4>[width=\textwidth]{tree-to-tree-prime}
%\end{center}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%\frametitle{Computing SSPD}
%\vspace*{-3mm}
%\begin{block}{Observation:}
%We have $\OO(1/\beta^\ell)$ node in level $\ell$ of $\tree'$.
%\end{block}
%Proof.
%
%$N(\ell):=$  all node in level $\ell$ of \textcolor{red}{$\tree'$}.
%
%$N'(\ell):=$  parents of the nodes in $N(\ell)$ in  \textcolor{red}{$\tree$}. %after removing ``heavy'' nodes.
%\pause
%
%Obviously $|N(\ell)|=\OO(|N'(\ell)|)$.
%\vspace*{-0.3cm}
%
%\begin{flushright}
%\includegraphics<3->[width=0.8\textwidth]{bound-level-nodes}
%\end{flushright}
%\only<3->{
%
%\pause  \pause
%\vspace*{-4.5cm}
%
%$|N'(\ell)|\leq 1/\beta^\ell$.
%}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{Computing SSPD}
\vspace*{-3mm}
%\medskip
\begin{algorithm}[H]
\SetLine
\For{all internal nodes $\mynode$ of $\tree$}{
\For{ each pair $(\mynode_i,\mynode_j)$ of children of $\mynode$}{
$\Findpairs(\mynode_i,\mynode_j)$\;
}
}
\caption{{\sc SSPD$(\tree)$}\label{alg:sspd}}
\end{algorithm}
%%%%%%%%%%%%%%
\only<2->{
\begin{algorithm}[H]
\SetLine
\eIf{\textcolor{red}{$\dist(\regionof{\mynode},\regionof{\mu}) \geq \frac{(s+1)\alpha}{2}\cdot\min\{\diam(\regionof{\mynode}),\diam(\regionof{\mu})\}$} or $\mynode$ is leaf or $\mu$ is leaf}{\Return $(V(\mynode), V(\mu))$\;}
{
\For{ all children $\mynode_i$ of $\mynode$ and children $\mu_j$ of $\mu$ }{\Return $\Findpairs(\mynode_i,\mu_j)$\;}
}
 \caption{$\Findpairs(\mynode, \mu)$\label{alg:Findpair}}
\end{algorithm}
}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}%[t]
\frametitle{Computing SSPD}
%\begin{block}{Theorem.}
\begin{theorem}
Given a set $V$ of $n$ points in $\Reals^d$ and $s>0$ we can compute
an SSPD with respect to $s$ having $\OO(n)$ pairs and total size $\OO(n\log n)$
in $\OO(n\log n)$ time.
%, where $\alpha$ is a
%constant greater than $18d\sqrt{d}$.
\end{theorem}
%\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%\frametitle{Computing SSPD}
%%\vspace*{-3mm}
%\begin{block}{If $(V(\mynode),V(\mu))\in \myS$ ($\myS$ is the  SSPD alg. output) then:}
%    \begin{itemize}
%    \item[(i)] $\mynode$ and  $\mu$ belongs to the same level in $\tree'$,\pause
%    \item[(ii)] $\dist(\regionof{\mynode},\regionof{\mu}) \geq \frac{(s+1)\alpha}{2}\cdot\min\{\diam(\regionof{\mynode}),\diam(\regionof{\mu})\}$ and \pause
%    \item[(iii)]
%        $\dist(\regionof{parent(\mynode)},\regionof{parent(\mu)})<
%        \frac{(s+1)\alpha}{2}\cdot\min\{\diam(\regionof{parent(\mynode)}),
%    \diam(\regionof{parent(\mu)})\}$.
%    \end{itemize}
%\end{block}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%\frametitle{Computing SSPD}
%\framesubtitle{Why $\myS$ is a  SSPD?}
%\vspace*{-3mm}
%
%\begin{block}{Lemma:}
%If
%$\dist(\regionof{\mynode},\regionof{\mu}) \geq \frac{(s+1)\alpha}{2}\cdot\min\{\diam(\regionof{\mynode}),\diam(\regionof{\mu})\}$
%then $(V(\mynode),V(\mu))$ is $s$-semi-separated.
%\end{block}
%\begin{center}
%\includegraphics<2>[width=0.7\textwidth]{SSPD-diam-1}
%\includegraphics<3>[width=0.7\textwidth]{SSPD-diam-2}
%\includegraphics<4>[width=0.7\textwidth]{SSPD-diam-3}
%\end{center}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%\frametitle{Computing SSPD}
%\framesubtitle{Why $\myS$ is a SSPD?}
%\vspace*{-3mm}
%For each $p,q\in V, \exists! (A,B)\in \myS \mbox{ s. t. } p\in A  \mbox{ and } q\in B$ or vice versa.
%\vspace*{-5mm}
%
%\begin{center}
%\includegraphics<2>[width=0.8\textwidth]{Tree-1}
%\includegraphics<3>[width=0.8\textwidth]{Tree-2}
%\includegraphics<4>[width=0.8\textwidth]{Tree-3}
%\end{center}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%\frametitle{Computing SSPD}
%\framesubtitle{Size  and total weight of $\myS$.}
%\vspace*{-3mm}
%$\overline{\myS}(\ell)=\{(\mynode,\mu) | \mynode, \mu\in N(\ell)\  \&$  \vspace*{-5mm}
%
%$$\dist(\regionof{\mynode},\regionof{\mu}) < \frac{(s+1)\alpha}{2}\cdot\min \diam\}$$
%%$$\dist(\regionof{\mynode},\regionof{\mu}) < \frac{(s+1)\alpha}{2}\cdot\min\{\diam(\regionof{\mynode}),\diam(\regionof{\mu})\}\}$$
%\vspace*{-5mm}
%
%\begin{block}{Lemma:}
%$|\overline{\myS}(\ell)|=\OO(s^2/\beta^\ell)$.
% %and $\sum\limits_{\mynode,\mu\in \overline{\myS}(\ell)}(|V(\mynode)|+|V(\mu)|)=\OO(s^d\cdot n).$
%\end{block}
%Proof.  Reorder  $(\mynode,\mu)$ s. t. $\diam(\regionof{\mynode})\leq  \diam(\regionof{\mu}).$
%\\ {\bf Claim:} Each node $\mynode$ appears in $\OO(s^2)$ pairs as the first element.
%\vspace*{-8mm}
%
%\begin{center}
%\includegraphics<2>[width=0.4\textwidth]{SSPD-Size-1}
%\includegraphics<3>[width=0.4\textwidth]{SSPD-Size-2}
%\includegraphics<4>[width=0.4\textwidth]{SSPD-Size-3}
%\includegraphics<5>[width=0.4\textwidth]{SSPD-Size-4}
%\end{center}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%\frametitle{Computing SSPD}
%\framesubtitle{Size  and total weight of $\myS$.}
%\vspace*{-3mm}
%%$\overline{\myS}(\ell)=\{(\mynode,\mu) | \mynode, \mu\in N(\ell)\  \&$  \vspace*{-5mm}
%%
%%$$\dist(\regionof{\mynode},\regionof{\mu}) < \frac{(s+1)\alpha}{2}\cdot\min \diam\}$$
%%\vspace*{-5mm}
%%
%\begin{block}{Lemma:}
%There is $\OO(s^2\cdot n)$ pairs in $\myS$.
%\end{block}
%Proof.   If $(V(\mynode),V(\mu))\in \myS$ and $\mynode,\mu\in N(\ell)$ then  $(parent(\mynode),parent(\mu))\in \overline{\myS}(\ell-1)$.
%\begin{eqnarray*}
%|\myS| &=& \sum_{\ell=0}^{\log_{1/\beta} n} |\myS(\ell)|\\
%&=& \OO\left(\sum_{\ell=0}^{\log_{1/\beta} n} |\overline{\myS}(\ell)|\right)\\
%&=& \OO\left(\sum_{\ell=0}^{\log_{1/\beta} n} s^2/ \beta^\ell\right)\\
%&=& \OO\left(s^2\cdot (1/\beta)^{\log_{1/\beta}n}\right) = \OO\left(s^2\cdot n\right).
%\end{eqnarray*}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%\frametitle{Computing SSPD}
%\framesubtitle{Size  and total weight of $\myS$.}
%\vspace*{-3mm}
%%$\overline{\myS}(\ell)=\{(\mynode,\mu) | \mynode, \mu\in N(\ell)\  \&$  \vspace*{-5mm}
%%
%%$$\dist(\regionof{\mynode},\regionof{\mu}) < \frac{(s+1)\alpha}{2}\cdot\min \diam\}$$
%%\vspace*{-5mm}
%%
%\begin{block}{Lemma:}
%$$\sum_{(\mynode,\mu) \in \myS} (|V(\mynode)|+|V(\mu)|)=\OO\left(s^2\cdot n \log n\right).$$
%\end{block}
%Proof.
%\begin{eqnarray*}
%\hspace*{-1cm} \sum_{\substack{(\mynode,\mu) \in \myS\\ \mynode,\mu \in \levelset(\ell)}}
%(|V(\mynode)|+|V(\mu)|) &\leq&\hspace*{-3mm} \sum_{\substack{(\mynode,\mu) \in \myS\\ \mynode,\mu \in \levelset(\ell)}} (|V(par(\mynode))|+|V(par(\mu))|)\\
%&=&\hspace*{-5mm}  \sum_{(\mynode,\mu)\in \overline{\myS}(\ell-1)} \OO( |V(\mynode)|+|V(\mu)| )\\
%&=& \OO(\frac{s^2}{\beta^{\ell-1}} \times \beta^{\ell-1}\cdot n)\\
%&=& \OO(s^2\cdot n).
%\end{eqnarray*}
%\end{frame}
\section{Applications}
\begin{frame}
\frametitle{Applications}
\begin{block}{Applications of SSPD (so far):}
\begin{itemize}
\item Min-cost perfect matching (Varadarajan '98),\pause
\item Low diameter spanners (Abam, Carmi, Farshi, Smid~'09),\pause
\item Region-fault tolerant geometric spanners in 2D (Abam, de Berg, Farshi, Gudmundsson '07),\pause
\item Spanners for imprecise points (Abam, Carmi, Farshi, Smid '09),\pause
\item Spanners for complete $k$-partite graphs (Abam, Carmi, Farshi, Smid '09).
\end{itemize}
\end{block}
\end{frame}
%
%\begin{frame}
%\frametitle{Spanners}
%\framesubtitle{Introduction}
%\begin{columns}[c]
%\begin{column}[c]{0.4\textwidth}
%%\hspace*{-0.5cm}
%%\begin{center}
%\includegraphics<1>[width=\textwidth]{EG}
%\includegraphics<2>[width=\textwidth]{t-spanner-def}
%\includegraphics<3>[width=\textwidth]{t-spanner-def-2}
%\includegraphics<4->[width=\textwidth]{t-spanner-def-3}
%%\end{center}
%\end{column}
%%\hspace*{-5mm}
%\begin{column}{0.6\textwidth}
%
%\begin{block}<1->{Geometric Network (Euclidean Graph)}
%Weighted undirected graph  $G(\pointset,E)$ s.t.
%\begin{itemize}
%\item $\pointset\subset \mathbb{R}^d$.
%\item for each $e=(u,v)\in E$, $wt(e)=|uv|$.
%\end{itemize}
%\end{block}
%
% %\pause
% %\vspace*{5mm}
%\begin{block}<2->{t-Spanner}
%For each { $u,v\in \pointset$}, there is a path between $u$ and $v$ of
%length $\leq t \times |uv|$. %Eucl. dist($u,v$).
%\hfill \textcolor{red}{($t$-path)}
%\end{block}
%
%%\pause %\vspace*{0.5cm}
%
%%\begin{block}<5>{}
%% $(1+\eps)$-Spanners \textcolor{red}{approximate}
%%the complete graphs with error $\eps$.
%%\end{block}
%\end{column}
%\end{columns}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%Spanners with diameter 2%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%
\section{Low-diam. S.}
\subsection{Spanners with diameter 2}
\begin{frame}[t]
\frametitle{Spanners with diameter 2}
\vspace*{-3mm}

\begin{algorithm}[H]
\SetLine
Compute SSPD of $\pointset$ w. r. t. $s:=\frac {4} {t-1}$\;
\ForEach({\\ \small assuming $A_i$ is smaller than $B_i$}){semi-separated pair $(A_i,B_i)$}{
Choose an arbitrary point $p\in A_i$\;
Connect all the points in $A_i\cup B_i$ to $p$\;
}
\Return $\graph(\pointset,E)$.
\caption{\sc Diameter-2-Spanner$(\pointset,t)$}
\end{algorithm}
\vspace*{-5mm}

\begin{center}
\includegraphics<1>[width=0.65\textwidth]{SSP-1}
\includegraphics<2>[width=0.65\textwidth]{SSP-2}
\includegraphics<3>[width=0.65\textwidth]{SSP-3}
\end{center}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Spanners with diameter $\OO(\log n)$}
\begin{frame}[t]
\frametitle{Spanners with diameter $\OO(\log n)$}
\vspace*{-3mm}

\begin{algorithm}[H]
\SetLine
Compute SSPD of $\pointset$ w. r. t. $s:=\frac {4} {t-1}$\;
\ForEach({\\ \small assuming $A_i$ is smaller than $B_i$}){semi-separated pair $(A_i,B_i)$}{
Choose an arbitrary point $p\in A_i$\;
Draw $k$ cones with apex at the center of $D_{A_i}$\;
In each cone, connect  the closest point to $A_i$ to $p$\;
}
\Return $\graph(\pointset,E)$.
\caption{\sc Low-Diameter-Spanner$(\pointset,t)$}
\end{algorithm}
\vspace*{-5mm}

\begin{center}
\includegraphics<2>[width=0.8\textwidth]{low-diam-alg-1}
\includegraphics<3>[width=0.8\textwidth]{low-diam-alg-2}
\includegraphics<4>[width=0.8\textwidth]{low-diam-alg-3}
\includegraphics<5>[width=0.8\textwidth]{low-diam-alg-4}
\end{center}

\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%{ Min-cost perfect matching} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\section{Min-cost perfect matching}
%\begin{frame}[t]
%\frametitle{Min-cost perfect matching}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%Region fault-tolerant spanners%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%
\section{R. F. T.  spanners}
%\begin{frame}[t]
%\frametitle{Region-fault tolerant spanners}
%\end{frame}
%\section{Introduction}

%\begin{frame}[t]
%\vspace*{-0.8cm}
%
%\hspace*{-1cm}
%$$\begin{array}{lcc}
%\includegraphics[width=0.4\textwidth]{points}
%&
%\includegraphics[width=0.1\textwidth]{Arrow}
%&
%\includegraphics[width=0.4\textwidth]{spanner}\\
%\mbox{ Given a set } \pointset\subset \Bbb{R}^d \mbox{ and } \eps>0 & & \mbox{ Sparse $\onepluseps$-Spanner }\\
%& &
%\includegraphics[width=0.4\textwidth]{complete-graph}
%\end{array}
%$$
%\vspace*{-1.5in}
%
%\mbox{\textcolor{red}{Quality:}}%Sparseness:}}
%\begin{itemize}
%\item Linear size (number of edges)
%\item Bounded degree
%\item Low weight
%\item Low diameter
%\end{itemize}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\section{Previous works}
%\begin{frame}[t]
%\begin{block}<1->{}
%\centerline{\large How can we incorporate fault-tolerance into
%$t$-spanners?}
%\end{block}
%\vspace*{5mm}
%
%\only<2->{\textcolor{red}{Vertex and edge fault-tolerant:}}
%%\vspace*{5mm}
%
%\includegraphics<2>[width=0.45\textwidth]{edge-vertex-example}%\hfill
%\includegraphics<3>[width=0.45\textwidth]{edge-vertex-example2}%\hfill
%\includegraphics<3>[width=0.45\textwidth]{edge-vertex-example-comp-2}
%\includegraphics<4>[width=0.45\textwidth]{edge-vertex-example3}%\hfill
%\includegraphics<4>[width=0.45\textwidth]{edge-vertex-example-comp-3}
%%\vspace*{-13mm}
%
%\only<2>{\hspace*{1in} $\graph$}%\GminusFault{\cgr}{F}$$
%\only<3>{\hspace*{1in} $\graph$\hspace*{1.9in} $\cgr$}
%\only<4>{\hspace*{.2in} $\graph\myminus$ red vertices and
%edges\hspace*{0.5in} $\cgr\myminus$ red vertices and edges}
%%$$\hspace*{0.1in}\graph \hspace*{3in}  \GminusFault{\cgr}{F}$$
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%\begin{block}<1->{}
%\centerline{\large How can we incorporate fault-tolerance into
%$t$-spanners?}
%\end{block}
%\vspace*{5mm}
%
%{\textcolor{red}{Vertex and edge fault-tolerant:}} \vspace*{5mm}
%
%\begin{block}{\textcolor{blue}{Previous results}} %\vspace*{2mm}
%
%\begin{itemize}
%\item $k$-fault-tolerant spanner with size $\OO(k n \log n)$
%    (Levcopolous \etal).
%\item Lukovski improved it to $\OO(kn)$ edges which is optimal.
%%\item Czumaj and Zhao showed that the greedy approach produce $k$-fault tolerant geometric spanner with degree $\OO(k)$ and total weight $\OO(k^2\cdot wt(MST))$.
%\item The greedy approach produce $k$-fault tolerant geometric spanner
%    with degree $\OO(k)$ and total weight $\OO(k^2\cdot wt(MST))$
%    (Czumaj \& Zhao).
%\end{itemize}
%\end{block}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{Region-fault tolerant spanners}
%\begin{block}<1->{}
%\centerline{\large How can we incorporate fault-tolerance into
%$t$-spanners?}
%\end{block}
%\vspace*{5mm}

\textcolor{red}{Region fault-tolerant:}

\includegraphics<2>[width=0.525\textwidth]{G} %\hfill
\includegraphics<2>[width=0.525\textwidth]{Gc}
\includegraphics<3>[width=0.525\textwidth]{GwithF} %\hfill
\includegraphics<3>[width=0.525\textwidth]{GcwithF}
\includegraphics<4->[width=0.525\textwidth]{GminusF} %\hfill
\includegraphics<4->[width=0.525\textwidth]{GcminusF}

\only<2>{$\hspace*{1in}\graph \hspace*{1.3in} \cgr$}
\only<3>{$\hspace*{1in}\graph %\hspace*{2.2in} \GminusFault{\graph}{F}
\hspace*{1.3in} \cgr$}
\only<4->{$\hspace*{1in}\GminusFault{\graph}{F} %\hspace*{2.2in} \GminusFault{\graph}{F}
\hspace*{1in} \GminusFault{\cgr}{F}$}

%\only<5-7>{\vspace*{-4cm}
%\begin{center}
%\includegraphics<5>[width=0.5\textwidth]{counter-example1}
%\includegraphics<6>[width=0.5\textwidth]{counter-example2}
%\includegraphics<7>[width=0.5\textwidth]{counter-example3}
%\end{center}
%}
%\only<8>{\vspace*{-2cm}

\vspace*{0.5cm}

\begin{block}<5->{}
\textcolor{blue}{ $\graph$ is  \cft  if it is fault-tolerant
under each {\bf convex} area fault.}
\end{block}
%}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%\begin{block}{}
%\textcolor{red}{No sparse region-fault tolerant spanners with respect to non-convex faults.}
%\end{block}
%%\vspace*{1mm}
%\begin{columns}[c]
%\begin{column}[c]{0.4\textwidth}
%
%$\Htwo$: The family of regions that are union of two half-planes
%
%\vspace*{1cm}
%\pause
%\begin{block}{}
%\textcolor{red}{Complete graph is the only \hhft spanner.}
%\end{block}
%%\vspace*{-5mm}
%\end{column}
%\hspace*{-5mm}
%\begin{column}{0.6\textwidth}
%\vspace*{-5mm}
%
%\begin{center}
%\includegraphics<1>[width=\textwidth]{HH1-new}
%\includegraphics<2>[width=\textwidth]{HH1-new}
%\includegraphics<3>[width=\textwidth]{HH2-new}
%\includegraphics<4>[width=\textwidth]{HH3-new}
%\includegraphics<5->[width=\textwidth]{HH4-new}
%\end{center}
%%\includegraphics[width=2.3in]{Figures/HH15.pdf}\hfill
%%\includegraphics[width=2.3in]{Figures/HH2.pdf}
%\end{column}
%\end{columns}
%
%\only<6>{
%\vspace*{-1cm}
%
%\begin{block}{}
%\centerline{We consider the case where $\F$ is the family $\C$ of convex sets.}
%\end{block}
%}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}%[t]
\frametitle{Region-fault tolerant spanners}
\begin{block}<1->{\textcolor{blue}{Observation.}}
If $\myH$ be the family of half-planes then\\
\centerline{$\graph$ is \cft $\iff$ $\graph$ is \hft.}
\end{block}
%\vspace*{-1cm}
%
%\pause
%\begin{columns}[t]
%\begin{column}[t]{0.5\textwidth}
%\textcolor{blue}{Proof.}
%\begin{itemize}
%\item[] $(\Rightarrow)$ Obvious.
%\pause
%\vspace*{3mm}
%
%\item[] $(\Leftarrow)$ Let $\graph$ be an \hft and $\faultarea\in \C$ and arb. points $u$ and $v$.
%\pause
%\vspace*{3mm}
%
%    \begin{itemize}
%     \item[Case 1:] $u$ and $v$ are \textcolor{red}{disconnected} in $\cgraph{\pointset}\myminus \faultarea$. \hspace*{1cm}\textcolor{red}{Done!}
%\pause
%\vspace*{3mm}
%
%     \item[Case 2:] $u$ and $v$ are \textcolor{red}{connected} in $\cgraph{\pointset}\myminus \faultarea$. Let $\path$ be the shortest path.
%    \end{itemize}
%\end{itemize}
%\end{column}
%%\hspace*{-5mm}
%\begin{column}{0.5\textwidth}
%%\vspace*{-5mm}
%\begin{center}
%%\includegraphics<1-5>[width=\textwidth]{empty}
%\includegraphics<6>[width=\textwidth]{HC1}
%\includegraphics<7>[width=\textwidth]{HC2}
%\includegraphics<8>[width=\textwidth]{HC3}
%\includegraphics<9>[width=\textwidth]{HC4}
%\includegraphics<10>[width=\textwidth]{HC45}
%%\includegraphics[width=3in]{Figures/HC6.pdf}
%\includegraphics<11>[width=\textwidth]{HC7}
%\only<12>{ \vspace*{1cm}
%
%\textcolor{blue}{We will talk about} \\[3mm]  \textcolor{red}{\hft} \\[3mm]  \textcolor{blue}{instead of}\\[3mm]  \textcolor{red}{\cft.}}
%\end{center}
%\end{column}
%\end{columns}
%\vspace*{-1cm}
%
\vspace*{1cm}
\begin{block}<2->{}\centerline{We will talk about \hft instead of \cft!}\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{WSPD-based Algorithm}
%\begin{frame}
%\begin{block}{}\centerline{{\Large Well Separated Pair Decomposition}} \end{block}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{Region-fault tolerant spanners}
\framesubtitle{WSPD-based  Algorithm}
\vspace*{-3mm}

\textcolor{blue}{Main idea:} Constructing $t$-spanner using WSPD.

\begin{algorithm}[H]
\SetLine
Compute WSPD of $\pointset$ w. r. t. $s:=\frac {4(t+1)} {t-1}$\;
\For{well-separated pair $(A_i,B_i)$}{
Add edge $(u,v)$ to $E$ ($u\in A_i$ and $v\in B_i$)\;
}
\Return $\graph(\pointset,E)$.
\caption{\sc WSPD-graph$(\pointset,t)$}
\end{algorithm}

\vspace*{-2mm}

\pause
\begin{block}{\textcolor{red}{Observations:}}
\begin{itemize}
\item[1)] What remains from a WSPD after a %half-plane
fault is still a WSPD.
\item[2)] It is sufficient to have a connection between each surviving  pair.
\item[3)] Any triangulation remains connected after each half-plane fault.
\end{itemize}
\end{block}
\end{frame}
\begin{frame}[t]
\frametitle{Region-fault tolerant spanners}
\framesubtitle{WSPD-based Algorithm}
%\vspace*{-3mm}

\begin{algorithm}[H]
\SetLine
Compute WSPD of $\pointset$ w. r. t. $s:=\frac {4(t+1)} {t-1}$\;
\For{each well-separated pair $(A_i,B_i)$}{
Triangulate the space between $\ch{A_i}$ and $\ch{B_i}$.
}
\Return $\graph(\pointset,E)$.
\caption{{\sc WSPD-Fault-Tolerant$(\pointset,t)$}}
\end{algorithm}
\vspace*{5mm}

%\pause
\begin{center}
\includegraphics<2>[width=0.8\textwidth]{WSTriangulate}
\end{center}
%\vspace*{-0.6cm}
%
%\begin{columns}[c]
%\begin{column}[c]{0.8\textwidth}
%
%\begin{block}<3->{\textcolor{blue}{Size:}}
%\begin{itemize}
%\item<3> Sum of the points on the convex hulls of WSPD (could be  $\sum_{i}(|A_i|+|B_i|)=\OO(n^2)$).% but \textcolor{red}{No specific example yet}).
%\item<4> For the points in convex position it is $\OO(n)$.
%\item<5> For uniformly distributed points the expected size is $\OO(n)$.
%\end{itemize}
%\end{block}
%\end{column}
%\begin{column}[c]{0.4\textwidth}
%\only<3>{\textcolor{red}{No example which generates graph with superlinear size yet.}}
%\begin{center}
%\includegraphics<4>[width=\textwidth]{WSPD-convex-pos}
%\end{center}
%\end{column}
%\end{columns}
%
\end{frame}
%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{Region-fault tolerant spanners}
\framesubtitle{WSPD-based Algorithm}
%\vspace*{-0.6cm}

%\begin{columns}[c]
%\begin{column}[c]{0.8\textwidth}

\begin{block}<1->{\textcolor{blue}{Size:}}
\begin{itemize}
\item<1> Sum of the points on the convex hulls of WSPD (could be  $\sum_{i}(|A_i|+|B_i|)=\OO(n^2)$).% but \textcolor{red}{No specific example yet}).
\item<2> For the points in convex position it is $\OO(n)$.
\item<3> The expected size is $\OO(n)$ for uniformly distributed points.
\end{itemize}
\end{block}
%\end{column}
%\begin{column}[c]{0.4\textwidth}
\only<1>{\textcolor{red}{No example which generates graph with superlinear size yet.}}
\begin{center}
\includegraphics<2>[width=0.8\textwidth]{WSPD-convex-pos}
\end{center}
%\end{column}
%\end{columns}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%\frametitle{\cft \textcolor{blue}{Steiner} spanners}
%\begin{columns}[t]
%\begin{column}[t]{0.5\textwidth}
%
%\textcolor{blue}{Main idea:} Add Steiner points s.t. all sets in the WSPD
%have bounded complexity.\\
%\vspace*{3mm}
%
%We use the WSPD constructed by \textcolor{red}{compressed quadtree} (Fisher and Har-Peled).
%
%%\pause
%\vspace*{3mm}
%
%\only<2->{\textcolor{red}{Quadtree:}
%Split each square to four equal squares if it contains > 1 point.}
%
%%\pause
%\vspace*{3mm}
%
%\only<7->{\textcolor{red}{Compressed Quadtree:}
%Keep squares that has $>1$ non-empty child.}
%
%\end{column}
%\begin{column}[t]{0.5\textwidth}
%\begin{center}
%\includegraphics<2>[width=\textwidth]{quadtree-points}
%\includegraphics<3>[width=\textwidth]{quadtree-const-1}
%\includegraphics<4>[width=\textwidth]{quadtree-const-2}
%\includegraphics<5>[width=\textwidth]{quadtree-const-3}
%\includegraphics<6>[width=\textwidth]{quadtree}
%\includegraphics<7>[width=\textwidth]{compress-quadtree}
%\end{center}
%%\vspace*{-3.5in}
%\end{column}
%\end{columns}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%\frametitle{\cft Steiner spanners}
%
%\begin{columns}[c]
%\begin{column}[c]{0.4\textwidth}
%Add corner points for each internal node.
%\vspace*{0.5cm}
%
%\begin{block}<5->{Lemma:}
%Convex hull of any node contains $\leq$ four points.
%\end{block}
%\vspace*{0.5cm}
%
%\begin{block}<6->{Theorem:}
%By adding $\OO(n)$ Steiner point we get a \cft Steiner spanner of $\OO(n)$ size.
%\end{block}
%
%\end{column}
%\begin{column}[c]{0.6\textwidth}
%\includegraphics<1>[width=\textwidth]{Steiner1}
%\includegraphics<2>[width=\textwidth]{Steiner2}
%\includegraphics<3>[width=\textwidth]{Steiner3}
%\includegraphics<4->[width=\textwidth]{Steiner4}
%\end{column}
%\end{columns}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
\subsection{SSPD-based Algorithm}
%\begin{frame}[t]
%\frametitle{\textcolor{red}{Back to } \cft spanners}
%
%\textcolor{blue}{Main idea:} Same as the WSPD algorithm.
%
%\vspace*{0.5cm}
%
%\begin{center}
%\includegraphics[width=0.5\textwidth]{WSTriangulate}
%\end{center}
%\vspace*{0.2cm}
%
%\centerline{\textcolor{red}{But the size might be $\sum_{i}(|A_i|+|B_i|)=\OO(n^2)$.}}
%
%\vspace*{0.4cm}
%
%\begin{block}{Now}
%
%\begin{itemize}
%\item We use a relaxed version of the WSPD called SSPD.
%\item   Some ideas from $\Theta$-graphs.
%\end{itemize}
%\end{block}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%\frametitle{Semi Separated Pair Decomposition}
%%\vspace*{4mm}
%\vspace*{-0.3cm}
%
%\begin{block}{Semi Separated Pair:}
%Let $s>0$ be a real number and $A,B\subset \Bbb{R}^d$.
%$A$ and $B$ are \textcolor{blue}{Semi~Separated} w.r.t. $s$, if $\exists$
%two disjoint balls, $D_A$ and $D_B$ s. t.
%\begin{itemize}
%\item \only<2->{$A\subseteq D_A$ and $B\subseteq D_B$.}
%%\pause
%\item \only<3->{$\dist(D_A,D_B)\geq s\times \min(\radius(D_A),\radius(D_B)).$}
%\end{itemize}
%\end{block}
%
%\vspace*{-0.1cm}
%
%\begin{center}
%\includegraphics<1>[width=0.7\textwidth]{SSP1}
%\includegraphics<2>[width=0.7\textwidth]{SSP2}
%\includegraphics<3>[width=0.7\textwidth]{SSP3}
%\end{center}
%
%\only<4->{\vspace*{-1.2cm}}
%
%\begin{block}<4->{\textcolor{red}{Well Separated Pair:}}
%if $\dist(D_A,D_B)\geq s\times \textcolor{red}{\max}(\radius(D_A),\radius(D_B)).$
%\end{block}
%%\vspace*{2in}
%
%\begin{block}<5->{\textcolor{red}{S}emi \textcolor{red}{S}eparated
%\textcolor{red}{P}air \textcolor{red}{D}ecomposition:}
% Just replace WS by SS in WSPD.
%%With this formulation $A$ and $B$ are \textcolor{red}{well-separated} if
%%$$\dist(D_A,D_B)\geq s\times \max(\radius(D_A),\radius(D_B)).$$
%\end{block}
%%\vspace*{0.1cm}
%
%\begin{block}<6->{}
%\centerline{We can construct an SSPD $\{(A_i,B_i)\}_{i=1}^m$ s. t.
%$\sum_{i}(|A_i|+|B_i|)=\OO(n\log n)$.}
%\end{block}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{Region-fault tolerant spanners}
\framesubtitle{SSPD-based  Algorithm}
\vspace*{-3mm}

\begin{algorithm}[H]
\SetLine
Compute SSPD of $\pointset$ w. r. t. $s:=f(t)$\;
\For{ each semi-separated pair $(A,B)$}{
Do the following\;
}
\Return $\graph(\pointset,E)$\;
\caption{{\sc SSPD-Fault-Tolerant$(\pointset,t)$}}
\end{algorithm}
%\vspace*{-1cm}

\begin{center}
\includegraphics<2>[width=0.8\textwidth]{SSPD-Alg1}
\includegraphics<3>[width=0.8\textwidth]{SSPD-Alg2}
\includegraphics<4>[width=0.8\textwidth]{SSPD-Alg3}
\includegraphics<5>[width=0.8\textwidth]{SSPD-Alg4}
\includegraphics<6>[width=0.8\textwidth]{SSPD-Alg5}
\includegraphics<7>[width=0.8\textwidth]{SSPD-Alg6}
\includegraphics<8>[width=0.8\textwidth]{SSPD-Alg7}
\includegraphics<9>[width=0.8\textwidth]{SSPD-Alg8}
\includegraphics<10>[width=0.8\textwidth]{SSPD-Alg9}
\includegraphics<11>[width=0.8\textwidth]{SSPD-Alg10}
\includegraphics<12>[width=0.8\textwidth]{SSPD-Alg-first-cone-comp}
\end{center}
%
%\vspace*{1cm}
%
%\begin{block}<13>{ Theorem:}
%For any set $\pointset$ of $n$ points and any $\eps>0$, there exist a
%\cft $\t$-spanner of $\pointset$ with $\OO(n\log n)$ edges.
%\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%%\frametitle{The generated graph \graph is \hft $t$-spanner.}
%\vspace*{-3mm}
%
%\begin{block}{The generated graph \graph\  is \hft $t$-spanner.}
%Proof.
%
%$h$: arbitrary half-plane, $p$ and $q$: arbitrary points outside $h$.
%
%$\exists (A,B)\in SSPD$ s. t. $p\in A$ and $q\in B$.
%
%\textcolor{red}{Proof by induction on $\max\{weight(A), weight(B)\}$.}
%
%\begin{itemize}
%\item \textcolor{blue}{Ind. base:} If $\max\{weight(A), weight(B)\}=1$ we are done.
%\item \textcolor{blue}{Ind. hypothesis:} assume it holds for all points in pairs with maximum weight $<k$.
%\item \textcolor{blue}{Ind. step:} suppose $\max\{weight(A), weight(B)\}=k$
%\end{itemize}
%\end{block}
%\vspace*{-3mm}
%
%\begin{center}
%\includegraphics<2>[width=0.5\textwidth]{Lemma-33-1}
%\includegraphics<3>[width=0.5\textwidth]{Lemma-33-2}
%\includegraphics<4>[width=0.5\textwidth]{Lemma-33-3}
%
%\end{center}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%$q_j$: the closest point in the cone to $O_A$ which lies outside $h$.
%
%\begin{block}{\textcolor{blue}{Claim:} $\exists$ an edge connecting $q_j$ to a point of $A$ outside $h$.}
%\begin{itemize}
%\item<1-> $q_j$ lies outside $\mbox{CH}(A\cup \{q_1,\ldots,q_{j-1}\})$.
%\item<4-> $q_j$ is connected to a point in $A\setminus h$.
%\end{itemize}
%\end{block}
%
%\begin{center}
%\includegraphics<2>[width=0.7\textwidth]{Lemma-32-1}
%\includegraphics<3>[width=0.7\textwidth]{Lemma-32-2}
%\includegraphics<4>[width=0.7\textwidth]{Lemma-32-3}
%
%\end{center}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Region-fault tolerant spanners}
\begin{block}{ Theorem:}
For any set $\pointset$ of $n$ points in the plane and any $t>1$, there exist a
\cft $t$-spanner of $\pointset$ with $\OO(n\log n)$ edges.
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%
%%%%%%%Spanners for imprecise points%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%
\section{Spanners for imprecise points}
\begin{frame}[t]
\frametitle{Spanners for imprecise points}
Imprecise point set:

\begin{center}
\includegraphics<2>[width=0.8\textwidth]{Imprecise-point-set}
\includegraphics<3>[width=0.8\textwidth]{Imprecise-point-set-2}
\includegraphics<4>[width=0.8\textwidth]{Imprecise-point-set-3}
\end{center}
\end{frame}
\begin{frame}[t]
\frametitle{Spanners for imprecise points}
Special case: All disks has same radius (say one).
\begin{block}{Observation.}
A WSPD of the centers of disks with respect to $2s+2$ is a WSPD of imprecise point set with respect to~$s$.
\end{block}
\vspace*{1cm}

\begin{block}<2->{Theorem.}
%\begin{theorem}
For any set of $n$ imprecise points in $\Reals^d$ modeled as pairwise
disjoint balls with similar sizes and any $t>1$, there is a
$t$-spanner with $\OO({n}/{(t-1)^d})$ edges which can be computed in
$\OO({n}/{(t-1)^d}+n\log n)$ time.
%\end{theorem}
\end{block}
%\begin{center}
%\includegraphics<2>[width=0.8\textwidth]{Imprecise-point-set}
%\includegraphics<3>[width=0.8\textwidth]{Imprecise-point-set-2}
%\includegraphics<4>[width=0.8\textwidth]{Imprecise-point-set-3}
%\end{center}
\end{frame}
\begin{frame}[t]
\frametitle{Spanners for imprecise points}
\vspace*{-0.3cm}

General case:
\begin{block}{Observation.}
An SSPD of the centers of disks with respect to $3s+3$ is an SSPD of imprecise point set with respect to~$s$.
\end{block}
\only<2-4>{
\begin{algorithm}[H]
\SetLine
Compute SSPD of $\pointset$ w. r. t. $s:=\frac {4} {t-1}$\;
\ForEach({\\ \small assuming $A_i$ is smaller than $B_i$}){semi-separated pair $(A_i,B_i)$}{
Choose an arbitrary point $p\in A_i$\;
Connect all the points in $A_i\cup B_i$ to $p$\;
}
\Return $\graph(\pointset,E)$.
\caption{\sc Spanner-For-Imprecise-Points$(\pointset,t)$}
\end{algorithm}
\vspace*{-15mm}

\begin{flushright}
\includegraphics<2>[width=0.45\textwidth]{SSP-1}
\includegraphics<3>[width=0.45\textwidth]{SSP-2}
\includegraphics<4>[width=0.45\textwidth]{SSP-3}
\end{flushright}
}
\vspace*{1cm}

\begin{block}<5->{Theorem.}
%\begin{theorem}
For any set of $n$ imprecise points in $\Reals^d$ modeled as pairwise
disjoint balls and any $t>1$, there is a
$t$-spanner with $\OO({n\log n}/{(t-1)^d})$ edges which can be computed in
$\OO(n\log n/{(t-1)^d})$ time.
%\end{theorem}
\end{block}
%\begin{center}
%\includegraphics<2>[width=0.8\textwidth]{Imprecise-point-set}
%\includegraphics<3>[width=0.8\textwidth]{Imprecise-point-set-2}
%\includegraphics<4>[width=0.8\textwidth]{Imprecise-point-set-3}
%\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%Spanners for $k$-partite graphs%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{$k$-Partite graph spanner}
\begin{frame}[t]
\frametitle{Spanners for complete $k$-partite graphs}
\vspace*{-0.5cm}

\begin{center}
\includegraphics<1>[width=0.7\textwidth]{2-partite}
\includegraphics<2->[width=0.7\textwidth]{2-partite-2}
%\includegraphics<3>[width=0.65\textwidth]{SSP-3}
\end{center}
\begin{block}<3->{Previous Results (Bose et al.'08)}
\begin{itemize}
\item A $(5+\eps)$-spanner with $\OO(n)$ edges in $\OO(n\log n)$ time.
\item A $(3+\eps)$-spanner with $\OO(n\log n)$ edges in $\OO(n\log n)$ time.
\item For $t<3$, every $t$-spanner must contains $\Omega(n\log n)$ edges.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[t]
\frametitle{Spanners for complete $k$-partite graphs}
\framesubtitle{A $(3+\eps)$-spanner with $\OO(n\log n)$ edges.}
\begin{algorithm}[H]
\SetLine
Compute SSPD of $\pointset$ w. r. t. $s:=6/\eps$\;
\For(\{assuming $A$ is smaller one\}){ each semi-separated pair $(A,B)$}{
$rep_b(A):=$ a blue point in $A$\;
$rep_r(A):=$ a red point in $A$\;
$rep_b(B):=$ the blue point in $B$ that is closest to $A$\;
$rep_r(B):=$ the red point in $B$ that is closest to $A$\;
Connect $rep_b(A)$ to all red points in $B$\;
Connect $rep_r(A)$ to all blue points in $B$\;
Connect $rep_b(B)$ to all red points in $A$\;
Connect $rep_r(B)$ to all blue points in $A$\;
}
\Return $\graph(\pointset,E)$\;
\caption{{\sc Bi-Partite-Spanner$(\pointset,\eps)$}}
\end{algorithm}
\end{frame}
\begin{frame}
\frametitle{Spanners for complete $k$-partite graphs}
\vspace*{-0.5cm}

\begin{center}
\includegraphics<1>[width=0.9\textwidth]{bi-partite-spanner-alg}
\includegraphics<2>[width=0.9\textwidth]{bi-partite-spanner-alg-2}
\includegraphics<3>[width=0.9\textwidth]{bi-partite-spanner-alg-3}
\includegraphics<4>[width=0.9\textwidth]{bi-partite-spanner-alg-4}
\includegraphics<5>[width=0.9\textwidth]{bi-partite-spanner-alg-5}
%\includegraphics<3>[width=0.65\textwidth]{SSP-3}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}[t]
%\frametitle{}
%\end{frame}
%\begin{frame}[t]
%\centerline{\tuebox{\Large Open Problems}}
%\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Future work}
\begin{frame}%[t]
\frametitle{Future work}
\begin{block}{Future work:}
\begin{itemize}
\item Compute SSPD for Non-Euclidean spaces.
\item Apply SSPD to other problems.
\end{itemize}
\end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{}
\begin{frame}
\begin{center}
\includegraphics<1>[width=0.2\textwidth]{QM}%{mwq}
\end{center}
\vspace*{5mm}


\centerline{\textcolor{red}{\Large  Thank You.}}
\end{frame}
\end{document}






































\newpage
\addtocounter{page}{-1}
\newpage

\begin{frame}[t]
%\center\includegraphics[width=4.5in]{iranmap-1.pdf}

Design a road network between cities.
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage

\begin{frame}[t]
%\center\includegraphics[width=4.5in]{iranmap-2.pdf}

Design a road network between cities.
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage

\begin{frame}[t]
%{\centerline{\includegraphics[width=4.5in]{iranmap-3.pdf}}}
%Design a road network between cities.

\vspace*{-3cm}
Ideal network: \textcolor{BrickRed}{Complete Graph!}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage

\begin{frame}[t]
%{\centerline{\includegraphics[width=4.5in]{iranmap-3.pdf}}}
%Design a road network between cities.

\vspace*{-3cm}
Ideal network: \textcolor{BrickRed}{Complete Graph!}

\vspace*{2mm}
\centerline{\tuebox{\Large Too expensive to build!}}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage

\begin{frame}[t]
%{\centerline{\includegraphics[width=4.5in]{iranmap-3.pdf}}}
%Design a road network between cities.

\vspace*{-3cm}
Ideal network: \textcolor{BrickRed}{Complete Graph!}

\vspace*{2mm}
\centerline{\tuebox{\Large Too expensive to build!}}

\vspace*{2mm}
\centerline{\tuebox{\Large Low cost alternative = Sparse $t$-spanners.}}
\end{frame}

\begin{frame}[t]
\tuebox{\Large t-Spanner:}
\\
Given a graph $G(V,E)$ with positive edge weight and a $t>1$.

\vspace*{-1cm}
\hspace*{-1cm}
\noindent
%\includegraphics[width=4.3in]{iranmap-3.pdf}
%\\
%
%\vspace*{-3in}
%\hspace*{3.2in}
%\includegraphics[width=0.5in]{Arrow.pdf}
%\\
%
%\vspace*{-1.7in}
%\hspace*{3.7in}
%\includegraphics[width=3.4in]{iranmap-4.pdf}
%\hspace*{8cm}\parbox[t]{10.5cm}{A sub-graph $G'(V,E')$ of $G$ is a $t$-spanner of $G$ if  $\forall u,v\in V$, there is a path in $G'$ between
%$u$ and $v$ of length $\leq t \times d_G(u,v) $(\textcolor{blue}{$t$-path}).}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage

\begin{frame}[t]
\tuebox{\Large t-Spanner:}
\\
Given a graph $G(V,E)$ with positive edge weight and a $t>1$.

\vspace*{-1cm}
\hspace*{-1cm}
\noindent
%\includegraphics[width=4.3in]{iranmap-3.pdf}
\\

\vspace*{-3in}
\hspace*{3.2in}
%\includegraphics[width=0.5in]{Arrow.pdf}
\\

\vspace*{-1.7in}
\hspace*{3.7in}
%\includegraphics[width=3.4in]{iranmap-4.pdf}
\hspace*{8cm}\parbox[t]{10.5cm}{A sub-graph $G'(V,E')$ of $G$ is a $t$-spanner of $G$ if  $\forall u,v\in V$, there is a path in $G'$ between
$u$ and $v$ of length $\leq t \times d_G(u,v) $(\textcolor{blue}{$t$-path}).}
%
%\vspace*{-1.5cm}
%\noindent\parbox[t]{7cm}{\textcolor{BrickRed}{If $G$ is a complete graph we call $G'$ a $t$-spanner of $V$.}}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage

\begin{frame}[t]
\tuebox{\Large t-Spanner:}
\\
Given a graph $G(V,E)$ with positive edge weight and a $t>1$.

\vspace*{-1cm}
\hspace*{-1cm}
\noindent
%\includegraphics[width=4.3in]{iranmap-3.pdf}
\\

\vspace*{-3in}
\hspace*{3.2in}
%\includegraphics[width=0.5in]{Arrow.pdf}
\\

\vspace*{-1.7in}
\hspace*{3.7in}
%\includegraphics[width=3.4in]{iranmap-4.pdf}
\hspace*{8cm}\parbox[t]{10.5cm}{A sub-graph $G'(V,E')$ of $G$ is a $t$-spanner of $G$ if  $\forall u,v\in V$, there is a path in $G'$ between
$u$ and $v$ of length $\leq t \times d_G(u,v) $(\textcolor{blue}{$t$-path}).}

\vspace*{-1.5cm}
\noindent\parbox[t]{7cm}{\textcolor{BrickRed}{If $G$ is a complete graph we call $G'$ a $t$-spanner of $V$.}}
\end{frame}

%\hspace*{9cm}
%Graph $G'(V,E')$ is a $t$-spanner of $G$ \\
%\hspace*{9cm}
%if
%%$\forall u,v\in V, d_{G'}(u,v)\leq t\cdot d_G(u,v)$.
% $\forall u,v\in V$, there is a path between
%\hspace*{8cm}$u$ and $v$ of length $\leq t \times$ Eucl. dist($u,v$)
%
%\vspace*{-2cm}
%\parbox{8cm}{\textcolor{BrickRed}{Geometric} \textcolor{blue}{$t$-spanner: \\$V\subset \Bbb{R}^d$ \\edge weight= Euclidean distance.}}
%}

\begin{frame}[t]
\tuebox{\Large Sparseness:}
\begin{itemize}
\item {Linear } number of edges
\item Total weight ($O(wt(\mbox{Minimum Spanning Tree}))$)%(compared with weight of MST)
\item Constant maximum degree
\item Logarithmic diameter
\end{itemize}
\vspace*{1cm}
\tuebox{\Large Geometric Graph:}
\begin{itemize}
\item $V\subset \Bbb{R}^d$
\item Edge weight= Euclidean distance between its endpoints.
\end{itemize}
\end{frame}

%\begin{frame}[t]
%\hspace*{-1.5cm}
%%\begin{center}
%\includegraphics[width=3.8in]{EG2.pdf}
%%\end{center}
%\vspace*{-8cm}
%
%\hspace*{8cm}\textcolor{blue}{Geometric Network (Euclidean Graph):}
%
%\hspace*{8cm}{Undirected graph with vertex set {\small $V\subset \Bbb{R}^d$}
%
%\hspace*{8cm}such that the weight of each edge is the
%
%\hspace*{8cm}Euclidean distance between its
%\hspace*{8cm}endpoints.}
%
%\vspace*{1cm}
%\hspace*{8cm}\textcolor{blue}{\large (Geometric) $t$-spanner:}
%
%\hspace*{8cm}For each {\small $u,v\in V$}, there is a path between
%
%\hspace*{8cm}$u$ and $v$ of length $\leq t \times$ Eucl. dist($u,v$)
%\\ \hspace*{8cm}
%(\textcolor{blue}{$t$-path}).
%
%\vspace*{-0.5cm}
%\end{frame}
%
%\begin{frame}
%\centerline{\tuebox{\textcolor{white}{\Large How can we construct a  $t$-spanner?}}}
%%\vspace*{1cm}
%
%{\large The most well-known algorithms are:}%for computing a $t$-spanner with $O(n)$ edges are:}
%\vspace*{0.5cm}
%\begin{itemize}
%\item \textcolor{blue}{Greedy}  (Bern (1989) and  Alth{\"o}fer et al. (1993)).
%\item \textcolor{blue}{$\Theta$-graph} (Clarkson (1987) and Keil (1988)).
%\item \textcolor{blue}{Ordered $\Theta$-graph} (Bose et. al. (2004)).
%\item \textcolor{blue}{Well-Separated Pair Decomposition}  (Arya et. al. (1995)).
%\end{itemize}
%
%\vspace*{0.5cm}
%{ Quality measures:}
%%\Large
%\begin{itemize}
%\item Number of edges
%\item Total weight %(compared with weight of MST)
%\item Maximum degree
%\item Diameter
%\end{itemize}
%\end{frame}
%

\begin{frame}[t]
%\vspace*{1cm}

\textcolor{blue}{Diameter of a $t$-spanner $G(V,E)$:}\\
The smallest integer $k$ such that
 there exist a $k$-link $t$-path between every pair of points.
%
%\vspace*{0.5cm}
%\textcolor{blue}{Problem:} \textcolor{red}{\large Given a $t$-spanner $G(V,E)$, compute the diameter of $G$.}
%
%\vspace*{0.5cm}
%$L_k(p,q)$: The shortest path length between $p$ and $q$ with at most $k$ edges.
%
%\vspace*{0.5cm}
%
%Diameter= The smallest $k$ s. t. $L_k(p,q)\leq t\cdot|pq|$,  for all pairs $p$ and $q$.
%
%\vspace*{0.5cm}
%\textcolor{blue}{\large Algorithm:}
%%\vspace*{0.5cm}
%
%\begin{itemize}
%\item $L_1(p,q)=\left\{
%\begin{array}{lc}
%|pq| & \mbox{if } (p,q)\in E.\\
%+\infty & \mbox{otherwise.}
%\end{array}
%\right.$
%\item $L_k(p,q)=\min\left\{L_{k-1}(p,q), \min\limits_{i+j=k} \{L_{i}(p,r)+L_j(r,q) \} \right\}$.
%\item Construct $L_k$'s until  $L_k(p,q)\leq t\cdot|pq|$,  for all pairs $p$ and $q$.
%\end{itemize}
%
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage
\begin{frame}[t]
%\vspace*{1cm}

\textcolor{blue}{Diameter of a $t$-spanner $G(V,E)$:}\\
The smallest integer $k$ such that
 there exist a $k$-link $t$-path between every pair of points.

\vspace*{0.5cm}
\textcolor{blue}{Problem:} \textcolor{BrickRed}{\large Given a $t$-spanner $G(V,E)$, compute the diameter of $G$.}

%\vspace*{0.5cm}
%$L_k(p,q)$: The shortest path length between $p$ and $q$ with at most $k$ edges.
%
%\vspace*{0.5cm}
%
%Diameter= The smallest $k$ s. t. $L_k(p,q)\leq t\cdot|pq|$,  for all pairs $p$ and $q$.
%
%\vspace*{0.5cm}
%\textcolor{blue}{\large Algorithm:}
%%\vspace*{0.5cm}
%
%\begin{itemize}
%\item $L_1(p,q)=\left\{
%\begin{array}{lc}
%|pq| & \mbox{if } (p,q)\in E.\\
%+\infty & \mbox{otherwise.}
%\end{array}
%\right.$
%\item $L_k(p,q)=\min\left\{L_{k-1}(p,q), \min\limits_{i+j=k} \{L_{i}(p,r)+L_j(r,q) \} \right\}$.
%\item Construct $L_k$'s until  $L_k(p,q)\leq t\cdot|pq|$,  for all pairs $p$ and $q$.
%\end{itemize}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage
\begin{frame}[t]
%\vspace*{1cm}

\textcolor{blue}{Diameter of a $t$-spanner $G(V,E)$:}\\
The smallest integer $k$ such that
 there exist a $k$-link $t$-path between every pair of points.

\vspace*{0.5cm}
\textcolor{blue}{Problem:} \textcolor{BrickRed}{\large Given a $t$-spanner $G(V,E)$, compute the diameter of $G$.}

\vspace*{0.5cm}
$L_k(p,q)$: The shortest path length between $p$ and $q$ with at most $k$ edges.

\vspace*{0.5cm}

Diameter= The smallest $k$ s. t. $L_k(p,q)\leq t\cdot|pq|$,  for all pairs $p$ and $q$.

%\vspace*{0.5cm}
%\textcolor{blue}{\large Algorithm:}
%%\vspace*{0.5cm}
%
%\begin{itemize}
%\item $L_1(p,q)=\left\{
%\begin{array}{lc}
%|pq| & \mbox{if } (p,q)\in E.\\
%+\infty & \mbox{otherwise.}
%\end{array}
%\right.$
%\item $L_k(p,q)=\min\left\{L_{k-1}(p,q), \min\limits_{i+j=k} \{L_{i}(p,r)+L_j(r,q) \} \right\}$.
%\item Construct $L_k$'s until  $L_k(p,q)\leq t\cdot|pq|$,  for all pairs $p$ and $q$.
%\end{itemize}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage
\begin{frame}[t]
%\vspace*{1cm}

\textcolor{blue}{Diameter of a $t$-spanner $G(V,E)$:}\\
The smallest integer $k$ such that
 there exist a $k$-link $t$-path between every pair of points.

\vspace*{0.5cm}
\textcolor{blue}{Problem:} \textcolor{BrickRed}{\large Given a $t$-spanner $G(V,E)$, compute the diameter of $G$.}

\vspace*{0.5cm}
$L_k(p,q)$: The shortest path length between $p$ and $q$ with at most $k$ edges.

\vspace*{0.5cm}

Diameter= The smallest $k$ s. t. $L_k(p,q)\leq t\cdot|pq|$,  for all pairs $p$ and $q$.

\vspace*{0.5cm}
\textcolor{blue}{\large Algorithm:}
%\vspace*{0.5cm}

\begin{itemize}
\item $L_1(p,q)=\left\{
\begin{array}{lc}
|pq| & \mbox{if } (p,q)\in E.\\
+\infty & \mbox{otherwise.}
\end{array}
\right.$
\item $L_k(p,q)=\min\left\{L_{k-1}(p,q), \min\limits_{\small \begin{array}{c}i+j=k\\ r\in V\setminus\{p,q\}\end{array}} \{L_{i}(p,r)+L_j(r,q) \} \right\}$.
\item Construct $L_k$'s until  $L_k(p,q)\leq t\cdot|pq|$,  for all pairs $p$ and $q$.
\end{itemize}

\end{frame}

\newpage
\begin{frame}[t]
\vspace*{0.3cm}
\textcolor{blue}{Lemma:}
Let $G=(V,E)$ be a graph  and $p,q\in V$.
For each integer $k\geq 2$,
$$\min\limits_{\footnotesize\begin{array}{c}i+j=k\\ {\tiny r\in V\setminus\{p,q\}}\end{array}} \{L_{i}(p,r)+L_j(r,q) \}=\min_{r\in V\setminus\{p,q\}}\{L_{k-1}[p,r]+ L_1[r,q]\}$$
%\textcolor{blue}{Proof.}
%$$\min\limits_{i+j=k} \{L_{i}(p,r)+L_j(r,q) \}\leq\min\{L_{k-1}[p,r]+ L_1[r,q]\} \mbox{\textcolor{BrickRed}{(Obvious!)}}$$
%\begin{eqnarray*}
%L_{i}(p,r)+L_j(r,q) &=& L_{i}(p,r)+L_{j-1}(r,r')+L_1(r',q)\\
%&\geq& L_{i+j-1}(p,r')+L_1(r',q).
%\end{eqnarray*}
%\vspace*{1cm}
%
%\begin{center}
%\includegraphics[width=4.5in]{Sppq.pdf}
%\end{center}

%%\vspace*{1cm}
%%\textcolor{blue}{Corollary:}
%%$$L_k[p,q]=\min\{L_{k-1}[p,q],\min\{L_{k-1}[p,r]+ L_1[r,q]\}\}.$$

\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage

\begin{frame}[t]
\vspace*{0.3cm}
\textcolor{blue}{Lemma:}
Let $G=(V,E)$ be a graph  and $p,q\in V$.
For each integer $k\geq 2$,
%$$\min\limits_{i+j=k} \{L_{i}(p,r)+L_j(r,q) \}=\min\{L_{k-1}[p,r]+ L_1[r,q]\}$$
$$\min\limits_{\footnotesize\begin{array}{c}i+j=k\\ {\tiny r\in V\setminus\{p,q\}}\end{array}} \{L_{i}(p,r)+L_j(r,q) \}=\min_{r\in V\setminus\{p,q\}}\{L_{k-1}[p,r]+ L_1[r,q]\}$$
\textcolor{blue}{Proof.}
$$\min\limits_{\footnotesize\begin{array}{c}i+j=k\\ {\tiny r\in V\setminus\{p,q\}}\end{array}} \{L_{i}(p,r)+L_j(r,q) \}\leq\min_{r\in V\setminus\{p,q\}}\{L_{k-1}[p,r]+ L_1[r,q]\} \mbox{\textcolor{BrickRed}{(Obvious!)}}$$
%\begin{eqnarray*}
%L_{i}(p,r)+L_j(r,q) &=& L_{i}(p,r)+L_{j-1}(r,r')+L_1(r',q)\\
%&\geq& L_{i+j-1}(p,r')+L_1(r',q).
%\end{eqnarray*}
%\vspace*{1cm}
%
%\begin{center}
%\includegraphics[width=4.5in]{Sppq.pdf}
%\end{center}
%
%%\vspace*{1cm}
%%\textcolor{blue}{Corollary:}
%%$$L_k[p,q]=\min\{L_{k-1}[p,q],\min\{L_{k-1}[p,r]+ L_1[r,q]\}\}.$$
%
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage

\begin{frame}[t]
\vspace*{0.3cm}
\textcolor{blue}{Lemma:}
Let $G=(V,E)$ be a graph  and $p,q\in V$.
For each integer $k\geq 2$,
%$$\min\limits_{i+j=k} \{L_{i}(p,r)+L_j(r,q) \}=\min\{L_{k-1}[p,r]+ L_1[r,q]\}$$
$$\min\limits_{\footnotesize\begin{array}{c}i+j=k\\ {\tiny r\in V\setminus\{p,q\}}\end{array}} \{L_{i}(p,r)+L_j(r,q) \}=\min_{r\in V\setminus\{p,q\}}\{L_{k-1}[p,r]+ L_1[r,q]\}$$
\textcolor{blue}{Proof.}
%$$\min\limits_{i+j=k} \{L_{i}(p,r)+L_j(r,q) \}\leq\min\{L_{k-1}[p,r]+ L_1[r,q]\} \mbox{\textcolor{BrickRed}{(Obvious!)}}$$
$$\min\limits_{\footnotesize\begin{array}{c}i+j=k\\ {\tiny r\in V\setminus\{p,q\}}\end{array}} \{L_{i}(p,r)+L_j(r,q) \}\leq\min_{r\in V\setminus\{p,q\}}\{L_{k-1}[p,r]+ L_1[r,q]\} \mbox{\textcolor{BrickRed}{(Obvious!)}}$$
\begin{eqnarray*}
L_{i}(p,r)+L_j(r,q) &=& L_{i}(p,r)+L_{j-1}(r,r')+L_1(r',q)\\
&\geq& L_{i+j-1}(p,r')+L_1(r',q).
\end{eqnarray*}
\vspace*{0.0cm}

\begin{center}
%\includegraphics[width=4.5in]{Sppq.pdf}
\end{center}

%\vspace*{1cm}
%\textcolor{blue}{Corollary:}
%$$L_k[p,q]=\min\{L_{k-1}[p,q],\min\{L_{k-1}[p,r]+ L_1[r,q]\}\}.$$

\end{frame}

\newpage
\addtocounter{page}{-1}
\newpage
\begin{frame}[t]
\vspace*{0.3cm}
\textcolor{blue}{Lemma:}
Let $G=(V,E)$ be a graph  and $p,q\in V$.
For each integer $k\geq 2$,
%$$\min\limits_{i+j=k} \{L_{i}(p,r)+L_j(r,q) \}=\min\{L_{k-1}[p,r]+ L_1[r,q]\}$$
$$\min\limits_{\footnotesize\begin{array}{c}i+j=k\\ {\tiny r\in V\setminus\{p,q\}}\end{array}} \{L_{i}(p,r)+L_j(r,q) \}=\min_{r\in V\setminus\{p,q\}}\{L_{k-1}[p,r]+ L_1[r,q]\}$$
\textcolor{blue}{Proof.}
%$$\min\limits_{i+j=k} \{L_{i}(p,r)+L_j(r,q) \}\leq\min\{L_{k-1}[p,r]+ L_1[r,q]\} \mbox{\textcolor{BrickRed}{(Obvious!)}}$$
$$\min\limits_{\footnotesize\begin{array}{c}i+j=k\\ {\tiny r\in V\setminus\{p,q\}}\end{array}} \{L_{i}(p,r)+L_j(r,q) \}\leq\min_{r\in V\setminus\{p,q\}}\{L_{k-1}[p,r]+ L_1[r,q]\} \mbox{\textcolor{BrickRed}{(Obvious!)}}$$
\begin{eqnarray*}
L_{i}(p,r)+L_j(r,q) &=& L_{i}(p,r)+L_{j-1}(r,r')+L_1(r',q)\\
&\geq& L_{i+j-1}(p,r')+L_1(r',q).
\end{eqnarray*}
%\begin{center}
%\includegraphics[width=4.5in]{Sppq.pdf}
%\end{center}

\vspace*{0.5cm}
\textcolor{blue}{Corollary:}
$$L_k[p,q]=\min\{L_{k-1}[p,q],\min_{r\in V\setminus\{p,q\}}\{L_{k-1}[p,r]+ L_1[r,q]\}\}.$$

\end{frame}

\newpage
\begin{frame}
\vspace*{1cm}
\begin{algorithm}{{\sc Diameter}}[G(V,E),t]{}
\qfor every pair $(p,q)\in V^2$\\
    \qif  $(p,q)\in E$\\
    \qthen
            $L_1[p,q]:=|pq|$\\
     \qelse
            $L_1[p,q]:=\infty$
    \qfi
\qrof\\
$k:=1$\\
%flag:=\qtrue\\
\qwhile there is a pair s.t. $L_{k}[p,q]> t\cdot|pq|$ \\%with no $t$-path between them \\%flag =\qtrue\\
%    flag:=\qfalse\\
    $k:=k+1$\\
    \qfor every $(p,q)\in V^2$\\
       $L_k[p,q]:=\min\{ L_{k-1}[p,q] ,\min\{  L_{k-1}[p,r]$       $+L_1[r,q]\}\}$
     \qrof
\qelihw\\
\qreturn $k$
\end{algorithm}

\vspace*{0.5cm}
\textcolor{blue}{Time Complexity: $\Oo(dn^3)$.}

\vspace*{0.5cm}
\textcolor{blue}{Space Complexity: $\Oo(n^2)$.}
\end{frame}
\newpage
\begin{frame}
\centerline{\huge \textcolor{blue}{Time complexity Improvement}}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage
\begin{frame}
\vspace*{1cm}
\begin{algorithm}{{\sc Diameter}}[G(V,E),t]{}
\qfor every pair $(p,q)\in V^2$\\
    \qif  $(p,q)\in E$\\
    \qthen
            $L_1[p,q]:=|pq|$\\
     \qelse
            $L_1[p,q]:=\infty$
    \qfi
\qrof\\
$k:=1$\\
%flag:=\qtrue\\
\qwhile there is a pair s.t. $L_{k}[p,q]> t\cdot|pq|$ \\%with no $t$-path between them \\%flag =\qtrue\\
%    flag:=\qfalse\\
    $k:=k+1$\\
    \qfor every $(p,q)\in V^2$\\
       $L_k[p,q]:=\min\{ L_{k-1}[p,q] ,\min\{  L_{k-1}[p,r]$       $+\textcolor{BrickRed}{L_1[r,q]}\}\}$
     \qrof
\qelihw\\
\qreturn $k$
\end{algorithm}

\vspace*{0.8cm}
\centerline{\tuebox{\Large If $(r,q)\not \in E$ then $L_1[r,q]=+\infty$.}}
%\vspace*{0.5cm}
%\textcolor{blue}{Time Complexity: $\Oo(dn^3)$.}
%
%\vspace*{0.5cm}
%\textcolor{blue}{Space Complexity: $\Oo(n^2)$.}
\end{frame}
\newpage
\begin{frame}
\vspace*{1cm}
\begin{algorithm}{{\sc Diameter2}}[G(V,E),t]{}
\qfor every pair $(p,q)\in V^2$\\
    \qif  $(p,q)\in E$\\
    \qthen
            $L_1[p,q]:=|pq|$\\
     \qelse
            $L_1[p,q]:=\infty$
    \qfi
\qrof\\
$k:=1$\\
%flag:=\qtrue\\
\qwhile there is a pair s.t. $L_{k}[p,q]> t\cdot|pq|$ \\%with no $t$-path between them \\%flag =\qtrue\\
%    flag:=\qfalse\\
    $k:=k+1$\\
    \qfor every $(p,q)\in V^2$\\
       $L_k[p,q]:=\min\{ L_{k-1}[p,q] ,\textcolor{BrickRed}{\min\limits_{r\in Adj(q)}\{  L_{k-1}[p,r]+|rq|\}}\}$
     \qrof
\qelihw\\
\qreturn $k$
\end{algorithm}
$$T(n)= n^2 + \sum_{k=1}^{d}  \sum_{(p,q)\in V^2}\deg(q)= n^2 +   d \sum_{p\in V}\sum_{q\in V}\deg(q).$$
\vspace*{0.5cm}
\textcolor{blue}{Time Complexity: $\Oo(dmn)$.}

%\vspace*{0.5cm}
\textcolor{blue}{Space Complexity: $\Oo(n^2)$.}

\end{frame}
\newpage
%\addtocounter{page}{-1}
%\newpage
%\begin{frame}
%\vspace*{1cm}
%\begin{algorithm}{{\sc Diameter2}}[G(V,E),t]{}
%\qfor all pair $(p,q)\in V^2$\\
%    \qif  $(p,q)\in E$\\
%    \qthen
%            $L_1[p,q]:=|pq|$\\
%     \qelse
%            $L_1[p,q]:=\infty$
%    \qfi
%\qrof\\
%$k:=1$\\
%%flag:=\qtrue\\
%\qwhile there is a pair s.t. $L_{k}[p,q]> t\cdot|pq|$ \\%with no %$t$-path between them \\%flag =\qtrue\\
%%    flag:=\qfalse\\
%    $k:=k+1$\\
%    \qfor {all $(p,q)\in V^2$}\\
%       {$L_k[p,q]:=\min\{L_{k-1}[p,q] ,\min\limits_{r\in Adj(q)}\{ %\textcolor{BrickRed}{L_{k-1}[p,r]}+|rq|\}\}$}
%     \qrof
%\qelihw\\
%\qreturn $k$
%\end{algorithm}
%%$$T(n)= n^2 + \sum_{k=2}^{d+1}  \sum_{(p,q)\in V^2}\deg(q)= n^2 +   %(d-1) \sum_{p\in V}\sum_{q\in V}\deg(q).$$
%%\vspace*{0.5cm}
%%\textcolor{blue}{Time Complexity: $\Oo(dmn)$.}
%
%%\vspace*{0.5cm}
%%\textcolor{blue}{Space Complexity: $\Oo(n^2)$.}
%
%\vspace*{0.5cm}
%$S_k(p)=\{r\in V |\  \exists \mbox{ $k$-link path between $p$ and %$r$ with length } L_k[p,r]\}$
%% \mbox{The shortest path with at most } k \mbox{edges between} p %\mbox{and} q \mbox{contains exactly } k \mbox{edges}  \}$
%
%\vspace*{1cm}
%No bound for $\left|S_{k-1}(p)\cap Adj(q)\right|$ better than the %obvious one!
%\end{frame}
\newpage
\begin{frame}
\centerline{\huge \textcolor{blue}{Space complexity Improvement}}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage
\begin{frame}[t]
\vspace*{1cm}
%{\centerline{\includegraphics[width=4.5in]{Linear-Space1.pdf}}}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage
\begin{frame}[t]
\vspace*{0.5cm}
%{\centerline{\includegraphics[width=4.5in]{Linear-Space2.pdf}}}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage
\begin{frame}[t]
\vspace*{0.5cm}
%{\centerline{\includegraphics[width=4.5in]{Linear-Space3.pdf}}}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage
\begin{frame}[t]
\vspace*{0.5cm}
%{\centerline{\includegraphics[width=4.5in]{Linear-Space4.pdf}}}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage
\begin{frame}[t]
\vspace*{0.5cm}
%{\centerline{\includegraphics[width=4.5in]{Linear-Space5.pdf}}}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage
\begin{frame}[t]
\vspace*{0.5cm}
%{\centerline{\includegraphics[width=4.5in]{Linear-Space6.pdf}}}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage
\begin{frame}[t]
\vspace*{0.5cm}
%{\centerline{\includegraphics[width=4.5in]{Linear-Space7.pdf}}}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage
\begin{frame}[t]
\vspace*{0.5cm}
%{\centerline{\includegraphics[width=4.5in]{Linear-Space7.pdf}}}
\vspace*{-0.5cm}
\textcolor{blue}{Time Complexity: $\Oo(dmn)$.}

\vspace*{0.3cm}
\textcolor{blue}{Space Complexity: $\Oo(n)$.}

\end{frame}

%\begin{frame}[t]
%\begin{algorithm}{{\sc Diameter2.1}}[G(V,E),t]{}
%$d:=0$\\
%\qfor all $p\in V$\\
%     \qfor all $q\in V$\\
%        \qif  $(p,q)\in E$\\% \hspace*{1.3cm}
%         \qthen
%             $L_1[q]:=|pq|$\\
%         \qelse
%             $L_1[q]:=\infty$
%        \qfi
%    \qrof\\
%    $k:=1$\\
%\qwhile there is a point $q$ s.t. $L_{k}[q]> t\cdot|pq|$ \\%with no
%     $k:=k+1$\\
%        \qfor all $q\in V$\\ %all $u\in S_{k-1}$\\
%                $L_k[q]:=\min\{L_{k-1}[q], \min\limits_{r\in Adj(q)}\{L_{k-1}[q]+|qr|\}\}$
%        \qrof
%    \qelihw\\
%   \qif $k>d$\hspace*{1.3cm}
%    \qthen $d:=k$
%    \qfi
%%\qrof
%\qrof\\
%\qreturn $d$.
%\end{algorithm}
%
%\vspace*{0.3cm}
%\textcolor{blue}{Time Complexity: $\Oo(dmn)$.}
%
%\vspace*{0.3cm}
%\textcolor{blue}{Space Complexity: $\Oo(n)$.}
%
%\end{frame}
\newpage
\begin{frame}
\centerline{\huge \textcolor{blue}{Another Strategy}}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage

%\begin{frame}
%\vspace*{1cm}
%\begin{algorithm}{{\sc Diameter2}}[G(V,E),t]{}
%\qfor all pair $(p,q)\in V^2$\\
%    \qif  $(p,q)\in E$\\
%    \qthen
%            $L_1[p,q]:=|pq|$\\
%     \qelse
%            $L_1[p,q]:=\infty$
%    \qfi
%\qrof\\
%$k:=1$\\
%%flag:=\qtrue\\
%\qwhile there is a pair s.t. $L_{k}[p,q]> t\cdot|pq|$ \\%with no %$t$-path between them \\%flag =\qtrue\\
%%    flag:=\qfalse\\
%    $k:=k+1$\\
%    \qfor \textcolor{BrickRed}{all $(p,q)\in V^2$}\\
%       {$L_k[p,q]:=\min\{L_{k-1}[p,q] ,\min\limits_{r\in Adj(q)}\{ %{L_{k-1}[p,r]}+|rq|\}\}$}
%     \qrof
%\qelihw\\
%\qreturn $k$
%\end{algorithm}
%\end{frame}
%\newpage
\begin{frame}[t]
\vspace*{0.3cm}
$\delta_k(p,q)$: The shortest path between $p$ and $q$ with \textcolor{BrickRed}{\large at most} $k$ edges. %In the case that we have more than one such a path we consider the path with minimum number of edges.

\vspace*{0.3cm}
$L_k[p,q]=|\delta_k(p,q)|$.

\begin{algorithm}{{\sc Diameter2}}[G(V,E),t]{}
\qfor every pair $(p,q)\in V^2$\\
    \qif  $(p,q)\in E$\\
    \qthen
            $L_1[p,q]:=|pq|$\\
     \qelse
            $L_1[p,q]:=\infty$
    \qfi
\qrof\\
$k:=1$\\
%flag:=\qtrue\\
\qwhile there is a pair s.t. $L_{k}[p,q]> t\cdot|pq|$ \\%with no $t$-path between them \\%flag =\qtrue\\
%    flag:=\qfalse\\
    $k:=k+1$\\
    \qfor every $(p,q)\in V^2$\\
       {$L_k[p,q]:=\min\{L_{k-1}[p,q] ,\min\limits_{r\in Adj(q)}\{ \textcolor{BrickRed}{L_{k-1}[p,r]}+|rq|\}\}$}
     \qrof
\qelihw\\
\qreturn $k$
\end{algorithm}
\centerline{\tuebox{ If %the number of edges on
$\delta_{k-1}(p,r)$ contains  less than $k-1$ edges then we do not need to check this $r$.}}
%\vspace*{2cm}
%\begin{center}
%\includegraphics[width=6in]{SPk.pdf}
%\end{center}
\end{frame}
\newpage
\addtocounter{page}{-1}
\newpage
\begin{frame}[t]
\vspace*{0.3cm}
$\delta_k(p,q)$: The shortest path between $p$ and $q$ with \textcolor{BrickRed}{\large at most} $k$ edges. %In the case that we have more than one such a path we consider the path with minimum number of edges.

\vspace*{0.3cm}
$L_k[p,q]=|\delta_k(p,q)|$.

\vspace*{0.3cm}

If $\delta_k(p,q)$ contains $k$ edges then $\delta_{k-1}(p,r)$ contains $k-1$ edges.

\vspace*{0.2cm}
\begin{center}
%\includegraphics[width=6in]{SPk-1.pdf}
\end{center}

\vspace*{0.3cm}
$S_k=\{(p,q)| \delta_k(p,q) \mbox{ contains exactly } k  \mbox{ edges }\}$

\vspace*{1cm}
To compute $L_k$ we only need to check pairs in $S_{k-1}$.

\vspace*{1cm}
Using the trivial bound of $S_k$ leads to \textcolor{blue}{$\Oo(dmn)$ running time}.
\end{frame}


%\addtocounter{page}{-1}
%\pagedissolve{Wipe /Di 0}
\begin{frame}[t]
\vspace*{1cm}

\tuebox{\Large Conclusions:}

%\hspace*{4cm}

\begin{itemize}
\item \textcolor{blue}{$\Oo(dmn)$ time algorithm for computing the diameter of a geometric $t$-\nolinebreak[4]spanner of a complete graph.}
\item \textcolor{blue}{The algorithm can easily extend to an $\Oo(dmn+n^2\log n)$ time algorithm for computing the diameter of a general $t$-spanner.}
\end{itemize}

\vspace*{1cm}
{\tuebox{\Large Future Work:}}
\begin{itemize}
\item \textcolor{blue}{Faster algorithm?}
\item \textcolor{blue}{Better bound for $S_k$?}
\end{itemize}
\end{frame}
%\begin{frame}
%\centerline{\tuebox{\Large Future Work:}}
%
%\hspace*{4cm}

%\begin{itemize}
%\item \textcolor{blue}{The running time of the improved greedy algorithm is $O(n^2\log n)$.}
%\item \textcolor{blue}{Expected weight of the $\Theta$-graph on uniformly distributed points set is a constant.}
%\item  \textcolor{blue}{Experimentally compare the time complexity of the algorithms (\textcolor{BrickRed}{almost done!}).}
%\end{itemize}
%\end{frame}

\begin{frame}
\centerline{\textcolor{green}{\huge Thank You }}
\vspace*{0.9cm}
\centerline{\textcolor{white}{\huge For Your}}
\vspace*{0.9cm}
\centerline{\textcolor{red}{\huge Attention! }}

%\includegraphics[width=2in]{que.pdf}
%\vspace*{2cm}
%\centerline{\textcolor{blue}{\Large Questions?}}
%\vspace*{2cm}
%\centerline{\textcolor{blue}{\huge Comments or suggestions?}}
\end{frame}

\end{document}
