Unformatted text preview: m , is minimized. 2 Page 173, Excercise 8.34. Show how to sort n integers in the range 0 to n 21 in O( n ) time 3 Page 384, Exercise 16.23. Suppose that in a 01 knapsack problem, the order of the items when sorted by increasing weight is the same as their order when sorted by decreasing value. Give an efficient algorithm to find an optimal solution to this variant of the knapsack problem, and argue that your algorithm is correct. 4 Reconsider the problem of constructing the minorder binary tree for array A[1], A[2], …, A[ n ] in homework one. Please design a greedy algorithm that needs Θ ( n ) time in worst case. 1...
View
Full Document
 Winter '05
 Shen
 Algorithms, Dynamic Programming, Analysis of algorithms, Computational complexity theory, 01 Knapsack problem, ith house

Click to edit the document details