Powered by OpenAIRE graph
Found an issue? Give us feedback
Kasu Journal of Comp...arrow_drop_down
Kasu Journal of Computer Science
Article . 2024 . Peer-reviewed
Data sources: Crossref
ZENODO
Article . 2024
License: CC BY
Data sources: Datacite
ZENODO
Article . 2024
License: CC BY
Data sources: Datacite
versions View all 3 versions
addClaim

This Research product is the result of merged Research products in OpenAIRE.

You have already added 0 works in your ORCID record related to the merged Research product.

Exploring Heuristic Algorithms for the Knapsack Problem: A Comparative Analysis of Program Complexity and Computational Efficiency

Authors: Bin Usman, Bashar Bin; Isah Kanoma, Saminu; Ibrahim, Zakariyau; Abubakar Niwuro, Hashimu; Ademola Rilwan, Adebayo;

Exploring Heuristic Algorithms for the Knapsack Problem: A Comparative Analysis of Program Complexity and Computational Efficiency

Abstract

The knapsack problem is an optimization problem in computer science which involves determining the most valuable combination of items that can be packed into a knapsack (a container) with a limited capacity (weight or volume); the goal is to maximize the total profit of the items included in the knapsack without exceeding its capacity. This study extensively analyzes the knapsack problem, exploring the application of three prevalent heuristics: greedy, dynamic programming, and FPTAS algorithms implemented in Python. The study aims to assess how these algorithms perform differently, focusing on program complexity and computational speed. Our main objective is to compare these algorithms and determine the most effective one for solving the knapsack problem as well as to be chosen by the researchers and developers when dealing similar problem in real-world applications. Our methodology involved solving the knapsack problem using the three algorithms within a unified programming environment. We conducted experiments using varying input datasets and recorded the time complexities of the algorithms in each trial. Additionally, we performed Halstead complexity measurements to derive the volume of each algorithm for this study. Subsequently, we compared program complexity in Halstead metrics and computational speed for the three approaches. The research findings reveal that the Greedy algorithm demonstrates superior computational efficiency compared to both Dynamic Programming (D.P) and FPTAS algorithms across various test cases. To advance understanding of the knapsack problem, future research should focus on investigating the performance of other programming languages in addressing combinatorial optimization problems, which would provide valuable insights into language choice impact. Additionally, integrating parallel computing techniques could accelerate solution processes for large-scale problem instances.

Related Organizations
Keywords

Halstead metrics, Python programming, Time complexity, NP-Hard, Heuristic, FPTAS

  • BIP!
    Impact byBIP!
    citations
    This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
    0
    popularity
    This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network.
    Average
    influence
    This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
    Average
    impulse
    This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network.
    Average
Powered by OpenAIRE graph
Found an issue? Give us feedback
citations
This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
BIP!Citations provided by BIP!
popularity
This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network.
BIP!Popularity provided by BIP!
influence
This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
BIP!Influence provided by BIP!
impulse
This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network.
BIP!Impulse provided by BIP!
0
Average
Average
Average
Upload OA version
Are you the author of this publication? Upload your Open Access version to Zenodo!
It’s fast and easy, just two clicks!