On Solving the Knapsack Problem with Conflicts
Abstract
1. Introduction
2. Formal Problem Description
3. A Mixed-Integer Linear Programming Model
4. Computational Experiments
4.1. Benchmark Instances
4.2. Experimental Results
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Martello, S.; Toth, P. Knapsack Problems: Algorithms and Computer Implementations; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 1990. [Google Scholar]
- Wei, L.; Luo, Z.; Baldacci, R.; Lim, A. A New Branch-and-Price-and-Cut Algorithm for One-Dimensional Bin-Packing Problems. INFORMS J. Comput. 2019, 32, 428–443. [Google Scholar] [CrossRef]
- Bettinelli, A.; Cacchiani, V.; Malaguti, E. A Branch-and-Bound Algorithm for the Knapsack Problem with Conflict Graph. INFORMS J. Comput. 2017, 29, 457–473. [Google Scholar] [CrossRef]
- Yamada, T.; Kataoka, S.; Watanabe, K. Heuristic and exact algorithms for the disjunctively constrained knapsack problem. INFORMS J. Comput. 2002, 43, 2864–2870. [Google Scholar]
- Hifi, M.; Michrafy, M. Reduction strategies and exact algorithms for the disjunctively constrained knapsack problem. Comput. Oper. Res. 2007, 34, 2657–2673. [Google Scholar] [CrossRef]
- Hifi, M.; Michrafy, M. A reactive local search-based algorithm for the disjunctively constrained knapsack problem. J. Oper. Res. Soc. 2006, 57, 718–726. [Google Scholar] [CrossRef]
- Akeb, H.; Hifi, M.; Ould Ahmed Mounir, M.E. Local branching-based algorithms for the disjunctively constrained knapsack problem. Comput. Ind. Eng. 2011, 60, 811–820. [Google Scholar] [CrossRef]
- Hifi, M.; Omani, N. An algorithm for the disjunctively constrained knapsack problem. Int. J. Oper. Res. 2012, 13, 22–43. [Google Scholar] [CrossRef]
- Hifi, M. An iterative rounding search-based algorithm for the disjunctively constrained knapsack problem. Eng. Optim. 2014, 46, 1109–1122. [Google Scholar] [CrossRef]
- Pferschy, U.; Schauer, J. The knapsack problem with conflict graphs. J. Graph Algorithms Appl. 2009, 2, 233–249. [Google Scholar] [CrossRef]
- Coniglio, S.; Furini, F.; San Segundo, P. A new combinatorial branch-and-bound algorithm for the Knapsack Problem with Conflicts. Eur. J. Oper. Res. 2021, 289, 435–455. [Google Scholar] [CrossRef]
- Darmann, A.; Pferschy, U.; Schauer, J.; Woeginger, G. Paths, trees and matchings under disjunctive constraints. Discret. Appl. Math. 2011, 16, 1726–1735. [Google Scholar] [CrossRef]
- Öncan, T.; Zhang, R.; Punnen, A.P. The minimum cost perfect matching problem with conflict pair constraints. Comput. Oper. Res. 2013, 40, 920–930. [Google Scholar] [CrossRef]
- Öncan, T.; Altınel, I.K. Iterated exact and heuristic algorithms for the minimum cost bipartite perfect matching problem with conflict constraints. In Proceedings of the 2017 IEEE International Conference on Industrial Engineering and Engineering Management (IEEM), Singapore, 10–13 December 2017; pp. 1032–1036. [Google Scholar]
- Öncan, T.; Altınel, I.K. A Branch-and-Bound Algorithm for the Minimum Cost Bipartite Perfect Matching Problem with Conflict Pair Constraints. Electron. Notes Discret. Math. 2018, 64, 5–14. [Google Scholar] [CrossRef]
- Öncan, T.; Şuvak, Z.; Akyüz, M.H.; Altınel, I.K. Assignment problem with conflicts. Comput. Oper. Res. 2019, 111, 214–229. [Google Scholar] [CrossRef]
- Carrabs, F.; Cerulli, R.; Mansini, R.; Moreschini, L.; Serra, D. Solving the Set Covering Problem with Conflicts on Sets: A new parallel GRASP. Comput. Oper. Res. 2024, 166, 106620. [Google Scholar] [CrossRef]
- Jacob, A.; Majumdar, D.; Raman, V. Parameterized complexity of conflict-free set cover. In Computer Science, Theory and Applications; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2019; Volume 11532, pp. 191–202. [Google Scholar] [CrossRef]
- Saffari, S.; Fathi, Y. Set covering problem with conflict constraints. Comput. Oper. Res. 2022, 143, 105763. [Google Scholar] [CrossRef]
- Banik, A.; Panolan, F.; Raman, V.; Sahlot, V.; Saurabh, S. Parameterized Complexity of Geometric Covering Problems Having Conflicts. Algorithmica 2020, 82, 1–19. [Google Scholar] [CrossRef]
- Zhang, R.; Kabadi, S.; Punnen, A. The minimum spanning tree problem with conflict constraints and its variations. Discret. Optim. 2011, 2, 191–205. [Google Scholar] [CrossRef]
- Samer, P.; Urrutia, S. A branch and cut algorithm for minimum spanning trees under conflict constraints. Optim. Lett. 2014, 1, 41–55. [Google Scholar] [CrossRef]
- Carrabs, F.; Cerrone, C.; Pentangelo, R. A multi-ethnic genetic approach for the minimum conflict weighted spanning tree problem. Networks 2019, 2, 134–147. [Google Scholar] [CrossRef]
- Carrabs, F.; Gaudioso, M. A Lagrangian approach for the minimum spanning tree problem with conflicting edge pairs. Networks 2021, 1, 32–45. [Google Scholar] [CrossRef]
- Carrabs, F.; Cerulli, R.; Pentangelo, R.; Raiconi, A. Minimum spanning tree with conflicting edge pairs: A branch-and-cut approach. Ann. Oper. Res. 2019, 298, 65–78. [Google Scholar] [CrossRef]
- Montemanni, R.; Smith, D. On Solving the Minimum Spanning Tree Problem with Conflicting Edge Pairs. Algorithms 2025, 18, 526. [Google Scholar] [CrossRef]
- Gabow, H.; Maheshwari, S.; Osterweil, L. On Two Problems in the Generation of Program Test Paths. IEEE Trans. Softw. Eng. 1976, SE-2, 227–231. [Google Scholar] [CrossRef]
- Krause, K.W.; Goodwin, M.A.; Smith, R.W. Optimal Software Test Planning Through Automated Network Analysis; TRW Systems Group: Cleveland, OH, USA, 1973; pp. 18–22. [Google Scholar]
- Srimani, P.K.; Sinha, B.P. Impossible pair constrained test path generation in a program. Inf. Sci. 1982, 28, 87–103. [Google Scholar] [CrossRef]
- Blanco, M.; Borndörfer, R.; Brückner, M.; Hoàng, N.D.; Schlechte, T. On the Path Avoiding Forbidden Pairs Polytope. Electron. Notes Discret. Math. 2015, 50, 343–348. [Google Scholar] [CrossRef]
- Ferone, D.; Festa, P.; Salani, M. Branch and Bound and Dynamic Programming Approaches for the Path Avoiding Forbidden Pairs Problem. In Optimization and Decision Science, Proceedings of the International Conference “Optimization and Decision Science” (ODS2020), Virtual Conference, 19 November 2020; Cerulli, R., Dell’Amico, M., Guerriero, F., Pacciarelli, D., Sforza, A., Eds.; Springer International Publishing: Cham, Switzerland, 2021; pp. 227–235. [Google Scholar]
- Pferschy, U.; Schauer, J. The maximum flow problem with disjunctive constraints. J. Comb. Optim. 2013, 26, 109–119. [Google Scholar] [CrossRef]
- Şuvak, Z.; Altınel, I.K.; Aras, N. Exact solution algorithms for the maximum flow problem with additional conflict constraints. Eur. J. Oper. Res. 2020, 287, 410–437. [Google Scholar] [CrossRef]
- Carrabs, F.; Cerulli, R.; Mansini, R.; Serra, D.; Sorgente, C. Hybridizing Carousel Greedy and Kernel Search: A new approach for the maximum flow problem with conflict constraints. Eur. J. Oper. Res. 2025, 324, 414–435. [Google Scholar] [CrossRef]
- Cerrone, C.; Cerulli, R.; Golden, B. Carousel greedy: A generalized greedy algorithm with applications in optimization. Comput. Oper. Res. 2017, 85, 97–112. [Google Scholar] [CrossRef]
- Angelelli, E.; Mansini, R.; Speranza, M.G. Kernel search: A new heuristic framework for portfolio selection. Comput. Optim. Appl. 2012, 51, 345–361. [Google Scholar] [CrossRef]
- Montemanni, R.; Smith, D.H. On Solving the Mainimum Spanning Tree Problem with Conflict Constraints. 2025; submitted for publication. [Google Scholar]
- Perron, L.; Didier, F. Google OR-Tools—CP-SAT. 2025. Available online: https://developers.google.com/optimization/cp/cp_solver/ (accessed on 14 July 2025).
- Stuckey, P.J. Lazy Clause Generation: Combining the Power of SAT and CP (and MIP?) Solving. In Proceedings of the International Conference on Integration of Artificial Intelligence and Operations Research Techniques in Constraint Programming (CPAIOR), Bologna, Italy, 14–18 June 2010; pp. 5–9. [Google Scholar]
- Montemanni, R.; Dell’Amico, M. Solving the parallel drone scheduling traveling salesman problem via constraint programming. Algorithms 2023, 16, 40. [Google Scholar] [CrossRef]
- Montemanni, R.; Dell’Amico, M.; Corsini, A. Parallel drone scheduling vehicle routing problems with collective drones. Comput. Oper. Res. 2024, 163, 106514. [Google Scholar] [CrossRef]
- Falkenauer, E. A hybrid grouping genetic algorithm for bin packing. J. Heuristics 1996, 1, 5–30. [Google Scholar] [CrossRef]
- GEne Network Expansion. CPU Performance. 2025. Available online: https://gene.disi.unitn.it/test/cpu_list.php (accessed on 14 July 2025).
- IBM. IBM CPLEX Optimizer. 2024. Available online: https://www.ibm.com/de-de/analytics/cplex-optimizer (accessed on 14 July 2025).
Instances | CFS [11] | BCM [3] | ILP [11] | CP-SAT | |||||
---|---|---|---|---|---|---|---|---|---|
Class | Type | # Opt | Sec | # Opt | Sec | # Opt | Sec | # Opt | Sec |
C1 | 1 | 90 | 0.0 | 90 | 0.0 | 90 | 0.2 | 90 | 0.1 |
2 | 90 | 0.0 | 90 | 0.0 | 90 | 1.1 | 90 | 0.3 | |
3 | 90 | 0.0 | 90 | 0.0 | 90 | 8.2 | 90 | 1.7 | |
4 | 90 | 0.0 | 90 | 0.0 | 90 | 24.2 | 90 | 14.4 | |
5 | 90 | 0.0 | 90 | 0.0 | 90 | 0.0 | 90 | 0.0 | |
6 | 90 | 0.0 | 90 | 0.0 | 90 | 0.1 | 90 | 0.1 | |
7 | 90 | 0.0 | 90 | 0.0 | 90 | 0.5 | 90 | 0.2 | |
8 | 90 | 0.0 | 90 | 0.0 | 90 | 3.6 | 90 | 0.7 | |
C3 | 1 | 90 | 0.0 | 90 | 0.0 | 90 | 1.5 | 90 | 0.0 |
2 | 90 | 0.0 | 90 | 0.1 | 90 | 25.8 | 90 | 0.1 | |
3 | 90 | 0.1 | 90 | 1.3 | 54 | 162.8 | 90 | 0.2 | |
4 | 90 | 1.6 | 90 | 27.3 | 21 | 141.9 | 90 | 1.9 | |
5 | 90 | 0.0 | 90 | 0.0 | 90 | 0.2 | 90 | 0.0 | |
6 | 90 | 0.0 | 90 | 0.0 | 90 | 2.0 | 90 | 0.0 | |
7 | 90 | 0.0 | 90 | 0.1 | 90 | 46.5 | 90 | 0.1 | |
8 | 90 | 0.0 | 90 | 0.6 | 59 | 35.3 | 90 | 0.2 | |
C10 | 1 | 90 | 0.1 | 90 | 1.6 | 90 | 3.5 | 90 | 0.1 |
2 | 90 | 25.2 | 73 | 31.9 | 68 | 126.2 | 90 | 0.3 | |
3 | 61 | 15.9 | 50 | 18.2 | 22 | 166.0 | 90 | 1.6 | |
4 | 50 | 47.2 | 40 | 108.8 | 1 | 575.1 | 90 | 14.5 | |
5 | 90 | 0.0 | 90 | 0.0 | 90 | 0.2 | 90 | 0.0 | |
6 | 90 | 0.5 | 90 | 6.8 | 90 | 5.3 | 90 | 0.1 | |
7 | 86 | 35.9 | 70 | 24.5 | 65 | 143.1 | 90 | 0.2 | |
8 | 60 | 7.3 | 49 | 17.4 | 20 | 156.4 | 90 | 0.7 | |
Average | 85.7 | 5.6 | 83.0 | 9.9 | 72.9 | 67.9 | 90.0 | 1.6 |
Instances | CFS [11] | BCM [3] | ILP [11] | CP-SAT | |||||
---|---|---|---|---|---|---|---|---|---|
Class | Type | # Opt | Sec | # Opt | Sec | # Opt | Sec | # Opt | Sec |
R1 | 1 | 90 | 0.0 | 90 | 0.0 | 90 | 0.1 | 90 | 0.1 |
2 | 90 | 0.0 | 90 | 0.0 | 90 | 0.8 | 90 | 0.2 | |
3 | 90 | 0.0 | 90 | 0.0 | 90 | 4.8 | 90 | 1.0 | |
4 | 90 | 0.0 | 90 | 0.1 | 90 | 10.1 | 90 | 9.0 | |
5 | 90 | 0.0 | 90 | 0.0 | 90 | 0.0 | 90 | 0.0 | |
6 | 90 | 0.0 | 90 | 0.0 | 90 | 0.1 | 90 | 0.1 | |
7 | 90 | 0.0 | 90 | 0.0 | 90 | 0.4 | 90 | 0.2 | |
8 | 90 | 0.0 | 90 | 0.1 | 90 | 2.7 | 90 | 0.8 | |
R3 | 1 | 90 | 0.0 | 90 | 0.0 | 90 | 0.4 | 90 | 0.0 |
2 | 90 | 0.0 | 90 | 0.0 | 90 | 5.0 | 90 | 0.1 | |
3 | 90 | 0.0 | 90 | 0.2 | 90 | 55.1 | 90 | 0.2 | |
4 | 90 | 0.1 | 90 | 2.3 | 50 | 127.2 | 90 | 1.9 | |
5 | 90 | 0.0 | 90 | 0.0 | 90 | 0.1 | 90 | 0.0 | |
6 | 90 | 0.0 | 90 | 0.0 | 90 | 0.5 | 90 | 0.0 | |
7 | 90 | 0.0 | 90 | 0.0 | 90 | 5.0 | 90 | 0.1 | |
8 | 90 | 0.0 | 90 | 0.2 | 90 | 64.7 | 90 | 0.2 | |
R10 | 1 | 90 | 0.0 | 90 | 0.1 | 90 | 1.6 | 90 | 0.1 |
2 | 90 | 0.8 | 90 | 9.1 | 87 | 107.4 | 90 | 0.2 | |
3 | 89 | 49.9 | 69 | 57.0 | 33 | 100.0 | 90 | 1.0 | |
4 | 51 | 23.2 | 40 | 25.0 | 8 | 333.6 | 90 | 9.0 | |
5 | 90 | 0.0 | 90 | 0.0 | 90 | 0.1 | 90 | 0.0 | |
6 | 90 | 0.0 | 90 | 0.2 | 90 | 1.5 | 90 | 0.1 | |
7 | 90 | 1.5 | 90 | 17.7 | 80 | 91.7 | 90 | 0.2 | |
8 | 79 | 19.5 | 69 | 43.2 | 30 | 77.0 | 90 | 0.8 | |
Average | 87.9 | 4.0 | 86.2 | 6.5 | 79.5 | 41.2 | 90.0 | 1.1 |
Instances | CFS [11] | BCM [3] | ILP [11] | CP-SAT | |||||
---|---|---|---|---|---|---|---|---|---|
Class | Density | # Opt | Sec | # Opt | Sec | # Opt | Sec | # Opt | Sec |
C1 | 0.1 | 80 | 0.0 | 80 | 0.0 | 80 | 0.1 | 80 | 0.2 |
0.2 | 80 | 0.0 | 80 | 0.0 | 80 | 0.2 | 80 | 0.4 | |
0.3 | 80 | 0.0 | 80 | 0.0 | 80 | 0.4 | 80 | 0.7 | |
0.4 | 80 | 0.0 | 80 | 0.0 | 80 | 0.6 | 80 | 1.2 | |
0.5 | 80 | 0.0 | 80 | 0.0 | 80 | 1.3 | 80 | 1.5 | |
0.6 | 80 | 0.0 | 80 | 0.0 | 80 | 2.7 | 80 | 3.2 | |
0.7 | 80 | 0.0 | 80 | 0.0 | 80 | 5.5 | 80 | 3.3 | |
0.8 | 80 | 0.0 | 80 | 0.0 | 80 | 14.4 | 80 | 5.2 | |
0.9 | 80 | 0.0 | 80 | 0.0 | 80 | 17.5 | 80 | 4.0 | |
C3 | 0.1 | 80 | 0.2 | 80 | 0.3 | 77 | 11.2 | 80 | 0.2 |
0.2 | 80 | 0.1 | 80 | 2.4 | 79 | 26.7 | 80 | 0.4 | |
0.3 | 80 | 0.4 | 80 | 6.6 | 72 | 27.7 | 80 | 0.7 | |
0.4 | 80 | 0.5 | 80 | 9.1 | 66 | 41.3 | 80 | 1.2 | |
0.5 | 80 | 0.5 | 80 | 9.6 | 52 | 74.6 | 80 | 1.6 | |
0.6 | 80 | 0.2 | 80 | 3.9 | 50 | 41.9 | 80 | 3.3 | |
0.7 | 80 | 0.1 | 80 | 1.0 | 50 | 11.0 | 80 | 3.3 | |
0.8 | 80 | 0.0 | 80 | 0.2 | 66 | 68.4 | 80 | 5.2 | |
0.9 | 80 | 0.0 | 80 | 0.0 | 72 | 27.2 | 80 | 3.9 | |
C10 | 0.1 | 47 | 41.4 | 33 | 37.3 | 47 | 53.3 | 80 | 0.1 |
0.2 | 50 | 79.0 | 30 | 4.4 | 30 | 4.5 | 80 | 0.1 | |
0.3 | 50 | 1.6 | 50 | 64.7 | 30 | 3.7 | 80 | 0.1 | |
0.4 | 70 | 11.5 | 50 | 3.7 | 48 | 169.0 | 80 | 0.2 | |
0.5 | 80 | 28.8 | 69 | 23.6 | 50 | 106.4 | 80 | 0.4 | |
0.6 | 80 | 1.2 | 80 | 52.5 | 50 | 38.2 | 80 | 0.4 | |
0.7 | 80 | 0.1 | 80 | 3.7 | 50 | 12.4 | 80 | 0.5 | |
0.8 | 80 | 0.0 | 80 | 0.3 | 70 | 75.8 | 80 | 0.5 | |
0.9 | 80 | 0.0 | 80 | 0.0 | 71 | 28.7 | 80 | 0.6 | |
Average | 76.2 | 6.1 | 73.8 | 8.3 | 64.8 | 32.0 | 80.0 | 1.6 |
Instances | CFS [11] | BCM [3] | ILP [11] | CP-SAT | |||||
---|---|---|---|---|---|---|---|---|---|
Class | Density | # Opt | Sec | # Opt | Sec | # Opt | Sec | # Opt | Sec |
R1 | 0.1 | 80 | 0.0 | 80 | 0.0 | 80 | 0.1 | 80 | 0.3 |
0.2 | 80 | 0.0 | 80 | 0.0 | 80 | 0.2 | 80 | 0.4 | |
0.3 | 80 | 0.0 | 80 | 0.0 | 80 | 0.3 | 80 | 0.8 | |
0.4 | 80 | 0.0 | 80 | 0.0 | 80 | 0.6 | 80 | 1.2 | |
0.5 | 80 | 0.0 | 80 | 0.0 | 80 | 0.9 | 80 | 1.5 | |
0.6 | 80 | 0.0 | 80 | 0.0 | 80 | 1.6 | 80 | 1.8 | |
0.7 | 80 | 0.0 | 80 | 0.0 | 80 | 4.8 | 80 | 2.1 | |
0.8 | 80 | 0.0 | 80 | 0.0 | 80 | 5.3 | 80 | 2.6 | |
0.9 | 80 | 0.0 | 80 | 0.0 | 80 | 7.2 | 80 | 2.2 | |
R3 | 0.1 | 80 | 0.0 | 80 | 0.1 | 80 | 0.1 | 80 | 0.3 |
0.2 | 80 | 0.0 | 80 | 0.1 | 80 | 1.0 | 80 | 0.4 | |
0.3 | 80 | 0.0 | 80 | 0.4 | 80 | 10.9 | 80 | 0.8 | |
0.4 | 80 | 0.0 | 80 | 0.7 | 78 | 35.6 | 80 | 1.2 | |
0.5 | 80 | 0.0 | 80 | 0.8 | 70 | 23.3 | 80 | 1.6 | |
0.6 | 80 | 0.0 | 80 | 0.6 | 70 | 46.3 | 80 | 1.8 | |
0.7 | 80 | 0.0 | 80 | 0.3 | 70 | 53.4 | 80 | 2.1 | |
0.8 | 80 | 0.0 | 80 | 0.1 | 74 | 45.2 | 80 | 2.5 | |
0.9 | 80 | 0.0 | 80 | 0.0 | 78 | 31.2 | 80 | 2.3 | |
R10 | 0.1 | 71 | 11.2 | 69 | 59.9 | 72 | 16.0 | 80 | 0.1 |
0.2 | 59 | 47.9 | 50 | 39.5 | 43 | 85.1 | 80 | 0.1 | |
0.3 | 70 | 42.8 | 50 | 3.9 | 44 | 139.2 | 80 | 0.1 | |
0.4 | 70 | 2.0 | 70 | 38.9 | 50 | 53.8 | 80 | 0.2 | |
0.5 | 80 | 7.2 | 70 | 3.9 | 50 | 51.6 | 80 | 0.4 | |
0.6 | 80 | 0.4 | 80 | 11.6 | 50 | 16.2 | 80 | 0.4 | |
0.7 | 80 | 0.1 | 80 | 1.3 | 54 | 38.5 | 80 | 0.5 | |
0.8 | 80 | 0.0 | 80 | 0.2 | 70 | 40.4 | 80 | 0.5 | |
0.9 | 79 | 0.0 | 79 | 0.0 | 75 | 44.6 | 80 | 0.6 | |
Average | 78.1 | 4.1 | 76.6 | 6.0 | 70.7 | 27.9 | 80.0 | 1.1 |
Instances | CFS [11] | BCM [3] | ILP [11] | CP-SAT 600 s | CP-SAT 3600 s | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Items | Capacity | Density | # Opt | Sec | # Opt | Sec | # Opt | Sec | # Opt | Gap % | Sec | # Opt | Gap % | Sec |
500 | 1000 | 0.001 | 10 | 0.0 | 10 | 0.0 | 10 | 0.0 | 10 | 0.00 | 0.1 | 10 | 0.00 | 0.1 |
0.002 | 10 | 0.0 | 10 | 0.6 | 10 | 0.0 | 10 | 0.00 | 0.1 | 10 | 0.00 | 0.1 | ||
0.005 | 10 | 0.2 | 10 | 6.7 | 10 | 0.0 | 10 | 0.00 | 13.1 | 10 | 0.00 | 13.1 | ||
0.01 | 10 | 0.8 | 9 | 103.3 | 10 | 0.0 | 9 | 0.02 | 30.4 | 10 | 0.00 | 73.6 | ||
0.02 | 10 | 56.7 | 1 | 272.7 | 10 | 0.3 | 10 | 0.00 | 24.8 | 10 | 0.00 | 24.8 | ||
0.05 | 1 | 165.8 | 0 | - | 10 | 90.6 | 9 | 0.09 | 204.0 | 10 | 0.00 | 218.8 | ||
500 | 2000 | 0.001 | 10 | 4.2 | 10 | 0.4 | 10 | 0.0 | 10 | 0.00 | 0.1 | 10 | 0.00 | 0.1 |
0.002 | 10 | 0.1 | 10 | 5.2 | 10 | 0.0 | 10 | 0.00 | 0.2 | 10 | 0.00 | 0.2 | ||
0.005 | 10 | 7.3 | 8 | 199.6 | 10 | 0.0 | 9 | 0.01 | 100.9 | 10 | 0.00 | 362.9 | ||
0.01 | 7 | 49.8 | 0 | - | 10 | 0.0 | 6 | 0.04 | 5.3 | 8 | 0.02 | 296.9 | ||
0.02 | 0 | - | 0 | - | 9 | 6.1 | 9 | 0.01 | 12.2 | 10 | 0.00 | 136.9 | ||
0.05 | 0 | - | 0 | - | 0 | - | 0 | 2.77 | - | 0 | 1.97 | - | ||
1000 | 1000 | 0.001 | 10 | 0.1 | 10 | 5.4 | 10 | 0.0 | 10 | 0.00 | 0.3 | 10 | 0.00 | 0.3 |
0.002 | 10 | 0.2 | 10 | 11.1 | 10 | 0.0 | 10 | 0.00 | 0.5 | 10 | 0.00 | 0.5 | ||
0.005 | 10 | 5.9 | 5 | 379.9 | 10 | 0.0 | 7 | 0.05 | 22.5211 | 10 | 0.00 | 456.6 | ||
0.01 | 7 | 163.9 | 0 | - | 10 | 0.1 | 2 | 0.14 | 84.5555 | 4 | 0.10 | 522.1 | ||
0.02 | 0 | - | 0 | - | 7 | 2.4 | 5 | 0.11 | 2.8536 | 6 | 0.08 | 153.0 | ||
0.05 | 0 | - | 0 | - | 0 | - | 0 | 4.72 | - | 0 | 3.44 | - | ||
1000 | 2000 | 0.001 | 10 | 3.1 | 9 | 84.7 | 10 | 0.0 | 10 | 0.00 | 8.7 | 10 | 0.00 | 8.7 |
0.002 | 10 | 45.8 | 7 | 210.3 | 10 | 0.0 | 8 | 0.02 | 36.9609 | 9 | 0.01 | 188.2 | ||
0.005 | 7 | 182.0 | 0 | - | 10 | 0.0 | 6 | 0.03 | 159.758 | 8 | 0.02 | 405.8 | ||
0.01 | 4 | 0.0 | 0 | - | 9 | 0.1 | 6 | 0.04 | 100.436 | 7 | 0.03 | 196.0 | ||
0.02 | 0 | - | 0 | - | 5 | 193.8 | 1 | 0.82 | 388.104 | 8 | 0.11 | 1697.2 | ||
0.05 | 0 | - | 0 | - | 0 | - | 0 | 8.21 | - | 0 | 7.08 | - | ||
Average | 6.5 | 38.1 | 4.5 | 98.5 | 8.3 | 14.0 | 7.0 | 0.71 | 56.9 | 7.9 | 0.54 | 226.5 |
Instances | CFS [11] | BCM [3] | ILP [11] | CP-SAT 600 s | CP-SAT 3600 s | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Items | Capacity | Density | # Opt | Sec | # Opt | Sec | # Opt | Sec | # Opt | Gap % | Sec | # Opt | Gap % | Sec |
500 | 1000 | 0.001 | 10 | 0.0 | 10 | 0.0 | 10 | 0.0 | 10 | 0.00 | 0.1 | 10 | 0.00 | 0.1 |
0.002 | 10 | 0.0 | 10 | 0.1 | 10 | 0.0 | 10 | 0.00 | 0.1 | 10 | 0.00 | 0.1 | ||
0.005 | 10 | 0.0 | 10 | 0.4 | 10 | 0.0 | 10 | 0.00 | 0.2 | 10 | 0.00 | 0.2 | ||
0.01 | 10 | 0.1 | 10 | 2.1 | 10 | 0.0 | 10 | 0.00 | 0.1 | 10 | 0.00 | 0.1 | ||
0.02 | 10 | 1.2 | 10 | 32.8 | 10 | 0.0 | 10 | 0.00 | 0.2 | 10 | 0.00 | 0.2 | ||
0.05 | 9 | 132.7 | 3 | 133.2 | 10 | 1.2 | 10 | 0.00 | 1.2 | 10 | 0.00 | 1.2 | ||
500 | 2000 | 0.001 | 10 | 0.0 | 10 | 0.1 | 10 | 0.0 | 10 | 0.00 | 0.1 | 10 | 0.00 | 0.1 |
0.002 | 10 | 0.0 | 10 | 0.3 | 10 | 0.0 | 10 | 0.00 | 0.2 | 10 | 0.00 | 0.2 | ||
0.005 | 10 | 0.1 | 10 | 2.4 | 10 | 0.0 | 10 | 0.00 | 0.2 | 10 | 0.00 | 0.2 | ||
0.01 | 10 | 10.4 | 9 | 190.7 | 10 | 0.0 | 10 | 0.00 | 0.1 | 10 | 0.00 | 0.1 | ||
0.02 | 3 | 116.5 | 1 | 39.6 | 10 | 0.1 | 10 | 0.00 | 0.2 | 10 | 0.00 | 0.2 | ||
0.05 | 0 | - | 0 | - | 10 | 81.2 | 6 | 1.61 | 228.895 | 10 | 0.00 | 471.9 | ||
1000 | 1000 | 0.001 | 10 | 0.0 | 10 | 0.4 | 10 | 0.0 | 10 | 0.0 | 0.2 | 10 | 0.0 | 0.2 |
0.002 | 10 | 0.0 | 10 | 1.6 | 10 | 0.0 | 10 | 0.0 | 0.4 | 10 | 0.0 | 0.4 | ||
0.005 | 10 | 0.1 | 10 | 16.8 | 10 | 0.0 | 10 | 0.0 | 0.3 | 10 | 0.0 | 0.3 | ||
0.01 | 10 | 15.0 | 8 | 152.6 | 10 | 0.1 | 10 | 0.0 | 0.2 | 10 | 0.0 | 0.2 | ||
0.02 | 4 | 125.7 | 1 | 468.8 | 10 | 0.6 | 10 | 0.0 | 0.4 | 10 | 0.0 | 0.4 | ||
0.05 | 0 | - | 0 | - | 9 | 255.0 | 3 | 2.9 | 139.3 | 10 | 0.00 | 943.3 | ||
1000 | 2000 | 0.001 | 10 | 0.0 | 10 | 2.3 | 10 | 0.0 | 10 | 0.00 | 0.3 | 10 | 0.00 | 0.3 |
0.002 | 10 | 0.0 | 10 | 20.3 | 10 | 0.0 | 10 | 0.00 | 0.6 | 10 | 0.00 | 0.6 | ||
0.005 | 9 | 69.5 | 2 | 189.9 | 10 | 0.0 | 10 | 0.00 | 0.3 | 10 | 0.00 | 0.3 | ||
0.01 | 1 | 565.8 | 0 | - | 10 | 0.1 | 10 | 0.00 | 0.3 | 10 | 0.00 | 0.3 | ||
0.02 | 0 | - | 0 | - | 10 | 2.1 | 10 | 0.00 | 10.2 | 10 | 0.00 | 10.2 | ||
0.05 | 0 | - | 0 | - | 0 | - | 0 | 12.45 | - | 0 | 10.51 | - | ||
Average | 7.3 | 51.9 | 6.4 | 66.0 | 9.5 | 14.8 | 9.1 | 0.71 | 16.7 | 9.6 | 0.44 | 62.2 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Montemanni, R.; Smith, D.H. On Solving the Knapsack Problem with Conflicts. Mathematics 2025, 13, 2674. https://doi.org/10.3390/math13162674
Montemanni R, Smith DH. On Solving the Knapsack Problem with Conflicts. Mathematics. 2025; 13(16):2674. https://doi.org/10.3390/math13162674
Chicago/Turabian StyleMontemanni, Roberto, and Derek H. Smith. 2025. "On Solving the Knapsack Problem with Conflicts" Mathematics 13, no. 16: 2674. https://doi.org/10.3390/math13162674
APA StyleMontemanni, R., & Smith, D. H. (2025). On Solving the Knapsack Problem with Conflicts. Mathematics, 13(16), 2674. https://doi.org/10.3390/math13162674