Math 2.0

Computer science Algorithms as mathematical objects Concept

Greedy algorithm

Summary

A greedy algorithm builds a solution step by step, at each step making the choice that looks best at that moment and never revising it. Greedy algorithms are simple and fast, but they find an optimal solution only for problems with special structure. For choosing a maximum-weight independent set, the greedy rule is optimal for every weight function exactly when the independent sets form a matroid. Kruskal's algorithm, Prim's algorithm and Dijkstra's algorithm are greedy.

Where this leads

4 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Greedy_algorithm
About this page
TagPSM6NKYJB8
URIm2://PSM6NKYJB8
Kindconcept
WritingW0 stub
MSC68W40, 90C27
SpecializesAlgorithm
Same as
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

Special cases

Used by

Definitions

Results about this