English

On Problems Related to Unbounded SubsetSum: A Unified Combinatorial Approach

Data Structures and Algorithms 2022-03-01 v1

Abstract

Unbounded SubsetSum is a classical textbook problem: given integers w1,w2,,wn[1,u], c,uw_1,w_2,\cdots,w_n\in [1,u],~c,u, we need to find if there exists m1,m2,,mnNm_1,m_2,\cdots,m_n\in \mathbb{N} satisfying c=i=1nwimic=\sum_{i=1}^n w_im_i. In its all-target version, tZ+t\in \mathbb{Z}_+ is given and answer for all integers c[0,t]c\in[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)\tilde{O}(u+t) and O~(u)\tilde{O}(u) time deterministically. We also show if we can compute (min,+)(\min,+) convolution for nn-length arrays in T(n)T(n) time, then All-Target Unbounded Knapsack can be solved in O~(T(u)+t)\tilde{O}(T(u)+t) time, thus establishing sub-quadratic equivalence between All-Target Unbounded Knapsack and (min,+)(\min,+) convolution.

Keywords

Cite

@article{arxiv.2202.13484,
  title  = {On Problems Related to Unbounded SubsetSum: A Unified Combinatorial Approach},
  author = {Mingyang Deng and Xiao Mao and Ziqian Zhong},
  journal= {arXiv preprint arXiv:2202.13484},
  year   = {2022}
}
R2 v1 2026-06-24T09:55:37.916Z