The colored knapsack problem: structural properties and exact algorithms
Fabio Ciccarelli, Alexander Helber, Erik Mühmer
Key points
From the paper's conclusion- We prove weak NP‐hardness and develop two exact dynamic programming algorithms, running in and time, where is the knapsack capacity.
Abstract
We study the colored knapsack problem (ColKP), a generalization of the classical knapsack problem in which items are partitioned into color classes and selected items must be orderable with no two consecutive items sharing a color. We prove weak NP‐hardness and develop two exact dynamic programming algorithms, running in and time, where is the knapsack capacity. We strengthen both algorithms with dominance and fathoming rules. We further show that the linear‐programming relaxation of the ColKP natural formulation admits an optimum with at most two fractional items and can be solved in time. Computational experiments on instances derived from the colored bin packing problem and on synthetic ColKP instances show that the algorithms perform particularly well on the former, while a general‐purpose solver is preferable for synthetic instances with large capacities.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Multiple-Choice Knapsack with Small ItemsarXiv · 2026
- Double-Partition Coloring problem: a unified approach for conflict-free coloring of hypergraphs and other coloring problems in graphsarXiv · 2026
- Integer Programming with Polyhedral Constraints on the ImagearXiv · 2026
- Faster Exact Algorithms for 3- and 4-Coloring: Deterministic Improvements and Further Randomized SpeedupsarXiv · 2026
- Bounded Knapsack in Truly Subquadratic TimearXiv · 2026
- A minimum witness for the 3/2 configuration-linear-program gap in two-weight graph balancing, unique at its sizearXiv · 2026