Enhancing computational efficiency in solving Knapsack problem: insights from algorithmic parallelization and optimization

Bashar Bin Usman, Okeyinka Aderemi Elisha, Ibrahim Abdullahi, Idris Rabiu, Adamu Isah, Abdulganiyyu Abdulrahman

Abstract


The Knapsack problem is a combinatorial optimization problem whose exact solution using exhaustive search method is impractical. Hence, the application of approximate algorithms is usually considered when encountering this optimization problem. This study optimized some approximate algorithms: greedy, dynamic programming, and branch-and-bound for the Knapsack problem with specific objectives of evaluating their time and program complexity, comparing efficiencies, and enhancing performance. Our methodology involved utilizing advanced Parallelization techniques to accelerate the implementation of loop-based optimization algorithms by distributing tasks across multiple processing units concurrently. This simultaneous execution minimized computational time, enhanced overall efficiency, and improved scalability, enabling effective resolution of large-scale optimization challenges. Additionally, coefficients for the Knapsack model were generated using a random number generation algorithm. Through analysis and experimental runs using Halstead metrics and time complexity measures, significant improvements in the enhanced algorithms compared to classical approaches were revealed, particularly in terms of program complexity and computational speed. Notably, the enhanced algorithms demonstrated superior time complexity across varying input sizes, indicating their potential as more efficient solutions for the Knapsack Problem. This research contributes to advancing Theoretical Computer Science by offering a new computational approach for tackling intricate knapsack-model-based problems, thereby expanding the toolkit for addressing real world challenges across diverse application areas.

Received: 03 June 2024

Accepted: 12 July 2024

Published: 12 August 2024


Keywords


combinatorial, Knapsack, heuristics, Halstead metrics, time complexity, random number generation.

Full Text:

PDF

References


Kellerer H, Pferschy U, and Pisinger D, “Knapsack Problems,” 2004.

S. Goddard, “CSCE 310J Fall 2004,” 2015. [Online]. Available: https://www.cse.unl.edu/~goddard/Courses/CSCE310J

J. Vala, J. Pandya, and D. Monaka, “COMPARISION OF DYNAMIC AND GREEDY APPROACH FOR KNAPSACK PROBLEM,” International Journal of Advance Engineering and Research Development, vol. 1, no. 1, 2014, doi: 10.21090/ijaerd.0101005.

Oluyinka I. Omotosho and Aderemi E. Okeyinka, “COMPARATIVE ANALYSIS OF THE GREEDY METHOD AND DYNAMIC PROGRAMMING IN SOLVING THE KNAPSACK PROBLEM,” 2015.

Ameen S and Azzam S, “Comparing between different approaches to solve the 0/1 Knapsack problem,” 2016.

G. I. Sampurno, E. Sugiharti, and A. Alamsyah, “Comparison of Dynamic Programming Algorithm and Greedy Algorithm on Integer Knapsack Problem in Freight Transportation,” Scientific Journal of Informatics, vol. 5, no. 1, 2018, doi: 10.15294/sji.v5i1.13360.

A. A. N. Etawi and F. T. Aburomman, “0/1 Knapsack Problem: Greedy Vs. Dynamic-Programming,” International Journal of Advanced Engineering and Management Research, vol. 5, no. 02, 2020.

Y. Wu, “Comparison of dynamic programming and greedy algorithms and the way to solve 0-1 knapsack problem,” Applied and Computational Engineering, vol. 5, no. 1, 2023, doi: 10.54254/2755-2721/5/20230666.

X. Chen, “A Comparison of Greedy Algorithm and Dynamic Programming Algorithm,” SHS Web of Conferences, vol. 144, 2022, doi: 10.1051/shsconf/202214403009.

A. H. Land and A. G. Doig, “An Automatic Method of Solving Discrete Programming Problems,” Econometrica, vol. 28, no. 3, 1960, doi: 10.2307/1910129.




DOI: https://dx.doi.org/10.21622/ACE.2024.04.2.885

Refbacks

  • There are currently no refbacks.


Copyright (c) 2024 Bashar Bin Usman, Okeyinka Aderemi Elisha, Okeyinka Aderemi Elisha, Ibrahim Abdullahi, Okeyinka Aderemi Elisha, Idris Rabiu, Ibrahim Abdullahi, Adamu Isah, Okeyinka Aderemi Elisha, Abdulganiyyu Abdulrahman, Ibrahim Abdullahi, Idris Rabiu, Adamu Isah, Ibrahim Abdullahi, Abdulganiyyu Abdulrahman, Idris Rabiu, Idris Rabiu, Adamu Isah, Adamu Isah, Abdulganiyyu Abdulrahman, Abdulganiyyu Abdulrahman


Advances in Computing and Engineering
E-ISSN: 2735-5985
P-ISSN: 2735-5977

Published by:

Academy Publishing Center (APC)
Arab Academy for Science, Technology and Maritime Transport (AASTMT)
Alexandria, Egypt
ace@aast.edu