MC28 Homework 4 (Spring 1997)

Due: March 24, 1997

  1. Do exercise 12.4 on page 438 of the text. The tree from figure 4.4, page 111, is reproduced below for your reference.
  2. Do exercise 12.9 on page 444.
  3. Do exercise 12.12 on page 449. You can assume the existence of a last-elements-of procedure without bothering to write it, and can write
    (define dp-pick-chocolates
      (lambda (chocolates weight-limit)
        (let ((table ...same as in memoized...))
          (define pick-chocolates
            ...same as in memoized...)
    
    rather than actually writing out the parts (particularly the definition of pick-chocolates) that are the same as in the memoized version.
  4. Do exercise 12.14, parts b and c only, from page 454.


Course web site: http://www.gac.edu/~max/courses/S97/MC28/
Instructor: Max Hailperin <max@gac.edu>