SICP Exercise 3.53
来源:互联网 发布:数据库系统实现 编辑:程序博客网 时间:2024/04/30 13:56
Exercise 3.53
方法一:
s的第1个元素是1,其余部分是s与s之和。这样s的第2个元素就是1加上1,即为2。第3个元素是2加上2,即为3。如此继续下去,得到s为(1 2 4 8 16 ...)。
方法二:(http://wqzhang.wordpress.com/2009/08/08/sicp-exercise-3-53/)
设s = (1 x2 x3 x4...),则s+s = (2 2*x2 2*x3 ...)。由s的定义我们知道(x2 x3 x4 ...) = ( 2 2*x2 2*x3 ...)。因此,我们可以得到,x2 = 2, x3 = 2*x2 = 4, x4 = 2*x3 = 8, ...。所以s为(1 2 4 8 16 ...)。
- SICP Exercise 3.53
- SICP exercise 1.43
- SICP Exercise 3.11
- SICP Exercise 3.15
- SICP Exercise 3.22
- SICP Exercise 3.25
- SICP Exercise 3.28
- SICP Exercise 3.29
- SICP Exercise 3.33
- SICP Exercise 3.34
- SICP Exercise 3.35
- SICP Exercise 3.37
- SICP Exercise 3.38
- SICP Exercise 3.50
- SICP Exercise 3.51
- SICP Exercise 3.52
- SICP Exercise 3.54
- SICP Exercise 3.55
- 无向图的连通分量 通用BFS算法
- Android的SoundPool类使用与利弊
- 目前缺少的功能
- 关于ultraedit的大括号对齐
- 为什么不要在STL容器中存储 auto_ptr 对象
- SICP Exercise 3.53
- P2P点播系统性能优化(2): 减少客户端的心跳包
- Window 2003 Server R2安装IIS时总提示“需要Service Pack 2 CD-Rom 上的文件”
- CentOS 6.0 Apache的cronolog的安装与自定义日志
- oracle资源忙
- linux 磁碟与档案系统管理
- Binder学习一 ServiceManager初始化
- SSH+ORACLE案例过程中出现的额一系列问题的可用解决方案(一)
- ubuntu下安装qq