Efficient reductions and algorithms for variants of Subset Sum

12/21/2021
βˆ™
by   Pranjal Dutta, et al.
βˆ™
0
βˆ™

Given (a_1, …, a_n, t) βˆˆβ„€_β‰₯ 0^n + 1, the Subset Sum problem (𝖲𝖲𝖴𝖬) is to decide whether there exists S βŠ† [n] such that βˆ‘_i ∈ S a_i = t. There is a close variant of the 𝖲𝖲𝖴𝖬, called π–²π—Žπ–»π—Œπ–Ύπ—Β π–―π—‹π—ˆπ–½π—Žπ–Όπ—. Given positive integers a_1, ..., a_n and a target integer t, the π–²π—Žπ–»π—Œπ–Ύπ—Β π–―π—‹π—ˆπ–½π—Žπ–Όπ— problem asks to determine whether there exists a subset S βŠ† [n] such that ∏_i ∈ S a_i=t. There is a pseudopolynomial time dynamic programming algorithm, due to Bellman (1957) which solves the 𝖲𝖲𝖴𝖬 and π–²π—Žπ–»π—Œπ–Ύπ—Β π–―π—‹π—ˆπ–½π—Žπ–Όπ— in O(nt) time and O(t) space. In the first part, we present search algorithms for variants of the Subset Sum problem. Our algorithms are parameterized by k, which is a given upper bound on the number of realisable sets (i.e.,Β number of solutions, summing exactly t). We show that 𝖲𝖲𝖴𝖬 with a unique solution is already NP-hard, under randomized reduction. This makes the regime of parametrized algorithms, in terms of k, very interesting. Subsequently, we present an Γ•(kΒ· (n+t)) time deterministic algorithm, which finds the hamming weight of all the realisable sets for a subset sum instance. We also give a poly(knt)-time and O(log(knt))-space deterministic algorithm that finds all the realisable sets for a subset sum instance. In the latter part, we present a simple and elegant randomized Γ•(n + t) time algorithm for π–²π—Žπ–»π—Œπ–Ύπ—Β π–―π—‹π—ˆπ–½π—Žπ–Όπ—. Moreover, we also present a poly(nt) time and O(log^2 (nt)) space deterministic algorithm for the same. We study these problems in the unbounded setting as well. Our algorithms use multivariate FFT, power series and number-theoretic techniques, introduced by Jin and Wu (SOSA'19) and Kane (2010).

READ FULL TEXT

page 1

page 2

page 3

page 4

research
βˆ™ 11/07/2020

Fast Low-Space Algorithms for Subset Sum

We consider the canonical Subset Sum problem: given a list of positive i...
research
βˆ™ 07/30/2018

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

Given a multiset of n positive integers and a target integer t, the Subs...
research
βˆ™ 09/11/2022

Dynamic Subset Sum with Truly Sublinear Processing Time

Subset sum is a very old and fundamental problem in theoretical computer...
research
βˆ™ 01/05/2020

All non-trivial variants of 3-LDT are equivalent

The popular 3-SUM conjecture states that there is no strongly subquadrat...
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
βˆ™ 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...
research
βˆ™ 07/07/2018

The Universal and Practical Programming Code for Subset Sum Problem

Given a multiset S of n numbers and a target number t, the subset sum pr...

Please sign up or login with your details

Forgot password? Click here to reset