3.3.5 To integrate or not to integrate

Now that we have separate pieces of the algorithm, we can choose whether to leave algorithms 1 and 2 just the way they are. If you want to see the entire algorithm, we can integrate the two. The integration is nothing more than filling in the statement ``find a prime factor $ f$ of $ n$ '' in algorithm 1 with the entire algorithm 2. The result of integration is algorithm 3.


\begin{algorithm}
% latex2html id marker 115\begin{algorithmic}[1]
\STATE gi...
...thmic} \caption{The integrated algorithm to factor a number.}
\end{algorithm}

The integrated version shows all the details of how to factor a number. However, it is more difficult to read because of the distracting detail of finding a factor.



Copyright © 2006-09-26 by Tak Auyeung