$\begingroup$
$\endgroup$
2
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!
-
$\begingroup$ This might be useful to you. $\endgroup$phan801– phan8012019年01月31日 16:12:57 +00:00Commented 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– gnasher7292019年01月31日 23:45:13 +00:00Commented Jan 31, 2019 at 23:45