<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0">
 <title type="html">TARDIS</title>
 <id>http://doctor.tardis.me/atom</id>
 <link rel="alternate" type="text/html" hreflang="ko" href="http://doctor.tardis.me/"/>
 <subtitle type="html">Time And Relative Dimension In Space</subtitle>
 <updated>2010-06-09T17:10:19+09:00</updated>
 <generator>Textcube.com 2.0 Garnet</generator>
 <entry>
  <title type="html">SICP 연습문제 1.13 풀이</title>
  <link rel="alternate" type="text/html" href="http://doctor.tardis.me/17"/>
  <link rel="replies" type="application/atom+xml" href="http://doctor.tardis.me/atom/discuss/17" thr:count="0"/>
  <category term="SICP"/>
  <category term="LISP"/>
  <category term="scheme"/>
  <category term="SICP"/>
  <category term="&#xC5F0;&#xC2B5;&#xBB38;&#xC81C;"/>
  <category term="&#xC99D;&#xBA85;"/>
  <category term="&#xD504;&#xB85C;&#xADF8;&#xB798;&#xBC0D;"/>
  <author>
   <name>The Doctor</name>
  </author>
  <id>http://doctor.tardis.me/17</id>
  <updated>2009-08-18T21:20:41+09:00</updated>
  <published>2009-08-18T21:04:42+09:00</published>
  <summary type="html">이 문서는 Structure and Interpretation of Computer, by Abelson, Sussman, and Sussman의 라이센스 이용허가규약 저작자표시-비영리에 따라 제작된 문서입니다. 혼자 공부하면서 풀어본 것입니다. 그런만큼 오류가 많을 것이라 생각합니다. 문제 있는 부분은 알려주시면 고맙겠습니다. Exercise 1.13.&amp;nbsp; Prove that Fib(n) is the closest integer to n/ 5, where &amp;nbsp;= (1 + 5)/2. Hint: Let &amp;nbsp;= (1 - 5)/2. Use induction and the definition of the Fibonacci numbers (see section 1.2.2) to prove that Fib(n) = ( n&amp;nbsp;- n)/ 5. 수학적 귀납법을 통해 증명한다면 Fib(0) = 0 (φ0 － ψ0) / √5 = (1 - 1) / √5 &amp;nbsp;= 0 ∵ Fib(0) = (φ0 － ψ0) / √5 Fib(1) = 1 (φ1 － ψ1) / √5 = {(1 + √5) / 2 - (1 - √5) / 2} / √5 = 2√5 / 2√5 = 1 ∵ Fib(1) = (φ1 － ψ1) / √5 만약 Fib(n-1) = (φn-1 － ψn-1) / √5 Fib(n) = (φn － ψn) / √5 이 성립한다고 가정하자. 이 때 Fib(n+1) = (φn+1 － ψn+1) / √5 이 성립하는지를 알아봐야 하므로 Fib(n+1) = Fib(n) + Fib(n-1) = (φn － ψn) / √5 + (φn-1 － ψn-1) / √5 = {(φn + φn-1) + (ψn + ψn-1)} / √5 = {φn-1(φ&amp;nbsp;+ 1) + ψn-1(ψ&amp;nbsp;+ 1)} / √5 &amp;nbsp;이 된다. 이 때, φ2&amp;nbsp;= (3 + √5) / 2 = φ&amp;nbsp;+ 1 이고, ψ2&amp;nbsp;= (3 - √5) / 2 &amp;nbsp;= ψ&amp;nbsp;+ 1 이다. ∵ Fib(n+1) = (φn+1 － ψn+1) / √5 이 성립한다. 즉, n = 0 과 n = 1에서 성립하므로 n = 2 이상의 정수에서 Fib(n) = (φn － ψn) / √5 이 성립한다. 따라서 n = 0 이상의 자연수에서 Fib(n) = (φn － ψn) / √5 이 성립함을 증명할 수 있다. 따라서 n = 0 이상의 자연수에서 (φn － ψn) / √5 가 φn / √5 에 가장 가까운 정수라면 이를 증명 가능하다. -------------------------------2009/01/03 21:47 * 드디어 풀이가 떠올랐습니다. &amp;nbsp;(φn － ψn) / √5 가 φn / √5 에 가장 가까운 정수이기 위해서는 두가지 조건이 성립되야 한다. 1. &amp;nbsp;(φn － ψn) / √5 가 정수여야 하며, 2. 이 두 숫자의 차가 0.5 미만이어야 한다. 2번이 성립해야 하는 이유는 어떤 정수 a가 가장 가까운 수 x의 범위는 a - 0.5 &amp;lt; x &amp;lt; a + 0.5 이기 때문이다. 따라서 | - ψn&amp;nbsp;/ √5 | &amp;lt; 0.5 가 성립하면 증명이 완료된다. - ψn&amp;nbsp;/ √5 = - {(1 - √5)&amp;nbsp;/ 2}n&amp;nbsp;/ √5 가 된다. √5 의 값은 2 &amp;lt; √5 &amp;lt;3 이다. ∵ (1 - √5)&amp;nbsp;의 값은 - 2 &amp;lt; (1 - √5)&amp;nbsp;&amp;lt; - 1 ∵ (1 - √5) / 2&amp;nbsp;의 값은 - 1 &amp;lt; (1 - √5)&amp;nbsp;&amp;lt; - 1 / 2 ∵ - ψn은 (- 1)n&amp;nbsp;과 (- 1 / 2)n&amp;nbsp;사이에 위치한다. 즉, | - ψn|은 1 이하에서 진동한다. | - ψn&amp;nbsp;| ≤ 1 로 분자가 1보다 작거나 같지만 분모 | √5 | &amp;gt; 2이므로 - ψn&amp;nbsp;/ √5 &amp;nbsp;&amp;lt; 1 / 2 이 항상 성립한다. (더 자세한 증명이 필요한 부분인지 아닌지를 모르겠다.) 따라서 n = 0 이상의 자연수에서 Fib(n) 은 &amp;nbsp;φn / √5 에 가장 가까운 정수임을 증명할 수 있다. P.S. 이번에 이렇게 오래 풀지 못한 이유는 - ψn&amp;nbsp;/ √5 를 구하는데 너무 집착한 나머지 단순히 가깝다는 것의 의미 자체를 생각하면 쉽게 증명할 수 있다는 사실을 깨닫지 못했기 때문이었습니다. &lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://doctor.tardis.me/17&quot;&gt;글 전체보기&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</summary>
 </entry>
 <entry>
  <title type="html">공감각</title>
  <link rel="alternate" type="text/html" href="http://doctor.tardis.me/21"/>
  <link rel="replies" type="application/atom+xml" href="http://doctor.tardis.me/atom/discuss/21" thr:count="0"/>
  <category term="Psychology"/>
  <category term="&#xACF5;&#xAC10;&#xAC01;"/>
  <category term="&#xC2EC;&#xB9AC;&#xD559;"/>
  <author>
   <name>The Doctor</name>
  </author>
  <id>http://doctor.tardis.me/21</id>
  <updated>2009-06-04T00:29:21+09:00</updated>
  <published>2009-06-04T00:29:21+09:00</published>
  <summary type="html">공감각이 감각의 혼선에 의한 것이라면 S.V. Shereshevskii 와는 정반대로 혼선이 거의 없는 인간은 어떤 인간이 될까? 한편 공감각이 잘 드러나는 혼선이라면 드러나지 않는 혼선에는 어떤 것이 있을까? &lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://doctor.tardis.me/21&quot;&gt;글 전체보기&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</summary>
 </entry>
 <entry>
  <title type="html">지식의 대통합 통섭</title>
  <link rel="alternate" type="text/html" href="http://doctor.tardis.me/19"/>
  <link rel="replies" type="application/atom+xml" href="http://doctor.tardis.me/atom/discuss/19" thr:count="0"/>
  <category term="The Library"/>
  <category term="&#xBB3C;&#xB9AC;&#xD559;"/>
  <category term="&#xC0AC;&#xD68C;&#xACFC;&#xD559;"/>
  <category term="&#xC0DD;&#xBB3C;&#xD559;"/>
  <category term="&#xC778;&#xBB38;&#xD559;"/>
  <category term="&#xC790;&#xC5F0;&#xACFC;&#xD559;"/>
  <category term="&#xC9C4;&#xD654;"/>
  <category term="&#xCC45;"/>
  <category term="&#xD1B5;&#xC12D;"/>
  <author>
   <name>The Doctor</name>
  </author>
  <id>http://doctor.tardis.me/19</id>
  <updated>2009-02-18T17:55:47+09:00</updated>
  <published>2009-02-04T23:36:16+09:00</published>
  <summary type="html"> 지식의 대통합 통섭, 에드워드 윌슨 저, 최재천 역, 사이언스 북스 Consilience: The Unity of Knowledge - 통섭은 특별히 지식의 대통합의 방법을 이야기하는 책이 아니다. 그냥 담담하게 통합의 가능성과 그 실례를 제시하여 방향성만을 제시하는 책이다. 100% 옳기 위해 쓴 책이라기보다는 이런 현상이 일어나고 있으니 이렇게 되지 않을까라고 추측해본다는 느낌에 가깝다. 그러나  저자의 생물학적인 통찰 덕에 이런 추측들에서 수없이 많은 것을 깨우칠 수 있게 해준다.  통섭을 읽는 중에 통섭에 대한 비판이 많다는 것을 들었는데 나는 왜 비판받는지 알지 못하고 있었다. 그러다가 몇몇 분의 글에서 &amp;#039;각각 연구하며 겹쳐지는 것을 무리하게 합치려한다&amp;#039;, &amp;#039;생물학의 위기의식 아니냐?&amp;#039; 같은 이야기를 보게 되었다.  그러나 나는 통섭은 &amp;#039;어느 날 아침에 일어나보니 이미 현실&amp;#039;이 될 일이라고 생각한다. 통섭이 말하는 것은 학문을 합친다는 이야기가 아니다. 현재 학문의 경계란 그 학문이 연구하는 대상과 고유의 방법론으로 나뉘는데 통섭은 이 경계가 불가침의 것이 아니게 되며, 방법론은 통합된다는 이야기라고 나는 생각한다. 왜냐하면 애초에 우리가 연구하는 것의 경계는 우리가 편하게 연구하기 위해서 만든 것일뿐 사실은 그 경계가 모호하고, 연구의 방법론은 우리가 아무 것도 모르는 상태에서 좀 더 알기 위해 발버둥치기 위해 생성된 것일 뿐이기 때문이다. 그리고 이는 &amp;#039;생물학&amp;#039;이라는 중간 계통을 통하던 말던과 관계 없이 모든 만물을 물리학적인 것으로 환원해내는 과정이다. 그리고 이러한 환원의 끝에 있는 것은 - 약간 과장하자면 - 아마도 물리학의 영원한 꿈인 간단하고 아름다운 &amp;#039;만물의 이론&amp;#039;이거나, 아니면 닿을 수 없는 것의 발견으로 인한 &amp;#039;신의 증명&amp;#039;일 것이다. 이 책과 함께 읽으면 좋은 책 넥서스 : 여섯개의 고리로 읽는 세상, 마크 뷰캐넌, 세종 연구원 - 통섭의 저자인 에드워드 윌슨은 복잡계의 가능성에 대해 유보적인 태도를 취했으나, 이에 찬성하던 그렇지 않던 복잡계가 어떠한 방식으로 여러가지 학문의 연구와 연결되어 있는지를 살펴보는 것은 매우 가치있는 일일 것이다. 부의 기원 : 최첨단 경제학과 과학이론이 밝혀낸 부의 원천과 진화, 에릭 바인하커, 랜덤하우스코리아 - 통섭에서 이야기된 경제학의 문제점을 복잡계적 시각에서 풀어간 책이다. &amp;#039;경제학이 가정한 것들&amp;#039;의 문제점에 대해 특히 깊게 다루고 있다. 생명과학 8판, 캠벨·리스, 바이오사이언스 - 기초적인 생물학적 지식을 얻기에 좋은 교재다. 통섭의 사회과학과 생물학의 통합에 대한 오해는 생물학에 대한 오해에 비롯되는 면도 상당히 존재한다고 생각한다. 그렇기에 이 책을 함께 추천할만하다. &lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://doctor.tardis.me/19&quot;&gt;글 전체보기&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</summary>
 </entry>
 <entry>
  <title type="html">괴담과 유전자-문화 공진화</title>
  <link rel="alternate" type="text/html" href="http://doctor.tardis.me/18"/>
  <link rel="replies" type="application/atom+xml" href="http://doctor.tardis.me/atom/discuss/18" thr:count="0"/>
  <category term="Social Science"/>
  <category term="&#xAC00;&#xC124;"/>
  <category term="&#xAD34;&#xB2F4;"/>
  <category term="&#xC0AC;&#xD68C;&#xACFC;&#xD559;"/>
  <category term="&#xC0AC;&#xD68C;&#xD559;"/>
  <category term="&#xC18D;&#xB2F4;"/>
  <category term="&#xC9C4;&#xD654;"/>
  <author>
   <name>The Doctor</name>
  </author>
  <id>http://doctor.tardis.me/18</id>
  <updated>2009-02-18T17:59:43+09:00</updated>
  <published>2009-01-13T15:25:59+09:00</published>
  <summary type="html">괴담은 왜 존재하는가? 괴담을 믿고 전파하는 행동이 생존에 유리했기 때문이다. 말하자면 옛날의 속담이나 옛 지혜는 괴담과 맥을 같이 한다고 나는 생각한다. 다만 우리는 보상 접근적인 이야기와 온건한 수준의 위험 회피 이야기는 속담이라 하게 되었고, 과격할 정도의 위험 회피적인 이야기는 괴담이라고 하는 것이 아닐까? &lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://doctor.tardis.me/18&quot;&gt;글 전체보기&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</summary>
 </entry>
 <entry>
  <title type="html">SICP 연습문제 1.12 풀이</title>
  <link rel="alternate" type="text/html" href="http://doctor.tardis.me/16"/>
  <link rel="replies" type="application/atom+xml" href="http://doctor.tardis.me/atom/discuss/16" thr:count="0"/>
  <category term="SICP"/>
  <category term="LISP"/>
  <category term="scheme"/>
  <category term="SICP"/>
  <category term="&#xC5F0;&#xC2B5;&#xBB38;&#xC81C;"/>
  <category term="&#xD504;&#xB85C;&#xADF8;&#xB798;&#xBC0D;"/>
  <author>
   <name>The Doctor</name>
  </author>
  <id>http://doctor.tardis.me/16</id>
  <updated>2009-01-02T00:45:33+09:00</updated>
  <published>2009-01-02T00:45:33+09:00</published>
  <summary type="html"> 이 문서는 Structure and Interpretation of Computer, by Abelson, Sussman, and Sussman의 라이센스 이용허가규약 저작자표시-비영리에 따라 제작된 문서입니다.  혼자 공부하면서 풀어본 것입니다. 그런만큼 오류가 많을 것이라 생각합니다. 문제 있는 부분은 알려주시면 고맙겠습니다. Exercise 1.12.  The following pattern of numbers is called Pascal&amp;#039;s triangle. The numbers at the edge of the triangle are all 1, and each number inside the triangle is the sum of the two numbers above it. Write a procedure that computes elements of Pascal&amp;#039;s triangle by means of a recursive process. 이 문제를 처음 접했을 때 어떻게 풀어야 할지 혼란했습니다. 그 첫째 이유는 이 문제가 파스칼의 삼각형을 만들어내도록 프로그래밍 하는 것으로 이해했기에, 수를 나열하는 방법을 생각했고, 이를 떠올릴 수 없었기 때문입니다. 그리고 둘째 이유는 조합을 이용하여 이를 만들어내는 방법이 떠오르기는 했지만 recursive process를 이용한 방법이 떠오르지 않았기 때문입니다. 그러다가 위키백과에서 파스칼의 삼각형을 참조하다가 이 문제가 몇 번째 줄의 몇 번째를 물으면 답하는 프로그램을 만들어보라는 질문이 아닐까 생각했고, 원문의 의미도 그렇게 이해되기에 이 방식을 이용하여 만들었더니 금새 풀렸습니다. (define (pascaltri n k)   (cond ((= k 1) 1)         ((= k n) 1)         ((and (&amp;gt; k 1) (&amp;lt; k n)) (+ (pascaltri (- n 1) (- k 1)) (pascaltri (- n 1) k))))) &lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://doctor.tardis.me/16&quot;&gt;글 전체보기&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</summary>
 </entry>
 <entry>
  <title type="html">SICP 연습문제 1.11 풀이</title>
  <link rel="alternate" type="text/html" href="http://doctor.tardis.me/15"/>
  <link rel="replies" type="application/atom+xml" href="http://doctor.tardis.me/atom/discuss/15" thr:count="0"/>
  <category term="SICP"/>
  <category term="LISP"/>
  <category term="scheme"/>
  <category term="SICP"/>
  <category term="&#xC5F0;&#xC2B5;&#xBB38;&#xC81C;"/>
  <category term="&#xD504;&#xB85C;&#xADF8;&#xB798;&#xBC0D;"/>
  <author>
   <name>The Doctor</name>
  </author>
  <id>http://doctor.tardis.me/15</id>
  <updated>2008-12-28T22:04:32+09:00</updated>
  <published>2008-12-28T21:22:35+09:00</published>
  <summary type="html">이 문서는 Structure and Interpretation of Computer, by Abelson, Sussman, and Sussman의 라이센스 이용허가규약 저작자표시-비영리에 따라 제작된 문서입니다.  혼자 공부하면서 풀어본 것입니다. 그런만큼 오류가 많을 것이라 생각합니다. 문제 있는 부분은 알려주시면 고맙겠습니다. Exercise 1.11.  A function f is defined by the rule that f(n) = n if n&amp;lt;3 and f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3) if n&amp;gt; 3. Write a procedure that computes f by means of a recursive process. Write a procedure that computes f by means of an iterative process. 정오표를 참조하셔야 합니다. recursive process로 (define (f n)         (cond ((&amp;lt; n 3) n)               (else (+ (f (- n 1))                         (* 2 (f (- n 2)))                         (* 3 (f (- n 3))))))) iterative process로 (define (f n)            (cond ((&amp;lt; n 3) n)                    (else (f-iter 0 1 2 n)))) (define (f-iter a b c count)           (cond ((= 2 count) c)                    (else (f-iter b c (+ (* 3 a) (* 2 b) c) (- count 1))))) iterative process를 블록구조화 (define (f n)            (define (f-iter a b c count)                     (cond ((= 2 count) c)                              (else (f-iter b c (+ (* 3 a) (* 2 b) c) (- count 1)))))           (cond ((&amp;lt; n 3) n)                    (else (f-iter 0 1 2 n))))   정오표 참조 전의 답 recursive process로 (define (f n)         (cond ((&amp;lt; n 3) n)               (else (+ (- n 1)                         (* 2 (f (- n 2)))                         (* 3 (f (- n 3))))))) iterative process로 (define (f n)            (cond ((&amp;lt; n 3) n)                    (else (f-iter 0 1 2 3 n)))) (define (f-iter a b c count mxcount)           (cond ((= (+ mxcount 1) count) c)                    (else (f-iter b c (+ (* 3 a) (* 2 b) (- count 1)) (+ count 1) mxcount)))) iterative process를 블록구조화 (define (f n)            (define (f-iter a b c count mxcount)                     (cond ((= (+ mxcount 1) count) c)                              (else (f-iter b c (+ (* 3 a) (* 2 b) (- count 1)) (+ count 1) mxcount))))           (cond ((&amp;lt; n 3) n)                    (else (f-iter 0 1 2 3 n)))) &lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://doctor.tardis.me/15&quot;&gt;글 전체보기&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</summary>
 </entry>
 <entry>
  <title type="html">SICP 연습문제 1.10 풀이</title>
  <link rel="alternate" type="text/html" href="http://doctor.tardis.me/14"/>
  <link rel="replies" type="application/atom+xml" href="http://doctor.tardis.me/atom/discuss/14" thr:count="0"/>
  <category term="LISP"/>
  <category term="scheme"/>
  <category term="SICP"/>
  <category term="&#xC5F0;&#xC2B5;&#xBB38;&#xC81C;"/>
  <category term="&#xD504;&#xB85C;&#xADF8;&#xB798;&#xBC0D;"/>
  <author>
   <name>The Doctor</name>
  </author>
  <id>http://doctor.tardis.me/14</id>
  <updated>2008-12-20T13:53:52+09:00</updated>
  <published>2008-12-20T13:49:37+09:00</published>
  <summary type="html"> 이 문서는 Structure and Interpretation of Computer, by Abelson, Sussman, and Sussman의 라이센스 이용허가규약 저작자표시-비영리에 따라 제작된 문서입니다. 혼자 공부하면서 풀어본 것입니다. 그런만큼 오류가 많을 것이라 생각합니다. 문제 있는 부분은 알려주시면 고맙겠습니다. Exercise 1.10.  The following procedure computes a mathematical function called Ackermann&amp;#039;s function. (define (A x y)   (cond ((= y 0) 0)         ((= x 0) (* 2 y))         ((= y 1) 2)         (else (A (- x 1)                  (A x (- y 1)))))) What are the values of the following expressions? (A 1 10) (A 1 10) (A (- 1 1) (A 1 (- 10 1))) (A 0 (A 1 9)) (A 0 (A (- 1 1) (A 1 (- 9 1)))) (A 0 (A 0 (A 1 8))) … (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 1 1)))))))))) (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 2))))))))) (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 4)))))))) (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 8))))))) (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 16)))))) … 1024 (A 2 4) (A 2 4) (A (- 2 1) (A 2 (- 4 1))) (A 1 (A 2 3)) (A 1 (A (- 2 1) (A 2 (- 3 1)))) (A 1 (A 1 (A 2 2))) (A 1 (A 1 (A (- 2 1) (A 2 (- 2 1))))) (A 1 (A 1 (A 1 (A 2 1)))) (A 1 (A 1 (A 1 2))) (A 1 (A 1 (A (- 1 1) (A 1 (- 2 1))))) (A 1 (A 1 (A 0 (A 1 1)))) (A 1 (A 1 (A 0 2))) (A 1 (A 1 4)) (A 1 (A (- 1 1) (A 1 (- 4 1)))) (A 1 (A 0 (A 1 3))) (A 1 (A 0 (A (- 1 1) (A 1 (- 3 1))))) (A 1 (A 0 (A 0 (A 1 2)))) … (A 1 (A 0 (A 0 (A 0 (A 1 1))))) (A 1 (A 0 (A 0 (A 0 2)))) … (A 1 16) (A (- 1 1) (A 1 (- 16 1))) … (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 1 1)))))))))))))))) (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 (A 0 2))))))))))))))) … 65536 (A 3 3) (A 3 3) (A 2 (A 2 (A 2 1))) (A 2 (A 2 2)) (A 2 (A 1 (A 2 1))) (A 2 (A 1 2)) (A 2 (A 0 (A 1 1))) (A 2 (A 0 2) (A 2 4) … 65536 오답 기록용이니 참조하지 마세요. (A 3 3) (A 2 (A 2 (A 2 1))) (A 2 (A 2 2)) (A 2 (A 1 (A 2 1))) (A 2 (A 1 2)) (A 2 (A 0 (A 1 (A 1 1)))) (A 2 (A 0 (A 1 2))) (A 2 (A 0 (A 0 (A 1 1)))) (A 2 (A 0 (A 0 2))) (A 2 8) (A 1 (A 2 7)) … (A 1 (A 1 (A 1 (A 1 (A 1 (A 1 (A 1 (A 2 1)))))))) (A 1 (A 1 (A 1 (A 1 (A 1 (A 1 (A 1 2))))))) (A 1 (A 1 (A 1 (A 1 (A 1 (A 1 (A 0 (A 1 1)))))))) … (A 1 (A 1 (A 1 (A 1 (A 1 (A 1 4)))))) (A 1 (A 1 (A 1 (A 1 (A 1 (A 0 (A 1 3))))))) (A 1 (A 1 (A 1 (A 1 (A 1 (A 0 (A 0 (A 0 (A 1 1))))))))) (A 1 (A 1 (A 1 (A 1 (A 1 16))))) Consider the following procedures, where  A  is the procedure defined above: (define (f n) (A 0 n)) (define (g n) (A 1 n)) (define (h n) (A 2 n)) (define (k n) (* 5 n n)) Give concise mathematical definitions for the functions computed by the procedures  f ,  g , and  h  for positive integer values of n. For example,  (k n)  computes 5n2. n&amp;gt;0 이므로 (define (f n) (A 0 n)) 은 2n (define (g n) (A 1 n)) 은 2n (define (h n) (A 2 n)) 은 2^2^2 … ^2 (n개) 꼴이 된다. h 함수의 경우 어떻게 수학 공식으로 나타낼지 고민하다가 위와 같이 일단 답을 적어놓은 후에 결국 다른 분의 답을 찾아보게 되었다. Solution to SICP Exercise 1.10의 식은 h(n)=2h(n-1) 와 같았다. 왜 이런 멋지고 간단한 방법을 생각하지 못한걸까! 공부가 많이 부족하다. 참고사항 Ackermann function : wikipedia 애커만 함수 항목 &lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://doctor.tardis.me/14&quot;&gt;글 전체보기&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</summary>
 </entry>
 <entry>
  <title type="html">SICP 연습문제 1.9 풀이</title>
  <link rel="alternate" type="text/html" href="http://doctor.tardis.me/11"/>
  <link rel="replies" type="application/atom+xml" href="http://doctor.tardis.me/atom/discuss/11" thr:count="1" thr:updated="2010-03-16T20:17:29+09:00"/>
  <category term="SICP"/>
  <category term="LISP"/>
  <category term="scheme"/>
  <category term="SICP"/>
  <category term="&#xC5F0;&#xC2B5;&#xBB38;&#xC81C;"/>
  <category term="&#xD504;&#xB85C;&#xADF8;&#xB798;&#xBC0D;"/>
  <author>
   <name>The Doctor</name>
  </author>
  <id>http://doctor.tardis.me/11</id>
  <updated>2008-12-18T21:50:26+09:00</updated>
  <published>2008-12-18T21:47:30+09:00</published>
  <summary type="html"> 이 문서는 Structure and Interpretation of Computer, by Abelson, Sussman, and Sussman의 라이센스 이용허가규약 저작자표시-비영리에 따라 제작된 문서입니다.  혼자 공부하면서 풀어본 것입니다. 그런만큼 틀린게 꽤 많을 것입니다. 문제 있는 부분은 알려주시면 고맙겠습니다. Exercise 1.9.  Each of the following two procedures defines a method for adding two positive integers in terms of the procedures  inc , which increments its argument by 1, and  dec , which decrements its argument by 1. (define (+ a b)   (if (= a 0)       b       (inc (+ (dec a) b)))) (define (+ a b)   (if (= a 0)       b       (+ (dec a) (inc b)))) Using the substitution model, illustrate the process generated by each procedure in evaluating  (+ 4 5) . Are these processes iterative or recursive? (+ 4 5) (inc (+ 3 5)) (inc (inc (+ 2 5))) (inc (inc (inc (+ 1 5)))) (inc (inc (inc (inc (+ 0 5))))) (inc (inc (inc (inc 5)))) (inc (inc (inc 6))) (inc (inc 7)) (inc 8) 9 이는 recursive 프로세스다. (+ 4 5) (+ (dec 4) (inc 5)) (+ 3 6) (+ (dec 3) (inc 6)) (+ 2 7) (+ (dec 2) (inc 7)) (+ 1 8) (+ (dec 1) (inc 8)) (+ 0 9) 9 이는 iterative 프로세스다. &lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://doctor.tardis.me/11&quot;&gt;글 전체보기&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</summary>
 </entry>
 <entry>
  <title type="html">SICP 연습문제 1.7-1.8 풀이</title>
  <link rel="alternate" type="text/html" href="http://doctor.tardis.me/10"/>
  <link rel="replies" type="application/atom+xml" href="http://doctor.tardis.me/atom/discuss/10" thr:count="0"/>
  <category term="SICP"/>
  <category term="LISP"/>
  <category term="scheme"/>
  <category term="SICP"/>
  <category term="&#xC5F0;&#xC2B5;&#xBB38;&#xC81C;"/>
  <author>
   <name>The Doctor</name>
  </author>
  <id>http://doctor.tardis.me/10</id>
  <updated>2008-11-23T20:25:06+09:00</updated>
  <published>2008-11-23T20:25:06+09:00</published>
  <summary type="html"> 이 문서는 Structure and Interpretation of Computer, by Abelson, Sussman, and Sussman의 라이센스 이용허가규약 저작자표시-비영리에 따라 제작된 문서입니다.  혼자 공부하면서 풀어본 것입니다. 틀린게 꽤 많을지도 모르겠습니다. 문제 있는 부분은 알려주시면 고맙겠습니다. Exercise 1.7.  The  good-enough?  test used in computing square roots will not be very effective for finding the square roots of very small numbers. Also, in real computers, arithmetic operations are almost always performed with limited precision. This makes our test inadequate for very large numbers. Explain these statements, with examples showing how the test fails for small and large numbers. An alternative strategy for implementing  good-enough?  is to watch how  guess  changes from one iteration to the next and to stop when the change is a very small fraction of the guess. Design a square-root procedure that uses this kind of end test. Does this work better for small and large numbers? 이유 예상 숫자가 일정 크기를 넘으면 프로그램이 답을 내놓지 못한다. 제곱근을 쉽게 예상할 수 있도록 2의 제곱의 제곱들을 구하고 일정 크기 이후에는 4배씩 해보았다. (sqrt 2) (sqrt 4) (sqrt 16) (sqrt 256) (sqrt 65536) (sqrt 4294967296) (sqrt 18446744073709551616) 이후로는 4배씩 했다. (sqrt 73786976294838206464) (sqrt 295147905179352825856) (sqrt 1180591620717411303424) 까지는 제곱근을 잘 찾아냈으나 (sqrt 2361183241434822606848) 부터는 답을 내놓지 않았다. (Dr.Schem의 경우 실행기가 계속 가동되다가 에러 메시지를 내고 프로그램이 다운되었다.) 이유는 잘 모르겠다. 숫자가 너무 작은 경우에는 0.001의 값 차이가 매우 큰 결과 차이가 된다. 예를 들어 (sqrt 0.0004)를 실행할 경우 값은 0.0354008825558513로 나오는데 이 값을 제곱하면 0.00125322248573317687066386771169 가 나오며 실제의 제곱근 값은 0.02다. 그렇다면 값의 판별을 뺄셈이 아닌 나눗셈을 통해 비교해보면 어떨까 했다. (define (average x y)                  (/ (+ x y) 2)) (define (sqrt-iter guess x)                  (if (good-enough? guess x)                      guess                      (sqrt-iter (improve guess x)                                 x))) (define (improve guess x)                  (average guess (/ x guess))) (define (good-enough? guess x)                  (= (/ (square guess) x) 1)) (define (sqrt x) (sqrt-iter 1.0 x)) 물론 이 프로시저의 경우는 조금 극단적인 프로시저이긴 하다. 그렇다 하더라도 결과만은 상당히 정확하게 나왔다. 하지만 결정적으로 값을 내놓는 속도가 상당히 느려졌다. 그래서 문제의 설명대로 별로 값의 변화가 없을 때 그만두는 프로시저를 설계해보았다. (define (average x y)                  (/ (+ x y) 2)) (define (sqrt-iter guess x)                  (if (good-enough? guess x)                      guess                      (sqrt-iter (improve guess x)                                 x))) (define (improve guess x)                  (average guess (/ x guess))) (define (good-enough? guess x)                  (&amp;lt; (abs (- (abs (/ guess (improve guess x))) 1))                     0.00000001)) (define (sqrt x) (sqrt-iter 1.0 x)) 이 프로시저의 판별 구조는 개선된 x값과 x값의 크기 비율을 비교하여 그 비율이 일정 비율 이하라면 충분하다고 판정한다. 이 프로시저의 경우 원래의 프로시저가 멈춰버린 매우 큰 값에서도 결과를 내어 놓는다. 뿐만 아니라 다른 프로시저에 비해 매우 빠르게 값을 내놓는다. 그러나 판별식이 일정한 자릿수까지의 정확도를 정하지 않기 때문에 수가 크면 클수록 대략은 맞더라도 실제값과는 거리가 벌어진다. 그러나 이 프로시저의 경우 판별값을 매우 작게 해도 느려지지 않고 역시 매우 빠르게 동작한다. (원래의 프로시저는 매우 느려진다.) 따라서 이 프로시저를 사용하되 충분한 판별값을 사용하는 편이 더 나을 것이다. 이런 결과를 살펴볼 때 맨 처음의 프로시저는 큰 숫자에 대해 연산할 때 어떤 이유에서인지 큰 부담이 걸리는 것이 아닌가 한다. Exercise 1.8.  Newton&amp;#039;s method for cube roots is based on the fact that if y is an approximation to the cube root of x, then a better approximation is given by the value Use this formula to implement a cube-root procedure analogous to the square-root procedure. (In section 1.3.4 we will see how to implement Newton&amp;#039;s method in general as an abstraction of these square-root and cube-root procedures.) 우리말본은 오타가 있습니다. 이 때문에 한참 헤맸는데 자세한 것은 정오표를 참조하시길 바랍니다. (define (square x) (* x x)) (define (cbrt-iter guess x)                  (if (good-enough? guess x)                      guess                      (cbrt-iter (improve guess x)                                 x))) (define (improve guess x)                  (/ (+ (* 2 guess) (/ x (square guess))) 3)) (define (good-enough? guess x)                  (&amp;lt; (abs (- (abs (/ guess (improve guess x))) 1))                     0.0000001)) (define (cbrt x) (cbrt-iter 1.0 x)) 역시 좀 더 정확한 값을 얻기 위해서는 판별값을 좀 더 낮춰줄 필요가 있다. &lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://doctor.tardis.me/10&quot;&gt;글 전체보기&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</summary>
 </entry>
 <entry>
  <title type="html">노드 구축 없는 SNS</title>
  <link rel="alternate" type="text/html" href="http://doctor.tardis.me/9"/>
  <link rel="replies" type="application/atom+xml" href="http://doctor.tardis.me/atom/discuss/9" thr:count="0"/>
  <category term="Web Service"/>
  <category term="SNS"/>
  <category term="&#xBCF5;&#xC7A1;&#xACC4;"/>
  <category term="&#xC6F9;&#xC11C;&#xBE44;&#xC2A4;"/>
  <category term="&#xD3EC;&#xC9C0;&#xC154;&#xB2DD;"/>
  <author>
   <name>The Doctor</name>
  </author>
  <id>http://doctor.tardis.me/9</id>
  <updated>2008-11-23T20:21:46+09:00</updated>
  <published>2008-11-14T17:11:30+09:00</published>
  <summary type="html">소셜 네트워크 서비스에 필요한 두 가지 작업은 첫번째가 노드 구축이며, 두번째가 노드의 연결이다. 그런데 이런 서비스를 구축하는데 있어 대부분의 서비스는 노드 구축에 치중하게 된다. 왜냐하면 당연하게도 노드가 없이 연결이 이뤄질 수 없기 때문이다. 그러나 실제의 서비스를 성공시키기 위한 핵심은 노드 자체보다는 연결을 어떻게 시켜주느냐에 있다. 왜냐하면 노드 자체를 통해 연결이 이뤄지는 것은 이미 우리나라에서는 싸이월드가 어찌되었던 간에 1위이며, 다른 나라에도 이미 1위 사이트가 존재하기 때문이다. 1위 네트워크는 &amp;#039;어쨌든&amp;#039; 굉장히 무너지기 어렵다. 다만 나는 여기서 새로운 노드 집합 구축 없이 기존의 것을 노드로 삼는 소셜 네트워크 서비스가 가능하지 않을까?&amp;quot; 라는 생각에 이르렀었고, 한두 가지 모델을 떠올렸었다. &lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://doctor.tardis.me/9&quot;&gt;글 전체보기&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</summary>
 </entry>
</feed>
