We study the knapsack problem with graph theoretic constraints. That is, we assume that there exists a graph structure on the set of items of knapsack and the solution also needs to satisfy certain graph theoretic properties on top of knapsack constraints. In particular, we need to compute in the connected knapsack problem a connected subset of items which has maximum value subject to the size of knapsack constraint. We show that this problem is strongly NP-complete even for graphs of maximum degree four and NP-complete even for star graphs. On the other hand, we develop an algorithm running in time $O\left(2^{tw\log tw}\cdot\text{poly}(\min\{s^2,d^2\})\right)$ where $tw,s,d$ are respectively treewidth of the graph, size, and target value of the knapsack. We further exhibit a $(1-\epsilon)$ factor approximation algorithm running in time $O\left(2^{tw\log tw}\cdot\text{poly}(n,1/\epsilon)\right)$ for every $\epsilon>0$. We show similar results for several other graph theoretic properties, namely path and shortest-path under the problem names path-knapsack and shortestpath-knapsack. Our results seems to indicate that connected-knapsack is computationally hardest followed by path-knapsack and shortestpath-knapsack.
翻译:我们研究带有图论约束的背包问题。即,假设背包物品集合上存在图结构,且解除了满足背包约束外,还需满足特定图论性质。具体而言,在连通背包问题中,我们需要在满足背包容量约束的条件下,计算一个具有最大价值的连通物品子集。我们证明,即使对于最大度为四的图,该问题也是强NP完全的;即使对于星图,它也是NP完全的。另一方面,我们开发了一个时间复杂度为$O\left(2^{tw\log tw}\cdot\text{poly}(\min\{s^2,d^2\})\right)$的算法,其中$tw,s,d$分别表示图的树宽、背包容量和目标价值。我们进一步提出了一个$(1-\epsilon)$近似算法,对于任意$\epsilon>0$,其运行时间为$O\left(2^{tw\log tw}\cdot\text{poly}(n,1/\epsilon)\right)$。我们针对其他几种图论性质(即路径和最短路径)展示了类似结果,分别命名为路径背包问题和最短路径背包问题。我们的结果似乎表明,连通背包问题的计算难度最大,其次是路径背包问题和最短路径背包问题。