Skip to main content.
-->
June 19th, 2005

Solution to SICP Exercise 1.26

Structure and Interpretation of Computer Programs

Solution to Exercise 1.26:

Because Louis’s version makes two calls to expmod for the even case instead of one, his process comes to resemble a binary tree of depth log n. The original creates a process that resembled a chain of length log n. When we count the number of nodes in Louis’s binary tree we get n - 1, bringing it back to Θ(n).

Posted by Ken Dyck in Programming

This entry was posted on Sunday, June 19th, 2005 at 9:34 am and is filed under Programming. You can follow any responses to this entry through the comments RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>