English

Subset Sum in Near-Linear Pseudopolynomial Time and Polynomial Space

Data Structures and Algorithms 2025-10-28 v3 Computational Complexity

Abstract

Given a multiset A={a1,,an}A = \{a_1, \dots, a_n\} of positive integers and a target integer tt, the Subset Sum problem asks if there is a subset of AA that sums to tt. Bellman's [1957] classical dynamic programming algorithm runs in O(nt)O(nt) time and O(t)O(t) space. Since then, much work has been done to reduce both the time and space usage. Notably, Bringmann [SODA 2017] uses a two-step color-coding technique to obtain a randomized algorithm that runs in O~(n+t)\tilde{O}(n+t) time and O~(t)\tilde{O}(t) space. Jin, Vyas and Williams [SODA 2021] build upon the algorithm given by Bringmann, using a clever algebraic trick first seen in Kane's Logspace algorithm, to obtain an O~(nt)\tilde{O}(nt) time and O~(log(nt))\tilde{O}(\log(nt)) space randomized algorithm. A SETH-based lower-bound established by Abboud et al. [SODA 2019] shows that Bringmann's algorithm is likely to have near-optimal time complexity. We build on the techniques used by Jin et al. to obtain a randomized algorithm running in O~(n+t)\tilde{O}(n+t) time and O~(n2+nlog2t)\tilde{O}(n^2 + n \log^2 t) space, resulting in an algorithm with near-optimal runtime that also runs in polynomial space. We use a multipoint evaluation-based approach to speed up a bottleneck step in their algorithm. We also provide a simple polynomial space deterministic algorithm that runs in O~(n2t)\tilde{O}(n^2t) time and O~(nlog2t)\tilde{O}(n \log^2 t) space.

Keywords

Cite

@article{arxiv.2508.04726,
  title  = {Subset Sum in Near-Linear Pseudopolynomial Time and Polynomial Space},
  author = {Thejas Radhika Sajith},
  journal= {arXiv preprint arXiv:2508.04726},
  year   = {2025}
}

Comments

Error in the randomized algorithm; specifically, in Claim 3.4, where FFT is used at the leaf nodes, it is assumed that the polynomials have degree at most n (or that each polynomial can be converted to another polynomial with degree n, in \tilde{O}(n) time.)

R2 v1 2026-07-01T04:37:53.193Z