We formulate the knapsack problem (KP) as a statistical physics system and compute the corresponding partition function as an integral in the complex plane. The introduced formalism allows us to derive three statistical-physics-based algorithms for the KP: one based on the recursive definition of the exact partition function; another based on the large weight limit of that partition function; and a final one based on the zero-temperature limit of the second. Comparing the performances of the algorithms, we find that they do not consistently outperform (in terms of runtime and accuracy) dynamic programming, annealing, or standard greedy algorithms. However, the exact partition function is shown to reproduce the dynamic programming solution to the KP, and the zero-temperature algorithm is shown to produce a greedy solution. Therefore, although dynamic programming and greedy solutions to the KP are conceptually distinct, the statistical physics formalism introduced in this work reveals that the large weight-constraint limit of the former leads to the latter. We conclude by discussing how to extend this formalism in order to obtain more accurate versions of the introduced algorithms and to other similar combinatorial optimization problems.
翻译:我们将背包问题(KP)制定为一个统计物理系统,并计算相应的配分函数作为复平面上的积分。引入的形式主义使我们能够推导出三种基于统计物理的KP算法:一个基于精确配分函数的递归定义;另一个基于该配分函数的大重量极限;最后一个基于第二个算法的零温度极限。比较算法的性能,我们发现它们不能始终优于(在运行时间和准确性方面)动态规划、退火或标准贪婪算法。然而,精确配分函数被证明能够复制KP的动态规划解,而零温度算法被证明能够产生贪婪解。因此,虽然KP的动态规划和贪婪解概念上是不同的,但本文介绍的统计物理形式主义揭示出前者的大重量限制极限导致了后者。我们最后讨论如何扩展这种形式主义以获得更准确版本的引入算法以及用于其他类似组合优化问题。