Homework 4
- Assigned: Friday, October 16, 2009
- Due: MONDAY,
October 26, 2009 (5pm in 122A mailboxes)
- Required for
Undergraduates: 5 of the following 6
problems
- Required for Graduate Students: 5 of the
following 6
problems
- Points: 10 pts per problem
- General Instructions:
- Please review the homework and grading policy outlined in the course information and homework page.
- Turn in problems
separately, based on the signs on the mailboxes
in 122A. DO NOT staple separate problems to one another.
- Submit the solutions on a standard A4/letter paper.
- Either type the homework (e.g. using the
formatting software called latex), OR, where applicable,
if written on paper, circle your answers. (running times,
true/false, etc.)
- For each problem:
- Staple pages belonging to a single problem.
- Write UNI and name.
- Indicate your professor's name (Stein or
Monteleoni).
- Write EC/RC on each problem.
- On each problem, you must also write down with whom you worked on
the assignment.
- Start early, be concise but rigorous, and enjoy!
- Be sure to review any parts of Chapters 15 and 16
with which you are
not familiar.
- All logs are base 2 unless otherwise specified.
- For a dynamic programming problem, be sure to show optimal
substructure, give the algorithm and analyze the running time.
- Unless otherwise specified, all problems and exercises are from
CLRS, Introduction to Algorithms, 3rd edition.
- Problem 15-1. Longest simple path in a directed
acyclic graph
- Problem 15-11. Inventory planning
- 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)
- a) Exercise 16.2-4
. (Skating professor)
b) Exercise 16.2-6. (Linear fractional
knapsack)
c) Exercise 16.3-1. (Huffman)
- Problem 16-1. Coin changing
- Problem 16-5. Offline caching