An Algorithm that makes locally optimal choices with the goal of reaching a global optimum.

  • This strategy works for Minimum Spanning Tree Algorithm it can be arbitrarily bad for other problems
  • Greedy strategies are usually very simple to implement
    • While not done and conditions true, choose best option
  • Best algorithms are often greedy algorithms with an optimization/trick
  • Greedy strategies are usually somewhat efficient, yielding polynomial time solutions.
  • These strategies can often give good approximations in practice.

Examples

Dijkstra’s Algorithm Prim’s Algorithm Kruskal’s Algorithm