A

The colored knapsack problem: structural properties and exact algorithms

International Transactions in Operational Research

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.

Authors 3

  1. Sapienza University of Rome

    Affiliation as printed

    Department of Computer, Control and Management Engineering Antonio Ruberti Sapienza University of Rome Rome Italy

  2. RWTH Aachen University

    Affiliation as printed

    Chair of Operations Research RWTH Aachen University Aachen Germany

  3. RWTH Aachen University

    Affiliation as printed

    Chair of Operations Research RWTH Aachen University Aachen Germany

Cited by 0 stored of 1

No patents citing this paper on Lens.org (checked 2026-10-06).

References 21