Re:JQuery plugin to arrange images using knapsack algorithm
by gauravsc on Tuesday April 24, 2012 @05:34AM
(#3883125)
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.
[ Parent
| on HN ]
Re:JQuery plugin to arrange images using knapsack algorithm
by ColinWright on Tuesday April 24, 2012 @05:36AM
(#3883133)
Right, that makes sense. Thank you.
What would happen if I encoded a large integer factorization instance into a Knapsack Problem and called your system?
Re:JQuery plugin to arrange images using knapsack algorithm
by DennisP on Tuesday April 24, 2012 @07:35AM
(#3883432)
Given that it's a jquery plugin, you'd probably get a "script on this page is running slowly" message.
Re:JQuery plugin to arrange images using knapsack algorithm
by vog on Wednesday April 25, 2012 @06:50AM
(#3888510)
This 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.