On Solving the Knapsack Problem with Conflicts
Abstract: A variant of the well-known Knapsack Problem is studied in this paper, where pairs of items are conflicting, and cannot be selected at the same time. This configures a set of hard constraints. The problem, which can be used to model real applications, looks for a selection of items such that the total profit is maximized, the capacity of the container is respected, and no conflict is violated. In this paper, we consider a previously known mixed integer linear program representing the problem and we solve it with the open-source solver CP-SAT, part of the Google OR-Tools computational suite. An experimental campaign on the instances available from the literature and adopted in the last decade, indicate that the approach we propose achieves results comparable with, and often better than, those of state-of-the-art solvers, notwithstanding its intrinsic conceptual and implementation simplicity.
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.