laziness, impatience, and hubris  
PerlMonks 
comment on 
( #3333=superdoc: print w/replies, xml )  Need Help?? 
Basically, this is very similar to a bin packing problem. Your fitness test is the minimum amount over the postage required, and your termination test is greater than or equal to the amount of postage required. Very commonly solved with a recursive or stackbased solution. IIRC, with the exception of pruning paths once they reach the required postage, the only way to get all solutions is really bruteforce. If you are satisfied with the first solution found, then you can trim that somewhat. This is, I believe, your classical NPComplete problem, which, without some assumptions, is only solvable by brute force. Very enjoyable (meaning interesting :) post and problem, BTW. MidLifeXis In reply to Re: How can I calculate the right combination of postage stamps?
by MidLifeXis

