2014年10月22日

Exercise 1.20 最大公约数算法

摘要: The process that a procedure generates is of course dependent on the rules used by the interpreter. As an example, consider the iterative gcd procedur... 阅读全文

posted @ 2014-10-22 17:41 一生只想往前飞 阅读(153) 评论(0) 推荐(0) 编辑

Exercise 1.19 Fast Fibonacci

摘要: 题目:There is a clever algorithm for computing the Fibonacci numbers in a logarithmic number of steps.Recall the transformation of the state variables a... 阅读全文

posted @ 2014-10-22 15:54 一生只想往前飞 阅读(191) 评论(0) 推荐(0) 编辑

Exercise 1.16 1.17 1.18

摘要: Finished in codehttps://github.com/AndyQu/sicp_exercise/blob/master/src/main/scala/sicp/Exponentiation.scala 阅读全文

posted @ 2014-10-22 14:34 一生只想往前飞 阅读(111) 评论(0) 推荐(0) 编辑

Exercise 1.13 Fib(N)证明题

摘要: TODO 阅读全文

posted @ 2014-10-22 14:29 一生只想往前飞 阅读(132) 评论(0) 推荐(0) 编辑

2014年9月18日

Exercise 1.15 sine

摘要: 题目: The sine of an angle (specified in radians) can be computed by making use of the approximation sin x  x if x is sufficiently small, and the trig... 阅读全文

posted @ 2014-09-18 11:47 一生只想往前飞 阅读(153) 评论(0) 推荐(0) 编辑

2014年9月16日

Exercise 1.14 count change的时间复杂度

摘要: 题目: Draw the tree illustrating the process generated by the count-change procedure of section 1.2.2 in making change for 11 cents. What are the order... 阅读全文

posted @ 2014-09-16 10:53 一生只想往前飞 阅读(279) 评论(0) 推荐(0) 编辑

2014年9月15日

Exercise 1.11---1.12 Pascal's Triangle

摘要: 1.11 F'ibonates函数的变种,略过。1.12题目:The following pattern of numbers is called Pascal's triangle. 1 1 1 1 2 1 1 3 3 11 4 6 4 1....... 阅读全文

posted @ 2014-09-15 16:48 一生只想往前飞 阅读(145) 评论(0) 推荐(0) 编辑

Exercise 1.10 Ackerman's function

摘要: 题目:The following procedure computes a mathematical function called Ackermann's function.(define (A x y) (cond ((= y 0) 0) ((= x 0) (... 阅读全文

posted @ 2014-09-15 16:28 一生只想往前飞 阅读(235) 评论(0) 推荐(0) 编辑

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 argum... 阅读全文

posted @ 2014-09-15 15:59 一生只想往前飞 阅读(128) 评论(0) 推荐(0) 编辑

Exercise 1.8 牛顿法求立方根

摘要: 题目: Newton'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 ... 阅读全文

posted @ 2014-09-15 15:50 一生只想往前飞 阅读(474) 评论(0) 推荐(0) 编辑

导航