<?xml version="1.0" encoding="windows-1252"?>
<node id="726122" title="Re: How can I calculate the right combination of postage stamps?" created="2008-11-26 09:48:28" updated="2008-11-26 09:48:28">
<type id="11">
note</type>
<author id="438971">
ForgotPasswordAgain</author>
<data>
<field name="doctext">
&lt;blockquote&gt;&lt;i&gt;Maybe I missed the bin-packing module on CPAN.&lt;/i&gt;&lt;/blockquote&gt;
&lt;p&gt;Yep, &lt;a href="http://search.cpan.org/~cbtilden/Algorithm-BinPack/lib/Algorithm/BinPack.pm"&gt;Algorithm::BinPack&lt;/a&gt;. There are a couple others, too, but that's the one I've used and it worked (was very happy :).&lt;/p&gt;
&lt;p&gt;&lt;b&gt;UPDATE:&lt;/b&gt; I got distracted by your actual problem, which I don't think is solved by the bin-packing algorithm. I'm also not formally trained in CS. :} I found this link which seems to explain the problem for the case of coins (which are practically stamps): &lt;a href="http://oucsace.cs.ohiou.edu/~razvan/courses/cs404/lecture19.pdf"&gt;The Coin Changing Problem&lt;/a&gt;&lt;/p&gt;</field>
<field name="root_node">
726121</field>
<field name="parent_node">
726121</field>
</data>
</node>
