Approximation Algorithms for Generalized Multidimensional Knapsack
Total Page：16
File Type：pdf, Size：1020Kb
Approximation Algorithms for Generalized Multidimensional Knapsack Arindam Khan ∗ Eklavya Sharma ∗ K. V. N. Sreenivas ∗ Abstract We study a generalization of the knapsack problem with geometric and vector constraints. The input is a set of rectangular items, each with an associated proﬁt and d nonnegative weights (d-dimensional vector), and a square knapsack. The goal is to ﬁnd a non-overlapping axis-parallel packing of a subset of items into the given knapsack such that the vector constraints are not violated, i.e., the sum of weights of all the packed items in any of the d dimensions does not exceed one. We consider two variants of the problem: (i) the items are not allowed to be rotated, (ii) items can be rotated by 90 degrees. We give a (2 + ε)-approximation algorithm for this problem (both versions). In the process, we also study a variant of the maximum generalized assignment problem (Max- GAP), called Vector-Max-GAP, and design a PTAS for it. 1 Introduction The knapsack problem is a fundamental well-studied problem in the ﬁeld of combinatorial optimization and approximation algorithms. It is one of Karp’s 21 NP-Complete problems and has been studied extensively for more than a century [15]. A common generalization of the knapsack problem is the 2-D geometric knapsack problem. Here, the knapsack is a unit square and the items are rectangular objects with designated proﬁts. The objective is to pack a maximum proﬁt subset of items such that no two items overlap and all the items are packed parallel to the axes of the knapsack (called axis-parallel or orthogonal packing). There are two further variants of the problem depending on whether we are allowed to rotate the items by 90 degrees or not. Another well-studied variant of the knapsack problem is d-D vector knapsack problem, where we are given a set of items, each with d-dimensional weight vector and a proﬁt, and a d-dimensional bin (d is a constant). The goal is to select a subset of items of maximum proﬁt such that the sum of all weights in each dimension is bounded by the bin capacity in that arXiv:2102.05854v1 [cs.DS] 11 Feb 2021 dimension. In this paper we study a natural variant of knapsack problem, called (2, d) Knapsack, which considers items with both geometric dimensions and the vector dimensions. In this 2-D geo- metric knapsack problem with d-D vector constraints (where d is a constant), or (2, d) KS in short, the input set I consists of n items. For any item i ∈ I, let w(i), h(i),p(i) denote the width, height and the proﬁt of the item, respectively, and let a(i)= w(i)h(i) denote the area of th the item. Also, for any item i ∈ I, let vj(i) denote the weight of the item in the j dimension. The objective is to pack a maximum proﬁt subset of items J ⊆ I into a unit square knapsack in an axis-parallel, non-overlapping manner such that for any j ∈ [d], i∈J vj(i) ≤ 1. We will also study a variant of Maximum Generalized Assignment ProblemP (Max-GAP). In Max- GAP problem, we are provided with a set of machines with designated capacities, and a set of ∗Department of Computer Science and Automation, Indian Institute of Science, Bengaluru, India. [email protected], [email protected], [email protected] 1 items; an item’s size and value depends on the machine to which it is going to be assigned. The objective is to assign a subset of items to machines such that the obtained value is maximized while making sure that no machine’s capacity is breached. We deﬁne a variant of the Max-GAP problem called Vector-Max-GAP. In this problem, we additionally have a d-dimensional weight vector associated with every item and a d-dimensional global weight constraint on the whole setup of machines. The objective is to ﬁnd the maximum value obtainable so that no machine’s capacity is breached and the overall weight of items does not cross the global weight constraint. 1.1 Our contributions Our two main contributions are (i)a (2+ ε) approximation algorithm for the (2, d) KS problem (ii) deﬁne a new problem called Vector-Max-GAP and obtain a PTAS for it. To obtain the approximation algorithm for (2, d) KS, we ﬁrst obtain a structural result using corridor decomposition, which shows that if we consider an optimal packing and remove ei- ther vertical items (height≫width) or horizontal items (width≫height), we can restructure the remaining packing to possess a ‘nice’ structure that can be eﬃciently searched for. In [9], which deals with the 2-D geometric knapsack problem, the authors use the PTAS for the maximum generalized assignment problem (Max-GAP) to eﬃciently search for such a nice structure. But due to the presence of vector constraints, we needed a generalization of the Max-GAP problem which we call the Vector-Max-GAP problem and obtain a PTAS for it to obtain the desired approximation algorithm for (2, d) KS. 1.2 Related work The classical knapsack problem admits a fully polynomial time approximation scheme (FPTAS) [14, 21]. Both 2-D geometric knapsack (2D GK) and 2-D vector knapsack problem are W[1]- hard [12, 20], thus do not admit an EPTAS unless W[1]=FPT. 1 However, d-D vector knapsack problem admits a PTAS [7]. On the other hand, it is not known whether the 2D GK is APX- Hard or not, and ﬁnding a PTAS for the problem is one of the major open problems in the area. The current best approximation algorithm [9] for this problem without rotations achieves an approximation ratio of 17/9+ ε. If rotations are allowed, the approximation ratio improves to 3/2+ ε. In a special case known as the cardinality case where each item has a proﬁt of one unit, the current best approximation factor is 558/325 + ε without rotations and 4/3+ ε with rotations (see [9]). PTASes exist for the restricted proﬁt density case, i.e., the proﬁt/area ratio of each item is upper bounded and lower bounded by ﬁxed constants (see [2]) and the case where all the items are small compared to the dimensions of the bin. EPTAS exists for the case where all the items are squares [13]. In the case where we can use resource augmentation, i.e., we are allowed to increase the width or height of the knapsack by a factor of ε, we can construct a packing which gives the exact optimal proﬁt in polynomial time (see [13]). 2GK has also been studied under psedopolynomial setting [17, 11]. The following table summarizes the results for 2GK problem. 1EPTAS is a PTAS with running time f(ε)nc where c is a constant that does not depend on ε. 2 without rotations with rotations General case 17/9+ ε[9] 3/2+ ε[9] Cardinality case 558/325 + ε[9] 4/3+ ε[9] Restricted proﬁt density PTAS[2] PTAS[2] Small items folklore FPTAS (Lemma 15) folklore FPTAS (Lemma 15) Square items EPTAS [13] irrelevant Resource Augmentation exact solution[13] exact solution[13] Figure 1: The state-of-the-art for the 2-D geometric knapsack problem. A well-studied problem closely related to the knapsack problem is bin packing. A natural gen- eralization of the bin packing problem is the 2-D geometric bin packing (2GBP) problem where items are rectangles and bins are unit squares. The current best asymptotic approximation ratio of (1 + ln 1.5+ ε) for 2GBP is due to [4]. Another generalization of bin packing is the vector bin packing problem (VBP) where each item has multiple constraints. For the current best approximation ratios of VBP, we refer the reader to [3]. There exist many other variants of the discussed packing problems such as strip packing (see [8, 10]), maximum independent set of rectangles (see [18]), storage allocation problems [22], etc. For an extensive survey of related packing problems, see [5, 16]. 1.3 Organization of the Paper In Section 2, we study the Vector-Max-GAP problem and design a PTAS for it. Section 3 describes the (2 + ε) approximation algorithm for the (2, d) Knapsack problem. In Sections 3.1 and 3.2, we use a structural result involving corridor decomposition and reduce our problem to a container packing problem. In Sections 3.3 and 3.4 we will discuss how to model the container packing problem as an instance of the Vector-Max-GAP problem. Finally, in Section 3.5, we put everything together to obtain the (2 + ε) approximation algorithm for the (2, d) Knapsack problem. 2 Vector-Max-GAP problem and a PTAS We will formally deﬁne the Vector-Max-GAP problem. Let I be a set of n items numbered 1 to th n and let M be a set of k machines, where k is a constant. The j machine has a capacity Mj. th Each item i ∈ I has a size of sj(i), value of valj(i) in the j machine (j ∈ [k]). Additionally, th each item i also has a weight wq(i) in the q dimension (q ∈ [d], d is a constant). Assume that for all j ∈ [k], q ∈ [d] and i ∈ [n], Mj, wq(i),sj(i), valj(i) are all non-negative. The objective is to assign a subset of items J ⊆ I to the machines such that for any machine j, the size of all the items assigned to it does not exceed Mj.