Dynamic programming
1.[3p] What does "overlapping subproblems" mean?
What does "overlapping subproblems" mean?
2.[2p] Mergesort would be faster if its subproblems were memoised.
Mergesort would be faster if its subproblems were memoised.
3.[3p] Pieces of length 1 to 8 sell for 2, 5, 7, 8, 10, 17, 17 and 20. What is the best revenue from a rod of length 8?
Pieces of length 1 to 8 sell for 2, 5, 7, 8, 10, 17, 17 and 20. What is the best revenue from a rod of length 8?
4.[2p] With those same prices, what is the best revenue from a rod of length 5?
With those same prices, what is the best revenue from a rod of length 5?
5.[3p] A bag holds 8 kg and the items are (3 kg, 4), (4 kg, 5), (2 kg, 3) and (5 kg, 6). What is the best value?
A bag holds 8 kg and the items are (3 kg, 4), (4 kg, 5), (2 kg, 3) and (5 kg, 6). What is the best value?
6.[2p] How many cells does the knapsack table have for 40 items and a capacity of 500, counting the zero row and column?
How many cells does the knapsack table have for 40 items and a capacity of 500, counting the zero row and column?
7.[3p] What is the edit distance between "kitten" and "sitting"?
What is the edit distance between "kitten" and "sitting"?
8.[3p] Which of these are true of dynamic programming?
Which of these are true of dynamic programming?
Select all that apply
9.[3p] Why is the knapsack algorithm called pseudo-polynomial?
Why is the knapsack algorithm called pseudo-polynomial?