Knapsack with variable weights satisfying linear constraints

Kameng Nip, Zhenbo Wang, Zizhuo Wang

Research output: Contribution to journalArticlepeer-review

4 Scopus citations


We introduce a variant of the knapsack problem, in which the weights of items are also variables but must satisfy a system of linear constraints, and the capacity of knapsack is given and known. We discuss two models: (1) the value of each item is given; (2) the value-to-weight ratio of each item is given. The goal is to determine the weight of each item, and to find a subset of items such that the total weight is no more than the capacity and the total value is maximized. We provide several practical application scenarios that motivate our study, and then investigate the computational complexity and corresponding algorithms. In particular, we show that if the number of constraints is a fixed constant, then both problems can be solved in polynomial time. If the number of constraints is an input, then we show that the first problem is NP-Hard and cannot be approximated within any constant factor unless P = NP , while the second problem is NP-Hard but admits a polynomial time approximation scheme. We further propose approximation algorithms for both problems, and extend the results to multiple knapsack cases with a fixed number of knapsacks and identical capacities.

Original languageEnglish (US)
Pages (from-to)713-725
Number of pages13
JournalJournal of Global Optimization
Issue number3
StatePublished - Nov 1 2017


  • Approximation algorithm
  • Computational complexity
  • Knapsack
  • Linear programming

Fingerprint Dive into the research topics of 'Knapsack with variable weights satisfying linear constraints'. Together they form a unique fingerprint.

Cite this