\documentstyle[11pt]{article}

\setlength{\oddsidemargin}{0pt}
\setlength{\evensidemargin}{0pt}
% \setlength{\parindent}{0pt}
\setlength{\parskip}{7pt plus 1pt}
\setlength{\marginparwidth}{0pt}
\setlength{\marginparsep}{0pt}
\setlength{\topmargin}{-.5in}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{8.5 in}
\begin{document}

\pagestyle{empty}

{\large \bf CS-591-06 \hspace{1.2in} Algorithms in the Real World, 
Fall 2002}

\vspace{.1in}

\begin{center}
{\large \bf Homework 1 Solutions}
\end{center}

\begin{enumerate}

\item an easy problem

\item Factor the graph given in the following figure using the algorithm
\emph{2-factor} given in Lecture 3.  Draw a separate picture for
each step of the algorithm.

\item Consider the migration problem on a demand graph $G$ with 4
nodes and maximum degree $\Delta$ where $\Delta $ is an even number.
Assume there are no extra ``bypass nodes'' but that we can use
indirection (i.e. we can first send an object to an intermediate node before
it goes to its goal node).

Can we always do migration on such a graph in $\Delta $ time steps?
If so, give an algorithm which will always do migration in $\Delta $
time steps.  If not, give a demand graph (with 4 nodes and even
$\Delta$) for which migration can not possibly be done in $\Delta $
time steps.

\item This question deals with the ``full-duplex'' variant of the
migration problem.  In this variant, in each time step, each device
can both send \emph{and} receive an object.  (This variant occurs when
dealing with ``real-world'' networks which use ``full-duplex''
communication.)

\begin{enumerate}
\item For some demand graph $G$, let $\Delta_{in}$ be the maximum
in-degree of $G$ and $\Delta_{out}$ be the maximum out-degree of $G$.
Give a lower bound for the number of time steps required to migrate
$G$ as a function of $\Delta_{in}$ and $\Delta_{out}$ under this
variant.

\item Show that in each time step, it's possible to reduce
Max ($\Delta_{in}$, $\Delta_{out}$) by $1$.  (Hint: First show that in
each time step, it's always possible to reduce $\Delta_{out}$ by $1$)

\item Give an algorithm which achieves this lower bound. (hint: show
that in each time step, you can reduce both $\Delta_{in}$ and
$\Delta_{out}$ by $1$.)
\end{enumerate}



\end{enumerate}

\end{document}
