On Problems Related to Unbounded SubsetSum: A Unified Combinatorial Approach

Abstract

Unbounded SubsetSum is a classical textbook problem: given integers w1,w2,·s,wn∈ [1,u],~c,u, we need to find if there exists m1,m2,·s,mn∈ N satisfying c=Σi=1n wimi. In its all-target version, t∈ Z+ is given and answer for all integers c∈[0,t] is required. In this paper, we study three generalizations of this simple problem: All-Target Unbounded Knapsack, All-Target CoinChange and Residue Table. By new combinatorial insights into the structures of solutions, we present a novel two-phase approach for such problems. As a result, we present the first near-linear algorithms for CoinChange and Residue Table, which runs in O(u+t) and O(u) time deterministically. We also show if we can compute (,+) convolution for n-length arrays in T(n) time, then All-Target Unbounded Knapsack can be solved in O(T(u)+t) time, thus establishing sub-quadratic equivalence between All-Target Unbounded Knapsack and (,+) convolution.

0

Discussion (0)

Sign in to join the discussion.

Loading comments…