@article{ajams20241234,
author={{Usman, Bashar Bin and Abdullahi, Ibrahim and Elisha, Okeyinka Aderemi},
title={Analysis of Complexity of Some Combinatorial Algorithms Using Halstead Metrics and Time Measures},
journal={American Journal of Applied Mathematics and Statistics},
volume={12},
number={3},
pages={66--69},
year={2024},
url={https://pubs.sciepub.com/ajams/12/3/4},
issn={2328-7292},
abstract={The Knapsack problem is a combinatorial optimization problem for which finding an exact solution using exhaustive search methods is impractical. Therefore, approximate algorithms are usually considered when tackling this optimization problem. The goal of this study was to analyze the complexity of the Knapsack problem using three approximate algorithms: greedy, dynamic programming, and branch-and-bound methods. To achieve this, we measured the Halstead metrics and computational time complexity of these three algorithms. Our methodology involved solving a hypothetical Knapsack problem using the three algorithms in the same programming environment. Experiments were conducted with varying input datasets, and the time complexities of the algorithms were recorded for each experiment. The average time complexities were computed at the end of the experiments. Additionally, we calculated the Halstead metrics required for the study. Both the Halstead metrics and computational time metrics for the three algorithms were then compared. Our findings showed that the greedy approach was the most efficient heuristic, followed closely by the dynamic programming method, with the branch-and-bound algorithm being the least efficient. Future work will incorporate real-world data with specific item characteristics to enhance the relevance and applicability of the findings. Additionally, it will explore hybrid approaches that combine these algorithms to leverage their respective strengths and effectively address their weaknesses.},
doi={10.12691/ajams-12-3-4}
publisher={Science and Education Publishing}
}
