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

1背包问题是NP难题。0

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

  • 使用c++描述,创建一个链表,并在中实现节点的插入,删除
    使用c++描述,创建一个链表,并在中实现节点的插入,删除-Use c++ Description, create a linked list, and realize in the node insert, delete
    2022-11-14 18:00:03下载
    积分:1
  • 这里是几种能够实现高斯滤波系数提取的m文件
    这里是几种能够实现高斯滤波系数提取的m文件-Here are a few ways to achieve Gaussian filter coefficients extracted m files
    2023-01-17 03:35:03下载
    积分:1
  • MCF5282的调试程序,可以调试5282的大部分外设
    MCF5282的调试程序,可以调试5282的大部分外设-The MCF5282 debugger can debug most of 5282 peripherals
    2022-04-14 13:14:14下载
    积分:1
  • C++运算符重载的用例。。 。。 。。
    C++运算符重载的用例。。 。。 。。 -vc
    2022-08-21 01:47:36下载
    积分:1
  • A good dephi sample.
    一个很好dephi编程示例编程,让初学者能更好的入门.-A good dephi sample.
    2023-05-19 04:45:03下载
    积分:1
  • 在第1章中,我们首先讨论在使用和不使用M F C的情况下创建一个窗口,以便清楚地了解 M F C是如何工作的。M F C窗口既可以由属于M F C的C +
    在第1章中,我们首先讨论在使用和不使用M F C的情况下创建一个窗口,以便清楚地了解 M F C是如何工作的。M F C窗口既可以由属于M F C的C + +类创建,也可以由一个早于并存在于 M F C之外的非C + +窗口类创建。我们将进一步观看窗口类并讨论那些由Wi n d o w s操作系统提 供的窗口类。最后,再看看M F C应用程序中都有什么。-In Chapter 1, we first discuss the use and does not use MFC create a window to a clear understanding of how the work of MFC. MFC window can belong to MFC from the C++ Type create, you can co-exist as early as by an outside non-MFC is C++ Window class to create. We will further watch window class and discussed by the Wi ndows provided by the operating system window class. Finally, take a look at MFC application has what.
    2023-06-07 19:55:03下载
    积分:1
  • 《C++程序设计教程(VisualC++环境)》源代码 C/C++程序设计教程(Visual C++环境) 内容提要 《C/C++程序设计教程...
    《C++程序设计教程(VisualC++环境)》源代码 C/C++程序设计教程(Visual C++环境) 内容提要 《C/C++程序设计教程(Visual C++环境)》是根据教育部高等学校非计算机专业计算机基础课程教学指导分委员会提出的《关于进一步加强高校计算机基础教学的意见》中有关大学计算机基础课程教学要求编写的。 《C/C++程序设计教程(Visual C++环境)》主要内容包括:C/C++概述,基本数据类型、运算符和表达式,结构化程序设计,数组,函数,面向对象程序设计基础基于对话框的应用程序,文档/视图结构应用程序,C++的I/0流库,等等,并针对课程内容设置了11个实验,使学生通过实验巩固所学知识;《C/C++程序设计教程(Visual C++环境)》力图把传统的面向过程的内容;现代的面向对象的内容、图形用户界面编程与应用程序开发内容三部分有机地结合在一起,使读者通过对《C/C++程序设计教程(Visual C++环境)》的学习,能够掌握开发小型系统的基本知识。 《C/C++程序设计教程(Visual C++环境)》可作为高等院校各专业的程序设计课程教材,也可作为培训教材或自学教材。 -err
    2022-01-25 15:14:11下载
    积分:1
  • Permite crear reidrecciones de paginas web desde codigo ASp.net
    Permite crear reidrecciones de paginas web desde codigo ASp.net
    2022-05-24 03:16:14下载
    积分:1
  • 基于SDK,视频卡的,VC++视频采集应用程序设计
    基于SDK,视频卡的,VC++视频采集应用程序设计-Based on the SDK, video cards, VC++ Video capture application design
    2023-07-02 23:20:03下载
    积分:1
  • Sellin Programme
    2022-04-20 07:24:16下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载