### Re^2: How can I calculate the right combination of postage stamps?

by JavaFan (Canon)
 on Oct 26, 2010 at 10:24 UTC ( #867433=note: print w/replies, xml ) Need Help??

In practice, any coin issuing entity will make coins in such a way that a greedy algorithm is optimal. That is, noone is issuing coins as 7c, 6c and 1c coins (a case where greedy isn't optimal to make 24c change (greedy gives you 3 x 7c + 3 x 1c, while optimal is 4 x 6c)). Instead typical coin denominations are 1c, (2c), 5c, 10c, 20 or 25c, (50c), 100c, (200 or 250c), (500c). For instance, US dollar coins come in 1c, 5c, 10c, 25c, 50c, and 100c; Euro coins in 1c, 2c, 5c, 10c, 20c, 50c, 100c, and 200c; Yen coins in 1y, 5y, 10y, 50y, 100y, 500y; Pound Sterling coins in 1p, 2p, 5p, 10p, 20p, 50p, 100p, 200p (effectively the same as Euro coins). For all, a greedy algorithm is optimal.
• Comment on Re^2: How can I calculate the right combination of postage stamps?

Replies are listed 'Best First'.
Re^3: How can I calculate the right combination of postage stamps?
by LanX (Saint) on Oct 26, 2010 at 13:20 UTC
True for coins, but postage stamps can be very different.

Cheers Rolf

Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://867433]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2023-09-21 21:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?

No recent polls found

Notices?