A modified dynamic programming algorithm rapidly and accurately solves large 0/1 knapsack problems. It has computational O($nlogn$), space O($nlogn$) and predictable maximum error. Experimentally it's accuracy increases faster than linearly with the solution size $k$. Problems with $k=10^3$ are solved with an average maximum fractional error of $10^{-4}$ and problems with $k=10^5$ with an average maximum fractional error of $10^{-7}$. The algorithm runs in constant time for all problems with a given $n$. On a common desktop computer the algorithm processes $n=10^3$ problems in $10^{-3}$ seconds and $n=10^6$ problems in 2 seconds.


翻译:一种改进的动态规划算法能够快速且精确地求解大规模0/1背包问题。该算法具有O($nlogn$)计算复杂度、O($nlogn$)空间复杂度及可预测的最大误差。实验表明其精度随解规模$k$的增长速度超过线性。对于$k=10^3$的问题,算法平均最大相对误差为$10^{-4}$;对于$k=10^5$的问题,平均最大相对误差可达$10^{-7}$。该算法在给定$n$值的问题上均保持恒定运行时间。在普通台式计算机上,算法处理$n=10^3$规模问题仅需$10^{-3}$秒,处理$n=10^6$规模问题仅需2秒。

0
下载
关闭预览

相关内容

在数学和计算机科学之中,算法(Algorithm)为一个计算的具体步骤,常用于计算、数据处理和自动推理。精确而言,算法是一个表示为有限长列表的有效方法。算法应包含清晰定义的指令用于计算函数。 来自维基百科: 算法
Top
微信扫码咨询专知VIP会员