In the simplest formulation of the knapsack problem, one seeks to maximize the total value of a collection of objects such that the total weight remains below a certain limit. In this work, we move from computer science to physics and formulate the knapsack problem as a statistical physics system and compute the corresponding partition function. We approximate the result in the large number limit and from this approximation develop a new algorithm for the problem. We compare the performance of this algorithm to that of other approximation algorithms, finding that the new algorithm is faster than most of these approaches while still retaining high accuracy. From its speed and accuracy relationship, we argue that the algorithm is a manifestation of a greedy algorithm. We conclude by discussing ways to extend the formalism to make its underlying heuristics more rigorous or to apply the approach to other combinatorial optimization problems. In all, this work exists at the intersection between computer science and statistical physics and represents a new analytical approach to solving the problems in the former using methods of the latter.
翻译:在最简单的 knapsack 问题公式中, 一个人试图最大限度地增加一个对象集合的总价值, 使总重量保持在一定限度以下。 在这项工作中, 我们从计算机科学转向物理, 将 knapsack 问题发展成统计物理系统, 并计算相应的分区功能。 我们比较了数量限制大的结果, 并从这个近似中为问题开发了一种新的算法。 我们比较了算法的性能与其他近似算法的性能, 发现新的算法比大多数这些方法的性能快, 但仍然保持很高的精确性。 我们从其速度和精确性关系中认为, 算法是一种贪婪的算法的表现形式。 我们最后通过讨论扩大形式主义的方法, 使其基础的偏重性更加严格, 或者将这一方法应用于其他组合优化问题。 总之, 这项工作存在于计算机科学和统计物理之间的交叉点上, 并代表了一种用后者的方法解决前者问题的新的分析方法。