\documentstyle[11pt,twoside]{article}
\input{defs-6045}
\begin{document}

\handout{ps8}{Homework Assignment 8}{April 10, 1992}
\due{Friday, April 17}

\medskip

Remember to write up problems 1 through 5 in such a way that each of
these problems can be turned in separately.  Put your name on each
problem, with your last name clearly written in CAPITAL LETTERS, and
with your section and the NAME of your recitation instructor (e.g.
RIVEST/LYNCH, W1) also in capital letters. Try to always provide clear
(this is not in contradiction with short!) justifications to your
constructions.  

\paragraph{Problems.} 

\begin{enumerate} 

\item[1.] (20 points) Argue carefully that recognizing
the set FACTORIALS = $\{ n! : n \ge 0 \}$ is in $P$.  Assume that the
input $x$ to be tested for ``factoriality'' is represented in binary.

\item[2.] (20 points) Argue that computing the function $f(n) = n!$ cannot be done
in polynomial time.  Assume that the input and the output of $f$ are
represented in binary.

\item[3.] (28 points) Let $f$ and $g$ be asymptotically positive functions.
A function $f$ is asymptotically positive if there exists $N_0$ such
that for all $n \geq N_0$, $f(n) \geq 0$.  Prove or disprove each of
the following conjectures. (Note: $\lg n = \log_2 n$).

\begin{enumerate}
\item (7 points) $f(n) = O(g(n))$ implies $g(n) = O(f(n))$.

\item (7 points) $f(n) = O(g(n))$ implies $\lg f(n) = O(\lg g(n))$, where $\lg g(n) > 0$ and $f(n) \geq 1$ for all sufficiently large $n$.

\item (7 points) $f(n) = O(g(n))$ implies $2^{f(n)} = O(2^{g(n)})$.

\item (7 points) $f(n) = O((f(n))^2)$.
\end{enumerate}

\item[4.] (20 points) Martin 23.9.  You can give a time bound expressed in order of growth notation.  Your answer must include an argument about why
the time bound is correct.

\item[5.] (12 points)  Martin 23.5



\end{enumerate} 

\end{document}
