Fast Low-Space Algorithms for Subset Sum

11/07/2020
by   Ce Jin, et al.
0

We consider the canonical Subset Sum problem: given a list of positive integers a_1,…,a_n and a target integer t with t > a_i for all i, determine if there is an S ⊆ [n] such that ∑_i ∈ S a_i = t. The well-known pseudopolynomial-time dynamic programming algorithm [Bellman, 1957] solves Subset Sum in O(nt) time, while requiring Ω(t) space. In this paper we present algorithms for Subset Sum with Õ(nt) running time and much lower space requirements than Bellman's algorithm, as well as that of prior work. We show that Subset Sum can be solved in Õ(nt) time and O(log(nt)) space with access to O(log n loglog n+log t) random bits. This significantly improves upon the Õ(n t^1+ε)-time, Õ(nlog t)-space algorithm of Bringmann (SODA 2017). We also give an Õ(n^1+εt)-time, O(log(nt))-space randomized algorithm, improving upon previous (nt)^O(1)-time O(log(nt))-space algorithms by Elberfeld, Jakoby, and Tantau (FOCS 2010), and Kane (2010). In addition, we also give a polylog(nt)-space, Õ(n^2 t)-time deterministic algorithm. We also study time-space trade-offs for Subset Sum. For parameter 1≤ k≤min{n,t}, we present a randomized algorithm running in Õ((n+t)· k) time and O((t/k) polylog (nt)) space. As an application of our results, we give an Õ(min{n^2/ε, n/ε^2})-time and polylog(nt)-space algorithm for "weak" ε-approximations of Subset Sum.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/21/2021

Efficient reductions and algorithms for variants of Subset Sum

Given (a_1, …, a_n, t) ∈ℤ_≥ 0^n + 1, the Subset Sum problem (𝖲𝖲𝖴𝖬) is to...
research
07/22/2018

Subset Sum Made Simple

Subset Sum is a classical optimization problem taught to undergraduates ...
research
07/10/2018

Improved Space-Time Tradeoffs for kSUM

In the kSUM problem we are given an array of numbers a_1,a_2,...,a_n and...
research
08/29/2023

Randomized Quasi Polynomial Algorithm for Subset-Sum Problems with At Most One Solution

In this paper we study the Subset Sum Problem (SSP). Assuming the SSP ha...
research
11/02/2021

Truly Low-Space Element Distinctness and Subset Sum via Pseudorandom Hash Functions

We consider low-space algorithms for the classic Element Distinctness pr...
research
10/12/2022

A nearly optimal randomized algorithm for explorable heap selection

Explorable heap selection is the problem of selecting the nth smallest v...
research
10/16/2020

Improving Schroeppel and Shamir's Algorithm for Subset Sum via Orthogonal Vectors

We present an 𝒪^⋆(2^0.5n) time and 𝒪^⋆(2^0.249999n) space randomized alg...

Please sign up or login with your details

Forgot password? Click here to reset