OIC now. 3 & 3 is the best answer but  the algorithm produces 4 + 1 + 1. Well I 
think the issue here is that currency is never (or almost never) designed this 
way. No one would make a 3 dollar bill coincidentally with a 4 dollar bill. 
There would be no practical reason to. 

And yet I remember for a time the USA produced a one dollar bill and a two 
dollar bill. So never say never! :-)

It seems that when creating currency values, one of the overriding principles 
OUGHT to be that each smaller value ought to divide evenly into all the larger 
values. I'm sure this is what was intended with American currency when it was 
first created in it's present form. Otherwise making change becomes rather 
tedious. 

Bob


On Jan 30, 2013, at 9:56 PM, Paul D. DeRocco wrote:

>> From: Mark Wieder
>> 
>>> Now how would you do it if the available coin values were:
>> 
>>>        40,30,10,4,3,1
>> 
>>> That's a more interesting problem, but probably a less 
>>> interesting coding
>>> test, because I think it would involve a more brute force 
>>> approach, less
>>> elegance.
>> 
>> I'm missing something. Why would that be different?
> 
> How would you represent 6?
> 
> -- 
> 
> Ciao,               Paul D. DeRocco
> Paul                mailto:pdero...@ix.netcom.com 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to