You are not logged in.
login | register

Discussion: All Topics on Computer
Topic: optimization problem... Need help...


Post a new topic to the All Content on Mathematica discussion
<< see all messages in this topic
<previous message | next message >


Subject:   RE: optimization problem... Need help...
Author: Mabel
Date: Aug 26 2006
It seems to me that Sandie's is the only exact solution. I suppose it was
intended to be solved using some optimization Algorithm with a name. I just
tabulated too-high and too-low 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 a-f integer would be at the intersection of the
"gridlines" in a 6-dimensional plane. The ones that satisfy each of the
equations above form two 5-dimensional planes which may intersect in a
4-dimensional plane. We'd be looking for the "gridline intersections" closest
to that 4-dimensional plane.

Reply to this message          Quote this message when replying?
yes  no
Post a new topic to the All Content on Mathematica discussion

Discussion Help