change_polynomial, an Octave code which uses a polynomial multiplication algorithm to count the ways of making various sums using a given number of coins.
In this version of the change making problem, the order of the coins is significant. If we are using exactly 3 coins to make 16 cents, we count 6 separate solutions: (1,5,10), (1,10,5), (5,1,10), (5,10,1), (10,1,5) and (10,5,1). Similarly, we count three essentialy equivalent solutions to forming the sum of 7 cents.
If the user wishes to determine the number of ways of forming sums using anywhere from 0 up to COIN_NUM coins, inclusive, then it is only necessary to include a coin of value 0 in the denomination list.
The information on this web page is distributed under the MIT license.
change_polynomial is available in a MATLAB version and an Octave version and a Python version.
octave_combinatorics, an Octave code which considers a variety of problems in combinatorics involving counting, combinations, permutations, and so on.