Greedy Algorithms
Status: draft · Confidence: medium (0.635) · Basis: verified_sources
Quality notes: generic_source_homepage, no_verified_sources, partial_source_verification
## TL;DR Greedy algorithms make locally optimal choices hoping for global optimum. Fast but require correctness proof. Examples: Huffman coding, Prim/Kruskal (MST), activity selection, fractional knapsack. ## Core Explanation Greedy choice property: locally optimal choice leads to globally optimal solution. Proof via exchange argument: any optimal solution can be transformed to include the greedy choice. Prim's: grow MST by adding nearest vertex (O(E log V)). Kruskal's: sort edges, union-find to avoid cycles (O(E log E)). ## Further Reading - [Introduction to Algorithms (CLRS)](undefined) ## Related Articles - [Deep Reinforcement Learning Algorithms: PPO, SAC, Dreamer, and Decision Transformer](../../ai/deep-reinforcement-learning-algorithms.md) - [Optimization Algorithms for Deep Learning](../../ai/optimization-algorithms.md) - [Swarm and Evolutionary Intelligence: Genetic Algorithms, NEAT, and Particle Swarms](../../ai/swarm-evolutionary-intelligence.md)