Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Greedy algorithm
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Examples== * The [[activity selection problem]] is characteristic of this class of problems, where the goal is to pick the maximum number of activities that do not clash with each other. * In the [[Macintosh computer]] game ''[[Crystal Quest]]'' the objective is to collect crystals, in a fashion similar to the [[travelling salesman problem]]. The game has a demo mode, where the game uses a greedy algorithm to go to every crystal. The [[artificial intelligence]] does not account for obstacles, so the demo mode often ends quickly. * The [[matching pursuit]] is an example of a greedy algorithm applied on signal approximation. * A greedy algorithm finds the optimal solution to [[Malfatti circles|Malfatti's problem]] of finding three disjoint circles within a given triangle that maximize the total area of the circles; it is conjectured that the same greedy algorithm is optimal for any number of circles. * A greedy algorithm is used to construct a Huffman tree during [[Huffman coding]] where it finds an optimal solution. * In [[decision tree learning]], greedy algorithms are commonly used, however they are not guaranteed to find the optimal solution. **One popular such algorithm is the [[ID3 algorithm]] for decision tree construction. *[[Dijkstra's algorithm]] and the related [[A* search algorithm]] are verifiably optimal greedy algorithms for [[graph search]] and [[Shortest path problem|shortest path finding]]. **A* search is conditionally optimal, requiring an "[[admissible heuristic]]" that will not overestimate path costs. *[[Kruskal's algorithm]] and [[Prim's algorithm]] are greedy algorithms for constructing [[minimum spanning tree]]s of a given [[connected graph]]. They always find an optimal solution, which may not be unique in general. *The [[Sequitur algorithm|Sequitur]] and [[Lempel-Ziv-Welch algorithm|Lempel-Ziv-Welch]] algorithms are [[Grammar_induction#Grammatical_inference_by_greedy_algorithms|greedy algorithms for grammar induction]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)