Problem Set #4

CS 155 -- due November 22, 1999

Problem #1 is worth 20 points; problem #2 is worth 10 points.
Late submissions must be turned in by 5:15 p.m. on November 24.
  1. Consider the zero-one knapsack instance with n=6, capacity 22, values (pi) = (27 24 18 23 15 2), and weights (wi) = (10 9 7 9 6 1). Let the upper bound for a node be the value of the solution obtained by continuing on the remainder of the instance with the greedy algorithm for the continuous knapsack problem. Let the lower bound for a node be the value of the solution obtained by continuing on the remainder of the instance with the greedy algorithm that considers all remaining items in order, including only those items that fit. Consider the following four control strategies:

    Do not use in your pruning strageties the fact that all profits in the instance are integers. Do not prune when an upper bound equals a lower bound.

    1. Sketch the tree given by applying the first control strategy to the given instance, labeling each node with the profit and weight included so far.
    2. For each node in the this tree for which an upper bound is computed in any of the last three control strategies, label the node with the upper bound.
    3. For each node in this tree for which a lower bound is computed in the third control strategy, label the node with the lower bound.
    4. Label each node with the order in which it is expanded (rather than generated, as in Figures 4.31-33 on pages 247-9 of my text) in each of the four strategies. These labels should appear on the outside of the nodes; the profits, weights, and bounds described above should appear inside. Note that leaves are never expanded.
    5. How many nodes are expanded by each of the control strategies?
    6. What is the optimal solution to the given instance?

  2. Use the FFT algorithm to multiply the polynomials
    2x3 + x2 + 2x - 1 and 3x2 - 2x + 1.