More on Change-Making and Related Problems
Abstract
Given a set of integer-valued coin types and a target value , the well-known change-making problem asks for the minimum number of coins that sum to , 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 , for every . For example, the textbook dynamic programming algorithms can solve the all-targets problem in time. Recently, Chan and He (SOSA'20) described a number of -time algorithms for the original (single-target) version of the change-making problem, but not the all-targets version. We obtain a number of new results on change-making and related problems, including: 1. A new algorithm for the all-targets change-making problem with running time , improving a previous -time algorithm. 2. A very simple -time algorithm for the all-targets change-making problem, where denotes the maximum coin value. The analysis of the algorithm uses a theorem of Erd\H{o}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 ). 3. For the original (single-target) coin changing problem, we describe a simple modification of one of Chan and He's algorithms that runs in time (instead of ). 4. For the original (single-capacity) unbounded knapsack problem, we describe a simple algorithm that runs in time, improving previous near--time algorithms. 5. 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).
Cite
@article{arxiv.2110.02503,
title = {More on Change-Making and Related Problems},
author = {Timothy M. Chan and Qizheng He},
journal= {arXiv preprint arXiv:2110.02503},
year = {2021}
}
Comments
This is the full version of our ESA 2020 paper