Abstract
The change-making problem is the problem of representing a given value with the fewest coins possible. We investigate the problem of determining whether the greedy algorithm produces an optimal representation of all amounts for a given set of coin denominations 1 = c1 < c2 < ... < c m . Chang and Gill [1] show that if the greedy algorithm is not always optimal, then there exists a counterexample x in the range c3 ≤ x < cm(c m c m−1+ c m − 3cm1/cm−cm− 1.
To test for the existence of such a counterexample, Chang and Gill propose computing and comparing the greedy and optimal representations of all x in this range. In this paper we show that if a counterexample exists, then the smallest one lies in the range c3+ 1 <x < c m + c m− 1 , and these bounds are tight. Moreover, we give a simple test for the existence of a counterexample that does not require the calculation of optimal representations. In addition, we give a complete characterization of three-coin systems and an efficient algorithm for all systems with a fixed number of coins. Finally, we show that a related problem is cqNP- complete.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
S. K. Chang and A. Gill. Algorithmic solution of the change-making problem. J. Assoc. Comput. Mach., 17(1):113–122, January 1970.
M. R. Garey and D. S. Johnson. Computers and Intractability: a Guide to the Theory of NP-Completeness. W. H. Freeman, 1979.
G. S. Lueker. Two NP-complete problems in nonnegative integer programming. Technical Report 178, Computer Science Laboratory, Princeton University, 1975.
S. Martello and P. Toth. Knapsack Problems. John Wiley and Sons, 1990.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1993 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kozen, D., Zaks, S. (1993). Optimal bounds for the change-making problem. In: Lingas, A., Karlsson, R., Carlsson, S. (eds) Automata, Languages and Programming. ICALP 1993. Lecture Notes in Computer Science, vol 700. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-56939-1_69
Download citation
DOI: https://doi.org/10.1007/3-540-56939-1_69
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-56939-8
Online ISBN: 978-3-540-47826-3
eBook Packages: Springer Book Archive