A Comparison of Greedy Algorithm and Dynamic Programming Algorithm

Two algorithms to handle the problem include greedy algorithms and dynamic programming. Because of their simplicity, intuitiveness, and great efficiency in addressing problems, they are frequently employed in a variety of circumstances. The connection and difference of the two algorithms are compare...

Full description

Bibliographic Details
Published in:SHS Web of Conferences
Main Author: Chen Xiaoxi
Format: Article
Language:English
Published: EDP Sciences 2022-01-01
Online Access:https://www.shs-conferences.org/articles/shsconf/pdf/2022/14/shsconf_stehf2022_03009.pdf
Description
Summary:Two algorithms to handle the problem include greedy algorithms and dynamic programming. Because of their simplicity, intuitiveness, and great efficiency in addressing problems, they are frequently employed in a variety of circumstances. The connection and difference of the two algorithms are compared by introducing the essential ideas of the two algorithms. The knapsack problem is a classic problem in computer science. In the application of solving the backpack problem, greedy algorithm is faster, but the resulting solution is not always optimal; dynamic programming results in an optimal solution, but the solving speed is slower. The research compares the application properties and application scope of the two strategies, with the greedy approach being the better approach in solving the knapsack problem.
ISSN:2261-2424