note
ForgotPasswordAgain
<blockquote><i>Maybe I missed the bin-packing module on CPAN.</i></blockquote>
<p>Yep, <a href="http://search.cpan.org/~cbtilden/Algorithm-BinPack/lib/Algorithm/BinPack.pm">Algorithm::BinPack</a>. There are a couple others, too, but that's the one I've used and it worked (was very happy :).</p>
<p><b>UPDATE:</b> 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): <a href="http://oucsace.cs.ohiou.edu/~razvan/courses/cs404/lecture19.pdf">The Coin Changing Problem</a></p>
726121
726121