3 ms·
We are using Dynamic programming and you are correct, knapsack is a problem but since the most common solution(and widely used) is using DP, we sometimes interm
by gauravsc 14y ago
We are using Dynamic programming and you are correct, knapsack is a problem but since the most common solution(and widely used) is using DP, we sometimes intermittently use the term Knapsack algorithm with DP algorithm to solve Knapsack problem.
- ColinWright 14y agoRight, that makes sense. Thank you. What would happen if I encoded a large integer factorization instance into a Knapsack Problem and called your system?
- DennisP 14y agoGiven that it's a jquery plugin, you'd probably get a "script on this page is running slowly" message.
- vog 14y agoThis answer completely misses the point. Of course the algorithm could run "forever", thus triggering browser timeouts. But it could as well terminate early, providing a suboptimal but fast solution.