I didn't really put the difference but you can see the pros and cons of the two methods, right? It's in there, somewhere.
Bruce-force Method
Solves a problem in the most simple, direct, or obvious way, does not take advantage of structure or pattern in the problem, often simpler than Greedy Method to implement, but is usually not the most efficient way.
Greedy Approach
Algorithm decides what is the best thing to do at each step (local maxima), may run significantly faster than brute-force, may not lead to the optimal (or even correct) solution (global maxima) Usually requires some initial pre-computation to set up the problem, to take advantage of special structure/pattern in the problem or solution space.
Sources: Matt and http://irl.eecs.umich.edu/jamin/courses/eecs281/fall07/lectures/lecture14.pdf
Hope you work it out!
Juliet
I
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.
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.
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.
The key difference between the Floyd-Warshall and Dijkstra algorithms is their approach to finding the shortest path in a graph. Floyd-Warshall algorithm: It is a dynamic programming algorithm that calculates the shortest path between all pairs of vertices in a graph. It is efficient for dense graphs with negative edge weights but has a higher time complexity of O(V3), where V is the number of vertices. Dijkstra algorithm: It is a greedy algorithm that finds the shortest path from a single source vertex to all other vertices in a graph. It is efficient for sparse graphs with non-negative edge weights and has a lower time complexity of O(V2) with a priority queue implementation.
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.
Very much so. It is human nature to be greedy, and the obviously huge difference in the country between those of wealth and those in poverty attests to it.
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.
Wow, I have never heard of this abuse before, but I will try to answer the question. You do not tell a difference because there is none. Why even put an "abuse" label on it? A person who is greedy and selfish is going to spend the money on themselves regardless of their spouse's needs, causing the spouse to go without. I suppose it would then be sensible to label it "monetary abuse," but I would just leave it as being married to a greedy and selfish person.
Yeah. They are greedy
no eminem is not greedy...
The phrase 'were greedy for more gold' is a fragment. Who was greedy? Correct: The men were greedy for more gold. The miners were greedy for more gold.
selfish people obly care about themselfs, but greedy people want everything to them selfs : e.g a=greedy b=selfish a- i want the world, money things everything , buut i still care about my family + friends b- its all about me , i need + what everything , i dont care abotu anyone but me! thats the difference!