There is not "a" greedy algorithm; "greedy algorithm" is a term to describe several algorithms that have some things in common. The general idea is that at each step, you look for what seems to be, "locally", the best solution. For example, in a shortest-distance problem, look for a step that takes you closer to the destination. This may, or may not, lead to the best solution overall.
Many of them.
45
Greedy has two syllables.
In Sanskrit, 'prameya' is the word for algorithm.
An algorithm for constructing the convex hull
A greedy algorithm will return as many results as possible. It depends on the algorithm what that means.An example would be in regular expressions. The regexp "/(a.+b)/" searches for a string that starts with "a" and ends with "b". So in the string "There's a bunny in the basket" a greedy algorithm would find "a bunny in the b", while a non-greedy search would find "a b".
A greedy algorithm is similar to a dynamic programming algorithm, but the difference is that solutions to the subproblems do not have to be known at each stage; instead a "greedy" choice can be made of what looks best for the moment.
the basic difference between them is that in greedy algorithm only one decision sequence is ever generated. where as in dynamic programming many decision sequences are generated.
Both algorithms have the same efficiency and both are based on the same greedy approach. But Kruskal's algorithm is much easier to implement.
Dijkstra's algorithm is used by the OSPF and the IS-IS routing protocols. The last three letters in OSPF (SPF) mean "shortest path first", which is an alternative name for Dijkstra's algorithm.
Greedy algorithms are only guaranteed to produce locally optimal solutions within a given time frame; they cannot be guaranteed to find globally optimal solutions. However, since the intent is to find a solution that approximates the global solution within a reasonable time frame, in that sense they will always work. If the intent is to find the optimal solution, they will mostly fail.
Branch and bound method is used for optimisation problems. It can prove helpful when greedy approach and dynamic programming fails. Also Branch and Bound method allows backtracking while greedy and dynamic approaches doesnot.However it is a slower method.
Kruskal's algorithm is an algorithm in graph theory that finds a minimum spanning tree for a connected weighted graph. This means it finds a subset of the edges that forms a tree that includes every vertex, where the total weight of all the edges in the tree is minimized. If the graph is not connected, then it finds a minimum spanning forest (a minimum spanning tree for each connected component). Kruskal's algorithm is an example of a greedy algorithm.
greedy method does not give best solution always.but divide and conquer gives the best optimal solution only(for example:quick sort is the best sort).greedy method gives feasible solutions,they need not be optimal at all.divide and conquer and dynamic programming are techniques.
Backtracking algorithmn finds minimal path among the all.The main advantage of back tracking algorithmn as compare with greedy is to find minimal distance.In greedy ,it does.t know the optimal solution.It is used in Google earth.
it is a processor of the work
The mongrel's greedy hunger caused him to make short work of the food in the dog bowl.