UMBC CMSC441, Design & Analysis of Algorithms, Fall 2002, Section 0101
Homework Assignments
- Exercise A.2-1, page 1067.
- Exercise 4.2-1, page 72.
- Problem 4-1, parts a, b, e, g and h, page 85.
- Exercise 6.4-4, page 136.
- Exercise 6.5-7, page 142.
- Problem 6-3, page 143.
Optional: Exercise 6.4-5, page 138.
- Exercise 5.2-4, page 98.
- Problem 7-4, page 162.
- Exercise 8.1-3, page 168.
- Problem 8-4, page 179.
- Exercise 9.3-8, page 193.
- Problem 15-2, page 364.
(Also available in PDF.)
- Exercise 15.3-5, page 350.
- Problem 15-4, page 367.
- [Tickets to Rides: Dynamic Programming]
You arrive at Waldo's World Amusement Park with T minutes before the
park closes. The park has n rides and your objective is to complete as
many rides as possible before the park closes. (For this problem,
taking the same ride twice counts as 2 rides.) You are given a table W
such that W(i,t) gives you the waiting time for ride i at time t. For
convenience, assume that t is to be given as minutes before the park
closes. Ride i itself takes ri minutes and all times are
measured in integer minutes.
- Define a subproblem, MaxRides, that can be used
to solve this dynamic programming problem. To do this, you must
describe the input parameters to MaxRides and the "return
value" using English sentences.
- Give a mathematical formula that shows how MaxRides
can be computed recursively. Then, explain all the parts of the
formula using English sentences.
- Describe how MaxRides can be computed bottom up using
a dynamic programming table. Be sure to include a description of the
dimensions of the table and the order that the entries of the table
are to be filled. Which entry has the solution to the original
problem?
- Analyze and justify the running time of your dynamic
programming algorithm.
- Exercise 22.2-5, page 539.
Hint: there's an example with <= 8 vertices.
- Exercise 22.4-5, page 552.
- Exercise 22.5-5, page 557.
- Problem 21-1, pages 518-519.
- Exercise 23.2-5, page 574.
- Problem 23-4, pages 577-578.
- Exercise 24.1-4, page 591.
- Exercise 24.3-6, page 600.
- Problem 24-3, pages 615.
Homework 10 is available in PDF only.
Last Modified:
27 Nov 2002 13:18:31 EST
by
Richard Chang
to Fall 2002 CMSC 441 Section Homepage