Faster Space-Efficient Algorithms for Subset Sum, k-Sum and Related Problems

We present space efficient Monte Carlo algorithms that solve Subset Sum and Knapsack instances with items using time and polynomial space, where the notation suppresses factors polynomial in the input size. Both algorithms assume random read-only access to random bits. Modulo this mild assumption, this resolves a long-standing open problem in exact algorithms for NP-hard problems. These results can be extended to solve Binary Linear Programming on variables with few constraints in a similar running time. We also show that for any constant , random instances of -Sum can be solved using time and space, without the assumption of random access to random bits. Underlying these results is an algorithm that determines whether two given lists of length with integers bounded by a polynomial in share a common value. Assuming random read-only access to random bits, we show that this problem can be solved using space significantly faster than the trivial time algorithm if no value occurs too often in the same list.
View on arXiv