FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/Exchange_algorithm

Greedy algorithm

A greedy algorithm is an algorithm which, at each step, makes the choice that is locally optimal, and subsequently does not reconsider past choices. Greedy algorithms are often used to solve combinatorial optimization problems. If an optimization problem only depends on the partial solution of solving it for one subproblem, we can solve this problem by "greedily" considering only the locally optimal subproblem. In this sense, a greedy algorithm is a special case of a dynamic programming algorithm. Uriel Feige notes that:

[Greedy algorithms] may be viewed as the ultimate form of dynamic programming, in which only one partial solution is maintained. The problem needs to have much more structure for this approach to work.

In many cases, a greedy algorithm does not produce an exact solution, but can yield solutions that approximate an exact solution in a reasonable amount of time.

An example of a problem which admits an exact greedy solution, the activity selection problem. Given a collection of tasks which can be done between allotted time intervals, the problem is to determine the maximum number of tasks that can be done. A greedy algorithm in χ(G)≤Δ(G)+1 obtained by a greedy algorithm. We begin by taking a vertex that has not been colored. Since it has at most Θ(log⁡n) times longer than the optimal tour.

Another example is that a solution for the 0-1 knapsack problem can be approximated by using the greedy algorithm for the fractional knapsack problem. This greedy algorithm has been proven to yield a solution at least half the value of the optimal solution.

Solutions for submodular maximization are approximated using a greedy algorithm which yields a solution at least half the value of the optimal solution.

Problems for which greedy algorithms are used to provide approximation algorithms include the set cover, load balancing, Steiner tree and independent set problem.

See also

edit

References

edit
Yuster, Raphael (January 2021). "Paths with many shortcuts in tournaments". Discrete Mathematics. 344 (1) 112168. arXiv:2009.13985. doi:10.1016/j.disc.2020.112168.
  • ↑ Erickson, Jeff (2019). "Greedy Algorithms". Algorithms. University of Illinois at Urbana-Champaign.
  • ↑ Diestel, Reinhard (2025). Graph Theory. Graduate Texts in Mathematics (Sixth Edition 2025 ed.). Erscheinungsort nicht ermittelbar: Springer. ISBN 978-3-662-70106-5.
  • ↑ Grimsman, David; Hespanha, Joao P.; Marden, Jason R. (December 17–19, 2018). Strategic Information Sharing in Greedy Submodular Maximization. IEEE Conference on Decision and Control. Miami, Fla.: IEEE. pp. 2722–2727. doi:10.1109/CDC.2018.8619166. ISBN 978-1-5386-1395-5.
  • ↑

  • View original on Wikipedia | Back | FazBrowse Home