Solutions to Exercises 8.1
1. Both techniques solve a problem by dividing it into several subproblems.
2. The application of the dynamic programming algorithm to the input 5, 1,
2, 10, 6, 2 in section 8.1 yielded the following table:
3. a. The time efficiency analysis of the algorithm in question is identical to
that of the top-down computation of the th Fibonacci number in Section
2.5: see recurrence (2.11) for the number of additions made by both al-
gorithms. Hence, the time efficiency class is Θ()where =(1+
√5)2
b. If an exhaustive search algorithm generates all the subsets of the coin
row given before checking which of them don’t include adjacent coins, the
number of the subsets will be equal 2which answers the question. But
4. The application of the dynamic programming algorithm to the instance
6