Dynamic Knapsack Flashcards
As a review, what is the input and definintion of the 0-1 knapsack problem?
What do we need to output?
How long would it take to brute force?
For n different items, the running time is Omega(2n) to brute force
Why doesn’t densest first solve the 0-1 integer knapsack problem?
What is the optimal substructure property?
What is the approach for the dynamic programing 0-1 knapsack problem?
What is the brute force code for 0-1 dynamic programming knapsack?
When we are creating our table, what do te subproblems look like?
What are the table calculations (in general).
Provide the mathematical representation as well
What is the code for the bottom up tabulation version? And what is the order in which the table is filled out?