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.
翻译:我们将背包问题表述为一个统计物理系统,并在复平面上以积分形式计算相应的配分函数。所引入的形式体系使我们能够推导出三种基于统计物理的背包问题算法:一种基于精确配分函数的递归定义;另一种基于该配分函数的大权重极限;最后一种基于第二种算法的零温极限。通过比较这些算法的性能,我们发现它们在运行时间和准确度方面并未持续优于动态规划、退火算法或标准贪心算法。然而,精确配分函数被证明可以重现背包问题的动态规划解,而零温算法被证明可以产生贪心解。因此,尽管背包问题的动态规划解和贪心解在概念上截然不同,但本工作引入的统计物理形式体系揭示了前者的较大权重约束极限会导致后者。最后,我们讨论了如何扩展这一形式体系,以得到所引入算法的更准确版本,并将其应用于其他类似的组合优化问题。