knapsack2.png

Here's a simple illustration of Coin Change Problem for two items, which can easily be represented in a two-dimensional coordinate system.

Given target sum, say 7, we need to determine coefficients for the two items, say 2 and 3, so that $7 = a_1 2 + a_2 3$.

This can be done by fixing possible y coordinates (for 3) and determining corresponding x coordinates (for 2). Doing so we see that

This is also related to Knapsack problem, which attains maximization bounded by a second set of coefficients.

See Also

OlegKobchenko/Coin Problem (last edited 2008-12-08 10:45:28 by )