Assignment 06 - Knapsack

Assignment 06 - Knapsack - exceed 6. Show the entire table...

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

View Full Document Right Arrow Icon
COMP 271: Design and Analysis of Algorithms Fall 2007 Assignment 6 Assigned: 25/10/07 Due Date: 4pm,1/11/07 Question 1 : There are 5 gifts with weights 3, 1, 2, 6 and 4; and values 4, 2, 5, 10 and 9 respectively. Use dynamic programming to Fnd the most valuable subset of gifts subject to the constraint the total weight cannot
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: exceed 6. Show the entire table for bottom-up computation, together with the keep array. Notes : You can discuss homework question with your classmates, but you must write up your answers independently. Acknowledge the people with whom you have discussed the assignment. 1...
View Full Document

Ask a homework question - tutors are online