%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NOTE: delete ,psfig here if using on athena, added psbox for Athena
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentstyle[12pt,twoside,alltt]{article}
\textwidth=6in
\oddsidemargin=0.25in
\evensidemargin=0.25in
\topmargin=-0.1in
\footskip=0.8in
\parindent=0.0cm
\parskip=0.3cm
\textheight=8.00in
\setcounter{tocdepth} {3}
\setcounter{secnumdepth} {2}
\sloppy

\newenvironment{proof}{\noindent{\bf Proof:}}{\qed\bigskip}
\newenvironment{proof_sketch}{\noindent{\bf Sketch of Proof:}\hspace*{1em}}{\qed\bigskip}

\newtheorem{theorem}{Theorem}
\newtheorem{corollary}{Corollary}
\newtheorem{lemma}{Lemma}
\newtheorem{claim}{Claim}
\newtheorem{fact}{Fact}
\newtheorem{definition}{Definition}
\newtheorem{assumption}{Assumption}
\newtheorem{observation}{Observation}
\newtheorem{example}{Example}
\newcommand{\qed}{\rule{7pt}{7pt}}



\newcounter{lecnum}
\renewcommand{\thepage}{\thelecnum-\arabic{page}}
\renewcommand{\thesection}{\thelecnum.\arabic{section}}
\renewcommand{\theequation}{\thelecnum.\arabic{equation}}
\renewcommand{\thefigure}{\thelecnum.\arabic{figure}}
\renewcommand{\thetable}{\thelecnum.\arabic{table}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Allows the PSbox function, used on Athena, to work on LCS machines%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\PSbox}[3]{\mbox{\rule{0in}{#3}\special{psfile=#1}\hspace{#2}}}



\newcommand{\lecture}[6]{
   \pagestyle{myheadings} \thispagestyle{plain} \newpage
\setcounter{lecnum}{#1} \setcounter{page}{1} \noindent \begin{center}
\framebox{ \vbox{ \hbox to 6.28in { {\bf 6.858/18.428 Machine Learning
\hfill Lecture #1: #2} } \vspace{4mm} 
\vspace{2mm} \hbox to 6.28in { {\it
Lecturer: #3 \hfill Scribe: #4} } } } \end{center}
\markboth{Lecture #1: #2}{Lecture #1: #2} \vspace*{4mm} }



\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Lecture command takes 4 arguments:
%		ordinal number of the lecture
%		date of the lecure
%		lecturer
%		scribe---that is you.
%
% Fill out the next line with this information !!!
\lecture{26}{December 14, 1994}{Mona Singh}{Charlie Kemp} 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Your notes start here!

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% For theorems, lemmas, definitions, remarks, etc. use commands
% {\theorem{...}}, {\lemma{...}}, {\definition{...}}, etc.
% For proofs, use \begin{proof} ... \end{proof}
%
% For figures use the following block:
%
% \begin{figure}
% \begin{center}
% \mbox{\psfig{figure=lecture-nn-fig-mm.ps}}
% \caption{A very nice picture.}
% \label{fig:picture}
% \end{center}
% \end{figure}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Outline}
\begin{itemize}
\item Introduction to the piecemeal learning problem
\item Linear time algorithm for piecemeal learning of city-block graphs
\item Nearly linear time algorithm for piecemeal learning of general graphs
\end{itemize}

\section{Introduction to the Piecemeal Learning Problem}
\subsection{Problem}
\begin{itemize}
\item Learner must learn a complete map of its environment through exploration
\item Learning must be done a {\em piece at a time}, with a return to start after each piece of exploration
\end{itemize}


\subsection{Motivation}
\begin{itemize}
\item A robot might want to refuel and drop off samples at a home location before continuing its exploration of an unknown environment. For example, a planetary exploration robot or a volcano exploration robot might have these requirements. 
\item Piecemeal learning can be used to model ``learning on the job'', in which phases of piecemeal learning help the learner improve its performance on other tasks it performs. For instance, a rookie taxi driver might explore the city between fares. 
\end{itemize}
\subsection{Formal Model}

\begin{figure}
\PSbox{lecture-26-fig-1.ps hoffset=-20 voffset=-180 hscale=100 vscale=100}{2in}{1.9in}
\caption{The learner knows the vertices it has visited and the edges it has traversed. The learner also knows the direction of each edge incident to the visited vertices.}
\label{fig:rob}
\end{figure}

The formal model of the problem consists of the specification of the
environment and the learner. An example of a partially explored
environment is shown in figure \ref{fig:rob}. The known and unknown
regions represent what the robot knows about the environment after
traversing the path marked by arrows. The following outline lists the
significant attributes of the environment and learner in the formal
model.


\begin{enumerate}
\item THE ENVIRONMENT
\begin{enumerate}
\item The environment is represented by a graph, $G=(V,E)$, which is finite, connected, and undirected.
\item The set of vertices $V$ represents accessible locations.
\item The vertex $s\in V$ is the start vertex.
\item An edge, $(x,y)\in E$, indicates that the learner can move from
$x$ to $y$ or back in one step.
\item The vertices are distinguishable.
\end{enumerate}

\item THE LEARNER
\begin{enumerate}
\item What the learner knows at each step:
\begin{enumerate}
\item The global position of seen vertices.
\item The direction of edges incident to seen vertices.
\item The edges it has traversed.
\end{enumerate}


\item What the learner knows initially:
\begin{enumerate}
\item The start vertex, $s$.
\item The upper bound, $B$, on the number of steps in an exploration phase.  
$B=(2+\alpha)r$, where $\alpha>0$ is some constant, and $r$ is the
radius of the graph.  The radius of the graph is defined as the
maximum of all shortest path distances between $s$ and any vertex in
$G$. $B$ can be thought of as the size of the robot's gas tank.
Intuitively, $B$ is a reasonable size since it allows the learner to
travel to any vertex in the graph, do some exploration, and still have
enough steps to make it back to $s$.
\end{enumerate}

\item The learner's goal is to learn the graph efficiently in a piecemeal
manner.  The total cost is the number of edges traversed to learn the
graph (Computational costs are not considered). Thus, the learner must
traverse every edge in the graph with the least total cost possible,
and must do so with the constraint that each of the its
exploration phases has at most $B$ steps, and between exploration
phases it must return to the start vertex.

\end{enumerate}
\end{enumerate}


\subsection{Standard Approaches}   

\begin{figure}
\PSbox{lecture-26-fig-2.ps hoffset=-40 voffset=-180 hscale=100 vscale=100}{1.15in}{1.25in}
\caption{An example of a ``stuck'' DFS}
\label{fig:stuckdfs}
\end{figure}

Two common methods for searching a graph are depth-first search and
breadth-first search. As described below, both methods have
unsatisfactory results when applied unaltered to the piecemeal learning
problem.

\begin{enumerate}
\item Depth-first search with interrupts (DFS)

In DFS, edges are always explored out of the most recently discovered
vertex $v$ that still has unexplored edges leaving it. As demonstrated
in figure \ref{fig:stuckdfs}, this approach fails when the only path
the robot knows to vertex $v$ is $\frac{B}{2}$ steps away from the
start vertex $s$. In this case the learner is unable to resume the DFS
exploration and still return to $s$ without exceeding $B$. Note,
however, that a shorter path to $v$ exists in the graph, but the robot
does not know it.


\begin{figure}
\PSbox{lecture-26-fig-3.ps hoffset=-150 voffset=-275 hscale=150 vscale=150}{0.5in}{1.25in}
\caption{A simple graph for which the cost of BFS is quadratic in the number of edges.}
\label{fig:orderbfs}
\end{figure}

\item Breadth-first search (BFS)
 
BFS explores all vertices at the same distance from $s$ before
exploring any vertices that are further away from $s$. This approach
does not fail.  However, standard BFS is inefficient as it requires
$\Omega (|E|^2)$ steps. Figure \ref{fig:orderbfs} gives an environment
which causes this many edge traversals. We would like a more efficient
algorithm.
\end{enumerate}


\subsection{New Techniques}

In order to achieve better algorithms some definitions and
theorems will be helpful.

{\definition{An on-line search is {\bf optimally interruptible} if it
always knows a shortest path back to s.}}

For example, BFS is optimally interruptable. 

{\definition{A search is {\bf efficiently interruptible} if it always
knows a path back to $s$ via explored edges of length at most r, the
radius of the graph. (Optimally interruptable implies efficiently
interruptible.)}}


\begin{theorem} 
An efficiently interruptible algorithm for searching an undirected
graph $G$ in $T(n,m)$ running time, where n is the number of vertices
and m is the number of edges in $G$, can be transformed into a
piecemeal learning algorithm which takes time $O(T(n,m))$.
\end{theorem}

\begin{proof_sketch}
An efficiently interruptible algorithm is converted into a piecemeal
learning algorithm by breaking its exploration into segments.  Each
exploration phase has at most $B$ steps, where $B=(2+\alpha)r$.  At
the beginning of each phase, besides the first, the robot moves from
the start vertex $s$ to the vertex at which the original algorithm was
interrupted. In the first phase the robot simply stays at $s$ instead
of moving.  The robot then explores $\alpha r$ edges of the original
algorithm, after which it ends the phase by returning to $s$. By the
definition of an efficiently interruptable algorithm, the beginning
and end of the phase take at most $2r$ steps.  Thus, each phase takes
$\leq 2r+ \alpha r=B$ steps.  For convenience, assume $\alpha=2$.
Then, the total running time is at most $(\frac{T(n,m)}{2r}+1)4r =
2T(n,m) + 4r < 6T(n,m)$.
\end{proof_sketch}

With this theorem we can ``ignore'' the piecemeal constraint and
focus on efficiently interruptable searches.

\section{Linear Time Algorithm for Piecemeal Learning of City-Block Graphs}
The general problem of efficiently interruptible searches is difficult
so we will first focus on city-block graphs.




{\bf City-Block Graphs:}
As shown in the figure \ref{fig:bfs}, a city-block graph is a grid graph
containing some nontouching axis-parallel rectangular obstacles. In
other words, city-block graphs are rectangular planar graphs in which
all edges are either vertical or horizontal, and in which all faces
are axis-parallel rectangles whose opposing sides have the same number
of edges.


As can be seen in the figure \ref{fig:bfs}, BFS produces patterns of
search which look like waves from a pebble dropped at the start
vertex $s$.  Each wavefront consists of all the vertices a certain
number of steps from $s$. By considering these wavefronts we will try
to efficiently mimic BFS.\\

\begin{figure}[hbt]
\PSbox{lecture-26-fig-4.ps hoffset=-80 voffset=-300 hscale=100 vscale=100}{2in}{2in}
\caption{ An example of a city-block environment explored by BFS, showing only ``wavefronts'' at odd distance to $s$.}
\label{fig:bfs}
\end{figure}


{\bf Notation:}
\begin{itemize}
\item Let $\delta(v, v')$ denote the length of the shortest path between $v$ and $v'$. Let $d[v]=\delta (v, s)$ which is the length of the shortest path from $v$ to $s$ or vice versa.
\item A {\em wavefront} $w$ is an ordered list of explored vertices $\langle v_1, v_2,...v_m \rangle$, $m\geq 1$ such that $\forall i (d[v_i]=d[v_1]$
and $\delta(v_i, v_{i+1})\leq2)$
\end{itemize}

\begin{figure}
\PSbox{lecture-26-fig-5.ps hoffset=-80 voffset=-300 hscale=100 vscale=100}{2in}{1.5in}
\caption{Wave $w$ is shown splitting into two waves $w1$ and $w2$ which merge on the other side of the obstacle at the meeting point. The wavefronts in wave $w1$ are siblings of the wavefronts in wave $w2$.}
\label{fig:split}
\end{figure}

We need the following terminology to explain the algorithm. The
wavefront terms below are illustrated in figure \ref{fig:split}. A
more formal description of this algorithm can be found in
\cite{BetkeRiSi93}.

{\bf Wavefront Terms:}
\begin{itemize}
\item {\bf successor} \\
	A wavefront at a distance $t$ generates a {\em successor}
wavefront at distance $t+1$
\item {\bf wave}\\
	A sequence of successor wavefronts
\item {\bf split}\\
	A wave {\em splits} when it hits an obstacle. In other words,
a wavefront has two successor wavefronts when the successors are
divided by an obstacle. Refer to the figure \ref{fig:split} and
wavefront $w$.
\item {\bf merge}\\
	On the far side of an obstacle two waves may {\em merge} into
one wave. Wavefronts of both waves have connected successors, so there
is only one successor wavefront for the two wavefronts. 
\item {\bf sibling wavefronts}\\
	Two wavefronts are {\em sibling} wavefronts if they each have
exactly one endpoint on the same obstacle and if the waves to which
they belong merge on the far side of that obstacle. 
\item {\bf meeting point} \\
	The point on an obstacle where the waves first meet is called
the {\em meeting point} of the obstacle  (see Figure~\ref{fig:split}).
\end{itemize}


\begin{figure}
\PSbox{lecture-26-fig-6.ps hoffset=-80 voffset=-300 hscale=100 vscale=100}{2in}{2in}
\caption{An example of the four monopaths}
\label{fig:monopaths}
\end{figure}

{\bf Monotone Paths:} By sending out four monotone paths the algorithm
divides the map into four regions which can be considered separately.
The monotone paths are east-north, east-south, west-north, and
west-south. The east-north path starts by moving to the east from the
source. The path then moves north after it meets the first obstacle.
At the next obstacle the path moves east again and continues to
alternate in this way for all obstacles encountered. The three other
monotone paths are created in much the same way (see figure
\ref{fig:monopaths}). The paths form a northern region, eastern
region, southern region and western region.  For the rest of the
notes, discussion focuses on the northern region, although the
results are analagous for the three other regions.\\


\begin{figure}
\PSbox{lecture-26-fig-7.ps hoffset=-80 voffset=-265 hscale=100 vscale=90}{1in}{1.75in}
\caption{Shapes of wavefronts in northern region. Illustration of peaks, valleys, and front and back of an obstacle. The meeting point is the lowest point in the valley.}
\label{fig:frontback}
\end{figure}

The following properties of wavefronts, illustrated in figure
\ref{fig:frontback}, can be shown by induction.\\
  
{\bf Properties of Wavefronts:}
\begin{enumerate}
\item A wavefront can only consist of diagonal segments.
\item Shapes of wavefronts stay the same except around obstacles.
\item Wavefronts hit at the front of an obstacle.
\item Wavefronts meet at the back of an obstacle at the {\em meeting point}, which is the bottom of a valley.
\item Peaks form above corners of obstacles. In the northern region, all peaks point north. There are no sideways peaks or flat wavefronts. 
\end{enumerate}

\subsection {The Wavefront Algorithm and its Properties}

The wavefront algorithm attempts to mimic BFS in an efficient way. A
wavefront and its successor are  close to one another. So when
possible the robot chooses to explore the successor of the wavefront
that it just finished exploring.  In this way, the robot avoids
spending a lot of time relocating between wavefronts. However, the
robot explores so that it still knows the relevant shortest paths. The
challenge is to create correct wavefront exploration patterns
while constructing them in a different order from standard BFS.  For
instance, if the robot naively pushes wavefronts ahead, always
following one wave, incorrect wavefronts will be formed at the
obstacles. This problem arises because siblings interact with each
other in forming correct wavefronts.  In particular, sibling
wavefronts should merge at their meeting point on an obstacle.  If a
wavefront is pushed beyond the meeting point, then it is no longer a
correct wavefront.

\begin{figure}
\PSbox{lecture-26-fig-8.ps hoffset=-30 voffset=-180 hscale=100 vscale=100}{1in}{1.5in}
\caption{Illustration of meeting point calculation where $v_w$ is the northwest vertex, $v_e$ is the northeast vertex, $k$ is the length of the obstacle, and $x$ is the distance from $v_w$ to the meeting point. }
\label{fig:calcmeet}
\end{figure}

To solve the problem of pushing a wavefront beyond a meeting point we
can compute the location of meeting points. In the northern region,
the meeting point on an obstacle is a point on the back of an obstacle
such that there is a shortest path if you go either east or west.
Once we know the shortest path to the back corners we can calculate
the meeting point. Thus, as shown in figure \ref{fig:calcmeet},
$x+d[v_w]=(k-x)+d[v_e]$ where $v_w$ is the northwest vertex, $v_e$ is
the northeast vertex, $k$ is the length of the obstacle, and $x$ is
the distance from $v_w$ to the meeting point.  So, $x= \frac
{k+d[v_e]-d[v_w]}{2}$.\\


{\bf Operationally this means:}
\begin{enumerate}
\item We do not expand a wavefront if it is at a back corner and its sibling has not reached the back corner. Since we do not know the meeting point, we do not want to expand this wavefront anymore (See figure \ref{fig:blocka}).



\item We do not expand a wavefront if it has reached a meeting point and its sibling has not reached the meeting point, since we want the wavefronts to merge properly (See figure \ref{fig:blockb}).


\begin{figure}[thb]
\PSbox{lecture-26-fig-9.ps hoffset=-75 voffset=-300 hscale=95 vscale=100}{1.1in}{1.5in}
\caption{An example of the first type of blocking}
\label{fig:blocka}
\end{figure}


\begin{figure}[ht]
\PSbox{lecture-26-fig-10.ps hoffset=-90 voffset=-300 hscale=100 vscale=100}{1.1in}{1.5in}
\caption{An example of the second type of blocking}
\label{fig:blockb}
\end{figure}

\item Each wavefront should be pushed forward until it is blocked and then another wavefront should be pushed forward. 
\end{enumerate}



\newpage

We now give a sketch of the {\sc Main-Algorithm}:
\begin{enumerate}
\item Create monotone paths
\item {\sc Explore} each region (North, South, East, and West).
\end{enumerate}


To {\sc Explore} a region:
\begin{enumerate}
\item Maintain an ordered list $L$ of wavefronts. 
\item $L= \langle s \rangle$
\item $current\_wavefront=s$
\item REPEAT the following UNTIL $L$ is empty
\begin{enumerate}
\item Expand $current\_wavefront$ to successor wavefront $w$ and update $L$  
\item Calculate any new meeting points
\item If $w$ can be merged with another wavefront then merge and update $L$
\item If $w$ hits obstacles split $w$ and update $L$
\item Set $current\_wavefront$ to be the unblocked wavefront nearest to the learner
\end{enumerate}
\end{enumerate}

  

\begin{theorem}
The wavefront algorithm is an optimally interruptible search algorithm
for city-block graphs.
\end{theorem}

\begin{proof_sketch} 
We can show that there is always a wavefront that is not blocked, so
the algorithm explores the entire region. We can also show that by
constructing wavefronts the algorithm maintains optimal
interruptibility.
\end{proof_sketch}

\begin{theorem}
The wavefront algorithm is linear in the number of edges in the
city-block graph.
\end{theorem}

\begin{proof_sketch}
By theorem 2, the algorithm is optimally interruptible. We can show
that it runs in linear time. So, by theorem 1 it can be converted to a
linear time piecemeal learning algorithm for grid graphs.
\end{proof_sketch}

\section{Nearly Linear Time Algorithm for Piecemeal Learning of General Graphs}

We now turn to the problem of piecemeal learning of {\em general}
undirected graphs. The best algorithm known for this problem runs in
time $O(E+V^{1+o(1)})$. The rest of the notes will describe a simpler
version of the algorithm, called the {\sc Strip-Explore} algorithm, which is
$O(E+V^{1.5})$. The {\sc Strip-Explore} algorithm gives an {\em efficiently
interruptable} algorithm based on BFS.\\


{\bf Terminology:}
\begin{itemize}
\item {\bf layer} \\
A {\em layer} in a BFS tree consists of vertices that have the same shortest path distance to the start vertex.  
\item {\bf frontier vertex}\\
A {\em frontier vertex} is a vertex that is incident to unexplored edges.  
\item {\bf expanded}\\
A frontier vertex is {\em expanded} when the learner has traversed all unexplored edges incident to it.
\end{itemize}

  
{\bf Algorithms:}

BFS on general graphs gives an $O(rV+E)$ algorithm. Expansion of all
the vertices takes time $O(E)$. Visiting all the vertices at layer $i$
takes time $O(V)$. A basic BFS algorithm is shown below.\\ 


{\sc Basic-BFS}$(s, r)$
\begin{enumerate}
\item for $i=0$ to $r-1$
\begin{enumerate}
\item for each vertex $u$ at a distance $i$ from $s$, relocate to $u$ and then expand $u$
\end{enumerate}
\end{enumerate}

  
{\sc Local-BFS}$(s, L)$ is a slightly modified BFS algorithm which only goes
to distance $L$ from the source vertex $s$ and only relocates to
vertices that have unexplored neighbors:


{\sc Local-BFS}$(s, L)$
\begin{enumerate}
\item for $i=0$ to $L-1$
\begin{enumerate}
\item for each vertex $u$ at a distance $i$ from $s$
\begin{enumerate}
\item if $u$ has any unexplored neighbors then relocate to $u$ and expand $u$
\end{enumerate}
\end{enumerate}
\end{enumerate}
 
\begin{figure}[hbt]
\PSbox{lecture-26-fig-11.ps hoffset=-35 voffset=-180 hscale=100 vscale=100}{2.25in}{2.5in}
\caption{Visual representation of the {\sc Strip-Explore} algorithm}
\label{fig:stripexp}
\end{figure}

{\sc Strip-Explore} uses {\sc Local-BFS} to explore strips of width $L$. This is
more efficient than using {\sc Basic-BFS} because there is some overlap between
the BFS trees. {\sc Strip-Explore} only passes through an overlap region
more than once when it is necessary to get to the frontier vertices.
Figure \ref{fig:stripexp} depicts the {\sc Strip-Explore} algorithm.\\


{\sc Strip-Explore}$(s, L,r )$
\begin{enumerate}
\item {\em sources}$ = \langle s \rangle$
\item {\em numstrips}$ =\lceil r/L \rceil$
\item For $i=1$ to ${\em numstrips}$ do
\begin{enumerate}
\item For each $u \in {\em sources} $ {\bf do}
\begin{enumerate}
\item Relocate to $u$
\item {\sc Local-BFS}($u, L$)
\end{enumerate}
\item ${\em sources} =$ all frontier vertices
\end{enumerate}
\end{enumerate}


{\sc Strip-Explore} analysis:
\begin{enumerate}
\item For any relocation between source vertices in the same strip there are at most $2V$ edge traversals. Since there are at most $\frac{r}{L}$ strips, there can be no more than $\frac{2rV}{L}$ edge traversals for relocating between source vertices.
\item To expand all vertices and explore all edges is $2E$ edge traversals.
\item Within a call of {\sc Local-BFS}, the learner only relocates to a vertex if the learner is about to expand it. Thus, the learner traverses at most $2L$ edges to relocate during a call to {\sc Local-BFS}. Futhermore, since {\sc Local-BFS} only relocates to vertices with unexplored neighbors, each vertex in the graph is relocated to at most once for expansion. Consequently, there are at most a total of $2LV$ traversals due to relocations within calls to {\sc Local-BFS}. 
\end{enumerate}

Based on the above analysis we see that the total number of edge
traversals is at most $\frac{2rV}{L}+2LV+2E$. $r$ is less than or
equal to $V$. Therefore, this expression is minimized when $L= \sqrt
r$, which shows that the {\sc Strip-Explore} algorithm runs in time
$O(V^{1.5}+E)$. The algorithm is also efficiently interruptible which
means it can be easily converted to a piecemeal algorithm.

A more complicated recursive version \cite{AwerbuchBetkeRiSi95} of
this algorithm gives an $O(E+V^{1+o(1)})$ piecemeal learning
algorithm.

\begin{thebibliography}{99}

\bibitem{BetkeRiSi93} Margrit Betke, Ronald Rivest and Mona Singh. Piecemeal Learning of an Unknown Environment. {\em Proceedings of the 1993 Conference on Computational Learning Theory} (pp.277-286). Santa Cruz, CA: 1993. (Published as MIT AI-Memo 1474, CBCL-Memo 93; to be published in Machine Learning, vol. 28, 2--3, February 1995.) 

\bibitem{AwerbuchBetkeRiSi95} Baruch Awerbuch, Margrit Betke, Ronald
Rivest, and Mona Singh. Piecemeal Graph Exploration by a Mobile Robot.
Published as MIT/LCS/TM-516, 1995.  To appear in {\em Proceedings of
the 1995 Conference on Computational Learning Theory}.

\end{thebibliography}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Your notes end here!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}














