More on Change-Making and Related Problems

10/06/2021
by   Timothy M. Chan, et al.
0

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. 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 Õ(t^4/3), improving a previous Õ(t^3/2)-time algorithm. 2. A very simple Õ(u^2+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). 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 Õ(u) time (instead of Õ(t)). 4. For the original (single-capacity) unbounded knapsack problem, we describe a simple algorithm that runs in Õ(nu) time, improving previous near-u^2-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).

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/20/2023

Improved Algorithms for Integer Complexity

The integer complexity f(n) of a positive integer n is defined as the mi...
research
07/22/2018

Subset Sum Made Simple

Subset Sum is a classical optimization problem taught to undergraduates ...
research
02/15/2018

A Faster FPTAS for #Knapsack

Given a set W = {w_1,..., w_n} of non-negative integer weights and an in...
research
09/26/2021

Preemptive Two-stage Goal-Programming Formulation of a Strict Version of the Unbounded Knapsack Problem with Bounded Weights

The unbounded knapsack problem with bounded weights is a variant of the ...
research
05/06/2023

An Improved PTAS for Covering Targets with Mobile Sensors

This paper considers a movement minimization problem for mobile sensors....
research
02/27/2022

On Problems Related to Unbounded SubsetSum: A Unified Combinatorial Approach

Unbounded SubsetSum is a classical textbook problem: given integers w_1,...
research
02/18/2021

Smart Build Targets Batching Service at Google

Google has a monolithic codebase with tens of millions build targets. Ea...

Please sign up or login with your details

Forgot password? Click here to reset