Classical and quantum dynamic programming for Subset-Sum and variants

by   Jonathan Allcock, et al.

Subset-Sum is an NP-complete problem where one must decide if a multiset of n integers contains a subset whose elements sum to a target value m. The best known classical and quantum algorithms run in time Õ(2^n/2) and Õ(2^n/3), respectively, based on the well-known meet-in-the-middle technique. Here we introduce a novel dynamic programming data structure with applications to Subset-Sum and a number of variants, including Equal-Sums (where one seeks two disjoint subsets with the same sum), 2-Subset-Sum (a relaxed version of Subset-Sum where each item in the input set can be used twice in the summation), and Shifted-Sums, a generalization of both of these variants, where one seeks two disjoint subsets whose sums differ by some specified value. Given any modulus p, our data structure can be constructed in time O(np), after which queries can be made in time O(n) to the lists of subsets summing to a same value modulo p. We use this data structure to give new Õ(2^n/2) and Õ(2^n/3) classical and quantum algorithms for Subset-Sum, not based on the meet-in-the-middle method. We then use the data structure in combination with variable time amplitude amplification and a quantum pair finding algorithm, extending quantum element distinctness and claw finding algorithms to the multiple solutions case, to give an O(2^0.504n) quantum algorithm for Shifted-Sums, an improvement on the best known O(2^0.773n) classical running time. We also study Pigeonhole Equal-Sums and Pigeonhole Modular Equal-Sums, where the existence of a solution is guaranteed by the pigeonhole principle. For the former problem we give classical and quantum algorithms with running time Õ(2^n/2) and Õ(2^2n/5), respectively. For the more general modular problem we give a classical algorithm which also runs in time Õ(2^n/2).


page 1

page 2

page 3

page 4


Equal-Subset-Sum Faster Than the Meet-in-the-Middle

In the Equal-Subset-Sum problem, we are given a set S of n integers and ...

Average-Case Subset Balancing Problems

Given a set of n input integers, the Equal Subset Sum problem asks us to...

Improved quantum algorithm for the random subset sum problem

We propose a quantum algorithm for solving random subset sum instances w...

Treedy: A Heuristic for Counting and Sampling Subsets

Consider a collection of weighted subsets of a ground set N. Given a que...

Robust quantum minimum finding with an application to hypothesis selection

We consider the problem of finding the minimum element in a list of leng...

Combinatorial Structure of the Deterministic Seriation Method with Multiple Subset Solutions

Seriation methods order a set of descriptions given some criterion (e.g....

Modular Subset Sum, Dynamic Strings, and Zero-Sum Sets

The modular subset sum problem consists of deciding, given a modulus m, ...

Please sign up or login with your details

Forgot password? Click here to reset