Analysis of Complexity of Some CombinatorialAlgorithms Using Halstead Metrics and Time Measures
Year: 2024
Type: article
Abstract: The Knapsack problem is a combinatorial optimization problem for which finding an exact solutionusing exhaustive search methods is impractical. Therefore, approximate algorithms are usually considered whentackling this optimization problem. The goal of this study was to analyze the complexity of the Knapsack problemusing three approximate algorithms: greedy, dynamic programming, and branch-and-bound methods. To achievethis, we measured the Halstead metrics and computational time complexity of these three algorithms. Ourmethodology involved solving a hypothetical Knapsack problem using the three algorithms in the sameprogramming environment. Experiments were conducted with varying input datasets, and the time complexities ofthe algorithms were recorded for each experiment. The average time complexities were computed at the end of theexperiments. Additionally, we calculated the Halstead metrics required for the study. Both the Halstead metrics andcomputational time metrics for the three algorithms were then compared. Our findings showed that the greedyapproach 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 itemcharacteristics to enhance the relevance and applicability of the findings. Additionally, it will explore hybridapproaches that combine these algorithms to leverage their respective strengths and effectively address theirweaknesses.
Source: Figshare
Authors: Bin Usman, Bashar, Abdullahi, Ibrahim, Elisha, Okeyinka Aderemi
Language: English
Subfield: Industrial and Manufacturing Engineering
Field: Engineering
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W6939497670
FWCI:
Cites:
Cited by:
Related to:
