On the Use of Gray Codes for Solving 0-1 Combinatorial Problems of Optimization in Environmental and Economic Systems

O. Trofymchuk, V. Vasyanin, Volodymyr Sokolov, A. Chikrii, L. Ushakova
{"title":"On the Use of Gray Codes for Solving 0-1 Combinatorial Problems of Optimization in Environmental and Economic Systems","authors":"O. Trofymchuk, V. Vasyanin, Volodymyr Sokolov, A. Chikrii, L. Ushakova","doi":"10.34229/2707-451x.22.4.2","DOIUrl":null,"url":null,"abstract":"Introduction. The application of binary-reflected (mirror, reflexive) Gray codes for solving combinatorial problems with pseudo-Boolean functions (polynomials from Boolean variables) is considered. A recursive Ehrlich algorithm is given for generating a sequence of lines n-bit Gray codes, in which each subsequent line differs from the previous one by only one digit (bit). As an example of the effectiveness of the use of these codes, the solution of two combinatorial problems with Boolean variables with a complete enumeration of solutions is considered, and it is shown how these codes can be used to efficiently calculate the values of the objective function and constraints. The results of an experimental study are presented, which show that Gray codes can be practically applied in branching schemes, for example, in the branch and bound method, when the number of variables in the branching nodes of the decision algorithm does not exceed 35. \nPurpose. The purpose of the article is to show the developers of algorithms and programs how to apply Gray codes in various branching schemes of the decision algorithm, for example, in the branch and bound method, when the number of binary (Boolean) variables at the nodes of the tree is small (less than 35).\nThe technique. The research methodology is based on a computational experiment for solving the 0-1 knapsack problem with the proposed algorithm of exhaustive search the solution with partial and full recalculation of the values of objective function and constraint of the problem. During the experiment, the accuracy of solving the problem by a “greedy” heuristic algorithm with time complexity O(n2) was also checked.\nResults. As a result of the experiment, it was found that the algorithm with a partial recalculation of the objective function and restrictions can be used for practical calculations in branching schemes, when the number of variables in the nodes of the branching tree does not exceed 35. The algorithm with partial recalculation is faster than the algorithm with full recalculation on average by 7 times. The heuristic \"greedy\" algorithm can be applied in practice to solve the 0-1 problem of a knapsack of large dimension (more than 10,000 items), when need to obtain an approximate value of the objective function at the limited computing resources. \nScientific novelty and practical significance. The novelty of the work lies in the proposed approach to solving combinatorial optimization problems with pseudo-Boolean functions using Gray codes. The efficiency of the proposed algorithm with a partial recalculation of the values of the objective function and constraints is shown, and its can be applied in practice in various branching schemes of the decision algorithm. Keywords: Gray codes, combinatorial optimization problems, problem solving time.","PeriodicalId":34598,"journal":{"name":"Kibernetika ta kompiuterni tekhnologiyi","volume":" ","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2022-12-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Kibernetika ta kompiuterni tekhnologiyi","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.34229/2707-451x.22.4.2","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

Abstract

Introduction. The application of binary-reflected (mirror, reflexive) Gray codes for solving combinatorial problems with pseudo-Boolean functions (polynomials from Boolean variables) is considered. A recursive Ehrlich algorithm is given for generating a sequence of lines n-bit Gray codes, in which each subsequent line differs from the previous one by only one digit (bit). As an example of the effectiveness of the use of these codes, the solution of two combinatorial problems with Boolean variables with a complete enumeration of solutions is considered, and it is shown how these codes can be used to efficiently calculate the values of the objective function and constraints. The results of an experimental study are presented, which show that Gray codes can be practically applied in branching schemes, for example, in the branch and bound method, when the number of variables in the branching nodes of the decision algorithm does not exceed 35. Purpose. The purpose of the article is to show the developers of algorithms and programs how to apply Gray codes in various branching schemes of the decision algorithm, for example, in the branch and bound method, when the number of binary (Boolean) variables at the nodes of the tree is small (less than 35). The technique. The research methodology is based on a computational experiment for solving the 0-1 knapsack problem with the proposed algorithm of exhaustive search the solution with partial and full recalculation of the values of objective function and constraint of the problem. During the experiment, the accuracy of solving the problem by a “greedy” heuristic algorithm with time complexity O(n2) was also checked. Results. As a result of the experiment, it was found that the algorithm with a partial recalculation of the objective function and restrictions can be used for practical calculations in branching schemes, when the number of variables in the nodes of the branching tree does not exceed 35. The algorithm with partial recalculation is faster than the algorithm with full recalculation on average by 7 times. The heuristic "greedy" algorithm can be applied in practice to solve the 0-1 problem of a knapsack of large dimension (more than 10,000 items), when need to obtain an approximate value of the objective function at the limited computing resources. Scientific novelty and practical significance. The novelty of the work lies in the proposed approach to solving combinatorial optimization problems with pseudo-Boolean functions using Gray codes. The efficiency of the proposed algorithm with a partial recalculation of the values of the objective function and constraints is shown, and its can be applied in practice in various branching schemes of the decision algorithm. Keywords: Gray codes, combinatorial optimization problems, problem solving time.
用灰色码求解环境经济系统中0-1组合优化问题
介绍考虑了二进制反射(镜像,自反)格雷码在求解具有伪布尔函数(布尔变量多项式)的组合问题中的应用。给出了一种递归Ehrlich算法,用于生成一系列行的n位格雷码,其中每一行与前一行仅相差一位。作为使用这些代码的有效性的一个例子,考虑了两个具有布尔变量的组合问题的解决方案,并给出了如何使用这些代码来有效地计算目标函数和约束的值。实验研究结果表明,当决策算法的分支节点中的变量数量不超过35时,格雷码可以实际应用于分支方案,例如分支定界法。意图本文的目的是向算法和程序的开发人员展示如何在决策算法的各种分支方案中应用格雷码,例如在分支定界方法中,当树的节点处的二进制(布尔)变量数量较少(小于35)时。技术。该研究方法基于求解0-1背包问题的计算实验,采用所提出的穷举搜索算法,对问题的目标函数和约束的值进行部分和全部重新计算。在实验过程中,还检验了时间复杂度为O(n2)的“贪婪”启发式算法求解问题的准确性。后果实验结果发现,当分支树的节点中的变量数量不超过35时,具有目标函数和限制的部分重新计算的算法可以用于分支方案中的实际计算。部分重新计算的算法比完全重新计算的方法平均快7倍。当需要在有限的计算资源下获得目标函数的近似值时,启发式“贪婪”算法可以在实践中应用于解决大尺寸(10000件以上)背包的0-1问题。科学新颖性和现实意义。这项工作的新颖性在于提出了使用格雷码求解具有伪布尔函数的组合优化问题的方法。通过对目标函数和约束条件的值进行部分重新计算,表明了所提出算法的有效性,并可在决策算法的各种分支方案中应用。关键词:格雷码,组合优化问题,问题求解时间。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
20
审稿时长
6 weeks
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书