CS 4349: Algorithms Spring 2008 Assignment 5 Due: Monday, March 3 (in class) 1. Ex. 16.1-1 (page 378). DP for activity selection problem. You may use either the recurrence in Equation 16.3 in page 373 of the book, or the simpler version we used in class (where we skip c[i,k] in the equation by letting a_k be the first activity in A_{ij}). 2. Modify the solution to Q1 to solve the following variation of the activity selection problem. The new goal is to maximize the amount of time that the resource is utilized (rather than the number of activities scheduled). 3. Build a Huffman code for the following alphabet (frequency of each character is given as a percentage): A(30), B(20), C(15), D(15), E(5), F(7), G(8). Follow the style in Figure 16.5 (page 389) of the book. Extra credit problem: Ex. 16.2-6 (page 384). Fractional knapsack.