a4 - the total weight limit. (i)If all v i are equal, what...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment #4: Due September 25 1. Exercise 16.2-4 (page 384). 2. Exercise 16.2.5 (page 384). 3. 16.2-7 (page 384) 4. The following problem is known in the literature as the knapsack prob- lem: We are given n objects each of which has a weight and a value. Suppose that the weight of object i is w i and its value is v i . We have a knapsack that can accommodate a total weight of W . We want to select a subset of the items that yields the maximum total value without exceeding
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: the total weight limit. (i)If all v i are equal, what would the greedy algorithm yield? Is this optimal? (ii)If all w i are equal, what would the greedy algorithm yield? Is this optimal? (iii) How should the greedy algorithm be designed in the general case? Is this optimal? [we are allowed to select fractional items.] 1...
View Full Document

This note was uploaded on 09/18/2008 for the course CS 4349 taught by Professor Chandra during the Spring '08 term at University of Texas at Dallas, Richardson.

Ask a homework question - tutors are online