A tight 1/3-approximation algorithm and fully polynomial-time approximation schemes for the Colored Knapsack Problem
Abstract
The Colored Knapsack Problem (ColKP) generalizes the classical Knapsack Problem by partitioning the items into color classes and requiring the selected items to admit an ordering in which consecutive items have different colors. The problem is weakly 𝒩𝒫-hard and admits two pseudo-polynomial dynamic programming (DP) algorithms proposed in the literature. These two DP algorithms have worst-case running times O(b n4) and O(b2 n3), respectively, where b is the knapsack capacity and n is the number of items. We develop the first approximation algorithm for the ColKP. By rounding an optimal basic solution of the linear programming relaxation of its natural integer programming formulation and repairing color feasibility, we obtain a linear-time approximation-algorithm whose worst-case performance ratio is 1/3. We then reformulate both DP algorithms so that profit, rather than knapsack capacity, indexes their pseudo-polynomial dimension, and combine them with profit scaling to obtain two fully polynomial-time approximation schemes (FPTASs). The first FPTAS runs in O(n5/ε) time for nonnegative profits and in O(n6/ε) time for arbitrary integer profits. The second FPTAS runs instead in O(n5/ε2) and O(n7/ε2) time, respectively. The approximation guarantee, along with new structural insights, provides the bounds needed to control the scaled profit range and establish these running times.
Related
- A Better-Than-$3$ Approximation Algorithm for Demand Matching via Knapsack Intersection LP and Contention Resolution
- A Fully Polynomial Approximation Algorithm for the Sherrington-Kirkpatrick Model
- A scenario-cluster-based and enhanced progressive hedging algorithm for the two-stage stochastic quadratic knapsack problem
- The Colored Jones Function does not determine any colored Links--Gould polynomial
- The colored Jones polynomial does not determine the Links--Gould polynomial
BibTeX
@misc{ciccarelli2026tight,
title = {{A tight 1/3-approximation algorithm and fully polynomial-time approximation schemes for the Colored Knapsack Problem}},
author = {Fabio Ciccarelli and Fabio Furini},
howpublished = {arXiv},
year = {2026},
month = sep,
doi = {10.48550/arxiv.2609.17713},
eprint = {2609.17713},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2609.17713},
note = {CC BY 4.0},
}
RIS
TY - UNPB
TI - A tight 1/3-approximation algorithm and fully polynomial-time approximation schemes for the Colored Knapsack Problem
AU - Fabio Ciccarelli
AU - Fabio Furini
PY - 2026
DA - 2026/09/15
PB - arXiv
DO - 10.48550/arxiv.2609.17713
UR - https://arxiv.org/abs/2609.17713
AB - The Colored Knapsack Problem (ColKP) generalizes the classical Knapsack Problem by partitioning the items into color classes and requiring the selected items to admit an ordering in which consecutive items have different colors. The problem is weakly 𝒩𝒫-hard and admits two pseudo-polynomial dynamic programming (DP) algorithms proposed in the literature. These two DP algorithms have worst-case running times O(b n^4) and O(b^2 n^3), respectively, where b is the knapsack capacity and n is the number of items. We develop the first approximation algorithm for the ColKP. By rounding an optimal basic solution of the linear programming relaxation of its natural integer programming formulation and repairing color feasibility, we obtain a linear-time approximation-algorithm whose worst-case performance ratio is 1/3. We then reformulate both DP algorithms so that profit, rather than knapsack capacity, indexes their pseudo-polynomial dimension, and combine them with profit scaling to obtain two fully polynomial-time approximation schemes (FPTASs). The first FPTAS runs in O(n^5/ε) time for nonnegative profits and in O(n^6/ε) time for arbitrary integer profits. The second FPTAS runs instead in O(n^5/ε^2) and O(n^7/ε^2) time, respectively. The approximation guarantee, along with new structural insights, provides the bounds needed to control the scaled profit range and establish these running times.
ER -