This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CSE450/598 Design And Analysis of Algorithms HW04 Solutions, Monday, 03/24/2008, Due: Monday, 03/31/2008 Please note that you have to typeset your assignment using either L A T E X or Microsoft Word. Hand-written assignment will not be graded. Also, it is recommended that you save a copy of your assignment on general.asu.edu . 1. (10 pts) This problem is for CSE450 students only. This problem deals with your understanding of the details of Dynamic Programming, using the weighted interval scheduling problem as an example. Assume that we have five jobs: J 1 , . . . , J 5 , where J i has value v i , start time s i , and finish time f i . Let these values be given by the following table: i s i f i v i p ( i ) M [ i ] 1 1 3 1 1 2 2 4 3 3 3 3 5 2 1 3 4 4 6 5 2 8 5 5 7 4 3 8 Use the space given in the table to compute the values of p ( i ) , i = 1 , . . . , 5. Use the algorithm given on Page 259 of the textbook to compute the values of M [ i ] , i = 1 , . . . , 5. Grading: 1 pt for each of the 10 entries. 2. (10 pts) This problem is related to the knapsack problem. Suppose the weight constraint is W = 10 and there are n = 5 items given by the following table. Use the algorithm implied by i w i v i 1 8 40 2 7 30 3 6 30 4 1 10 5 2 25 the analysis on Page 272 of the textbook to compute an optimal solution for this instance. You have to form the table, compute the entries of the table, and write out the optimal solution 1 as a set of the items selected.as a set of the items selected....
View Full Document
- Spring '08