English

A Simple Near-Linear Pseudopolynomial Time Randomized Algorithm for Subset Sum

Data Structures and Algorithms 2020-01-03 v3

Abstract

Given a multiset SS of nn positive integers and a target integer tt, the Subset Sum problem asks to determine whether there exists a subset of SS that sums up to tt. The current best deterministic algorithm, by Koiliaris and Xu [SODA'17], runs in O~(nt)\tilde O(\sqrt{n}t) time, where O~\tilde O hides poly-logarithm factors. Bringmann [SODA'17] later gave a randomized O~(n+t)\tilde O(n + t) time algorithm using two-stage color-coding. The O~(n+t)\tilde O(n+t) running time is believed to be near-optimal. In this paper, we present a simple and elegant randomized algorithm for Subset Sum in O~(n+t)\tilde O(n + t) time. Our new algorithm actually solves its counting version modulo prime p>tp>t, by manipulating generating functions using FFT.

Keywords

Cite

@article{arxiv.1807.11597,
  title  = {A Simple Near-Linear Pseudopolynomial Time Randomized Algorithm for Subset Sum},
  author = {Ce Jin and Hongxun Wu},
  journal= {arXiv preprint arXiv:1807.11597},
  year   = {2020}
}

Comments

To appear in SOSA 2019 (fixed some typos)

R2 v1 2026-06-23T03:19:46.997Z