<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: SICP section 1.2.1</title>
	<atom:link href="http://eli.thegreenplace.net/2007/06/26/sicp-section-121/feed/" rel="self" type="application/rss+xml" />
	<link>http://eli.thegreenplace.net/2007/06/26/sicp-section-121/</link>
	<description>Eli Bendersky's personal website</description>
	<lastBuildDate>Wed, 28 Jul 2010 12:22:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ivo</title>
		<link>http://eli.thegreenplace.net/2007/06/26/sicp-section-121/comment-page-1/#comment-204099</link>
		<dc:creator>Ivo</dc:creator>
		<pubDate>Mon, 07 Sep 2009 19:36:24 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/06/26/sicp-section-121/#comment-204099</guid>
		<description>Note that the Ackermann function as defined in SICP is different from the Ackermann function in both links. They state:
A(0, y) = y + 1
A(1, y) = y + 2
A(2, y) = 2y + 3
A(3, y) = 2^(y+3) - 3
A(4. y) explodes</description>
		<content:encoded><![CDATA[<p>Note that the Ackermann function as defined in SICP is different from the Ackermann function in both links. They state:<br />
A(0, y) = y + 1<br />
A(1, y) = y + 2<br />
A(2, y) = 2y + 3<br />
A(3, y) = 2^(y+3) &#8211; 3<br />
A(4. y) explodes</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eliben</title>
		<link>http://eli.thegreenplace.net/2007/06/26/sicp-section-121/comment-page-1/#comment-199700</link>
		<dc:creator>eliben</dc:creator>
		<pubDate>Fri, 28 Aug 2009 04:26:51 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/06/26/sicp-section-121/#comment-199700</guid>
		<description>OK, I&#039;ve fixed the computation of (A 3 3). Thanks for noticing.</description>
		<content:encoded><![CDATA[<p>OK, I&#8217;ve fixed the computation of (A 3 3). Thanks for noticing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zok</title>
		<link>http://eli.thegreenplace.net/2007/06/26/sicp-section-121/comment-page-1/#comment-198047</link>
		<dc:creator>zok</dc:creator>
		<pubDate>Mon, 24 Aug 2009 20:56:05 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/06/26/sicp-section-121/#comment-198047</guid>
		<description>There is an error in the calculation of (A 3 3)
You wrote:
; we saw that (A 2 2) is 16
But (A 2 2) is 4 !!!
Right sequence is:
(A 3 3)
(A 2 (A 3 2))
(A 2 (A 2 (A 3 1)))
(A 2 (A 2 2))
(A 2 (A 1 (A 2 1)))
(A 2 (A 1 2))
(A 2 4)
(A 1 (A 2 3))
(A 1 (A 1 A(2 2)))
(A 1 (A 1 (A 1 (A 2 1))))
(A 1 (A 1 (A 1 2)))
So,
(A 3 3) = 2^(2^(2^2))=2^(2^4)=2^16 = 65536</description>
		<content:encoded><![CDATA[<p>There is an error in the calculation of (A 3 3)<br />
You wrote:<br />
; we saw that (A 2 2) is 16<br />
But (A 2 2) is 4 !!!<br />
Right sequence is:<br />
(A 3 3)<br />
(A 2 (A 3 2))<br />
(A 2 (A 2 (A 3 1)))<br />
(A 2 (A 2 2))<br />
(A 2 (A 1 (A 2 1)))<br />
(A 2 (A 1 2))<br />
(A 2 4)<br />
(A 1 (A 2 3))<br />
(A 1 (A 1 A(2 2)))<br />
(A 1 (A 1 (A 1 (A 2 1))))<br />
(A 1 (A 1 (A 1 2)))<br />
So,<br />
(A 3 3) = 2^(2^(2^2))=2^(2^4)=2^16 = 65536</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Snikeris</title>
		<link>http://eli.thegreenplace.net/2007/06/26/sicp-section-121/comment-page-1/#comment-164336</link>
		<dc:creator>Joe Snikeris</dc:creator>
		<pubDate>Fri, 03 Apr 2009 23:27:05 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/06/26/sicp-section-121/#comment-164336</guid>
		<description>@eli,

Cool, thanks for pointing that out. 

A recursive definition of h: h(n) = 2^{h(n-1)}</description>
		<content:encoded><![CDATA[<p>@eli,</p>
<p>Cool, thanks for pointing that out. </p>
<p>A recursive definition of h: h(n) = 2^{h(n-1)}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gwern</title>
		<link>http://eli.thegreenplace.net/2007/06/26/sicp-section-121/comment-page-1/#comment-163710</link>
		<dc:creator>gwern</dc:creator>
		<pubDate>Mon, 30 Mar 2009 02:23:30 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/06/26/sicp-section-121/#comment-163710</guid>
		<description>Looks like some of your formatting is messed up:  I see &#039;; (add-iter 1 8)&#039; as &#039;add-iter 1 smiley-face&#039;!</description>
		<content:encoded><![CDATA[<p>Looks like some of your formatting is messed up:  I see &#8216;; (add-iter 1 8)&#8217; as &#8216;add-iter 1 smiley-face&#8217;!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eliben</title>
		<link>http://eli.thegreenplace.net/2007/06/26/sicp-section-121/comment-page-1/#comment-160455</link>
		<dc:creator>eliben</dc:creator>
		<pubDate>Tue, 10 Mar 2009 17:54:27 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/06/26/sicp-section-121/#comment-160455</guid>
		<description>@Joe,

Exponentation is &lt;a href=&quot;http://en.wikipedia.org/wiki/Operator_associativity&quot; rel=&quot;nofollow&quot;&gt;right-associative&lt;/a&gt;. Hence:

2^2^2^2 = 2^(2^(2^2)) = 2^(2^4) = 2^16 = 65536</description>
		<content:encoded><![CDATA[<p>@Joe,</p>
<p>Exponentation is <a href="http://en.wikipedia.org/wiki/Operator_associativity" rel="nofollow">right-associative</a>. Hence:</p>
<p>2^2^2^2 = 2^(2^(2^2)) = 2^(2^4) = 2^16 = 65536</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Snikeris</title>
		<link>http://eli.thegreenplace.net/2007/06/26/sicp-section-121/comment-page-1/#comment-160185</link>
		<dc:creator>Joe Snikeris</dc:creator>
		<pubDate>Mon, 09 Mar 2009 15:49:02 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/06/26/sicp-section-121/#comment-160185</guid>
		<description>For (h n) your definition is wrong.  It falls apart at (h 4).

(h 0) = 0
(h 1) = 2
(h 2) = 2^2 = 4
(h 3) = 2^2^2 = 16
(h 4) = 2^2^2^2 = 256 &lt;&gt; 65536

h(0) = 0, h(1) = 2, h(n) = 2^{h(n-1)} is more accurate.</description>
		<content:encoded><![CDATA[<p>For (h n) your definition is wrong.  It falls apart at (h 4).</p>
<p>(h 0) = 0<br />
(h 1) = 2<br />
(h 2) = 2^2 = 4<br />
(h 3) = 2^2^2 = 16<br />
(h 4) = 2^2^2^2 = 256 &lt;&gt; 65536</p>
<p>h(0) = 0, h(1) = 2, h(n) = 2^{h(n-1)} is more accurate.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: poq</title>
		<link>http://eli.thegreenplace.net/2007/06/26/sicp-section-121/comment-page-1/#comment-154405</link>
		<dc:creator>poq</dc:creator>
		<pubDate>Wed, 04 Feb 2009 02:22:49 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/06/26/sicp-section-121/#comment-154405</guid>
		<description>I think the answer to  Exercise 1.10 which calculates A(3,3) is not right

  ; (A 3 3)
  ; (A 2 (A 3 2))
  ; (A 2 (A 2 (A 3 1)))
  ; (A 2 (A 2 2))
  ; we saw that (A 2 2) is 16
  ; So, (A 3 3) = 2^16 = 65536 //here,A(1,16)=65536,A(2,16) &gt;&gt; 65536 :)</description>
		<content:encoded><![CDATA[<p>I think the answer to  Exercise 1.10 which calculates A(3,3) is not right</p>
<p>  ; (A 3 3)<br />
  ; (A 2 (A 3 2))<br />
  ; (A 2 (A 2 (A 3 1)))<br />
  ; (A 2 (A 2 2))<br />
  ; we saw that (A 2 2) is 16<br />
  ; So, (A 3 3) = 2^16 = 65536 //here,A(1,16)=65536,A(2,16) &gt;&gt; 65536 <img src='http://eli.thegreenplace.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://eli.thegreenplace.net/2007/06/26/sicp-section-121/comment-page-1/#comment-153596</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Wed, 28 Jan 2009 22:36:21 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/06/26/sicp-section-121/#comment-153596</guid>
		<description>Oops need to modify my previous post(should have previewed)
(define (newAh1 n)
  (define (iter p c)
    (if (= c n)
        p
        (iter (expt 2 p) (+ c 1))))
  (iter 2 1))</description>
		<content:encoded><![CDATA[<p>Oops need to modify my previous post(should have previewed)<br />
(define (newAh1 n)<br />
  (define (iter p c)<br />
    (if (= c n)<br />
        p<br />
        (iter (expt 2 p) (+ c 1))))<br />
  (iter 2 1))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://eli.thegreenplace.net/2007/06/26/sicp-section-121/comment-page-1/#comment-152347</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Fri, 16 Jan 2009 20:26:41 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/06/26/sicp-section-121/#comment-152347</guid>
		<description>(h n) can also be written by the following iterative process
`&lt;code&gt;(define (h n) 
      (define (iter p c)
         (if (__abENT__gt; (+ c 1)
                   p
                   (expt 2 (iter p (+ c 1)))))
         (iter 2 1))&lt;/code&gt;`</description>
		<content:encoded><![CDATA[<p>(h n) can also be written by the following iterative process<br />
<code class="backtick">(define (h n)<br />
      (define (iter p c)<br />
         (if (&gt; (+ c 1)<br />
                   p<br />
                   (expt 2 (iter p (+ c 1)))))<br />
         (iter 2 1))</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
