RUS  ENG
Full version
JOURNALS // News of the Kabardino-Balkarian Scientific Center of the Russian Academy of Sciences // Archive

News of the Kabardino-Balkarian Scientific Center of the Russian Academy of Sciences, 2024 Volume 26, Issue 5, Pages 73–83 (Mi izkab901)

Computer science and information processes

Parallelizing the ant colony algorithm for solving the knapsack problem as an example using Python

M. R. Vagizov, S. P. Khabarov

St. Petersburg State Forestry Engineering University named after S.M. Kirov, 194021, Russia, St. Petersburg, 5 Institutsky lane

Abstract: The paper considers the ant colony algorithm and describes the process of its parallelization using Python and multiprocessing module. Using the example of the knapsack problem, it is shown that distributing tasks among a number of processes allows to improve the performance of the algorithm while maintaining its efficiency. Compared to exact methods, like dynamic programming, the use of the ant colony algorithm showed a significant reduction in execution time with an acceptable level of deviation from the optimal solution. The advantage of parallelization algorithms is the efficient utilization of the computing system, where all available processor cores are used, resulting in faster execution of more iterations in the same time. The results obtained confirm the potential of AŅO for solving complex problems with limited computation time.

Keywords: ant colony algorithm, forest resource optimization, knapsack problem, heuristic algorithms

UDC: 004.89:528.8

MSC: 94-08

Received: 25.09.2024
Revised: 02.10.2024
Accepted: 09.10.2024

DOI: 10.35330/1991-6639-2024-26-5-73-83



Bibliographic databases:


© Steklov Math. Inst. of RAS, 2025