Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Great article. Got me thinking if this could be used to solve the knapsack problem.


You can. It is a straightforward MILP program.

The issue is, MILP in general is NP-complete to solve... so it doesn’t gain you anything. In practice solutions can be found quickly, or at least good approximations.


Yep, remember studying the solution using dynamic programming, back in college


Yes, knapsack can be optimally solved with these solvers. Indeed, the time complexity of these optimisers is exponential.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: