Fine-Grained Complexity of Approximating Vector Knapsack: A Faster Algorithm and Equivalence with $k$-SUM in 2D
We revisit the $d$-dimensional Vector Knapsack problem (abbreviated as $d$-Knapsack): Given a $d$-dimensional capacity vector and a set of items, each with a $d$-dimensional weight vector and a profit, the goal is to select a set of items that maximizes the total profit without exceeding the capacity in any dimension. For any $d \ge 2$, the best known approximation scheme for $d$-Knapsack runs in time $O(n^{\lceil d/\varepsilon \rceil - d})$ [Caprara, Kellerer, Pferschy, Pisinger '00]. We improve this running time to $n^{\frac{d-1}{2\varepsilon} + O(d)}$. This is the first improvement for $d$-Knapsack in over 25 years, and the first result that improves the exponent by a constant factor, as all prior algorithms had an exponent of $d/\varepsilon \pm O(d)$. We achieve this speedup by designing the first meet-in-the-middle algorithm for $d$-Knapsack. This requires replacing the LP solver used in prior algorithms by a dynamic programming algorithm to generate representative solutions, building on an LP-based structural argument. We further establish a fine-grained equivalence of 2-Knapsack and $k$-SUM: For $k = \lceil 1/\varepsilon \rceil - 1$, computing a $(1-\varepsilon)$-approximation for 2-Knapsack has the same time complexity as the $k$-SUM problem up to a factor $n^{O(1)}$, where the $O(1)$ is independent of $\varepsilon$. Consequently, unless $k$-SUM admits substantially faster algorithms than are currently known, 2-Knapsack requires time $n^{\frac 1{2\varepsilon} - O(1)}$, which together with our algorithm establishes the optimal running time exponent of 2-Knapsack as $\frac 1{2\varepsilon} \pm O(1)$. Conversely, if significantly faster algorithms for $k$-SUM are found, they automatically transfer to 2-Knapsack.