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

1背包问题是NP难题。0

于 2022-03-25 发布 文件大小:17.38 kB
0 184
下载积分: 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 个回复

  • NS的编程和调试
    NS编程与调试 - NOAH 模块 noah是一个无线路由代理(相对于DSDV ,路由, ... )只支持直接沟通的无线节点之间或基站和移动节点的情况下移动IP的使用。这使得模拟的情况下多跳无线路由是不受欢迎的。noah不会发送任何路由相关的数据包。-NS programming and debugging- NOAH Module NOAH is a wireless routing agent that (in contrast to DSDV, DSR, ...) only supports direct communication between wireless nodes or between base stations and mobile nodes in case Mobile IP is used. This allows to simulate scenarios where multi-hop wireless routing is undesired. NOAH does not send any routing related packets.
    2022-03-10 12:11:40下载
    积分:1
  • 加快互联网工具和源代码,感觉很好的程序,很好的学习…
    上网加速工具与源代码,感觉不错的程序,有着很好的学习价值,-accelerate Internet tools and source code, feeling good procedures, the good learning value,
    2022-05-17 11:25:48下载
    积分:1
  • A small program can be converted to string a number of float
    一个小程序,可以将string 转换为float型数,可用于string类的统一-A small program can be converted to string a number of float-type, can be used for the unification of string type
    2022-08-07 07:50:50下载
    积分:1
  • 具有强大功能的信息检索(布尔检索)
    这个是信息检索系统原理的作业,能够对多篇文章的单词进行布尔检索,支持and or not三种逻辑运算,对多个单词的与或非运算结果的文章篇目号进行输出。比如A and B or not C含义是既出现A单词又出现B单词或者不出现C单词的文章有第2篇,第13篇,就对这两篇文章号2和13进行输出。用户使用时可将主函数中文件改成自己计算机上的文件路径,然后就可以运行了。
    2022-02-07 07:58:15下载
    积分:1
  • VB6 and Shell .. sample code
    VB6 and Shell .. sample code-Shell and VB6 sample code ..
    2022-10-11 04:30:03下载
    积分:1
  • 串行端口通信源代码
    串行端口 RS232 通信源的代码 VC8 MFC 串行端口连接示例的源代码,VC + + visual studio 8 MFC
    2022-02-14 03:55:40下载
    积分:1
  • 公民卡系统 ASP.NET 项目
    项目
    2023-05-28 10:20:04下载
    积分:1
  • ncc_tetrahederon是Fortran90库定义的权重和abscisass…
    Newton-Cotes积分公式的加权系数计算程序库。用Fortran90编写。-NCC_TETRAHEDERON is a FORTRAN90 library which defines the weights and abscisass for a sequence of 7 Newton-Cotes closed quadrature rules for the tetrahedron.
    2022-03-19 10:19:10下载
    积分:1
  • 操作WAV文件,的播放器。
    操作WAV文件,的播放器。-operation WAV files, the player.
    2022-11-28 15:30:03下载
    积分:1
  • 考勤管理系统
    考勤管理系统是指一套管理公司的员工的上下班考勤记录等相关情况的管理系统。是考勤软件与考勤硬件结合的产品,一般为HR部门使用,掌握并管理企业的员工出勤动态。狭义上定义,考勤管理系统单指考勤软件管理系统。 考勤管理系统,在包含薪资计算模块的情况下,可以灵活定义各个工资项目的计算公式,自动调用员工的出勤数据、人员资料、就餐等与工资相关的数据,计算出员工的工资情况,可提供银行代发工资所需的相关文件。同时提供丰富的统计分析报表,可即时掌握企业工资支出情况。
    2022-02-22 08:57:56下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载