Abstract
In this paper, we address the constrained knapsack problem with divisible item sizes and penalties (the CK-DSP problem, for short), which is modelled as follows. Given a set \(A=\{a_{1},a_{2},\ldots ,a_{n}\}\) of n items and a knapsack K with capacity L, where each item \(a_{i}\in A\) has a size \(s_{i}\in Z^{+}\), a profit \(c_{i}\in R^{+}\), a penalty \(p_{i}\in R^{+}\), and these n item sizes are divisible, i.e., either \(s_{i}|s_{j}\) or \(s_{j}|s_{i}\) for any two distinct items \(a_{i}\) and \(a_{j}\) in A, each item \(a_{i}\in A\) must be either put into K under the constraint that the summation of sizes of items in K does not exceed L, or rejected with its penalty \(p_{i}\) that we must pay for, it is asked to find a subset \(X\subseteq A\) to satisfy the constraint \(s(X)=\sum _{a_i\in X}s_i \le L\). We consider three versions of the CK-DSP problem, respectively. (1) The constrained knapsack problem with divisible item sizes and total penalties (the CK-DSTP problem, for short) is asked to find a subset \(X\subseteq A\) to satisfy the constraint \(s(X) \le L\), the objective is to maximize the value of total profits of the items in X minus total penalties paid for the rejected items not in X; (2) The constrained knapsack problem with divisible item sizes and maximum penalty (the CK-DSMP problem, for short) is asked to find a subset \(X\subseteq A\) to satisfy the constraint \(s(X) \le L\), the objective is to maximize the value of total profits of the items in X minus maximum penalty paid for the rejected items not in X; (3) The penalized knapsack problem with divisible item sizes (the PK-DS problem, for short) is asked to find a subset \(X\subseteq A\) to satisfy the constraint \(s(X) \le L\), the objective is to maximize the value of total profits of the items in X minus maximum penalty paid for the items in X. As our contributions, we design three exact combinatorial algorithms to solve the CK-DSTP problem, the CK-DSMP problem and the PK-DS problem, and these three algorithms run in time \(O(n\log n)\), \(O(n^{2}\log n)\) and \(O(n^{2}\log n)\), respectively, where n is the number of items with divisible sizes.
Similar content being viewed by others
References
Ceselli, A., Righini, G.: An optimization algorithm for a penalized knapsack problem. Oper. Res. Lett. 34(4), 394–404 (2006)
Coffman, E.G., Garey, M.R., Johnson, D.S.: Bin packing with divisible item sizes. J. Complex. 3, 406–428 (1987)
Coffman, E.G., Garey, M.R., Johnson, D.S.: Approximation algorithms for bin packing: a survey. In: Hochbaum, D. (ed.) Approximation Algorithms. PWS Publishing Company, Boston (1997)
Croce, F.D., Pferschy, U., Scatamacchia, R.: New exact approaches and approximation results for the penalized knapsack problem. Discret. Appl. Math. 253, 122–135 (2019)
Csirik, J., Woeginger, G.J.: On-line packing and covering problems. In: Fiat, A., Woeginger, G.J. (eds.) Online Algorithms: the State of the Art. Lecture Notes in Computer Science, pp. 147–177. Springer-Verlag, New York (1998)
Dósa, G., He, Y.: Bin packing problems with rejection penalties and their dual problems. Inf. Comput. 204(5), 795–815 (2006)
Epstein, L.: Bin packing with rejection revisited. Algorithmica 56(4), 505–528 (2010)
Epstein, L., Levin, A.: AFPTAS results for common variants of bin packing: a new method for handling the small items. SIAM J. Optim. 20(6), 3121–3145 (2010)
Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. WH Freeman, New york (1979)
Hartmann, M., Olmstead, T.: Solving sequential knapsack problems. Oper. Res. Lett. 13(4), 225–232 (1993)
Horowitz, E., Sahni, S.: Computing partitions with applications to the knapsack problem. J. Ass. Comput. Mach. 21(2), 277–292 (1974)
Ibarra, O.H., Kim, C.E.: Fast approximation algorithms for the knapsack and sum of subset problems. J. Ass. Comput. Mach. 22(4), 463–468 (1975)
Jansen, K., Kraft, S.E.J.: A faster FPTAS for the unbounded knapsack problem. Eur. J. Comb. 68, 148C174 (2018)
Kang, J., Park, S.: Algorithms for the variable sized bin packing problem. Eur. J. Oper. Res. 147(2), 365–372 (2003)
Kellerer, H., Pferschy, U.: A new fully polynomial time approximation scheme for the knapsack problem. J. Comb. Optim. 3(1), 59–71 (1999)
Kellerer, H., Pferschy, U., Pisinger, D.: Knapsack Problems. Springer, Berlin (2004)
Knuth, D.E.: The Art of Computer Programming: Fundamental Algorithms, vol. 1, 2nd edn. Addison-Wesley, Reading (1973)
Korte, B., Vygen, J.: Combinatorial Optimization: Theory and Algorithms, 5th edn. Springer-Verlag, Berlin (2012)
Li, J., Pan, P., Cai, L., Lichen, J., Wang, W.: Bin packing with divisible item sizes and rejection penalties. Optim. Lett. 16, 1587–1597 (2022)
Martello, S., Pisinger, D., Toth, P.: New trends in exact algorithms for the 0–1 knapsack problem. Eur. J. Oper. Res. 123(2), 325–332 (2000)
Martello, S., Toth, P.: Knapsack Problems: Algorithms and Computer Implementations. Wiley, Chichester (1990)
Nauss, R.M.: An efficient algorithm for the 0–1 knapsack problem. Manage. Sci. 23(1), 27–31 (1976)
Sahni, S.: Approximate algorithms for the 0–1 knapsack problem. J. Ass. Comput. Mach. 22(1), 115–124 (1975)
Schrijver, A.: Combinatorial Optimization: Polyhedra and Efficiency. Springer-Verlag, Berlin (2003)
Vazirani, V.V.: Approximation Algorithms. Springer-Verlag, Berlin (2001)
Verhaegh, W.F.J., Aarts, E.H.L.: A polynomial-time algorithm for knapsack with divisible item sizes. Inf. Process. Lett. 62(4), 217–221 (1997)
Williamson, D.P., Shmoys, D.B.: The Design of Approximation Algorithms. Cambridge University Press, New York (2011)
Acknowledgements
We are indeed grateful to the reviewers for their insightful comments and for their suggested changes that improve the presentation greatly.
Funding
These authors are supported by the National Natural Science Foundation of China [Nos. 11861075, 12101593] and Project for Innovation Team (Cultivation) of Yunnan Province [No. 202005AE160006]. Junran Lichen is also supported by Fundamental Research Funds for the Central Universities [No. buctrc202219], and Jianping Li is also supported by Project of Yunling Scholars Training of Yunnan Province [No. K264202011820].
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Li, J., Cai, L., Lichen, J. et al. Combinatorial algorithms for solving the constrained knapsack problems with divisible item sizes and penalties. Optim Lett 17, 1939–1956 (2023). https://doi.org/10.1007/s11590-022-01969-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11590-022-01969-4