A Near-Linear Pseudopolynomial Time Algorithm for Subset Sum
Abstract
Given a set of positive integers and a target value , the Subset Sum problem asks whether any subset of sums to . A textbook pseudopolynomial time algorithm by Bellman from 1957 solves Subset Sum in time . This has been improved to by Pisinger [J. Algorithms'99] and recently to by Koiliaris and Xu [SODA'17]. Here we present a simple randomized algorithm running in time . This improves upon a classic algorithm and is likely to be near-optimal, since it matches conditional lower bounds from Set Cover and k-Clique. We then use our new algorithm and additional tricks to improve the best known polynomial space solution from time and space to time and space , assuming the Extended Riemann Hypothesis. Unconditionally, we obtain time and space for any constant .
Cite
@article{arxiv.1610.04712,
title = {A Near-Linear Pseudopolynomial Time Algorithm for Subset Sum},
author = {Karl Bringmann},
journal= {arXiv preprint arXiv:1610.04712},
year = {2017}
}
Comments
accepted at SODA'17, 18 pages