吉林大学学报(理学版)

• 计算机科学 • 上一篇    下一篇

Knapsacks约束的弧相容改进算法

黄蔚1, 付兴宇2, 李占山1,2   

  1. 1. 吉林大学 计算机科学与技术学院, 长春 130012; 2. 吉林大学 软件学院, 长春 130012
  • 收稿日期:2016-06-24 出版日期:2017-01-26 发布日期:2017-02-02
  • 通讯作者: 黄蔚 E-mail:hwei@jlu.edu.cn

Improved Arc Consistency Algorithm for Knapsacks Constraints

HUANG Wei1, FU Xingyu2, LI Zhanshan1,2   

  1. 1. College of Computer Science and Technology, Jilin University, Changchun 130012, China;2. College of Software, Jilin University, Changchun 130012, China
  • Received:2016-06-24 Online:2017-01-26 Published:2017-02-02
  • Contact: HUANG Wei E-mail:hwei@jlu.edu.cn

摘要: 通过修改背包约束弧相容算法的数据结构, 将点阵图改为有向图, 解决了原背包约束弧相容算法中存在冗余计算和无效操作的问题, 加快了算法对问题的求解效率. 对比实验结果表明: 在面对同一类问题时, 因为数据结构更复杂, 改进算法的初始化时间虽增加, 但求解时间提高了20%~50%; 在面对求解难度较高的问题时, 改进算法能更好地缩减求解问题的时间.

关键词: 弧相容, Knapsacks约束, 约束满足问题

Abstract: By modifying the data structure of arc consistency algorithm of Knapsacks constraints, we transformed the bitmap to a directed graph, which solved the problem of redundant computation and invalid operation in the arc consistency algorithm of the original knapsack constraint, and accelerated the algorithm to solve the problem of efficiency. Comparative experimental results show that in the face of the same kind of problem, the initialization time of the improved algorithm is increased because the data structure is more complex, but the solution time is improved by 20%—50%. The improved algorithm can reduce the time of solving the problem in the face of the high difficulty of solving the problem.

Key words: constraint satisfaction problem, arc consistency, Knapsacks constraint

中图分类号: 

  • TP18