计算机科学 ›› 2018, Vol. 45 ›› Issue (7): 73-77.doi: 10.11896/j.issn.1002-137X.2018.07.011

• 第三十三届全国信息存储技术学术会议 • 上一篇    下一篇

求解01背包问题的贪婪蛙跳算法

高思齐,邢玉轩,肖侬,刘芳   

  1. 国防科技大学计算机学院 长沙410073
  • 收稿日期:2017-07-18 出版日期:2018-07-30 发布日期:2018-07-30
  • 作者简介:高思齐(1994-),女,硕士,主要研究方向为群体智能算法和神经网络,E-mail:gsq_fighting@126.com;邢玉轩(1990-),男,博士,主要研究方向为大数据处理;肖 侬(1969-),男,教授,主要研究方向为云计算、存储以及计算机体系结构,E-mail:nongxiao@nudt.edu.cn;刘 芳(1976-),女,副教授,主要研究方向为网络存储和信息安全,E-mail:liufang@nudt.edu.cn(通信作者)。
  • 基金资助:
    本文受国家高技术研究发展计划(863),国家自然科学基金项目(2015AA015305,61232003,61332003,61202121)资助。

Greedy Frog Leaping Algorithm for 01 Knapsack Problem

GAO Si-qi,XING Yu-xuan,XIAO Nong,LIU Fang   

  1. School of Computer,National University of Defense Technology,Changsha 410073,China
  • Received:2017-07-18 Online:2018-07-30 Published:2018-07-30

摘要: 01背包问题是经典的组合优化问题,被广泛应用于生活中的多个领域,如货物装载、预算控制、资源分配和资产管理等。因此,长期以来许多科学家在该领域不断钻研,并取得了丰硕的成果。尽管01背包问题已被研究多年,但由于该问题已被证明为NP完全问题,因此找到最优解并不容易。近年来,大量的智能算法不断被提出并被用来求解01背包问题,如化学反应优化算法、遗传算法、粒子群算法、蛙跳算法、人工蜂群算法、爬山算法和模拟退火算法等。通过对智能算法和01背包问题的探索,文中提出了贪婪蛙跳算法(GFLA)来解决01背包问题。不同于传统的蛙跳算法,GFLA总会在每次模因搜索过程中更新全局最优解,以便在接下来的全局搜索过程使用最新的全局最优解进行搜索,从而扩大解的搜索空间。除了蛙跳算法这类传统的局部搜索和全局搜索策略之外,针对01背包问题,在计算适应度值的阶段,本工作提出了贪心策略并分别将其应用于drop和add两个步骤。在drop阶段,若背包超重,则将其中价值密度最小的物品移出并更新解决方案。在add阶段,若背包还有承载物品的能力,则将未放入背包的重量最小的物品放入背包,并对背包信息进行更新。这样,便大大提高了利用蛙跳算法来求解01背包问题的能力。将贪婪蛙跳算法与蜂群算法、化学反应优化算法、遗传算法和量子演化算法进行对比,结果显示,贪婪蛙跳算法取得了最好的结果,从而表明了该算法是求解01背包问题的有效算法。

关键词: 01背包问题, 价值密度, 贪婪策略, 蛙跳算法, 最小分配

Abstract: 01 knapsack problem(01kp) is a classic combinatorial optimization problem and appears in many models of real world problem,such as cargo loading,budget control,resource allocation,financial management,and so forth.Many scientists have studied on this area for several decades and achieved a rich harvest.Even though 01kp has been researched for many years,it has been proved to be an NP complete problem,thus finding the best solution is not easy.In recent years,many original and improved intelligent algorithms was proposed to address 01 knapsack problem,for instance,chemical reaction optimization algorithm,genetic algorithm,particle swarm optimization algorithm,shuffled frog leaping algorithm,artificial bee colony algorithm,hill climbing algorithm and simulated annealing algorithm.This paper studied on many intelligent algorithms and 01 knapsack problems,and proposed greedy frog leaping algorithm (GFLA) to solve 01kp.Different from original shuffled frog leaping algorithm,GFLA always updates global best solution during each memeplex process,such that global exploration would employ the latest global best solution to expand the search space.In addition to traditional global exploration and local exploitation,aiming at 01kp,it proposed a greedy scheme at fitness computing stage,including drop and add two steps.At drop step,if the knapsack is over-weighted,then the item with minimum value density is removed from the knapsack and the solution is updated.At add step,if there is still space for the knapsack to load items,then items with minimum weight which have not been loaded are put into the knapsack and solution is also updated.Drop and add steps adopted in our work greatly improve greedy frog leaping algorithm’s ability to address 01kp.This paper conducted the experiments on benchmarks,and compared the results with chemical reaction optimization algorithm,genetic algorithm,quantum-inspired evolutionary algorithm,chemical reaction optimization with greedy strategy.All experimental results show that greedy frog leaping algorithm obtains the best solutions in all cases,which indicates that GFLA is an efficient algorithm to address 01 knapsack problem.

Key words: 01 knapsack problem, Frog leaping algorithm, Greedy scheme, Min-allocate, Value density

中图分类号: 

  • TP301
[1]LAGOUDAKIS,MICHAIL G.The 0-1 knapsack problem--An introductory survey .https://pdfs.semanticscholar.org/6bd6/2e0ba7233c5086fe4b9061926d191894714b.pdf. [2]SAHNI S.Approximate Algorithms for the 0/1 Knapsack Problem.Journal of the Acm,1975,22(1):115-124.SHI H.Solution to 0/1 knapsack problem based on improvedant colony algorithm∥2006 IEEE International Conference on Information Acquisition.IEEE,2006:1062-1066.
[4]YAN C,GAO S,LUO H,et al.A hybrid algorithm based on tabu search and chemical reaction optimization for 0-1 Knapsack problem∥International Conference in Swarm Intelligence.Springer,Cham,2015:229-237.
[5]HAN K H,KIM J H.Quantum-inspired evolutionary algorithm for a class of combinatorial optimization.IEEE Transactions on Evolutionary Computation,2002,6(6):580-593.
[6]SHEN W,XU B,HUANG J P.An Improved Genetic Algorithm for 0-1 Knapsack Problems∥International Conference on NETWORKING & Distributed Computing.IEEE Computer Society,2011:32-35.
[7]TRUONG T K,LI K,XU Y.Chemical reaction optimizationwith greedy strategy for the 0-1 knapsack problem.Applied Soft Computing Journal,2013,13(4):1774-1780.
[8]EUSUFF M,LANSEY K,PASHA F.Shuffled frog-leaping algorithm:a memetic meta-heuristic for discrete optimization.Engineering Optimization,2006,38(2):129-154.
[1] 魏霖静, 宁璐璐, 郭斌, 侯振兴, 甘诗润.
基于混合蛙跳算法的K-mediods聚类挖掘与并行优化
K-mediods Cluster Mining and Parallel Optimization Based on Shuffled Frog Leaping Algorithm
计算机科学, 2020, 47(10): 126-129. https://doi.org/10.11896/jsjkx.190900113
[2] 张新明, 程金凤, 康强, 王霞.
改进的混合蛙跳算法及其在多阈值图像分割中的应用
Improved Shuffled Frog Leaping Algorithm and Its Application in Multi-threshold Image Segmentation
计算机科学, 2018, 45(8): 54-62. https://doi.org/10.11896/j.issn.1002-137X.2018.08.010
[3] 贾鑫,张少平.
基于贪婪策略的NAND FLASH存储器的磨损均衡算法研究
Research on Wear Leveling Algorithm of NAND FLASH Memory Based on Greedy Strategy
计算机科学, 2017, 44(Z11): 312-316. https://doi.org/10.11896/j.issn.1002-137X.2017.11A.066
[4] 米晓萍,李雪梅.
基于信息融合度传递的频域徙动入侵特征挖掘算法
Mining Algorithm of Frequency Domain Migration Intrusion Feature Based on Information Fusion Transfer
计算机科学, 2015, 42(3): 224-227. https://doi.org/10.11896/j.issn.1002-137X.2015.03.046
[5] 刘晓芹,黄考利,安幼林,吕晓明.
改进的混合蛙跳算法在传感器配置优化中的应用
Application of Improved Shuffled Frog Leaping Algorithm in Optimum of Sensor Location
计算机科学, 2011, 38(2): 72-75.
[6] 韩毅,蔡建湖,周根贵,李延来,林华珍,唐加福.
随机蛙跳算法的研究进展
Advances in Shuffled Frog Leaping Algorithm
计算机科学, 2010, 37(7): 16-19.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!