Podcast
Questions and Answers
What is the condition to determine if an item shouldn't be added to the knapsack?
What is the condition to determine if an item shouldn't be added to the knapsack?
- The weight of the item equals the weight of the candidate
- The weight of the item plus the weight of the candidate exceeds the capacity (correct)
- The weight of the item plus the weight of the candidate is less than the capacity
- The weight of the item is more than the weight of the candidate
Why must an item be extended if it can extend a candidate?
Why must an item be extended if it can extend a candidate?
- To potentially reach a higher value solution (correct)
- To ensure the current best solution remains unchanged
- To prevent the solution from exceeding the capacity
- Because an extended candidate always leads to a better solution
What does it mean when an item can extend a candidate towards a solution?
What does it mean when an item can extend a candidate towards a solution?
- The capacity is less than both the item's weight and the candidate's weight
- The sum of their weights doesn't exceed the capacity (correct)
- The item has a higher weight than the candidate
- The item's value is lower than the candidate's value
In the context of extending a candidate, what does 'pruning the search space early' refer to?
In the context of extending a candidate, what does 'pruning the search space early' refer to?
Why is it important to ensure that items in this problem cannot have negative values?
Why is it important to ensure that items in this problem cannot have negative values?