Table of Contents
Fetching ...

Knapsack: Connectedness, Path, and Shortest-Path

Palash Dey, Sudeshna Kolay, Sipra Singh

TL;DR

This work studies three graph-structured variants of the knapsack problem: Connected Knapsack, Path Knapsack, and Shortest Path Knapsack. It develops a treewidth-based dynamic programming framework that yields 2^{O(tw log tw)}-time algorithms and fixed-parameter, pseudo-polynomial time approximation schemes, along with (1−ε)-approximation algorithms for all variants on bounded-treewidth graphs. The paper establishes strong NP-hardness for Connected Knapsack (even with degree ≤4) and Path Knapsack, while showing Shortest Path Knapsack admits a pseudo-polynomial-time solution and scalable approximations. It also explores additional parameters like the minimum vertex cover size, proving hardness results that rule out broad f(vcs)·poly(n,s,d) algorithms under ETH. Collectively, the results reveal a hierarchy in difficulty (Shortest Path Knapsack easier, then Path Knapsack, then Connected Knapsack) and demonstrate robust algorithmic techniques for knapsack problems under graph constraints.

Abstract

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-ε)$ factor approximation algorithm running in time $O\left(2^{tw\log tw}\cdot\text{poly}(n,1/ε)\right)$ for every $ε>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.

Knapsack: Connectedness, Path, and Shortest-Path

TL;DR

This work studies three graph-structured variants of the knapsack problem: Connected Knapsack, Path Knapsack, and Shortest Path Knapsack. It develops a treewidth-based dynamic programming framework that yields 2^{O(tw log tw)}-time algorithms and fixed-parameter, pseudo-polynomial time approximation schemes, along with (1−ε)-approximation algorithms for all variants on bounded-treewidth graphs. The paper establishes strong NP-hardness for Connected Knapsack (even with degree ≤4) and Path Knapsack, while showing Shortest Path Knapsack admits a pseudo-polynomial-time solution and scalable approximations. It also explores additional parameters like the minimum vertex cover size, proving hardness results that rule out broad f(vcs)·poly(n,s,d) algorithms under ETH. Collectively, the results reveal a hierarchy in difficulty (Shortest Path Knapsack easier, then Path Knapsack, then Connected Knapsack) and demonstrate robust algorithmic techniques for knapsack problems under graph constraints.

Abstract

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 where are respectively treewidth of the graph, size, and target value of the knapsack. We further exhibit a factor approximation algorithm running in time for every . 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.
Paper Structure (25 sections, 15 theorems, 13 equations, 1 figure, 1 table)

This paper contains 25 sections, 15 theorems, 13 equations, 1 figure, 1 table.

Key Result

theorem thmcountertheorem

Connected Knapsack is strongly $\mathsf{NP}$-complete even when the maximum degree of the input graph is four.

Figures (1)

  • Figure 1: Reduced instance of Path Knapsack in \ref{['thm:pk-pathwidth']}.

Theorems & Definitions (23)

  • definition thmcounterdefinition: Connected Knapsack
  • definition thmcounterdefinition: Path Knapsack
  • definition thmcounterdefinition: Shortest Path Knapsack
  • definition thmcounterdefinition: Treewidth
  • definition thmcounterdefinition: Vertex Cover
  • theorem thmcountertheorem
  • corollary thmcountercorollary
  • definition thmcounterdefinition: Knapsack
  • theorem thmcountertheorem
  • theorem thmcountertheorem
  • ...and 13 more