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=1e3 are solved with an average maximum fractional error of 1e-4 and problems with k=1e5 with an average maximum fractional error of 1e-7. The algorithm runs in constant time for all problems with a given n. On a common desktop computer the algorithm processes n=1e3 problems in 1e-3 seconds and n=1e6 problems in 2 seconds.


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

0
下载
关闭预览

相关内容

在数学和计算机科学之中,算法(Algorithm)为一个计算的具体步骤,常用于计算、数据处理和自动推理。精确而言,算法是一个表示为有限长列表的有效方法。算法应包含清晰定义的指令用于计算函数。 来自维基百科: 算法
专知会员服务
20+阅读 · 2020年12月9日
【CVPR2020】跨模态哈希的无监督知识蒸馏
专知会员服务
61+阅读 · 2020年6月25日
【NeurIPS2019】图变换网络:Graph Transformer Network
CNN 反向传播算法推导
统计学习与视觉计算组
30+阅读 · 2017年12月29日
Spark机器学习:矩阵及推荐算法
LibRec智能推荐
16+阅读 · 2017年8月3日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2025年12月26日
VIP会员
相关VIP内容
专知会员服务
20+阅读 · 2020年12月9日
【CVPR2020】跨模态哈希的无监督知识蒸馏
专知会员服务
61+阅读 · 2020年6月25日
相关资讯
【NeurIPS2019】图变换网络:Graph Transformer Network
CNN 反向传播算法推导
统计学习与视觉计算组
30+阅读 · 2017年12月29日
Spark机器学习:矩阵及推荐算法
LibRec智能推荐
16+阅读 · 2017年8月3日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员