Multistage Knapsack

Authors Evripidis Bampis, Bruno Escoffier, Alexandre Teiller

Thumbnail PDF


  • Filesize: 0.53 MB
  • 14 pages

Document Identifiers

Author Details

Evripidis Bampis
  • Sorbonne Université, CNRS, LIP6, France
Bruno Escoffier
  • Sorbonne Université, CNRS, LIP6, France
Alexandre Teiller
  • Sorbonne Université, CNRS, LIP6, France


This research benefited from the support of FMJH program PGMO and from the support of EDF-Thalès-Orange.

Cite AsGet BibTex

Evripidis Bampis, Bruno Escoffier, and Alexandre Teiller. Multistage Knapsack. In 44th International Symposium on Mathematical Foundations of Computer Science (MFCS 2019). Leibniz International Proceedings in Informatics (LIPIcs), Volume 138, pp. 22:1-22:14, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2019)


Many systems have to be maintained while the underlying constraints, costs and/or profits change over time. Although the state of a system may evolve during time, a non-negligible transition cost is incured for transitioning from one state to another. In order to model such situations, Gupta et al. (ICALP 2014) and Eisenstat et al. (ICALP 2014) introduced a multistage model where the input is a sequence of instances (one for each time step), and the goal is to find a sequence of solutions (one for each time step) that simultaneously (i) have good quality on the time steps and (ii) as stable as possible. We focus on the multistage version of the Knapsack problem where we are given a time horizon t=1,2,...,T, and a sequence of knapsack instances I_1,I_2,...,I_T, one for each time step, defined on a set of n objects. In every time step t we have to choose a feasible knapsack S_t of I_t, which gives a knapsack profit. To measure the stability/similarity of two consecutive solutions S_t and S_{t+1}, we identify the objects for which the decision, to be picked or not, remains the same in S_t and S_{t+1}, giving a transition profit. We are asked to produce a sequence of solutions S_1,S_2,...,S_T so that the total knapsack profit plus the overall transition profit is maximized. We propose a PTAS for the Multistage Knapsack problem. This is the first approximation scheme for a combinatorial optimization problem in the considered multistage setting, and its existence contrasts with the inapproximability results for other combinatorial optimization problems that are even polynomial-time solvable in the static case (e.g.multistage Spanning Tree, or multistage Bipartite Perfect Matching). Then, we prove that there is no FPTAS for the problem even in the case where T=2, unless P=NP. Furthermore, we give a pseudopolynomial time algorithm for the case where the number of steps is bounded by a fixed constant and we show that otherwise the problem remains NP-hard even in the case where all the weights, profits and capacities are 0 or 1.

Subject Classification

ACM Subject Classification
  • Theory of computation → Approximation algorithms analysis
  • Knapsack
  • Approximation Algorithms
  • Multistage Optimization


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Susanne Albers. On Energy Conservation in Data Centers. In Christian Scheideler and Mohammad Taghi Hajiaghayi, editors, Proceedings of the 29th ACM Symposium on Parallelism in Algorithms and Architectures, SPAA 2017, Washington DC, USA, July 24-26, 2017, pages 35-44. ACM, 2017. URL:
  2. Hyung-Chan An, Ashkan Norouzi-Fard, and Ola Svensson. Dynamic Facility Location via Exponential Clocks. ACM Trans. Algorithms, 13(2):21:1-21:20, 2017. Google Scholar
  3. Barbara M. Anthony and Anupam Gupta. Infrastructure Leasing Problems. In Matteo Fischetti and David P. Williamson, editors, Integer Programming and Combinatorial Optimization, 12th International IPCO Conference, Ithaca, NY, USA, June 25-27, 2007, Proceedings, volume 4513 of Lecture Notes in Computer Science, pages 424-438. Springer, 2007. URL:
  4. Evripidis Bampis, Bruno Escoffier, Michael Lampis, and Vangelis Th. Paschos. Multistage Matchings. In David Eppstein, editor, 16th Scandinavian Symposium and Workshops on Algorithm Theory, SWAT 2018, June 18-20, 2018, Malmö, Sweden, volume 101 of LIPIcs, pages 7:1-7:13. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2018. URL:
  5. Evripidis Bampis, Bruno Escoffier, and Sasa Mladenovic. Fair Resource Allocation Over Time. In Elisabeth André, Sven Koenig, Mehdi Dastani, and Gita Sukthankar, editors, Proceedings of the 17th International Conference on Autonomous Agents and MultiAgent Systems, AAMAS 2018, Stockholm, Sweden, July 10-15, 2018, pages 766-773. International Foundation for Autonomous Agents and Multiagent Systems Richland, SC, USA / ACM, 2018. URL:
  6. Nicolas K. Blanchard and Nicolas Schabanel. Dynamic Sum-Radii Clustering. In Sheung-Hung Poon, Md. Saidur Rahman, and Hsu-Chun Yen, editors, WALCOM: Algorithms and Computation, 11th International Conference and Workshops, WALCOM 2017, Hsinchu, Taiwan, March 29-31, 2017, Proceedings., volume 10167 of Lecture Notes in Computer Science, pages 30-41. Springer, 2017. URL:
  7. Niv Buchbinder, Shahar Chen, and Joseph Naor. Competitive Analysis via Regularization. In Chandra Chekuri, editor, Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2014, Portland, Oregon, USA, January 5-7, 2014, pages 436-444. SIAM, 2014. URL:
  8. Niv Buchbinder, Shahar Chen, Joseph Naor, and Ohad Shamir. Unified Algorithms for Online Learning and Competitive Analysis. Math. Oper. Res., 41(2):612-625, 2016. URL:
  9. Alberto Caprara, Hans Kellerer, Ulrich Pferschy, and David Pisinger. Approximation algorithms for knapsack problems with cardinality constraints. European Journal of Operational Research, 123(2):333-345, 2000. Google Scholar
  10. Edith Cohen, Graham Cormode, Nick G. Duffield, and Carsten Lund. On the Tradeoff between Stability and Fit. ACM Trans. Algorithms, 13(1):7:1-7:24, 2016. URL:
  11. David Eisenstat, Claire Mathieu, and Nicolas Schabanel. Facility Location in Evolving Metrics. In Javier Esparza, Pierre Fraigniaud, Thore Husfeldt, and Elias Koutsoupias, editors, Automata, Languages, and Programming - 41st International Colloquium, ICALP 2014, Copenhagen, Denmark, July 8-11, 2014, Proceedings, Part II, volume 8573 of Lecture Notes in Computer Science, pages 459-470. Springer, 2014. URL:
  12. Alan M Frieze, MRB Clarke, et al. Approximation algorithms for the m-dimensional 0-1 knapsack problem: Worst-case and probabilistic analyses. European Journal of Operational Research, 15:100-109, 1984. Google Scholar
  13. Michael R Garey and David S Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, 1979. Google Scholar
  14. Albert Gu, Anupam Gupta, and Amit Kumar. The Power of Deferral: Maintaining a Constant-Competitive Steiner Tree Online. SIAM J. Comput., 45(1):1-28, 2016. URL:
  15. Anupam Gupta, Kunal Talwar, and Udi Wieder. Changing Bases: Multistage Optimization for Matroids and Matchings. In Javier Esparza, Pierre Fraigniaud, Thore Husfeldt, and Elias Koutsoupias, editors, Automata, Languages, and Programming - 41st International Colloquium, ICALP 2014, Copenhagen, Denmark, July 8-11, 2014, Proceedings, Part I, volume 8572 of Lecture Notes in Computer Science, pages 563-575. Springer, 2014. Google Scholar
  16. Oscar H. Ibarra and Chul E. Kim. Fast Approximation Algorithms for the Knapsack and Sum of Subset Problems. J. ACM, 22(4):463-468, 1975. URL:
  17. Hans Kellerer and Ulrich Pferschy. A New Fully Polynomial Time Approximation Scheme for the Knapsack Problem. J. Comb. Optim., 3(1):59-71, 1999. URL:
  18. Hans Kellerer, Ulrich Pferschy, and David Pisinger. Knapsack Problems. Springer, Berlin, Germany, 2004. Google Scholar
  19. Bernhard Korte and Rainer Schrader. On the existence of fast approximation schemes. In O. Magasarian, R. Meyer, and S. Robinson, editors, Nonlinear Programming 4, pages 415-437. Academic Press, 1981. Google Scholar
  20. Eugene L. Lawler. Fast Approximation Algorithms for Knapsack Problems. Math. Oper. Res., 4(4):339-356, 1979. URL:
  21. Michael J. Magazine and Osman Oguz. A fully polynomial approximation scheme for the 0-1 knapsack problem. European Journal of Operational Research, 8:270-273, 1981. Google Scholar
  22. Nicole Megow, Martin Skutella, José Verschae, and Andreas Wiese. The Power of Recourse for Online MST and TSP. SIAM J. Comput., 45(3):859-880, 2016. URL:
  23. Chandrashekhar Nagarajan and David P Williamson. Offline and online facility leasing. Discrete Optimization, 10(4):361-370, 2013. Google Scholar
  24. Osman Oguz and Michael J. Magazine. A polynomial time approximation algorithm for the multidimensional knapsack problem. Working paper, University of Waterloo, 1980. Google Scholar
  25. Cécile Rottner. Combinatorial Aspects of the Unit Commitment Problem. PhD thesis, Sorbonne Université, 2018. Google Scholar
  26. Baruch Schieber, Hadas Shachnai, Gal Tamir, and Tami Tamir. A Theory and Algorithms for Combinatorial Reoptimization. Algorithmica, 80(2):576-607, 2018. URL:
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail