Discussion:  All Topics on Computer 
Topic:  optimization problem... Need help... 
Post a new topic to the All Content on Mathematica discussion 

Subject:  RE: optimization problem... Need help... 
Author:  Mabel 
Date:  Aug 26 2006 
intended to be solved using some optimization Algorithm with a name. I just
tabulated toohigh and toolow coin arrays.
You can tabulate the number of coins of each denomination using Excel (or
whatever spreadsheet you like). You can input the number of coins of the largest
denominations and use a formula to calculate the number coins of smallest
denomination (for a total of 12 coins). You can enter a formula to calculate the
total value of the coins.
It looks like you'll have a large table, but with the values given, choices
narrow quickly. You soon discover one 50 piece is too many, as one 50 plus
eleven 5 pieces makes the total value 105. You cannot use any 25 pieces either;
two of the 15 pieces is too many, as is three of the 10 pieces. Choices narrow
even more if you try to add to exactly 71, as that would require a number of 7
pieces with a total value ending in 6 or 1 (three pieces to make 21, or eight
for 56).
Interesting kind of problems. There should be a general, more elegant way to
solve them. If you have 6 denominations of coins with values A, B, C, D, E and
F,taking a, b, c, d, e, and f units of each respectively you would want:
a+b+c+d+e+f=12 and
Aa+Bb+Cc+Dd+Ee+Ff=71.
The points (a,b,c,d,e,f) with af integer would be at the intersection of the
"gridlines" in a 6dimensional plane. The ones that satisfy each of the
equations above form two 5dimensional planes which may intersect in a
4dimensional plane. We'd be looking for the "gridline intersections" closest
to that 4dimensional plane.
 
Post a new topic to the All Content on Mathematica discussion  