On the PTAS Complexity of Multidimensional Knapsack
Abstract
We study the -dimensional knapsack problem. We are given a set of items, each with a -dimensional cost vector and a profit, along with a -dimensional budget vector. The goal is to select a set of items that do not exceed the budget in all dimensions and maximize the total profit. A polynomial-time approximation scheme (PTAS) with running time has long been known for this problem, where is the error parameter and is the encoding size. Despite decades of active research, the best running time of a PTAS has remained . Unfortunately, existing lower bounds only cover the special case with two dimensions , and do not answer whether there is a -time PTAS for larger values of .
In this work, we show that the running times of the best-known PTAS cannot be improved up to a polylogarithmic factor assuming the Exponential Time Hypothesis (ETH). Our techniques are based on a robust reduction from 2-CSP, which embeds 2-CSP constraints into a desired number of dimensions. Then, using a recent result of [Bafna Karthik and Minzer, STOC’25], we succeed in exhibiting tight trade-off between and for all regimes of the parameters assuming is sufficiently large. Informally, our result also shows that under ETH, for any function there is no -time -approximation for -dimensional knapsack, where is the number of items and hides polylogarithmic factors in .
Keywords and phrases:
-dimensional Knapsack, Multidimensional Knapsack, PTAS, CSPCopyright and License:
2012 ACM Subject Classification:
Theory of computation Approximation algorithms analysis ; Theory of computation Problems, reductions and completeness ; Theory of computation Parameterized complexity and exact algorithmsAcknowledgements:
Pasin is grateful to Karthik C. S. for insightful discussions on [7].Editor:
Shubhangi SarafSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
In the -Knapsack problem, we are given a set of items, each with a cost and a profit, together with a budget. The goal is to select a subset of items whose total cost does not exceed the budget while maximizing the total profit. Knapsack is one of the most studied problems in combinatorial optimization. Indeed, a polynomial-time approximation scheme (PTAS) for the problem [28, 48] was among the first PTASes to have ever been discovered in the field, and is often the first PTAS taught in computer science courses (see e.g. [50, Section 3.1] and [13, Chapter 35.5]). While such a PTAS has been known to exist since the 70s [28, 48], the problem remains an active topic of research to this day [23, 37, 32, 33, 46, 9, 27, 16, 42, 12], with the best known (fully) PTAS that gives a -approximation in time [42, 12]. This running time is essentially tight assuming -convolution cannot be solved in truly sub-quadratic time [15, 36].
Numerous generalizations of Knapsack have been considered over the years. One of the most natural and well-studied versions is the so-called -dimensional knapsack problem. Here each cost is a -dimensional vector. The problem remains the same, except that the total cost must not exceed the budget in every coordinate. The problem is defined more formally below.
Definition 1 (-Dimensional Knapsack).
- Input:
-
An instance consisting of:
-
a set of items ,
-
a profit function ,
-
a -dimensional cost function ,
-
a -dimensional budget .
-
- Solution:
-
A subset such that for all it holds that .
- Objective:
-
Find a solution of maximum profit, where the profit of is .
Multidimensional (vector) knapsack is the family of -dimensional knapsack problems for all . The study of -dimensional knapsack dates back to the 50s [40, 43, 49] and it has been used to model problems arising in many contexts, including resource allocation, delivery system, budgeting, investment, and voting (see the survey [18] for a more comprehensive review). Given its importance, there have been several algorithms and hardness results devised for the problem over the years. We summarize the main theoretical results below. We note that many heuristics for the problems have been proposed (e.g., [2, 5, 6, 31, 38, 47, 3, 51, 45]), although these do not provide theoretical guarantees and thus will be omitted from the subsequent discussions.
On the hardness front, the decision version of the Knapsack problem () generalizes the Subset Sum problem, which is one of Karp’s 21 NP-complete problems [29]. The case admits a fully polynomial time approximation scheme (FPTAS), i.e., a PTAS that runs in time . In contrast, for , it has also long been known that no FPTAS exists unless P = NP [34, 41]. This has more recently been strengthened in [35], who show that, even when , the problem does not admit an efficient PTAS (EPTAS), i.e., one that runs in time time, assuming . This in turn was improved by [26] to rule out any PTAS that runs in time even for , assuming ETH. Recently, [20] established a lower bound for exact algorithms for the -Dimensional Knapsack problem, based on a hypothesis concerning multi-dimensional convolutions.
Meanwhile, on the algorithmic front, a PTAS for -dimensional knapsack with running time was first described by Chandra et al. [10]111Strictly speaking, Chandra et al.’s algorithm is for the unbounded version where each item can be picked multiple times. However, it can be extended to the bounded case too [44]., not long after a PTAS for Knapsack was discovered in [28, 48]. The -dimensional knapsack has been a challenging research topic ever since: over the past nearly 50 years, all improvements on Chandra et al.’s PTAS come just in the constant in the exponent [19, 8], with the best running time known being [8]. Unfortunately, this barrier cannot be explained by aforementioned existing lower bounds. For example, they do not rule out an -time PTAS. This brings us to the main question of this paper:
Is there a PTAS for -dimensional knapsack with running time ?
1.1 Our Results
Our main result is the resolution of the above question in the negative, up to a polylogarithmic factor in the exponent. Unlike previous lower bounds [35, 26] which focused on two dimensions , or a non-parametrized number of dimensions [11], our lower bound gives a nearly tight trade-off between and , for all regimes of . In the following results, denotes the encoding size of the instance.
Theorem 2.
Assuming ETH, there are constants , such that for any and any the following holds. There is no -approximation algorithm for -dimensional knapsack that runs in time , where is the size of the input and .
For example, Theorem 2 implies that there is no algorithm which for every sufficiently large and any returns a -approximate solution for a -dimensional knapsack instance in time , or , or even for any (by setting ). Additionally, as the lower bound in Theorem 2 considers specific values of and , the result also rules out algorithms with running time of the form for an arbitrary function .
1.2 Technical Overview
Existing lower bounds for -dimensional knapsack can be crudely partitioned into three categories.
-
First, lower bounds for dimensions [34, 41, 35, 26]. The basic technique in this setting is to reduce Subset Sum, known to be computationally hard in various settings (e.g., [14, 1]), to -dimensional knapsack. In broad terms, each number in the Subset Sum instance corresponds to an item. One dimension imposes an upper bound by the target value on the original sum, while the second dimension guarantees that the original sum is higher than the target value using a clever cost construction. However, these constructions are only useful for using an extremely small , and cannot be used to reveal the asymptotic hardness of -dimensional knapsack for larger values of .
-
The second category of lower bounds considers the setting where is arbitrarily large, as can be seen in [11]. The lower bound in [11] relies upon a reduction from independent set which uses a fairly high number of dimensions. In particular, the result in [11] rules out the existence of a constant approximation for multidimensional knapsack, where the number of dimensions is part of the input. However, it is unclear whether the approach in [11] can be adapted to yield lower bounds for fixed and .
-
The third type of lower bounds deals with the parameterized complexity of the problem. In [25] the authors show that multidimensional subset sum does not have a parameterized algorithm when the parameter is the number of dimensions , even if the items’ costs are encoded in unary. The result is based on a reduction from the -constraint satisfaction problem (-CSP, see definition in Section 2), which embeds each edges of the -CSP instance into two dimensions.
The core ideas of the reduction in [25] can be easily extended to multidimensional knapsack. Combined with recent hardness-of-approximation results for constraint satisfaction problems [4, 21, 39, 22], this extension can be used to establish lower bounds on the running time of any -approximation algorithm for multidimensional knapsack with fixed . However, such results are limited for a fixed , and will not lead to the result in Theorem 2.
We build upon the existing reduction form -CSP [25], and extend it to attain a lower bound which works for every sufficiently large and every . The core novelty of our reduction lies in a technique which embeds multiple constraints of the -CSP instance into a constant number of dimensions. To do so, on certain dimensions, the weights of the items are viewed as multidigit numbers on the basis of a large number , and each constraint is mapped into a specific digit.
Crucially to attain hardness of approximation results, our reduction is approximation preserving. However, the quality of the approximation preservation depends linearly on the used ratio between constraints and variables in the CSP instance. Combined with the recent hardness of approximation results for 2-CSP by Bafna Karthik and Minzer [4], this leads to a lower bound which works for every sufficiently large fixed value of and any .
Organization
2 Preliminaries
Basic definitions
For an instance of a maximization problem , let be the optimum value of and let denote the encoding size of . For a set , a function , and a subset we use the abbreviation . For some , an -approximate solution for is a solution for of value at least . For all let . Throughout this paper, let be the logarithm with the natural logarithm base.
-dimensional knapsack
For short, for any we use -VK to denote -dimensional (vector) knapsack (see the formal definition of -VK in Definition 1). We also use VK to denote the collection of -VK instances over all . For some and a -VK instance , let be the maximum budget of the instance. For any and , we may assume w.l.o.g. that every -dimensional knapsack instance is also a -dimensional knapsack instance by adding extra dimensions with zero budgets and zero costs for all items.
Graph theory definitions
For every graph let and denote the set of vertices and edges of , respectively. We assume that all graphs considered in this paper are simple directed graphs with no anti-symmetric edges. For a vertex we use to denote the set of adjacent edges to in . For some , a graph is -bounded degree if the degree of each vertex in is at most .
3-SAT and ETH
Our lower bounds are conditioned on ETH. Before we state these, recall the standard 3-SAT problem.
Definition 3 (3-SAT).
-
Input: , where is a set of variables and is a set of disjunction clauses of three variables or negation of variables in .
-
Assignment: A function .
-
Objective: Find an assignment satisfying a maximum number of clauses. Let be the maximum number of clauses in satisfied by a single assignment to .
Next, we state ETH [24].
Conjecture 4 (Exponential-Time Hypothesis (ETH)).
There is a constant such that there is no algorithm that given a 3-SAT formula on variables and clauses can decide if in time .
2-CSP
We prove the hardness of VK via a reduction from 2-CSP, defined formally below.
Definition 5 (2-CSP).
-
Input: consisting of
-
–
A directed constraint graph .
-
–
A finite alphabet set . Without the loss of generality, we always assume that for some .
-
–
For each edge , a constraint .
-
–
-
Satisfied edges: For , we say that that is satisfied by if and only if .
-
A solution: A function .
-
Value: The value of a solution is defined as the relative number of satisfied edges:
-
Objective: Find a solution with maximum value.
For a 2-CSP instance , we define by the value of an optimal solution for . In the proof of our main result, we use a recent hardness of approximation result for -CSPs [4]. In the following, we state a slightly stronger version of the result from [4]. We have verified with the authors that this stronger formulation does indeed follow from their work [30].
Theorem 6 ([4]).
Assuming ETH, there is a constant such that the following holds. For every constant there exist and such that for every fixed there is no algorithm running in time that takes as input a 2-CSP instance on a constant degree bipartite regular graph with vertices over an alphabet of size and can distinguish between the following two cases:
-
(Completeness) .
-
(Soundness) .
3 A reduction from 2-CSP to VK with Varying Dimensions
In this section, we give our main reduction from 2-CSP to VK. As we will see in the next section, this implies our main result (Theorem 2). Besides the -CSP instance, the reduction also considers an additional integer parameter in addition to the 2-CSP instance . The reduction embeds multiple edges of the -CSP instance into a constant number of dimensions. The parameter determines how many edges are embedded within a constant number of dimensions. Increasing reduces the number of dimensions of the resulting instance but also weakens the soundness guarantees of the reduction. Thus, introduces a trade-off between the number of dimensions and the approximation ratio.
Lemma 7 (Dimension Embedding Reduction).
There is a reduction 2-CSP VK that, given a 2-CSP instance whose constraint graph is a -bounded degree graph and , returns in time an instance of -VK such that the following holds.
-
1.
The number of dimensions is .
-
2.
.
-
3.
(Completeness) If , then there is a solution for with profit .
-
4.
(Soundness) For every , if there is a solution for of profit at least
, then .
Before the formal construction, we provide a high level intuitive description. For this entire section, let be a 2-CSP instance, where is of bounded degree for some fixed constant , and let . In addition, let such that . In the following, we describe a reduction that creates the reduced VK instance .
The construction of the reduced instance can be intuitively summarized as follows. The instance has two types of items. The first type contains all pairs of a vertex in and an assignment for the vertex, and the second type contains all triplets of an edge and a feasible assignment for both of its endpoints. The profits, costs, and budgets are defined so that a feasible solution for this VK instance with a sufficiently high profit satisfy the following: for most vertices and for all of their adjacent edges it holds that (i) exactly one item is selected to corresponding to an assignment of to the vertex , and (ii) exactly one item of the form is selected to , preserving the assignment of to . From here, it is easy to construct an assignment for the original 2-CSP instance with relatively high value.
The non-trivial part is to enforce the above using the definition of profits, costs, and budgets. Recall that the reduction receives the parameter which controls the number of dimensions. We define four sub-constraints for each edge and call the set of sub-constraints over all edges. We define a partition of into constraints, with up to sub-constraints in each constraint (with possibly fewer sub-constraints in the last constraint). For each , we make an embedding of into only two dimensions, thus having overall dimensions of the VK instance.
The construction of the items’ costs consists of two levels. The first level associates a weight with each item, where the weight has a dimension for every sub-constraint. The weight function ensures that if a set of items has a weight of exactly in every dimension, then the set of items represents a solution for the -CSP instance of value . On its own, this level is similar to the reduction in [25]. The second level generates the actual costs. Here, each constraint (a subset of sub-constraints) is associated with two dimensions. The first dimension encodes the weights of the sub-constraints as a digit number on the basis of a large number , where each sub-constraint in is assigned to a digit. The second dimension is used to enforce the property that if a solution contains multiple items associated with the sub-constraints in , then the weight associated with each sub-constraint must be exactly .
The Reduction from 2-CSP to VK
We proceed with the formal description of . As the reduction is relatively long, we describe each parameter (the set of items, profits, costs, and budgets) in separate paragraphs.
The Items
The set of items contains all pairs of a vertex in and a possible assignment to the vertex, as well as all edges in and a satisfying assignment to the endpoints of the edges. Formally, let be the set of items, where
and
For any and , with a slight abuse of notation, we use the unified notation for the first entry of the item, corresponding for a vertex or an edge, respectively, by
Before describing the remaining components of the reduction, we use the following definition of constraints.
Constraints
Our reduction associates four sub-constraints with every edge of the -CSP instance, and bundles sub-constraints into a single constraint. More formally, a sub-constraint is a tuple , where is the edge of the sub-constraint, selects as the endpoint of associated with the sub-constraint , and can be viewed as a sign selector. In our reduction, a constraint is a subset of sub-constraints.
Let be an arbitrary partition of such that for all and ; thus, and for all . Define as the -th constraint. We also define as the set of all sub-constraints. In particular, is a partition of .
We define the following auxiliary parameter – the number of sub-constraints in which a vertex or an edge participates within a constraint. This parameter relates to both the profits and costs of the items. For all and define
and for every define
Intuitively, the values and can be viewed as the number of sub-constraints in in which and participate. An illustration of the above is given in Figure 1.
Profits
Define the profits by for every and for every .
Lemma 8.
For every and , we have .
Proof.
It holds that
The second equality holds since for every there is exactly one such that . Next, we define the costs and budgets of the reduced VK instance. As a building block, we use the following definition of a -dimensional weight function. Informally, each dimension of the weight function corresponds to a sub-constraint in , and can be interpreted as the cost of an item on the specific sub-constraint.
Weights
Let . Define the weight function such that for every , where , define the -dimension as follows.
-
For every define
(1) -
For every define
(2)
Notice that the weight of an item in equals to if is the endpoint of associated with and ; on the other hand, for the weight the item receives is the complement: , considering as a large number, strictly larger than any (recall that and ). The weight of an item is defined reciprocally to the above, using if , and the complement if . From here, we get the following result.
Lemma 9.
Let such that , and let
Then, for every it holds that .
Proof.
Note that since for every it holds that as . For any , we have
Thus, it holds that for every .
Additional Parameters for the Costs and Budgets
Define a sufficiently large parameter as
Recall that is the encoding size of the -CSP instance . In addition, define , where the reason for the selection of these parameters becomes clear in the proofs later on. The following observation holds since are bounded by .
Observation 10.
and .
We proceed to define the costs and budgets of the reduced VK instance.
Costs
The reduced instance will have dimensions and without the loss of generality, the dimensions correspond to the set , i.e., a pair of dimensions for each constraint . We define the cost function as follows. For every , let be an arbitrary bijection, that will be used to order the sub-constraints in each constraint arbitrarily into disjoint bits in the costs (and budgets). Let and for define
Observe that , which implies that the costs in dimensions are non-negative. For each , and the cost encodes the weights of all the sub-constraints . The encoding simply views the cost as an -digit number on the basis of , where the sub-constraint is assigned to the -digit. The costs for are used as a complement to the costs in the dimension. The two dimensions and are later used together to ensure properties of high profit solutions. We give an illustration of the costs in Figure 2.
The next observation will be helpful throughout this section.
Observation 11.
For any and , we have
-
(i)
.
-
(ii)
.
Budget
We define the -dimensional budget for every dimension by
This completes the definition of the reduced instance . To simplify the presentation, when are clear from the context, we may discard from the notations.
Clearly, given a 2-CSP instance with a constraint graph and , the instance can be constructed in time . Next, we prove some basic properties of the reduction.
Lemma 12.
For any 2-CSP instance and the following holds.
-
1.
.
-
2.
.
Proof.
The first property clearly holds as a simple observation from the construction of the reduced instance. For the second property of the lemma, note that the largest number in the costs/profits/budgets of the instance , i.e., , is bounded by . In addition, from Observation 10 it holds that . Thus,
Therefore, the reduced instance can be encoded in space
This shows the second property of the lemma.
We also use the following auxiliary result.
Lemma 13.
The following properties hold:
-
For every
-
Proof.
For a boolean valued expression , define if is true and if is false. For the first property of the lemma, for all it holds that
Since is a partition of , the second property follows from the first property.
We give below the completeness and soundness of the reduction. We start with the former, which is (relatively) straightforward.
Lemma 14 (Completeness).
For any 2-CSP instance and , if there is a solution for such that , then there is a solution for of profit .
Proof.
Let be a solution for satisfying that for every it holds that . We use to define a solution for the VK instance as follows. Define
Note that for every it holds that . In addition, for every it holds that by the definition of ; thus, . We conclude that and is therefore well-defined. From Lemma 8 and the second item of Lemma 13, the profit is equal to
To conclude, it remains to prove that is a solution for ; i.e., that all budget constraints are satisfied. To see this, first notice that for any , by Lemma 9 we have
| (3) |
Let be a budget constraint. Consider the two cases depending on :
-
. In this case, (3) and the first item of Observation 11 yield
-
. In this case, the first item of Observation 11, we have
The second equality uses (3). The fourth equality uses the fact that for every and for every there is exactly one item in in which and form the first coordinate.
Thus, is a feasible solution for and this completes the proof.
For the soundness, we prove that given a solution to the reduced instance , we can construct a solution for with roughly the same value/profit. Before that, we give a couple of useful properties over the weights of any solution of :
Lemma 15.
Let be any solution for . Then, for any , the following holds:
-
(i)
.
-
(ii)
If , then for all .
To prove this, we use the following fact that an integer can be uniquely represented in base-.
Observation 16.
Let and be such that . Then, for all it holds that .
Proof of Lemma 15.
Since is a solution for ,
| (4) |
where the last equality follows from the two items of Observation 11. Thus, Item i of the lemma holds by diving the two sides of the inequality by .
To prove Item ii of the lemma, note that for (4) to be an equality rather than just an inequality, we must have , since and (recall that is a solution). Therefore,
| (5) |
Observe that due to our choice of the parameters and . From this, (5), and Observation 16, we can conclude that for all as required.
Using Lemma 15, we can give the second direction of the reduction.
Lemma 17 (Soundness).
For any 2-CSP instance , , and , if there is a solution for of profit at least , then there is a solution for such that .
The soundness proof goes, in high level, as follows. Given a solution for with relatively high profit, we define the set of tight constraints of as all satisfying . We denote by the set of vertices whose all of their adjacent edges belong to a set such that is tight. We show that every induce the following property: There is exactly one , and for every there is exactly one , such that where , , and . Therefore, we can define an assignment by setting for vertices , and define the assignment of other vertices arbitrarily. Finally, we can easily show that every constraint of the CSP instance is satisfied by immediately by the definition of . Since has a relatively high profit, it follows that is large implying that most of the constraints are tight and therefore we have constructed an assignment for with a relatively high profit.
Proof.
Let such that there is a solution for of profit at least . For every , let be the unique index satisfying that belongs to . In addition, let
be the set of tight constraints of . Define
| (6) |
as the set of vertices satisfying that all of their adjacent edges belong to tight constraints. The set satisfies the following crucial property.
Claim 18.
For every there is exactly one such that . Moreover, for every there is exactly one such that and , where satisfies .
Proof.
By (6), it holds that must be tight for every , that is,
Let and let , where is the unique index such that . Thus, as , by Item ii of Lemma 15 it holds that and . Observe that there can be at most one such that : assume towards a contradiction that there are such that , then it follow that
where first equality follows from the definition of (1) and the second inequality holds as . The above inequality is a contradiction that .
Analogously, if there are where then it would follow that
where the first inequality uses the definition of (2), and the second inequality follows from . The above inequality is a in contradiction to . Therefore, there is at most one items of the form in .
On the other hand, if for all it holds that , then since there is at most one such that we also have
The inequality holds since we assume that there is no it holds that , and we have shown above that there is at most one such that . The above contradicts the fact that . Similarly, if for all it holds that , then it follows that
The above equation is a contradiction that .
Overall, we have established that there is exactly one such that and there is exactly one such that . Therefore, it remains to prove that . Observe that
Since , we conclude that . The statement of the claim follows.
For all denote by the unique symbol satisfying that ; by Claim 18 it holds that is well defined for every . Define by for every , and for every define arbitrarily as some symbol in . We start with the following claim.
Claim 19.
For every such that it holds that .
Proof.
Let such that . Thus, it follows that and , where are the unique symbols such that and , respectively, by Claim 18. Moreover, as and , by Claim 18 it follows that . Since it immediately follows that as required.
It remains to give a lower bound on the value of . To do so, we need the following upper bound on the number of non-tight indices .
Claim 20.
.
Proof.
First, from Lemma 8, we have
Now, for every , it holds that ; by Item i of Lemma 15 and the fact that assigns only integral value for each item, we have that . Plugging this into the above, we get
Finally, the claim follows since we assume that .
To conclude the soundness proof, observe that
| (7) | ||||
The first inequality holds as every such that can add up to vertices (its endpoints) to . The second inequality holds as due to the construction of the partition of . The last inequality uses Claim 20. Hence,
The first inequality follows from Claim 19. The second inequality holds since has a maximum degree ; hence, for each there are at most adjacent edges that do not belong to and we conclude that . The last inequality follows from (7). By the above inequality, the soundness proof follows.
The above lemmas give the statement of the reduction.
Proof of Lemma 7.
4 Proofs of the Main Lower Bound
In this section, we prove Theorem 2 relying on the reduction presented in Section 3 and the strong lower bound for 2-CSP of [4], formalized in Theorem 6.
Theorem (2).
Assuming ETH, there is a constant , such that for any and any the following holds. There exists a constant such that there is no -approximation algorithm for -dimensional knapsack that runs in time , where is the size of the input and .
Proof of Theorem 2.
The proof can be summarized in high level as follows. First, we define a set of parameters. Then, relying on these parameters, we assume towards a contradiction the existence of an approximation algorithm VK-ALG for -VK, for a sufficiently large (see the concrete definitions below). Then, based on the existence of VK-ALG we give a reduction called CSP-ALG from 2-CSP to -VK. Finally, we use the reduction to reach a contradiction to the existing lower bound for 2-CSP, given in Theorem 6. For readability, the proofs of the technical claims within the proof are deferred to Section 4.1.
Assume that ETH holds. Define and let and be the constants promised by Theorem 6 for the error parameter . Let . We define several constants as follows. Let be the constant promised by Theorem 6. Let and let be the integer promised by the following claim.
Claim 21.
There is an integer such that for every the following holds.
-
.
-
.
Let . Assume, towards a contradiction that there are and such that there is a -approximation algorithm VK-ALG for -dimensional knapsack that runs in time , where is the size of the input and . To reach a contradiction to Theorem 6, we define the following reduction from 2-CSP on specific parameters. Define , and define . It holds that is sufficiently large by the following claim.
Claim 22.
.
According to Theorem 6, in the following we will consider only 2-CSP instances with variables and constraints. Define . The following claim shows that satisfies the conditions of Lemma 7.
Claim 23.
and .
Recall that by Theorem 6 there is no algorithm running in time that takes as input a 2-CSP instance on a constant degree bipartite regular graph with vertices over an alphabet of size and can distinguish between the following two cases:
-
(Completeness) .
-
(Soundness) .
By our assumption, there is a -approximation algorithm VK-ALG for -dimensional knapsack that runs in time , where is the size of the input. Using VK-ALG, we define the following algorithm CSP-ALG that decides between the above two cases on 2-CSP instances with variables on bipartite regular graphs of degree . Let , where , be such a 2-CSP instance and define CSP-ALG on as follows.
-
1.
Compute the reduced -VK instance using Lemma 7
-
2.
Execute VK-ALG on instance and let be the profit of the resulting solution
-
3.
If : Decide and else decide .
By Claim 23 and Lemma 7, the number of dimensions of the instance is at most , and recall we can treat this instance as a -VK instance by padding the extra dimensions in the cost vectors with zeros for all items. We conclude with the following two claims that the existence of the above algorithm is a contradiction to Theorem 6.
Claim 24.
For every given 2-CSP instance on a constant degree bipartite regular graph with vertices, Algorithm CSP-ALG correctly decides if or .
Proof.
Observe that is a well defined -VK instance by Lemma 7 and Claim 23. Consider the following cases to show that CSP-ALG correctly decides .
-
If . Then, by Lemma 7 there is a solution for with profit ; thus, as VK-ALG is a -approximation algorithm, it follows that and consequently CSP-ALG decides .
-
If . We use the following claim.
Claim 25.
.
The above two cases suffice to conclude the proof of the claim.
In the following, we analyze the running time of CSP-ALG.
Claim 26.
For every given 2-CSP instance on a constant degree bipartite regular graph with vertices, Algorithm CSP-ALG decides in time , where is the size of the alphabet.
Proof.
We first bound the running time of Step 1 of the algorithm, that constructs (note that does not depend on ). Let . The running time of this step is by Lemma 7. Note that the encoding size of can be bounded by since for each we can encode using bits, and there are such functions (recall that is fixed for CSP-ALG and is not part of the input to the algorithm). Thus, the running time of Step 1 is
In addition, Step 2 can be computed in time
The first equality follows from by Lemma 7. The second equality holds since the encoding size of is bounded by as explained above. The third equality uses that ; thus, . The fourth inequality follows because and by the monotonicity of the function in the domain (recall that since ). The last equality uses Claim 21 as .
Thus, overall the running time of CSP-ALG on instance can be bounded by
The equality follows from the fact that from Claim 21, using that .
4.1 Deferred Technical Proofs
We give below the deferred proofs of the technical claims used throughout the proof of Theorem 2.
Claim 21. [Restated, see original statement.]
There is an integer such that for every the following holds.
-
.
-
.
Proof.
Let be the minimum integer satisfying that for every it holds that . Clearly, there is such an integer since is fixed. Recall that and define . Since , it follows that ; thus, and for every it holds that a required.
Claim 22. [Restated, see original statement.]
.
Proof.
Since we have
it follows that ; thus,
The claim follows.
Claim 23. [Restated, see original statement.]
and .
Proof.
Since , it follows that . For the second direction, as we round up and (using that ). Thus, . In addition,
The above gives the statement of the claim.
Claim 25. [Restated, see original statement.]
.
Proof.
Recall that . Thus, and it follows that
Thus, using the definition of :
Therefore,
The proof follows.
References
- [1] Amir Abboud, Karl Bringmann, Danny Hermelin, and Dvir Shabtay. Seth-based lower bounds for subset sum and bicriteria path. ACM Transactions on Algorithms (TALG), 18(1):1–22, 2022. doi:10.1145/3450524.
- [2] Inès Alaya, Christine Solnon, and Khaled GHéDIRA. Ant algorithm for the multidimensional knapsack problem. In BIOMA, pages 63–72, 2004.
- [3] Md. Abul Kalam Azad, Ana Maria A. C. Rocha, and Edite M. G. P. Fernandes. Improved binary artificial fish swarm algorithm for the 0-1 multidimensional knapsack problems. Swarm Evol. Comput., 14:66–75, 2014. doi:10.1016/J.SWEVO.2013.09.002.
- [4] Mitali Bafna, CS Karthik, and Dor Minzer. Near optimal constant inapproximability under eth for fundamental problems in parameterized complexity. In Proceedings of the 57th Annual ACM Symposium on Theory of Computing, pages 2118–2129, 2025.
- [5] Stefan Balev, Nicola Yanev, Arnaud Fréville, and Rumen Andonov. A dynamic programming based reduction procedure for the multidimensional 0–1 knapsack problem. European journal of operational research, 186(1):63–76, 2008. doi:10.1016/J.EJOR.2006.02.058.
- [6] Vincent Boyer, Moussa Elkihel, and Didier El Baz. Heuristics for the 0–1 multidimensional knapsack problem. European Journal of Operational Research, 199(3):658–664, 2009. doi:10.1016/J.EJOR.2007.06.068.
- [7] Karthik C. S., Dániel Marx, Marcin Pilipczuk, and Uéverton Souza. Conditional lower bounds for sparse parameterized 2-csp: A streamlined proof. arXiv e-prints, pages arXiv–2311, 2023.
- [8] Alberto Caprara, Hans Kellerer, Ulrich Pferschy, and David Pisinger. Approximation algorithms for knapsack problems with cardinality constraints. Eur. J. Oper. Res., 123(2):333–345, 2000. doi:10.1016/S0377-2217(99)00261-1.
- [9] Timothy M. Chan. Approximation schemes for 0-1 knapsack. In SOSA, pages 5:1–5:12, 2018. doi:10.4230/OASIcs.SOSA.2018.5.
- [10] Ashok K. Chandra, Daniel S. Hirschberg, and C. K. Wong. Approximate algorithms for some generalized knapsack problems. Theor. Comput. Sci., 3(3):293–304, 1976. doi:10.1016/0304-3975(76)90048-7.
- [11] Chandra Chekuri and Sanjeev Khanna. On multidimensional packing problems. SIAM journal on computing, 33(4):837–851, 2004. doi:10.1137/S0097539799356265.
- [12] Lin Chen, Jiayi Lian, Yuchen Mao, and Guochuan Zhang. A nearly quadratic-time FPTAS for knapsack. CoRR, abs/2308.07821, 2023. doi:10.48550/arXiv.2308.07821.
- [13] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, 3rd Edition. MIT Press, 2009. URL: http://mitpress.mit.edu/books/introduction-algorithms.
- [14] Marek Cygan, Holger Dell, Daniel Lokshtanov, Dániel Marx, Jesper Nederlof, Yoshio Okamoto, Ramamohan Paturi, Saket Saurabh, and Magnus Wahlström. On problems as hard as cnf-sat. ACM Transactions on Algorithms (TALG), 12(3):1–24, 2016. doi:10.1145/2925416.
- [15] Marek Cygan, Marcin Mucha, Karol Wegrzycki, and Michal Wlodarczyk. On problems equivalent to (min, +)-convolution. ACM Trans. Algorithms, 15(1):14:1–14:25, 2019. doi:10.1145/3293465.
- [16] Mingyang Deng, Ce Jin, and Xiao Mao. Approximating knapsack and partition via dense subset sums. In SODA, pages 2961–2979, 2023. doi:10.1137/1.9781611977554.CH113.
- [17] Ilan Doron-Arad, Ariel Kulik, and Pasin Manurangsi. Fine grained lower bounds for multidimensional knapsack. arXiv preprint arXiv:2407.10146, 2024. doi:10.48550/arXiv.2407.10146.
- [18] Arnaud Fréville. The multidimensional 0-1 knapsack problem: An overview. Eur. J. Oper. Res., 155(1):1–21, 2004. doi:10.1016/S0377-2217(03)00274-1.
- [19] A.M. Frieze and M.R.B. Clarke. Approximation algorithms for the m-dimensional 0–1 knapsack problem: Worst-case and probabilistic analyses. European Journal of Operational Research, 15(1):100–109, 1984. doi:10.1016/0377-2217(84)90053-5.
- [20] Kilian Grage and Klaus Jansen. Convolution and knapsack in higher dimensions. arXiv preprint arXiv:2403.16117, 2024. doi:10.48550/arXiv.2403.16117.
- [21] Venkatesan Guruswami, Bingkai Lin, Xuandi Ren, Yican Sun, and Kewen Wu. Parameterized inapproximability hypothesis under exponential time hypothesis. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing, pages 24–35, 2024. doi:10.1145/3618260.3649771.
- [22] Venkatesan Guruswami, Bingkai Lin, Xuandi Ren, Yican Sun, and Kewen Wu. Almost optimal time lower bound for approximating parameterized clique, csp, and more, under eth. In Proceedings of the 57th Annual ACM Symposium on Theory of Computing, pages 2136–2144, 2025. doi:10.1145/3717823.3718130.
- [23] Oscar H. Ibarra and Chul E. Kim. Fast approximation algorithms for the knapsack and sum of subset problems. J. ACM, 22(4):463–468, 1975. doi:10.1145/321906.321909.
- [24] Russell Impagliazzo and Ramamohan Paturi. On the complexity of k-sat. Journal of Computer and System Sciences, 62(2):367–375, 2001. doi:10.1006/JCSS.2000.1727.
- [25] Tanmay Inamdar, Daniel Lokshtanov, Saket Saurabh, and Vaishali Surianarayanan. Parameterized Complexity of Fair Bisection: (FPT-Approximation meets Unbreakability). In Inge Li Gørtz, Martin Farach-Colton, Simon J. Puglisi, and Grzegorz Herman, editors, 31st Annual European Symposium on Algorithms (ESA 2023), volume 274 of Leibniz International Proceedings in Informatics (LIPIcs), pages 63:1–63:17, Dagstuhl, Germany, 2023. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ESA.2023.63.
- [26] Klaus Jansen, Felix Land, and Kati Land. Bounding the running time of algorithms for scheduling and packing problems. SIAM J. Discret. Math., 30(1):343–366, 2016. doi:10.1137/140952636.
- [27] Ce Jin. An improved FPTAS for 0-1 knapsack. In ICALP, pages 76:1–76:14, 2019. doi:10.4230/LIPIcs.ICALP.2019.76.
- [28] David S. Johnson. Approximation algorithms for combinatorial problems. In STOC, pages 38–49, 1973. doi:10.1145/800125.804034.
- [29] Richard M. Karp. Reducibility among combinatorial problems. In Proceedings of a symposium on the Complexity of Computer Computations, pages 85–103, 1972. doi:10.1007/978-1-4684-2001-2_9.
- [30] C. S. Karthik. Personal communication, 2025.
- [31] Liangjun Ke, Zuren Feng, Zhigang Ren, and Xiaoliang Wei. An ant colony optimization approach for the multidimensional knapsack problem. Journal of Heuristics, 16:65–83, 2010. doi:10.1007/S10732-008-9087-X.
- [32] Hans Kellerer and Ulrich Pferschy. A new fully polynomial time approximation scheme for the knapsack problem. J. Comb. Optim., 3(1):59–71, 1999. doi:10.1023/A:1009813105532.
- [33] Hans Kellerer and Ulrich Pferschy. Improved dynamic programming in connection with an FPTAS for the knapsack problem. J. Comb. Optim., 8(1):5–11, 2004. doi:10.1023/B:JOCO.0000021934.29833.6B.
- [34] Bernhard Korte and Rainer Schrader. On the existence of fast approximation schemes. In Nonlinear Programming 4, pages 415–437. Academic Press, 1981. doi:10.1016/B978-0-12-468662-5.50020-3.
- [35] Ariel Kulik and Hadas Shachnai. There is no EPTAS for two-dimensional knapsack. Inf. Process. Lett., 110(16):707–710, 2010. doi:10.1016/J.IPL.2010.05.031.
- [36] Marvin Künnemann, Ramamohan Paturi, and Stefan Schneider. On the fine-grained complexity of one-dimensional dynamic programming. In ICALP, pages 21:1–21:15, 2017. doi:10.4230/LIPIcs.ICALP.2017.21.
- [37] Eugene L. Lawler. Fast approximation algorithms for knapsack problems. Math. Oper. Res., 4(4):339–356, 1979. doi:10.1287/MOOR.4.4.339.
- [38] Soh-Yee Lee and Yoon-Teck Bau. An ant colony optimization approach for solving the multidimensional knapsack problem. In ICCIS, pages 441–446, 2012. doi:10.1109/ICCISci.2012.6297286.
- [39] Daniel Lokshtanov, MS Ramanujan, Saket Saurab, and Meirav Zehavi. Parameterized complexity and approximability of directed odd cycle transversal. In SODA, pages 2181–2200, 2020.
- [40] James H Lorie and Leonard J Savage. Three problems in rationing capital. The journal of business, 28(4):229–239, 1955.
- [41] Michael J. Magazine and Maw-Sheng Chern. A note on approximation schemes for multidimensional knapsack problems. Math. Oper. Res., 9(2):244–247, 1984. doi:10.1287/MOOR.9.2.244.
- [42] Xiao Mao. (1-)-approximation of knapsack in nearly quadratic time. CoRR, abs/2308.07004, 2023. doi:10.48550/arXiv.2308.07004.
- [43] Harry M Markowitz and Alan S Manne. On the solution of discrete programming problems. Econometrica: journal of the Econometric Society, pages 84–110, 1957.
- [44] Osman Oguz and MJ Magazine. A polynomial time approximation algorithm for the multidimensional 0/1 knapsack problem. Univ. Waterloo Working Paper, 1980.
- [45] Abdellah Rezoug, Mohamed Bader-El-Den, and Dalila Boughaci. Hybrid Genetic Algorithms to Solve the Multidimensional Knapsack Problem, pages 235–250. Springer International Publishing, Cham, 2019. doi:10.1007/978-3-319-95104-1_15.
- [46] Donguk Rhee. Faster fully polynomial approximation schemes for knapsack problems. PhD thesis, Massachusetts Institute of Technology, 2015.
- [47] Sara Sabba and Salim Chikhi. A discrete binary version of bat algorithm for multidimensional knapsack problem. Int. J. Bio Inspired Comput., 6(2):140–152, 2014. doi:10.1504/IJBIC.2014.060598.
- [48] Sartaj Sahni. Approximate algorithms for the 0/1 knapsack problem. J. ACM, 22(1):115–124, 1975. doi:10.1145/321864.321873.
- [49] H Martin Weingartner and David N Ness. Methods for the solution of the multidimensional 0/1 knapsack problem. Operations Research, 15(1):83–103, 1967. doi:10.1287/OPRE.15.1.83.
- [50] David P. Williamson and David B. Shmoys. The Design of Approximation Algorithms. Cambridge University Press, 2011. URL: http://www.cambridge.org/de/knowledge/isbn/item5759340/?site_locale=de_DE.
- [51] Hong-Fang Yan, Ci-Yun Cai, De-Huai Liu, and Min-Xia Zhang. Water wave optimization for the multidimensional knapsack problem. In ICIC, volume 11644, pages 688–699, 2019. doi:10.1007/978-3-030-26969-2_65.
