Greedy Algorithm
Definition
A greedy algorithm makes the locally best available decision at each step.
Greedy algorithms build a solution step-by-step without systematically revising earlier decisions. With suitable problem structure, they can provide optimal solutions; for other problems, only approximations.
Simply explained
Always taking the currently cheapest offer, even though this may miss a better overall combination later.
Why it matters in practice
Relevant for fast heuristics, scheduling, selection, and optimization problems when computation time is more important than exhaustive search.
Example from business
A simple scheduling assigns the next free task to the currently most suitable resource.
Limits and pitfalls
- Confusing local optimum with global optimum; not checking problem suitability; ignoring missing quality bounds.
Origin & history
Greedy strategies belong to classical algorithm paradigms and are used in many optimization and graph problems.
Use in mid-sized companies
- Possible application: fast prioritization, routing or resource heuristics, and simple assignment problems with clear rules.
Frequently asked questions
Does a greedy algorithm always deliver the best solution?
No. It depends on the mathematical properties of the problem. Why is it still used? Because it is often simple and fast.
Sources
- greedy algorithm · NIST Dictionary of Algorithms and Data Structures, greedy algorithm
Sources checked on 10.10.2026.
Editorially reviewed on: