SHS Web Conf.
Volume 144, 20222022 International Conference on Science and Technology Ethics and Human Future (STEHF 2022)
|Number of page(s)||5|
|Section||Application of Artificial Intelligence Technology and Machine Learning Algorithms|
|Published online||26 August 2022|
A Comparison of Greedy Algorithm and Dynamic Programming Algorithm
High School Affiliated to Renmin University of China, Beijing, China
* Corresponding author. Email: email@example.com
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.
© The Authors, published by EDP Sciences, 2022
This is an Open Access article distributed under the terms of the Creative Commons Attribution License 4.0, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.