\documentstyle[oneside,hmwk,11pt]{handout}
\hmwknumber{2}
\topic{Recurrences, Sorting, Selection, Lower Bounds}
\duedate{Tuesday, 9 July 1996}
\begin{document}
\maketitle

\vspace{-0.4in}

\section*{Reading}
\vspace{-0.1in}
Read Ch. 3, 4, 9.1--9.3 and 10.1 of CLR.


\section*{Practice}
\vspace{-0.1in}
Recall, these exercises are purely for your own practice.  You need
only turn in the official problems.
\begin{itemize}
\item Do CLR 3.1-5.

\item Do CLR 4.2-4, 4.2-5.

\item Do CLR 9.1-3.

\item Do CLR 9.1-5.

\item Do CLR 9.3-4.

\end{itemize}


\section*{Problems}
\vspace{-0.1in}
\begin{enumerate}
\item  (20 points) Do CLR 4-1.

\item (20 points) Do CLR 4-2.  To make the analysis cleaner, we will charge your
algorithm only for the number of ``bit-fetch'' operations.  The input
to the algorithm consists of an array of $n$ numbers, each of which is
comprised of $\ceil{\lg n}$ bits.  Give an algorithm which can find
the missing number by fetching only $O(n)$ bits.

\item (40 points) Do CLR 9-1 (parts a--e only).

\item (20 points) Do CLR 9.3-3.


\end{enumerate}


\section*{Extra Credit}
\vspace{-0.1in}
In problem 10.1-1 (discussed in lecture), we gave an algorithm
which finds the second smallest of $n$ elements using $n + \ceil{\lg
n} - 2$ comparisons in the worst case.  Here, we want you to show that
this algorithm is almost optimal by proving a 
general lower bound showing that $n + \floor{\lg n} - 2$ comparisons
are required in the worst case for {\em any} algorithm which finds the
second smallest element.


\end{document}

