Abstract <p>For NP-complete problems, it is a well-known fact that each evaluated variant is checked in polynomial time on von Neumann machines. But the number of variants, as well as the total time for their construction, increases exponentially relative to the length of the input data <InlineEquation ID="IEq1"> <EquationSource Format="TEX">\(M\)</EquationSource> <!--LobJMat2561013Snytnikova-m1--> </InlineEquation>. Associative models can build a variant table with an estimate of <InlineEquation ID="IEq2"> <EquationSource Format="TEX">\(O(M)\)</EquationSource> <!--LobJMat2561013Snytnikova-m2--> </InlineEquation> time and <InlineEquation ID="IEq3"> <EquationSource Format="TEX">\(O(2^{M})\)</EquationSource> <!--LobJMat2561013Snytnikova-m3--> </InlineEquation> memory. Using the cuSTAR library, associative algorithms can be executed on graphics accelerators. This paper presents an associative algorithm to solve the 0-1 knapsack problem, which is implemented on graphics accelerators and achieves a time complexity of <InlineEquation ID="IEq4"> <EquationSource Format="TEX">\(O(M)\)</EquationSource> <!--LobJMat2561013Snytnikova-m4--> </InlineEquation> for limited values of <InlineEquation ID="IEq5"> <EquationSource Format="TEX">\(M\)</EquationSource> <!--LobJMat2561013Snytnikova-m5--> </InlineEquation>. At the same time, the value of <InlineEquation ID="IEq6"> <EquationSource Format="TEX">\(M\)</EquationSource> <!--LobJMat2561013Snytnikova-m6--> </InlineEquation> is not limited by the size of the standard data types. Also, limiting the number of kernels and the length of the variant table leads to an increase in the value of M, at which the algorithm has linear complexity in terms of execution time.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

cuSTAR Library for NP-complete Problems: Solving the Knapsack Problem

  • T. V. Snytnikova

摘要

Abstract

For NP-complete problems, it is a well-known fact that each evaluated variant is checked in polynomial time on von Neumann machines. But the number of variants, as well as the total time for their construction, increases exponentially relative to the length of the input data \(M\) . Associative models can build a variant table with an estimate of \(O(M)\) time and \(O(2^{M})\) memory. Using the cuSTAR library, associative algorithms can be executed on graphics accelerators. This paper presents an associative algorithm to solve the 0-1 knapsack problem, which is implemented on graphics accelerators and achieves a time complexity of \(O(M)\) for limited values of \(M\) . At the same time, the value of \(M\) is not limited by the size of the standard data types. Also, limiting the number of kernels and the length of the variant table leads to an increase in the value of M, at which the algorithm has linear complexity in terms of execution time.