Homework 4

  • Assigned: Friday, October 14, 2011
  • Due: Friday, October 28, 2011 (5pm in 122A mailboxes)
  • Required for Undergraduates: 5 of the following 7 problems 
  • Required for Graduate Students: 5 of the following 7 problems 
  • Points: 10 pts per problem
  • General Instructions: 
  1. Please review the homework and grading policy outlined in the course information and homework page. FOR THIS ASSIGNMENT THERE WILL BE NO EXTRA CREDIT ACCEPTED.
  2. Be sure to review any parts of Chapters 15 and 16 with which you are not familiar.
  3. All logs are base 2 unless otherwise specified.
  4. For a dynamic programming problem, be sure to show optimal substructure, give the algorithm and analyze the running time.
  5. Unless otherwise specified, all problems and exercises are from CLRS, Introduction to Algorithms, 3rd edition.
  • Problems:
  1. Problem 15-2. Longest Palidromic Sequence.
  2. Problem 15-4. Printing Neatly.
  3. Problem 15-11. Inventory planning
  4. a) Exercise 16.1-1. DP for activity selection
    b) Exercise 16.1-2. Last activity to start
    c) Exercise 16.1-3. Greedy choices that do not work
  5. a) Exercise 16.2-4 . Skating professor
    b) Exercise 16.3-8. Huffman
  6. Problem 16-2. Scheduling.
  7. Problem 16-5. Offline caching