1
$\begingroup$

I have a problem like the knapsack problem, except instead of finding the max value, I'm trying to find the closest value to a given value.

Anyone know where to start, have a name for this problem, or can point me to an example?

Thank you!

$\endgroup$
2
  • $\begingroup$ This might be useful to you. $\endgroup$
    – phan801
    Jan 31, 2019 at 16:12
  • $\begingroup$ @phan801 Your link is a simplified version. Here we have (I assume) various items with different weights, and your total weight must still fit into the knapsack. Interesting problem. Obviously NP-complete, we can solve ordinary knapsack by trying to get as close as possible to the total value of all items. $\endgroup$
    – gnasher729
    Jan 31, 2019 at 23:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.