登录
首页 » 算法 » 0 / 1背包问题是一个N P

0 / 1背包问题是一个N P

于 2022-02-26 发布 文件大小:8.71 kB
0 241
下载积分: 2 下载次数: 1

代码说明:

0 / 1背包问题是一个N P-复杂问题,为了解决该问题,,将用回溯算法解决该问题。既然想选择一个对象的子集,将它们装入背包,以便获得的收益最大,则解空间应组织成子集树的形状(如图1 6 - 2所示)。该回溯算法与4 . 2节的装载问题很类似。首先形成一个递归算法,去找到可获得的最大收益。然后,对该算法加以改进,形成代码。改进后的代码可找到获得最大收益时包含在背包中的对象的集合。-0/1 knapsack problem is a P-complex issues, in order to solve the problem, and will be used backtracking algorithm to solve the problem. As to the choice of a subset of object, they will load a backpack, in order to obtain the greatest profits, the solution should be organized into space subset of the shape of the tree (Figure 1 6-2 below). The backtracking algorithms and 4. Two loading problem is very similar. Forming a recursive algorithm to get the maximum benefit available. Then, this algorithm is modified to form code. Improved code can be found at the maximum benefits included in the backpack of a collection of objects.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 一个绝好的数学公式计算类,支持多种数学公式的快速计算
    一个绝好的数学公式计算类,支持多种数学公式的快速计算-a wonderful class of mathmatica fomula computing,supporting many formulas computing
    2022-01-30 18:24:11下载
    积分:1
  • CROUT REDUTION ALGORITHM
    &求解N乘N线性系统
    2022-02-06 19:18:05下载
    积分:1
  • 装配生产线调度m行和N站
    装配生产线调度m行和N站
    2023-08-12 18:30:02下载
    积分:1
  • vs2008 c# 去雾算法源码
    开发工具:vs2008;开发语言:c#;功能:去雾算法源码。本程序目的是交流学习,如果要用在项目中,建议使用opencv工具得到图像像素点的RGB值,这样会提高程序的执行效率。
    2022-03-01 17:51:23下载
    积分:1
  • Project code
    这是一个网页开发项目的代码,它包含html文件和它的模板,你知道我现在做,因为这是杀死我里面。
    2023-08-23 22:05:03下载
    积分:1
  • 用BP网络解决异或问题
    用BP网络解决异或问题-BP network or problems to resolve differences
    2022-02-03 15:47:52下载
    积分:1
  • 同时定位与构图算法
    导航,机器人领域的同时定位与构图(slam)算法。kalman滤波,粒子滤波各两个程序,亲自验证,换过多个matlab版本,一直都好用。
    2022-03-20 07:32:54下载
    积分:1
  • CUDA_match
    基于CUDA库进行图像间的匹配,很好的入门学习代码。CUDA是Compute Unified Device Architecture的缩写。 代码中主要包含CUDA的基本功能库,图像立体匹配源代码,图像处理源代码和模板匹配源代码等,还包含了测试数据。
    2022-01-24 09:49:57下载
    积分:1
  • Molgedey和舒斯特去相关算法,具有方形混合矩阵A。
    The Molgedey and Schuster decorrelation algorithm, having square mixing matrix and no noise . Truncation is used for the time shifted matrix, and it is forced to be symmetric . The delay Tau is estimated . The number of independent components are calculated using Bayes Information Criterion (BIC), with PCA for dimension reduction.-The Molgedey and Schuster decorrelation algorithm, having square mixing matrix and no noise . Truncation is used for the time shifted matrix, and it is forced to be symmetric . The delay Tau is estimated . The number of independent components are calculated using Bayes Information Criterion (BIC), with PCA for dimension reduction.
    2022-03-17 02:59:15下载
    积分:1
  • 一、前言 24点游戏是一个常见游戏,出题者给出4个整数,要求答题者在指定时间内给出一个四则运算的表达式,恰好用上这这个整数各一次,计算结果为24,超出时间为...
    一、前言 24点游戏是一个常见游戏,出题者给出4个整数,要求答题者在指定时间内给出一个四则运算的表达式,恰好用上这这个整数各一次,计算结果为24,超出时间为输。 二、分析 用计算机来算这个题,搜索速度当然有很大优势,我编程喜欢考虑通用一点,不限制输入数量和结果数,甚至不限制运算符数量。这样组合数就很大,如果输入数比较多,则搜索时间会非常长。 我用两个方法来提高搜索速度:一、是大家都能考虑到的重复搜索问题,比如1,2,3和2,3,1所有的组合情况是相同的,我只搜索使用递增序的数组,则可以降低一个组合数的数量级别;二、使用动态规划中的备忘录方法,比如你计算出2和3所有可能的计算结果,则他们与4结合的时候,要用到,与1结合的时候,也要用到,使用备忘录,可以只计算一次,大大降低运算复杂度。 三、设计 整体设计:分别设计4个类:游戏、表达式、运算、分数,各司其责,结构清晰,易于扩展。 -First, the preamble 24-point game is a common game, give the title are four integer requiring answer within a specified period of time in a four calculations give the expression, just use that the integral of the time, results for the 24, beyond the time to lose. Second, analysis Use computers to count the title, the search speed of course, there is a great advantage, I enjoy taking generic programming that does not restrict the importation of the volume and the number of results, and even limiting the number of operators. So on a large number of combinations, if you
    2022-04-21 18:17:05下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载