Average Sensitivity of the Knapsack Problem

Authors Soh Kumabe, Yuichi Yoshida

Thumbnail PDF


  • Filesize: 0.71 MB
  • 14 pages

Document Identifiers

Author Details

Soh Kumabe
  • The University of Tokyo, Japan
Yuichi Yoshida
  • National Institute of Informatics, Tokyo, Japan

Cite AsGet BibTex

Soh Kumabe and Yuichi Yoshida. Average Sensitivity of the Knapsack Problem. In 30th Annual European Symposium on Algorithms (ESA 2022). Leibniz International Proceedings in Informatics (LIPIcs), Volume 244, pp. 75:1-75:14, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2022)


In resource allocation, we often require that the output allocation of an algorithm is stable against input perturbation because frequent reallocation is costly and untrustworthy. Varma and Yoshida (SODA'21) formalized this requirement for algorithms as the notion of average sensitivity. Here, the average sensitivity of an algorithm on an input instance is, roughly speaking, the average size of the symmetric difference of the output for the instance and that for the instance with one item deleted, where the average is taken over the deleted item. In this work, we consider the average sensitivity of the knapsack problem, a representative example of a resource allocation problem. We first show a (1-ε)-approximation algorithm for the knapsack problem with average sensitivity O(ε^{-1}log ε^{-1}). Then, we complement this result by showing that any (1-ε)-approximation algorithm has average sensitivity Ω(ε^{-1}). As an application of our algorithm, we consider the incremental knapsack problem in the random-order setting, where the goal is to maintain a good solution while items arrive one by one in a random order. Specifically, we show that for any ε > 0, there exists a (1-ε)-approximation algorithm with amortized recourse O(ε^{-1}log ε^{-1}) and amortized update time O(log n+f_ε), where n is the total number of items and f_ε > 0 is a value depending on ε.

Subject Classification

ACM Subject Classification
  • Theory of computation → Approximation algorithms analysis
  • Average Sensitivity
  • Knapsack Problem


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


  1. Mikhail Atallah and Marina Blanton. Algorithms and theory of computation handbook. CRC press, 2009. Google Scholar
  2. Moshe Babaioff, Nicole Immorlica, David Kempe, and Robert Kleinberg. A knapsack secretary problem with applications. In Approximation, randomization, and combinatorial optimization. Algorithms and techniques, pages 16-28. Springer, 2007. Google Scholar
  3. Martin Böhm, Franziska Eberle, Nicole Megow, Bertrand Simon, Lukas Nölke, Jens Schlöter, and Andreas Wiese. Fully dynamic algorithms for knapsack problems with polylogarithmic update time. In IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, 2021. Google Scholar
  4. Niv Buchbinder and Joseph Naor. Online primal-dual algorithms for covering and packing. Mathematics of Operations Research, 34(2):270-286, 2009. Google Scholar
  5. Timothy Chan. Approximation schemes for 0-1 knapsack. In Symposium on Simplicity in Algorithms, 2018. Google Scholar
  6. George Dantzig. Discrete variable extremum problems. Operations Research, 5:266-277, 1957. Google Scholar
  7. Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. Calibrating noise to sensitivity in private data analysis. In Theory of Cryptography Conference, pages 265-284. Springer, 2006. Google Scholar
  8. Björn Feldkord, Matthias Feldotto, Anupam Gupta, Guru Guruganesh, Amit Kumar, Sören Riechers, and David Wajc. Fully-dynamic bin packing with little repacking. In International Colloquium on Automata, Languages, and Programming, 2018. Google Scholar
  9. Anupam Gupta, Ravishankar Krishnaswamy, Amit Kumar, and Debmalya Panigrahi. Online and dynamic algorithms for set cover. In ACM SIGACT Symposium on Theory of Computing, pages 537-550, 2017. Google Scholar
  10. Anupam Gupta and Roie Levin. Fully-dynamic submodular cover with bounded recourse. IEEE Symposium on Foundations of Computer Science, pages 1147-1157, 2020. Google Scholar
  11. Manoj Gupta and Richard Peng. Fully dynamic (1 + ε)-approximate matchings. In IEEE Symposium on Foundations of Computer Science, pages 548-557, 2013. Google Scholar
  12. Xin Han, Yasushi Kawase, Kazuhisa Makino, and Haruki Yokomaku. Online knapsack problems with a resource buffer. In International Symposium on Algorithms and Computation, 2019. Google Scholar
  13. Oscar Ibarra and Chul Kim. Fast approximation algorithms for the knapsack and sum of subset problems. Journal of the ACM, 22(4):463-468, 1975. Google Scholar
  14. Kazuo Iwama and Shiro Taketomi. Removable online knapsack problems. In International Colloquium on Automata, Languages, and Programming, pages 293-305, 2002. Google Scholar
  15. Ce Jin. An improved fptas for 0-1 knapsack. In International Colloquium on Automata, Languages, and Programming, 2019. Google Scholar
  16. Richard Karp. Reducibility among combinatorial problems. In Complexity of Computer Computations, pages 85-103. Springer, 1972. Google Scholar
  17. Hans Kellerer and Ulrich Pferschy. A new fully polynomial time approximation scheme for the knapsack problem. Journal of Combinatorial Optimization, 3(1):59-71, 1999. Google Scholar
  18. Hans Kellerer and Ulrich Pferschy. Improved dynamic programming in connection with an fptas for the knapsack problem. Journal of Combinatorial Optimization, 8(1):5-11, 2004. Google Scholar
  19. Hans Kellerer, Ulrich Pferschy, and David Pisinger. Knapsack problems. Springer, 2004. Google Scholar
  20. Soh Kumabe and Yuichi Yoshida. Average sensitivity of dynamic programming. In ACM-SIAM Symposium on Discrete Algorithms, pages 1925-1961, 2022. Google Scholar
  21. Eugene Lawler. Fast approximation algorithms for knapsack problems. Mathematics of Operations Research, 4(4):339-356, 1979. Google Scholar
  22. Alberto Marchetti-Spaccamela and Carlo Vercellis. Stochastic on-line knapsack problems. Mathematical Programming, 68(1):73-104, 1995. Google Scholar
  23. Frank McSherry and Kunal Talwar. Mechanism design via differential privacy. In IEEE Symposium on Foundations of Computer Science, pages 94-103, 2007. Google Scholar
  24. Shogo Murai and Yuichi Yoshida. Sensitivity analysis of centralities on unweighted networks. In The World Wide Web Conference, pages 1332-1342, 2019. Google Scholar
  25. Krzysztof Onak and Ronitt Rubinfeld. Maintaining a large matching and a small vertex cover. In ACM Symposium on Theory of Computing, pages 457-464, 2010. Google Scholar
  26. Pan Peng and Yuichi Yoshida. Average sensitivity of spectral clustering. In ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 1132-1140. ACM, 2020. Google Scholar
  27. Donguk Rhee. Faster fully polynomial approximation schemes for knapsack problems. PhD thesis, Massachusetts Institute of Technology, 2015. Google Scholar
  28. Yossi Shiloach and Shimon Even. An on-line edge-deletion problem. Journal of the ACM, 28(1):1-4, 1981. Google Scholar
  29. Jan van den Brand and Danupon Nanongkai. Dynamic approximate shortest paths and beyond: Subquadratic and worst-case update time. In IEEE Symposium on Foundations of Computer Science, pages 436-455, 2019. Google Scholar
  30. Nithin Varma and Yuichi Yoshida. Average sensitivity of graph algorithms. In ACM-SIAM Symposium on Discrete Algorithms, pages 684-703, 2021. Google Scholar
  31. Yuichi Yoshida and Samson Zhou. Sensitivity analysis of the maximum matching problem. In Innovations in Theoretical Computer Science, pages 58:1-58:20, 2021. Google Scholar
  32. Yunhong Zhou, Deeparnab Chakrabarty, and Rajan Lukose. Budget constrained bidding in keyword auctions and online knapsack problems. In International Workshop on Internet and Network Economics, pages 566-576. Springer, 2008. Google Scholar