(95 72 86 70 97 72 52 88 77 94 91 79 61 77 99 70 91)
1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
Each new level of the triangle has 1's on the ends; the interior numbers are the sums of the two numbers above them. Write a program (binomial n) to produce a list of binomial coefficients for the power n using the Pascal's triangle technique. (binomial should be a recursive program that manipulates lists; it should not use use (choose n k).) Use the function (choose n k) that you wrote earlier to calculate (choose 4 k) for k from 0 through 4; what is the relationship between these values and the binomial coefficients?
For example, suppose that l = (0 30 56 78 96 ...). The value for x = 3 is 78, and the value for x = 4 is 96. (interpolate l 3.4) = 85.2, i.e., 78 + .4 * (96 - 78) .
Use your interpolate function to make the binary coefficient list for n = 12 look like a function and plot it using your plotting program. What is the shape of this curve?
(findpath 'a 'b) = #f (findpath 'a 'a) = () (findpath 'a '(a)) = (car) (findpath 'gold '(rocks gold (monster))) = (cdr car)
(pathtocode (findpath 'gold '(rocks gold (monster))) = (car (cdr x))
(define cave '(a (b ((c) d) (e (f)) g) h . i)) (pathfn 'get-f 'f cave) => (define (get-f x) (car (car (cdr (car (cdr (cdr (car (cdr x))))))))) (get-f cave) = fVerify that your program pathfn can make a function to retrieve any of the letters in cave. You now have written a Scheme program that writes Scheme programs!
(corresp 'light '((my eyes) (have seen (the light))) '((my ears) (have heard (the music)))) ==> music