Fast Algorithms for Knapsack via Convolution and Prediction

被引:16
作者
Bateni, MohammadHossein [1 ]
Hajiaghayi, MohammadTaghi [2 ]
Seddighin, Saeed [2 ]
Stein, Cliff [3 ]
机构
[1] Google Inc, New York, NY 10011 USA
[2] Univ Maryland, College Pk, MD 20742 USA
[3] Columbia Univ, New York, NY USA
来源
STOC'18: PROCEEDINGS OF THE 50TH ANNUAL ACM SIGACT SYMPOSIUM ON THEORY OF COMPUTING | 2018年
关键词
knapsack; convolution; prediction; PAIRS SHORTEST PATHS;
D O I
10.1145/3188745.3188876
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
The knapsack problem is a fundamental problem in combinatorial optimization. It has been studied extensively from theoretical as well as practical perspectives as it is one of the most well-known NP-hard problems. The goal is to pack a knapsack of size t with the maximum value from a collection of n items with given sizes and values. Recent evidence suggests that a classic O(nt) dynamic programming solution for the knapsack problem might be the fastest in the worst case. In fact, solving the knapsack problem was shown to be computationally equivalent to the (min, +) convolution problem, which is thought to be facing a quadratic-time barrier. This hardness is in contrast to the more famous (+, .) convolution (generally known as polynomial multiplication), that has an O(n log n)-time solution via Fast Fourier Transform. Our main results are algorithms with near-linear running times (in terms of the size of the knapsack and the number of items) for the knapsack problem, if either the values or sizes of items are small integers. More specifically, if item sizes are integers bounded by s(max), the running time of our algorithm is (O) over tilde((n + t)s(max)). If the item values are integers bounded by v(max), our algorithm runs in time (O) over tilde (n + tv(max)). Best previously known running times were O(nt), O(n(2)s(max)), O(n(2)v(max)) and O(ns(max)v(max)). At the core of our algorithms lies the prediction technique: Roughly speaking, this new technique enables us to compute the convolution of two vectors in time (O) over tilde (ne(max)) when the solution satisfies a monotonic structure and an approximation of the solution within an additive error of e(max) is available. Our results also improve the best known solutions for knapsack whose running times do not depend on t. In the limited size setting, when the items have multiplicities, the fastest algorithms for knapsack run in time O(n(2)s(max)(2)) and O(n(3)s(max)(2)) for the cases of infinite and given multiplicities, respectively. Our results improve both running times by a factor of (Omega) over tilde (n max{1, n/s(max)}).
引用
收藏
页码:1269 / 1282
页数:14
相关论文
共 20 条
[1]  
Axiotis Kyriakos, 2018, ARXIV180206440
[2]  
Backurs A, 2017, PROCEEDINGS OF THE TWENTY-EIGHTH ANNUAL ACM-SIAM SYMPOSIUM ON DISCRETE ALGORITHMS, P2215
[3]   DYNAMIC PROGRAMMING [J].
BELLMAN, R .
SCIENCE, 1966, 153 (3731) :34-&
[4]   Necklaces, Convolutions, and X plus Y [J].
Bremner, David ;
Chan, Timothy M. ;
Demaine, Erik D. ;
Erickson, Jeff ;
Hurtado, Ferran ;
Iacono, John ;
Langerman, Stefan ;
Patrascu, Mihai ;
Taslakian, Perouz .
ALGORITHMICA, 2014, 69 (02) :294-314
[5]  
Bringmann K, 2017, PROCEEDINGS OF THE TWENTY-EIGHTH ANNUAL ACM-SIAM SYMPOSIUM ON DISCRETE ALGORITHMS, P1073
[6]   Clustered Integer 3SUM via Additive Combinatorics [J].
Chan, Timothy M. ;
Lewenstein, Moshe .
STOC'15: PROCEEDINGS OF THE 2015 ACM SYMPOSIUM ON THEORY OF COMPUTING, 2015, :31-40
[7]   HARD KNAPSACK-PROBLEMS [J].
CHVATAL, V .
OPERATIONS RESEARCH, 1980, 28 (06) :1402-1411
[8]  
Cormen T. H., 2001, Introduction to Algorithms, V2nd
[9]  
Cygan Marek, 2017, ICALP
[10]  
Garey M. R., 1979, Computers and intractability. A guide to the theory of NP-completeness