2007/12/04

coin or change problem

I also wanted to write about the coin problem
or change problem. When I read about this in CM
I *had* to buy the book. Turns out that a
fair discussion is available on line,
but not in Wikipedia though. See
http://www.cut-the-knot.org/ctk/GeneratingFunctions.shtml

In fact the whole business is somewhat less surprising
if you think about binomial coefficients in a symbolic
way: in (A+B)^4 we have that there are (4 choose 2) = 6
combinations of AABB. This is also the coefficient
of X^2 in (1+x)^4. Likewise, we find that the number
of ways to give change for t cents is the exponent
of (1+X+X^2+ ...)(1+5X+25X^2+ ...)(1+10X+100X^2+ ...)(1+25X+625X^2+ ...)
if the nominations are 1, 5, 20 and 25 cents (the old Dutch system)
Surprising is that these expressions can be changed for
1/1-X, 1-5X, 1-10X and 1-25X, and that we can
multiply those, without running into trouble.