Abstract: Unbounded SubsetSum is a classical textbook problem: given integers w1,w2, …, wn∈[1,u], c,u, we need to find if there exists m1,m2, …, mn ∈ ℕ satisfying c =Σni=1 wimi. In its all-target version, t ∈ ℤ+ is given and the answers for all integers c ∈ [0, t] are required. In this paper, we study three generalizations of this simple problem: All-Target Unbounded Knapsack, All-Target CoinChange and Residue Table. With new combinatorial insights into the structures of solutions, we present a novel two-phase approach. As a result, we show that: • All-Target CoinChange can be solved in Õ(u +t) time deterministically, improving the previous Õ(t4/3) time algorithm [Chan and He, ESA 2020]. • Residue Table can be solved in Õ(u) time deterministically, improving the previous Õ(u3/2) time algorithm [Klein, 2021]. •All-Target Unbounded Knapsack can be solved in Õ(T(u) + t) time, where is the running time for (min, +) convolution for length-n arrays, improving the previous O(u2 log u + t) time algorithm [Chan and He, ESA 2020].
0 Replies
Loading