Glossary · method
Greedy Algorithm
Class of constructive algorithms that builds a solution by making the locally best choice at each step without backtracking; provably optimal on matroid structures and a fast heuristic in general.
Açgözlü AlgoritmaGreedy HeuristicMatroid GreedyLocal-Best Choice
A greedy algorithm is a constructive algorithm class that makes the locally optimal-looking decision at every step and never backtracks. Its roots trace to classic combinatorial work (Kruskal 1956 and Prim 1957 for minimum spanning tree; Dijkstra 1959 for shortest path). When the greedy approach yields the global optimum is characterized by matroid theory: the Rado-Edmonds theorem (Edmonds 1971) states that a subset system is solved optimally by the greedy algorithm for all weight functions if and only if it is a matroid. This is why minimum spanning tree (Kruskal/Prim), Huffman coding (Huffman 1952), and single-machine weighted-completion-time (SPT/EDD rules, Smith 1956) admit greedy optimum solutions. By contrast, knapsack, bin packing, set covering, and VRP have greedy solutions bounded only within a known approximation factor (e.g. Chvátal 1979 ln(n)+1 for set covering) and are not globally optimal. In practice greedy algorithms play three roles: (1) fast constructive heuristic (warm-start), (2) approximation algorithm guarantee family, (3) initial solution for local search or metaheuristics. Heuristically the greedy TSP (nearest neighbor), the Clarke-Wright savings method (1964) for VRP, and the LPT/SPT family for scheduling are industry-standard examples. Cormen, Leiserson, Rivest and Stein (CLRS, 2009) chapter 16 is the reference treatment.
Örnek
A hardware retailer in Eskişehir stocking 38 products decides its end-of-season clearance mix under a 120 m² shelf and 800,000 TRY capital constraint via a greedy algorithm: it sorts marginal profit / shelf-area ratio and packs from the top. A full knapsack solve finds a 3% better mix in 22 seconds, but the greedy solution delivers 78% fill rate and 940,000 TRY expected revenue in 12 milliseconds — sufficient for the weekly decision cycle.