]> git.rkrishnan.org Git - sicp.git/blob - src/sicp/ex3_57.rkt
Solutions to 4.27, 4.28 and 4.29.
[sicp.git] / src / sicp / ex3_57.rkt
1 #lang racket
2
3 #|
4
5 We do (n - 1) additions for the memo-proc based delay implementation. 
6
7 With the simple delay implementation, for a given n, it constructs the 
8 fib sequence:
9
10  fib (n) = fib (n-1) + fib (n-2)
11
12 In our case, the number of additions for nth fib will be equal to the
13 number of additions for the fib(n-1) and that for fib(n-2) + 1
14
15 |#