Difference Between Greedy Method and Dynamic Programming

To solve the optimization problem in computing the two methods namely greedy and dynamic programming are used. The solutions produced by the greedy algorithms are more effective than the dynamic programming solutions. The primary difference between the greedy method and dynamic programming is that greedy method just generates only one decision sequence. As against, dynamic programming can produce many decision sequences.

Greedy method and dynamic programming both are used to find the optimal solution to the problem from a set of feasible solutions. The main difference between them is that Greedy method never reexamines its selections while Dynamic programming is inverse which also assures to provide an optimal solution to the problem.

posted @ 2022-08-08 18:03  千心  阅读(26)  评论(0编辑  收藏  举报