What is a greedy algorithm? It is difficult to describe what it is, but we generally say an algorithm is greedy if it builds up a solution in small steps, choosing a decision at each step myopically to optimize some underlying criterion. One can design different greedy algorithms for the same problem, but all optimizing locally to reach an optimal solution. When a greedy algorithm succeeds in solving a nontrivial problem optimally, it implies something interesting and useful about the structure of the problem itself; there is a local rule that one can use to construct optimal solutions. A greedy algorithm will give us a guaranteed close to optimal solution always. The two basic methods, the greedy algorithm stays ahead and exchange argument, will be used to show that a greedy algorithm will produce an optimal solution to a problem. By the greedy algorithm stays ahead, we mean that if one measures the greedy algorithm's progress step by step, then it is better than any other algorithm at each step, and thus produces an optimal solution. By exchange argument, : one considers any possible solution to the problem and gradually transforms it into the solution found by the greedy algorithm without affecting its quality. Some of the most well-known applications of the greedy algorithm: shortest paths in a graph, the minimum spanning tree problem, and the construction of Huffman codes for performing data compression. A more complex application, the Minimum-Cost Arborescence Problem will further extend our notion of what a greedy algorithm is.

This section was introductory and pretty easy to read through. I would give it a scale of 9/10.

courses/cs211/winter2014/journals/fred/4.0_greedy_algorithms_front_matter.txt · Last modified: 2014/02/12 01:45 by gisaf
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0