A faster FPTAS for #knapsack

Paweł Gawrychowski, Liran Markin, Oren Weimann

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

Given a set W = (w1, . . ., wn) of non-negative integer weights and an integer C, the #Knapsack problem asks to count the number of distinct subsets of W whose total weight is at most C. In the more general integer version of the problem, the subsets are multisets. That is, we are also given a set (u1, . . ., un) and we are allowed to take up to ui items of weight wi. We present a deterministic FPTAS for #Knapsack running in O(n2.5ε 1.5 log(nε 1) log(nε)) time. The previous best deterministic algorithm [FOCS 2011] runs in O(n3ε 1 log(nε 1)) time (see also [ESA 2014] for a logarithmic factor improvement). The previous best randomized algorithm [STOC 2003] runs in O(n2.5log(nε 1) + ε 2n2) time. Therefore, for the case of constant ε, we close the gap between the O(n2.5) randomized algorithm and the O(n3) deterministic algorithm. For the integer version with U = maxi (ui), we present a deterministic FPTAS running in O(n2.5ε 1.5 log(nε 1 log U) log(nε) log2 U) time. The previous best deterministic algorithm [TCS 2016] runs in O(n3ε 1 log(nε 1 log U) log2 U) time.

Original languageAmerican English
Title of host publication45th International Colloquium on Automata, Languages, and Programming, ICALP 2018
EditorsChristos Kaklamanis, Daniel Marx, Ioannis Chatzigiannakis, Donald Sannella
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
ISBN (Electronic)9783959770767
DOIs
StatePublished - 1 Jul 2018
Event45th International Colloquium on Automata, Languages, and Programming, ICALP 2018 - Prague, Czech Republic
Duration: 9 Jul 201813 Jul 2018

Publication series

NameLeibniz International Proceedings in Informatics, LIPIcs
Volume107

Conference

Conference45th International Colloquium on Automata, Languages, and Programming, ICALP 2018
Country/TerritoryCzech Republic
CityPrague
Period9/07/1813/07/18

Keywords

  • Approximate counting
  • Functions
  • K-approximating sets
  • Knapsack

All Science Journal Classification (ASJC) codes

  • Software

Cite this