Skip to main content.
-->
April 24th, 2005

Solution to SICP Exercise 1.13

Structure and Interpretation of Computer Programs

Finally, I have a solution to Exercise 1.13:

http://www.kendyck.com/math/sicp/ex1-13.xml

Posted by Ken Dyck in Programming

This entry was posted on Sunday, April 24th, 2005 at 11:09 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.

10 Responses to “Solution to SICP Exercise 1.13”

  1. Scott says:

    Ken,

    Well done — my wife and I each worked separately on this for half an hour with minimal progress. How long were you working on the problem?

    Scott

    (also working through SICP)

  2. Ken Dyck says:

    Actually, I found the toughest part about this exercise was formatting it for the web. Compared to getting MathML to work, the proof was relatively simple, but as I recall, that wasn’t entirely straightforward, either.

    I’m sorry. I don’t remember how long I spent working on it.

    Good luck with SICP, though. I have to say that it’s pretty cool (and rare) that you have a wife that is interested in this sort of thing. Good luck to both of you.

  3. Ran says:

    Hi
    Nice proof!
    The main part of the induction can be simplified considiribly by taking into account the fact (which is mentioned in the book) that
    phi^2 = phi + 1
    and similarly for psi. Thus you have that
    phi^(n+1) - phi^n - phi^(n-1) = 0
    which you can compare on the right hand side to psi.
    In fact, you don’t even have to “open” phi and psi!

  4. Bill Mill says:

    Beautiful proof, it’s been four years since I thought about inductive proofs, and I followed you right through.

  5. Morgan says:

    How can I view this? I have tried both Firefox and IE.

  6. Ken Dyck says:

    Morgan, the proof is written in MathML.

    Firefox has had built-in support for rendering MathML since version 1.5 from what I can tell. That is, it should ‘just work’. Perhaps you need to upgrade to a more recent release of Firefox.

    IE requires a plug-in to render MathML. MathPlayer seems to be the most popular, but as a Firefox user I can’t attest to its quality.

    Hope this helps.

  7. Jonathan Hartley says:

    Hey. I have viewed the solution at:

    http://www.kendyck.com/math/sicp/ex1-13.xml

    in the past, but now when I go to look at it, it says:

    Error loading stylesheet: An unknown error has occurred (805303f4)http://www.w3.org/Math/XSL/pmathml.xsl

    Is this just me? Given the comments above, I’ll mention that I’m on Firefox 3.5.7, on Windows.

  8. Ken Dyck says:

    As Jonathan points out, there appears to be a problem viewing the proof in Firefox 3.5.7. I’m also seeing problems in IE8 and Chrome 3.0.195.38.

    It seems that sometime since the page was first launched, browsers have deemed it a security risk to fetch stylesheets from external sites. I’ll fix this when I have some time.

    Thanks for reporting the problem Jonathan!

  9. Jonathan Hartley says:

    n.p. I don’t know if you already fixed it, but today I’m at home (i.e. on a different computer, but still running Firefox 3.7.5) and it works fine. Hooray. Thanks.

  10. Ken Dyck says:

    It is strange that it worked for you, Jonathan, because I hadn’t changed anything.

    Anyways, it should be fixed now for anybody else who is having problems.

Leave a Reply

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