Change-making problem

Change-making problem

The change-making problem addresses the following question: how can a given amount of money be made with the least number of coins of given denominations? It is a knapsack type problem, and has applications wider than just currency.

Contents

Mathematical definition

Given a set of integer coin values {w1, w2, ..., wn} where w1 = 1 and wj < wj+1 for 1 ≤ jn − 1, and a positive integer W, find a set of non-negative integers {x1, x2, ..., xn} which minimize

\sum_{j=1}^n x_j

subject to

\sum_{j=1}^n w_j x_j = W.

Non currency examples

Methods of solving

Dynamic programming

Making a list of ways to make each amount from one upwards (an example of a dynamic programming method)

Linear programming

Integer Linear Programming is often a quick way to solve this kind of problem, but the time it will take to resolve the problem is not certain, and may be slow in some cases

Greedy method

In the US (and most other) coin systems, a greedy algorithm of picking the largest denomination of coin which is not greater than the remaining amount to be made will always produce the optimal result. This is not automatically the case, though: if the coin denominations were 1, 3 and 4, then to make 6, the greedy algorithm would choose three coins (4,1,1) whereas the optimal solution is two coins (3,3).

See also

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Change 123 — Cover of Change 123 volume 1 as published Akita Shoten ちぇんじ123 (Chenji Hi Fu Mi) …   Wikipedia

  • Making a Stand — Arrested Development episode Episode no. Season 3 Episode 8 Directed by Peter Lauer Written by …   Wikipedia

  • Coin problem — With only 2 pence and 5 pence coins, one cannot make 3 pence, but one can make any higher amount. The coin problem (also referred to as the Frobenius coin problem or Frobenius problem, after the mathematician Ferdinand Frobenius) is a… …   Wikipedia

  • Change of variables — In mathematics, a change of variables is a basic technique used to simplify problems in which the original variables are replaced with new ones; the new and old variables being related in some specified way. The intent is that the problem… …   Wikipedia

  • Problem of universals — The problem of universals is an ancient problem in metaphysics about whether universals exist. Universals are general or abstract qualities, characteristics, properties, kinds or relations, such as being male/female, solid/liquid/gas or a certain …   Wikipedia

  • change — change1 W1S1 [tʃeındʒ] v ▬▬▬▬▬▬▬ 1¦(become different/make something different)¦ 2¦(start doing/using something different)¦ 3¦(replace something)¦ 4 change your mind 5 change sides 6¦(clothes)¦ 7¦(bed)¦ 8¦(exchange goods)¦ 9¦(exchange money)¦ …   Dictionary of contemporary English

  • Change request — A change request is a document containing a call for an adjustment of a system; it is of great importance in the change management process. A change request is not raised for a wording change in a letter. A change request is declarative, i.e. it… …   Wikipedia

  • Wicked problem — The concept of wicked problems was originally proposed by Horst Rittel (a pioneering theorist of design and planning, and late professor at the University of California, Berkeley) and M. Webber ref|1 in a seminal treatise for social planning,… …   Wikipedia

  • Violin making and maintenance — Making an instrument of the violin family may be done in different ways, many of which have changed very little in nearly 500 years since the first violins were made. Some violins, called bench made instruments, are made by a single individual,… …   Wikipedia

  • Frame problem — In artificial intelligence, the frame problem was initially formulated as the problem of expressing a dynamical domain in logic without explicitly specifying which conditions are not affected by an action. John McCarthy and Patrick J. Hayes… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”