\documentstyle[12pt,simplemargins]{article}
\setallmargins{1in}
\begin{document}

{\noindent\bf\Large 1.}

\begin{verbatim}
<ea> = (+ z 1)
<eb> = (+ z 2)
<ec> = x
<ed> = 0
\end{verbatim}

\vspace*{.2in}
{\noindent\bf\Large 2.} {\bf\large (a)} Both the total space and the
number of steps required grows linearly with the number of times the
angle is divided by 3.  Thus, since the size of the angle is reduced by
a constant factor each time, the order of growth for both space and time
are logarithmic, i.e.  $O(\log angle)$.

\vspace*{.2in}
{\noindent\bf\large (b)}

\begin{verbatim}
(define (sine-i angle)
  (define (iter c-poly angle)
    (if (not (> (abs angle) 0.1))
        (c-poly angle)
        (iter (lambda (x) (poly (c-poly x)))
              (/ angle 3))))
  (iter poly angle))
\end{verbatim}

\noindent Because this is an iterative process, the total space required
is constant, i.e. there are no deferred operations in the recursive
sense. However, the deferred operations found in the recursive version
of this procedure are stored in the iterative variable \verb+c-poly+.
Thus, the time required is the same as in the recursive version since
the nested calls to \verb+poly+ still have to be done.

\vspace*{.2in}
{\noindent\bf\Large 3. }{\bf\large (a)} It results in a recursive process
since there are deferred operations.

\vspace*{.2in}
{\noindent\bf\large (b)} An iterative version of \verb+cont-frac+:

\begin{verbatim}
(define (cont-frac-i n d k)
  (define (cf i result)
    (if (= i 0)
        result
        (cf (- i 1) (/ (n i) (+ (d i) result)))))
  (cf k 0))
\end{verbatim}

\end{document}
