Greedy algorithm
Greedy algorithmsalgorithms which followproblem solving meta-heuristicmaking the locally optimum choice at each stage withhopefindingglobal optimum. For instance, applyinggreedy strategy totraveling salesman problem yieldsfollowing algorithm: "At each stage visitnearest unvisited city tocurrent city".Greedy algorithms rarely findglobally optimal solution consistently, sinceusually don't operate exhaustively on alldata. Nevertheless theyuseful because theyquickthink upoften give good approximations tooptimum. Ifgreedy algorithm can be provenyieldglobal optimum forgiven problem class,typically becomesmethodchoice. Examplessuch greedy algorithmsKruskal's algorithmPrim's algorithm. The theorymatroids provideswhole classsuch algorithms.
