TY - GEN
T1 - More on change-making and related problems
AU - Chan, Timothy M.
AU - He, Qizheng
N1 - Publisher Copyright:
© Timothy M. Chan and Qizheng He
PY - 2020/8/1
Y1 - 2020/8/1
N2 - Given a set of n integer-valued coin types and a target value t, the well-known change-making problem asks for the minimum number of coins that sum to t, assuming an unlimited number of coins in each type. In the more general all-targets version of the problem, we want the minimum number of coins summing to j, for every j = 0, . . ., t. For example, the textbook dynamic programming algorithms can solve the all-targets problem in O(nt) time. Recently, Chan and He (SOSA’20) described a number of O(t polylog t)-time algorithms for the original (single-target) version of the change-making problem, but not the all-targets version. In this paper, we obtain a number of new results on change-making and related problems: We present a new algorithm for the all-targets change-making problem with running time Õ(t4/3), improving a previous Õ(t3/2)-time algorithm. We present a very simple Õ(u2 + t)-time algorithm for the all-targets change-making problem, where u denotes the maximum coin value. The analysis of the algorithm uses a theorem of Erdős and Graham (1972) on the Frobenius problem. This algorithm can be extended to solve the all-capacities version of the unbounded knapsack problem (for integer item weights bounded by u). For the original (single-target) coin changing problem, we describe a simple modification of one of Chan and He’s algorithms that runs in Õ(u) time (instead of Õ(t)). For the original (single-capacity) unbounded knapsack problem, we describe a simple algorithm that runs in Õ(nu) time, improving previous near-u2-time algorithms. We also observe how one of our ideas implies a new result on the minimum word break problem, an optimization version of a string problem studied by Bringmann et al. (FOCS’17), generalizing change-making (which corresponds to the unary special case).
AB - Given a set of n integer-valued coin types and a target value t, the well-known change-making problem asks for the minimum number of coins that sum to t, assuming an unlimited number of coins in each type. In the more general all-targets version of the problem, we want the minimum number of coins summing to j, for every j = 0, . . ., t. For example, the textbook dynamic programming algorithms can solve the all-targets problem in O(nt) time. Recently, Chan and He (SOSA’20) described a number of O(t polylog t)-time algorithms for the original (single-target) version of the change-making problem, but not the all-targets version. In this paper, we obtain a number of new results on change-making and related problems: We present a new algorithm for the all-targets change-making problem with running time Õ(t4/3), improving a previous Õ(t3/2)-time algorithm. We present a very simple Õ(u2 + t)-time algorithm for the all-targets change-making problem, where u denotes the maximum coin value. The analysis of the algorithm uses a theorem of Erdős and Graham (1972) on the Frobenius problem. This algorithm can be extended to solve the all-capacities version of the unbounded knapsack problem (for integer item weights bounded by u). For the original (single-target) coin changing problem, we describe a simple modification of one of Chan and He’s algorithms that runs in Õ(u) time (instead of Õ(t)). For the original (single-capacity) unbounded knapsack problem, we describe a simple algorithm that runs in Õ(nu) time, improving previous near-u2-time algorithms. We also observe how one of our ideas implies a new result on the minimum word break problem, an optimization version of a string problem studied by Bringmann et al. (FOCS’17), generalizing change-making (which corresponds to the unary special case).
KW - Coin changing
KW - Dynamic programming
KW - Fine-grained complexity
KW - Frobenius problem
KW - Knapsack
UR - http://www.scopus.com/inward/record.url?scp=85092444444&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85092444444&partnerID=8YFLogxK
U2 - 10.4230/LIPIcs.ESA.2020.29
DO - 10.4230/LIPIcs.ESA.2020.29
M3 - Conference contribution
AN - SCOPUS:85092444444
T3 - Leibniz International Proceedings in Informatics, LIPIcs
BT - 28th Annual European Symposium on Algorithms, ESA 2020
A2 - Grandoni, Fabrizio
A2 - Herman, Grzegorz
A2 - Sanders, Peter
PB - Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
T2 - 28th Annual European Symposium on Algorithms, ESA 2020
Y2 - 7 September 2020 through 9 September 2020
ER -