<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://inimino.org/SICP-wiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://inimino.org/SICP-wiki/feed.php">
        <title>HN reads SICP</title>
        <description></description>
        <link>http://inimino.org/SICP-wiki/</link>
        <image rdf:resource="http://inimino.org/SICP-wiki/lib/images/favicon.ico" />
       <dc:date>2009-03-20T17:06:37+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://inimino.org/SICP-wiki/doku.php?id=exercise_2.16&amp;rev=1236903444&amp;do=diff"/>
                <rdf:li rdf:resource="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.45&amp;rev=1236553851&amp;do=diff"/>
                <rdf:li rdf:resource="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.46&amp;rev=1236418778&amp;do=diff"/>
                <rdf:li rdf:resource="http://inimino.org/SICP-wiki/doku.php?id=exercise_2.6&amp;rev=1236417959&amp;do=diff"/>
                <rdf:li rdf:resource="http://inimino.org/SICP-wiki/doku.php?id=start&amp;rev=1236417565&amp;do=diff"/>
                <rdf:li rdf:resource="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.43&amp;rev=1236415765&amp;do=diff"/>
                <rdf:li rdf:resource="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.38&amp;rev=1235958682&amp;do=diff"/>
                <rdf:li rdf:resource="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.35&amp;rev=1235958412&amp;do=diff"/>
                <rdf:li rdf:resource="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.34&amp;rev=1235957566&amp;do=diff"/>
                <rdf:li rdf:resource="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.36&amp;rev=1235957532&amp;do=diff"/>
                <rdf:li rdf:resource="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.32&amp;rev=1235955981&amp;do=diff"/>
                <rdf:li rdf:resource="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.31&amp;rev=1235955768&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://inimino.org/SICP-wiki/lib/images/favicon.ico">
        <title>HN reads SICP</title>
        <link>http://inimino.org/SICP-wiki/</link>
        <url>http://inimino.org/SICP-wiki/lib/images/favicon.ico</url>
    </image>
    <item rdf:about="http://inimino.org/SICP-wiki/doku.php?id=exercise_2.16&amp;rev=1236903444&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-03-13T00:17:24+00:00</dc:date>
        <dc:creator>inimino</dc:creator>
        <title>exercise_2.16 - created</title>
        <link>http://inimino.org/SICP-wiki/doku.php?id=exercise_2.16&amp;rev=1236903444&amp;do=diff</link>
        <description>Explain, in general, why equivalent algebraic expressions may lead to 
different answers. Can you devise an interval-arithmetic package that 
does not have this shortcoming, or is this task impossible? (Warning: 
This problem is very difficult.)


As seen in Exercise 2.14, most of the algebraic identities that hold on 
operations over real numbers do not hold on the analogous operations over 
intervals.</description>
    </item>
    <item rdf:about="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.45&amp;rev=1236553851&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-03-08T23:10:51+00:00</dc:date>
        <title>exercise_1.45</title>
        <link>http://inimino.org/SICP-wiki/doku.php?id=exercise_1.45&amp;rev=1236553851&amp;do=diff</link>
        <description>We saw in section 1.3.3 that attempting to compute square roots 
by naively finding a fixed point of y ↦ x/y does not converge, and that this 
can be fixed by average damping. The same method works for finding cube roots 
as fixed points of the average-damped y ↦ x/y². Unfortunately, the process does 
not work for fourth roots — a single average damp is not enough to make a 
fixed-point search for y ↦ x/y³ converge. On the other hand, if we average damp 
twice (i.e., use the average damp of the …</description>
    </item>
    <item rdf:about="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.46&amp;rev=1236418778&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-03-07T09:39:38+00:00</dc:date>
        <dc:creator>inimino</dc:creator>
        <title>exercise_1.46</title>
        <link>http://inimino.org/SICP-wiki/doku.php?id=exercise_1.46&amp;rev=1236418778&amp;do=diff</link>
        <description>Several of the numerical methods described in this chapter are 
instances of an extremely general computational strategy known as iterative 
improvement. Iterative improvement says that, to compute something, we start 
with an initial guess for the answer, test if the guess is good enough, and 
otherwise improve the guess and continue the process using the improved guess 
as the new guess. Write a procedure iterative-improve that takes two procedures 
as arguments: a method for telling whether a…</description>
    </item>
    <item rdf:about="http://inimino.org/SICP-wiki/doku.php?id=exercise_2.6&amp;rev=1236417959&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-03-07T09:25:59+00:00</dc:date>
        <dc:creator>inimino</dc:creator>
        <title>exercise_2.6 - created</title>
        <link>http://inimino.org/SICP-wiki/doku.php?id=exercise_2.6&amp;rev=1236417959&amp;do=diff</link>
        <description>In case representing pairs as procedures wasn't mind-boggling 
enough, consider that, in a language that can manipulate procedures, we can get 
by without numbers (at least insofar as nonnegative integers are concerned) by 
implementing 0 and the operation of adding 1 as</description>
    </item>
    <item rdf:about="http://inimino.org/SICP-wiki/doku.php?id=start&amp;rev=1236417565&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-03-07T09:19:25+00:00</dc:date>
        <dc:creator>inimino</dc:creator>
        <title>start</title>
        <link>http://inimino.org/SICP-wiki/doku.php?id=start&amp;rev=1236417565&amp;do=diff</link>
        <description>This wiki is created by the HN-reads-SICP group, for posting solutions and discussion on the SICP exercises.

Please add your own solutions or thoughts once you have done each exercise.

Chapter 1. Building Abstractions with Procedures

1.1 The Elements of Programming


Exercise 1.1</description>
    </item>
    <item rdf:about="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.43&amp;rev=1236415765&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-03-07T08:49:25+00:00</dc:date>
        <dc:creator>inimino</dc:creator>
        <title>exercise_1.43 - added a couple solutions</title>
        <link>http://inimino.org/SICP-wiki/doku.php?id=exercise_1.43&amp;rev=1236415765&amp;do=diff</link>
        <description>Exercise 1.43.


If f is a numerical function and n is a positive integer, then 
we can form the nth repeated application of f, which is defined to be the 
function whose value at x is f(f(...(f(x))...)). For example, if f is the 
function x ↦ x + 1, then the nth repeated application of f is the function 
x ↦ x + n. If f is the operation of squaring a number, then the nth repeated 
application of f is the function that raises its argument to the 2ⁿth power. 
Write a procedure that takes as input…</description>
    </item>
    <item rdf:about="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.38&amp;rev=1235958682&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-03-02T01:51:22+00:00</dc:date>
        <dc:creator>mario romero</dc:creator>
        <title>exercise_1.38</title>
        <link>http://inimino.org/SICP-wiki/doku.php?id=exercise_1.38&amp;rev=1235958682&amp;do=diff</link>
        <description>Exercise 1.38.  In 1737, the Swiss mathematician Leonhard Euler published a memoir De Fractionibus Continuis, which included a continued fraction expansion for e - 2, where e is the base of the natural logarithms. In this fraction, the Ni are all 1, and the Di are successively 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, .... Write a program that uses your cont-frac procedure from exercise 1.37 to approximate e, based on Euler's expansion.</description>
    </item>
    <item rdf:about="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.35&amp;rev=1235958412&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-03-02T01:46:52+00:00</dc:date>
        <title>exercise_1.35 - created</title>
        <link>http://inimino.org/SICP-wiki/doku.php?id=exercise_1.35&amp;rev=1235958412&amp;do=diff</link>
        <description>Show that the golden ratio ϕ (section 1.2.2) is a fixed point of the transformation x ↦ 1 + 1/x, and use this fact to compute ϕ by means of the fixed-point procedure. 



(define ϕ (/ (+ 1 (sqrt 5)) 2))
(+ 1 (/ 1 ϕ)) ; =&gt; ϕ = 1.618033988749895

(define tolerance 0.00001)
(define (fixed-point f first-guess)
  (define (close-enough? v1 v2)
    (&lt; (abs (- v1 v2)) tolerance))
  (define (try guess)
    (let ((next (f guess)))
      (if (close-enough? guess next)
          next
          (try next))))…</description>
    </item>
    <item rdf:about="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.34&amp;rev=1235957566&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-03-02T01:32:46+00:00</dc:date>
        <title>exercise_1.34 - created</title>
        <link>http://inimino.org/SICP-wiki/doku.php?id=exercise_1.34&amp;rev=1235957566&amp;do=diff</link>
        <description>Suppose we define the procedure




(define (f g)
  (g 2))




Then we have




(f square)
4

(f (lambda (z) (* z (+ z 1))))
6




What happens if we (perversely) ask the interpreter to evaluate the combination (f f)? Explain. 


Answer: 
Failure, because (f f) evaluates to (f 2),
but then we get (2 2); the first 2 is not a function so the interpreter fails.</description>
    </item>
    <item rdf:about="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.36&amp;rev=1235957532&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-03-02T01:32:12+00:00</dc:date>
        <dc:creator>mario romero</dc:creator>
        <title>exercise_1.36</title>
        <link>http://inimino.org/SICP-wiki/doku.php?id=exercise_1.36&amp;rev=1235957532&amp;do=diff</link>
        <description>Exercise 1.36.  Modify fixed-point so that it prints the sequence of approximations it generates, using the newline and display primitives shown in exercise 1.22. Then find a solution to xx = 1000 by finding a fixed point of x  log(1000)/log(x). (Use Scheme's primitive log procedure, which computes natural logarithms.) Compare the number of steps this takes with and without average damping. (Note that you cannot start fixed-point with a guess of 1, as this would cause division by log(1) = 0.)</description>
    </item>
    <item rdf:about="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.32&amp;rev=1235955981&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-03-02T01:06:21+00:00</dc:date>
        <dc:creator>mario romero</dc:creator>
        <title>exercise_1.32</title>
        <link>http://inimino.org/SICP-wiki/doku.php?id=exercise_1.32&amp;rev=1235955981&amp;do=diff</link>
        <description>Exercise 1.32.  a. Show that sum and product (exercise 1.31) are both special cases of a still more general notion called accumulate that combines a collection of terms, using some general accumulation function:

(accumulate combiner null-value term a next b)</description>
    </item>
    <item rdf:about="http://inimino.org/SICP-wiki/doku.php?id=exercise_1.31&amp;rev=1235955768&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-03-02T01:02:48+00:00</dc:date>
        <title>exercise_1.31</title>
        <link>http://inimino.org/SICP-wiki/doku.php?id=exercise_1.31&amp;rev=1235955768&amp;do=diff</link>
        <description>a.  The sum procedure is only the simplest of a vast number of similar abstractions that can be captured as higher-order procedures. Write an analogous procedure called product that returns the product of the values of a function at points over a given range. Show how to define factorial in terms of product. Also use product to compute approximations to using the formula:</description>
    </item>
</rdf:RDF>
