# Change-making Problem

Making change problems are a variety of partition of an integer problems where the allowed partition sizes may be restricted, i. e., the denominations available and whether the full amount is an available partition size (you can just hand the amount back).

## A simple example using common United States coins

You have an unlimited supply of cents, 5-cent pieces, dimes (worth 10 cents) and quarter dollars (worth 25 cents).

This problem is kept quite small so that one can verify easily that the answer is correct.How many combinations, i. e., the order of the coins are not significant, are available to return twenty-five cents?

This is the answer to the question:

\( \left\{\left( \begin{array}{cc} 1 & 25 \\ \end{array} \right),\left( \begin{array}{cc} 1 & 20 \\ 5 & 1 \\ \end{array} \right),\left( \begin{array}{cc} 1 & 15 \\ 5 & 2 \\ \end{array} \right),\left( \begin{array}{cc} 1 & 15 \\ 10 & 1 \\ \end{array} \right),\left( \begin{array}{cc} 1 & 10 \\ 5 & 3 \\ \end{array} \right),\left( \begin{array}{cc} 1 & 10 \\ 5 & 1 \\ 10 & 1 \\ \end{array} \right),\left( \begin{array}{cc} 1 & 5 \\ 5 & 4 \\ \end{array} \right),\left( \begin{array}{cc} 1 & 5 \\ 5 & 2 \\ 10 & 1 \\ \end{array} \right),\left( \begin{array}{cc} 1 & 5 \\ 10 & 2 \\ \end{array} \right),\left( \begin{array}{cc} 5 & 5 \\ \end{array} \right),\left( \begin{array}{cc} 5 & 3 \\ 10 & 1 \\ \end{array} \right),\left( \begin{array}{cc} 5 & 1 \\ 10 & 2 \\ \end{array} \right),\left( \begin{array}{cc} 25 & 1 \\ \end{array} \right)\right\} \)

And our final answer is 13. \( _\square \)

If the full range of permissible partitions is all positive integers less then or equal to amount to be returned, then, the total count would be the partition of an integer \(p(n)\).

Most change making problems encountered here can be done in the available coding environment herein.

For problems which are small enough to fit with the limits of arithmetic and allowed computation, a small recursive program can solve the problem.

In the Rust language:

**Cite as:**Change-making Problem.

*Brilliant.org*. Retrieved from https://brilliant.org/wiki/making-change/