Originally Posted by AlexsMom
Given that the Wikipedia entry on "greedy algorithm" itself says "Greedy algorithms mostly (but not always) fail to find the globally optimal solution," I'm not sure I see any value in teaching it as a rote problem-solving technique to kids, other than as a parlor trick that coincidentally happens to always work with US coins.
Well... that may be true, but if you don't know how to solve a packing-type problem - or, come to that, a problem of any other kind where it isn't clear how to solve the whole problem, but you can compare possible next steps and see which makes most progress in some sense - a greedy algorithm is a jolly good place to start. If nothing else, thinking about how such an approach can fail may give you insight into the problem. For giving change specifically, it works for pretty much any modern system of coins; the fact that it didn't work for UK pre-decimalisation is an anomaly.

Discussed this with DS and his main contribution was amusement at the name. He couldn't believe that a greedy algorithm was really so called because it's greedy, rather than because it was invented by someone called Grede!


Email: my username, followed by 2, at google's mail