arXiv:2610.18017cs.DSOct 2026

Manuscript Offprint

arXiv:2610.18017

Inclusion-wise extremal knapsack problems are (mostly) hard to approximate

Fabio Ciccarelli, Fabio Furini, Ulrich Pferschy, Elena Rener

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We study two inclusion-wise extremal variants of the 0–1 Knapsack Problem (KP). Given n items with integer weights and nonnegative costs or profits, the Minimum-Cost Maximal Knapsack Packing Problem seeks a minimum-cost packing for capacity c to which no item can be added, while the Maximum-Profit Minimal Knapsack Cover Problem seeks a maximum-profit cover for threshold d from which no item can be removed. Both problems are weakly NP-hard and pseudo-polynomially solvable, as is the classical KP, but their approximability is fundamentally different: unless P = NP, with positive values neither problem admits a polynomial-time 2p(n)2^{p(n)}-approximation for any polynomial p; allowing zero values rules out every multiplicative factor. Even with unit costs for packing and unit profits for covering, neither admits an n1−εn^{1-\varepsilon}-approximation for any fixed ε>0\varepsilon > 0, whereas a trivial n-approximation exists. We identify restrictions that restore approximability. If every item weighs at least a fixed fraction of the capacity, respectively of the threshold, both

F. Ciccarelli

Department of Computer, Control and Management Engineering “Antonio Ruberti” (DIAG),

Sapienza University of Rome, Rome, Italy

E-mail: f.ciccarelli@uniroma1.it

ORCID: 0009-0005-5795-5574

F. Furini

Department of Computer, Control and Management Engineering “Antonio Ruberti” (DIAG),

Sapienza University of Rome, Rome, Italy

E-mail: fabio.furini@uniroma1.it

ORCID: 0000-0002-1839-5827

U. Pferschy

Department of Operations and Information Systems, University of Graz, Graz, Austria

E-mail: ulrich.pferschy@uni-graz.at

ORCID: 0000-0001-8881-1497

E. Rener

Independent researcher, Bern, Switzerland

E-mail: elenarener@gmail.com

ORCID: 0000-0002-2371-8360

F. Ciccarelli, F. Furini, U. Pferschy, E. Rener

problems can be solved exactly in polynomial time. For the cover problem, if each weight wiw_i satisfies wi−1≥δ(d−1)w_i - 1 \geq \delta(d - 1), we give an approximation scheme for arbitrary profits whose running time is polynomial in nn, 1/ε1/\varepsilon, and 1/δ1/\delta. If values equal weights, a fully polynomial-time approximation scheme (FPTAS) was already known for the packing problem; we give an FPTAS for the cover problem, improving on the previously known factor 2. If value-to-weight ratios differ by at most a factor κ\kappa, we obtain a (1+ε)κ(1 + \varepsilon)\kappa-approximation for both problems.

Keywords knapsack problem · maximal packing · minimal cover · Lazy Bureaucrat Problem · Greedy Boss Problem · inapproximability · approximation schemes

Mathematics Subject Classification (2020) 90C27 · 68Q17 · 68W25

1 Introduction

The 0–1 Knapsack Problem (KP) is the standard example of a weakly NP-hard problem that is very well behaved. With n items and capacity c it is solved exactly in O(nc)O(nc) time by dynamic programming (Kellerer et al. 2004), and it admits a fully polynomial-time approximation scheme (FPTAS), that is, for every ε>0\varepsilon > 0 an algorithm that returns a solution within a factor 1+ε1 + \varepsilon of the optimum in time polynomial in the input size and 1/ε1/\varepsilon (Ibarra and Kim 1975; Lawler 1979; Kellerer and Pferschy 2004). It is obtained by scaling the profits and running a profit-indexed dynamic program. For KP, pseudo-polynomial exact solvability and full approximability go together, and the second follows from the first, through the profit-indexed version of the dynamic program. The central question of this paper is whether this implication survives when feasible solutions are required to be inclusion-wise extremal.

This paper studies two variants of KP in which feasible solutions are required to be inclusion-wise extremal. We are given a set I of n items; item i∈Ii \in I has a positive integer weight wiw_i and a nonnegative value viv_i, and we write w(S)=∑i∈Swiw(S) = \sum_{i \in S} w_i for S⊆IS \subseteq I; in particular, w(I)w(I) is the total weight of all items. In the Minimum-Cost Maximal Knapsack Packing Problem (MinMax-Pack) the values are costs. One must select a set of items that fits into a knapsack of positive integer capacity c and to which no further item can be added without exceeding the capacity, and among these maximal packings one of minimum cost is sought. In the Maximum-Profit Minimal Knapsack Cover Problem (MaxMin-Cov) the values are profits. One must select a set of items whose total weight reaches a positive integer threshold d and from which no item can be removed without dropping below it, and among these minimal covers one of maximum profit is sought. Throughout the paper, the weights wiw_i, the capacity c and the threshold d are positive integers. The two problems are complementary (Furini et al. 2017): the complement of a maximal packing is a minimal cover for the threshold d=w(I)−cd = w(I) - c, and vice versa. Both problems are weakly NP-hard and are solved by the same kind of dynamic program.

as KP: MinMax-Pack in O(nc)O(nc) time, and MaxMin-Cov in O(nd)O(nd) time directly or in O(n(w(I)−d))O(n(w(I) - d)) time by complementation.

Both problems come from scheduling. Let every item be a job with processing time wiw_{i}, released at time 0 and due at time cc, and consider a single worker who is not allowed to stay idle while some job can still be started and completed. The sets of jobs the worker may execute are exactly the maximal packings. Minimising the total processing time is the Lazy Bureaucrat Problem (LBP) with common arrivals and deadlines (Arkin et al. 2003; Gourvès et al. 2013). Minimising the number of executed jobs is the unit-cost case. A cost viv_{i} unrelated to wiw_{i} models a worker who dislikes some jobs more than others, and minimising the total disutility of the executed jobs is exactly MinMax-Pack. The cover problem is the maximisation counterpart: when vi=wiv_{i} = w_{i} it is the Greedy Boss Problem (GBP) of Gourvès et al. (2013).

The answer to the approximability of the studied knapsack problems is surprisingly negative: inclusion-wise extremality preserves pseudo-polynomial solvability, but can almost completely destroy approximability. In the proportional case vi=wiv_{i} = w_{i} approximability survives: the Lazy Bureaucrat Problem with common arrivals and deadlines admits an FPTAS (Gourvès et al. 2013). In general, however, although MinMax-Pack and MaxMin-Cov retain the weak NP-hardness and the pseudo-polynomial exact algorithms of KP, the approximation picture is radically different when the objective is allowed to vary independently of the weights. With positive values, neither problem admits an approximation within 2p(n)2^{p(n)} for any polynomial pp; allowing zero values rules out every multiplicative factor. With unit costs for MinMax-Pack or unit profits for MaxMin-Cov, even a factor n1−εn^{1 - \varepsilon} is impossible, whereas every feasible solution is within a factor nn of the optimum. Table 1 summarises this separation.

Table 1 Classical knapsack versus general MinMax-Pack and MaxMin-Cov, assuming P≠NP\mathrm{P} \neq \mathrm{NP}.

KPMinMax-PackMaxMin-Cov
Weakly NP-hardyesyes (Thm. 4.12)yes (Thm. 4.12)
Weight-indexedyesyes (Thm. 4.12)yes (Thm. 4.12)
pseudo-polynomial DP Value-indexedyesno (Cor. 5.6)no (Cor. 5.6)
pseudo-polynomial DP FPTASyesno, even with unit costs (Cor. 5.6)no, even with unit profits (Cor. 5.6)
Constant-factor approximationyesno, even with unit costs (Thm. 5.3)no, even with unit profits (Thm. 5.3)
n1−εn^{1-\varepsilon}-approximationyesno, even with unit costs (Thm. 5.3)no, even with unit profits (Thm. 5.3)
Factor 2p(n)2^{p(n)} with positive valuesyesno (Thm. 5.2)no (Thm. 5.2)

Our results also identify the two structural features behind this loss of approximability: items of vanishing relative weight and objectives that are

F. Ciccarelli, F. Furini, U. Pferschy, E. Rener

poorly correlated with the weights. This leads naturally to the second question of the paper: what happens when either of these two features is ruled out? We show that ruling out either feature allows a substantially better algorithmic behaviour. On the weight side, excluding arbitrarily small items yields exact polynomial-time algorithms. On the objective side, proportional objectives admit approximation schemes, in particular an FPTAS for the Greedy Boss Problem, for which only a factor 2 was known. Thus, at the proportional endpoint both problems admit FPTASs, and bounding the value-to-weight spread still yields constant-factor approximations. Table 5 at the end of the paper summarises the picture.

References (29)