The standard 0/1 knapsack requires that the weight of every item is independent to others. Then DP is a efficient algorithm towards the solution. But now I met a similar but extensions of this problem, that
the weight of new items are dependent on previous items already in the knapsack.
For example, we have 5 items a
, b
, c
, d
and e
with weight w_a
, ..., w_e
. item b
and c
have weight dependency.
When b
is already in the knapsack, the weight of item c
will be smaller than w_c
because it can share some space with b
, i.e. weight(b&c) < w_b + w_c
. Symmetrically, when c
is already in the knapsack, the weight of b
will be smaller than w_b
.
This uncertainty results a failure of original DP algorithm, since it depend on the correctness of previous iterations which may not correct now. I have read some papers about knapsack but they either have dependencies subjected to profit (quadratic knapsack problem), or have variable weight which follows a random distribution (stochastic knapsack problem). I have also aware of the previous question 1/0 Knapsack Variation with Weighted Edges, but there is only a very generic answer available, and no answer about what is the name of this knapsack.
One existing solution:
I have also read one approximate solution in a paper about DBMS optimizations, where they group the related items as one combined item for knapsack
. If use this technique into our example, the items for knapsack will be a
, bc
, d
, e
, therefore there is no more dependencies between any two of these four items. However it is easy to construct an example that does not get optimal result, like when an item with "small weight and benefit" is grouped with another item with "large weight and benefit"
. In this example, the "small" item should not be selected in solution, but is selected together with the "large" item.
Question:
Is there any kind of efficient solving techniques that can get optimal result, or at least with some error guarantee? Or am I taking the wrong direction for modelling this problem?