Fall 2004 CS 4104 Homework Assignment 11

Due: Thursday, November 11 at 11:00 PM

This assignment is worth a total of 50 points.

All homework will be submitted electronically, using the curator system. You may submit your homework in PDF or Postscript form, or in any format that can be opened using Microsoft Word (including plain ASCII text). Note, however, that readability is important to your grade, and that you often need to typeset mathematical equations. If you submit more than one version of your homework, we will store all submissions, but will actually grade the latest one. Make sure that your file contains at the top your name, your ID number, your email address, as well as your partner's name, ID number and email address. All submissions MUST contain the following statement exactly as written here:

I understand the answers that I have submitted. The answers submitted have not been directly copied from another source, but instead are written in my own words.

Two students may work together and jointly submit the homework assignment. If this is done, the submission MUST also contain a statement detailing the contribution of each student to the solution of each problem.

1. Write a dynamic programming algorithm to solve the following variation on the Knapsack problem: You are given a collection of n items, where each item has both a size and a value. Each item has an infinite number of duplicates available. There is a size to the knapsack, K. The goal is to select items with the greatest value possible, such that the sum of their sizes is less than or equal to K.

2. Shaffer Problem 14.13.

3. Shaffer Problem 15.1.