登录
首页 » Windows开发 » 1背包问题是NP难题。0

1背包问题是NP难题。0

于 2022-03-25 发布 文件大小:17.38 kB
0 214
下载积分: 2 下载次数: 1

代码说明:

0-l背包问题是子集选取问题。一般情况下,0-1背包问题是NP难题。0-1背包 问题的解空间可用子集树表示。解0-1背包问题的回溯法与装载问题的回溯法十分类 似。在搜索解空间树时,只要其左儿子结点是一个可行结点,搜索就进入其左子树。当 右子树有可能包含最优解时才进入右子树搜索。否则将右子树剪去。设r是当前剩余 物品价值总和;cp是当前价值;bestp是当前最优价值。当cp+r≤bestp时,可剪去右 子树。计算右子树中解的上界的更好方法是将剩余物品依其单位重量价值排序,然后 依次装入物品,直至装不下时,再装入该物品的一部分而装满背包。由此得到的价值是 右子树中解的上界。-0-l knapsack problem is selected subset of the problem. Under normal circumstances, 0-1 knapsack problem is NP-hard. 0-1 knapsack problem the solution space available subset of the tree said. Xie 0-1 knapsack problem with the law retroactively loading the retroactive law very similar. The search solution space trees, as long as their son left node is a viable nodes, the search entered its left subtree. When the right subtree is the optimal solution may contain only son into the right tree search. It will cut right subtrees. Suppose that r is the total value of the remaining items; Cp is the current value; Bestp is currently the best value. When cp r bestp, they can cut right subtrees. Calculation right

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

发表评论

0 个回复

  • 这是一个delphi开发的播放器,本来想做一半PPLIVE房…
    这是用delphi 开发的一个播放器,做了一半本来想实现像pplive那样的-This is a delphi development player, originally wanted to do half as pplive realize that
    2022-03-14 16:53:34下载
    积分:1
  • that a company has a customer reception center, the unit time to a random custom...
    说某公司有一个顾客接待站,在单位时间内随机地有顾客到接待站询问,设每位顾客 的接待时间是某个范围内的随机值,设接待站只有一名接待人员,要求程序模拟统计 //在设定时间内,接待员的总空闲时间和顾客的平均等待时间。假定模拟数据已按顾客 //到达接待站的先后顺序依次存于某个正文数据文件中。对应每位顾客有两个数据,到达 ///时间和需要接待的时间。 //在计算机模拟程序中,程序按模拟环境中的事件出现顺序逐一处理事件。当一个事件 //结束时,下一个事件隔一段时间才发生,则程序中的模拟时钟立即推进到下一个事件 的发生时间,如一个事件还未处理结束之前,另有其他事件等待处理,则这些事件就 应依次排队等候处理。-that a company has a customer reception center, the unit time to a random customers to ask reception centers set up for each customer reception time is within the scope of a random value, is only a reception center set up to receive, process simulation requirements statistics// within a set time, the receptionist at the total idle between customers and the average waiting time. Simulated data has been assumed by the customer// Reception Center arrived in the order followed by the text stored in a data file. Corresponding two per customer data, arriving///time and the time required to receive.// In the computer simulation program, the process by simulation environment incidents each sequence
    2022-01-30 22:04:42下载
    积分:1
  • 静态链表.这是刚刚学习数据结构的时候编写的第1个小小程序,用构造类型编写的静态链表,实现了基本的赋值,插入,删除等功能。...
    静态链表.这是刚刚学习数据结构的时候编写的第1个小小程序,用构造类型编写的静态链表,实现了基本的赋值,插入,删除等功能。-static List. This is just learning the structure of the data, prepared by the time a small program that will prepare the structure type static chain and achieve the basic assignment, insert, delete capabilities.
    2022-06-20 07:54:46下载
    积分:1
  • 该TDI过滤驱动程序示例的目的是说明如何使用TDI红…
    The goal of this TDI filter driver sample is to illustrate how to use TDI to redirect outbound TCP connections to a local proxy. -The goal of this TDI filter driver sample is to illustrate how to use TDI to redirect outbound TCP connections to a local proxy.
    2022-02-21 21:30:57下载
    积分:1
  • Project on THIS(The Hindu Information System)
    Project on THIS(The Hindu Information System)
    2022-04-18 23:37:41下载
    积分:1
  • 孙鑫老师的VC++教程的光盘源代码,数写的很好,代码也很好,值得研究!第11章源程序!...
    孙鑫老师的VC++教程的光盘源代码,数写的很好,代码也很好,值得研究!第11章源程序!-SUN Xin teachers VC++ Tutorial CD-ROM source code, written in a few very good, code is also good, worthy of study! Chapter 11 source code!
    2023-08-12 16:25:03下载
    积分:1
  • 第一个事件
    firstevent
    2022-07-19 15:08:54下载
    积分:1
  • 这是对加快程序运行时间,合理程序类型最有效,最有说服力的一本书...
    这是对加快程序运行时间,合理程序类型最有效,最有说服力的一本书-Introduction to Algorithm
    2022-01-25 21:35:25下载
    积分:1
  • practical third category, which is very easy to achieve, mapping, status bar pro...
    一些实用的第三方类,实现功能非常方便,贴图, 状态栏进度条, 普通进度条,ADO操作,EXECLE操作, 菜单图表, -practical third category, which is very easy to achieve, mapping, status bar progress of the general progress of the operation ADO, EXECLE operation, and the menu chart
    2022-05-25 15:26:54下载
    积分:1
  • 这里的三维动画明星
    here r 3D animated stars
    2022-09-25 04:05:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载