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
_version_ 1852737790267097088
author Chen Xiaoxi
author_facet Chen Xiaoxi
author_sort Chen Xiaoxi
collection DOAJ
container_title SHS Web of Conferences
description 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.
format Article
id doaj-art-153ef2cb8e2b4c0a98533db06c65eaab
institution Directory of Open Access Journals
issn 2261-2424
language English
publishDate 2022-01-01
publisher EDP Sciences
record_format Article
spelling doaj-art-153ef2cb8e2b4c0a98533db06c65eaab2025-08-19T21:06:00ZengEDP SciencesSHS Web of Conferences2261-24242022-01-011440300910.1051/shsconf/202214403009shsconf_stehf2022_03009A Comparison of Greedy Algorithm and Dynamic Programming AlgorithmChen Xiaoxi0High School Affiliated to Renmin University of ChinaTwo 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.https://www.shs-conferences.org/articles/shsconf/pdf/2022/14/shsconf_stehf2022_03009.pdf
spellingShingle Chen Xiaoxi
A Comparison of Greedy Algorithm and Dynamic Programming Algorithm
title A Comparison of Greedy Algorithm and Dynamic Programming Algorithm
title_full A Comparison of Greedy Algorithm and Dynamic Programming Algorithm
title_fullStr A Comparison of Greedy Algorithm and Dynamic Programming Algorithm
title_full_unstemmed A Comparison of Greedy Algorithm and Dynamic Programming Algorithm
title_short A Comparison of Greedy Algorithm and Dynamic Programming Algorithm
title_sort comparison of greedy algorithm and dynamic programming algorithm
url https://www.shs-conferences.org/articles/shsconf/pdf/2022/14/shsconf_stehf2022_03009.pdf
work_keys_str_mv AT chenxiaoxi acomparisonofgreedyalgorithmanddynamicprogrammingalgorithm
AT chenxiaoxi comparisonofgreedyalgorithmanddynamicprogrammingalgorithm