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

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

于 2022-02-26 发布 文件大小:8.71 kB
0 220
下载积分: 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 个回复

  • How to modify the MFC AppWizard Wizard to generate the appearance of the framewo...
    如何修改MFC AppWizard向导生成的框架程序的外观和大小,修改图标、光标、背景的三种方法。如何增加和删除工具栏按钮,如何给应用程序增加工具栏,如何显示和隐藏工具栏。定制状态栏,在状态栏中添加时钟显示,CTime类及其用法。在状态栏中添加进度条(主窗口产生后立即产生进度条的巧妙思想,不能在OnCreate函数中直接处理,要用到自定义消息的方法)。鼠标坐标显示,在CView中获取状态栏对象的几种方式。如何为应用程序添加启动画面。 -How to modify the MFC AppWizard Wizard to generate the appearance of the framework of procedures and size, modify the icon, cursor, background three methods. How to add and remove toolbar buttons, how to increase the application toolbar, how to show and hide the toolbar. Custom status bar, add in the status bar clock display, CTime class and its usage. In the status bar to add the progress bar (the main window immediately after the progress bar the ingenious ideas, in the OnCreate function should not directly deal with, to use a custom message to the method). Mouse coordinates shows that access to the status bar in the CView object in several ways. How to add a splash screen applications.
    2022-12-03 22:25:03下载
    积分:1
  • refprop调用
    简单的refprop代码,仅仅只是针对不懂同学,当然还有获取更多资源
    2023-07-13 16:35:04下载
    积分:1
  • 光纤传播常数计
    光纤模场分布和传播常数,输入模式的阶数,计算得到各类模式的模场分布。在其中修改参数,至少可以计算5层光纤结构。
    2022-08-24 06:43:40下载
    积分:1
  • Kmeans的VB代码和测试数据
    kmeans algorthms code vb and test data
    2022-03-25 17:35:53下载
    积分:1
  • boothc语言实现
    比较好的带符号数乘法的方法是布斯(Booth)算法。它采用相加和相减的操作计算补码数据的乘积。Booth算法对乘数从低位开始判断,根据两个数据位的情况决定进行加法 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
    2023-06-14 21:15:02下载
    积分:1
  • 最小生成树绝对可以运行的程序
    最小生成树绝对可以运行的程序-absolute minimum spanning tree can run the procedure
    2022-08-13 18:23:32下载
    积分:1
  • k--mean 实现聚类
    这是一个用c++编写的k-mean程序,完全能够实现聚类算法,可以帮助大家学习c++和聚类算法!
    2022-07-10 08:15:36下载
    积分:1
  • 基于布沙尔模型的七参数坐标转换程序
    本程序基于MFC解算坐标转换的三个参数(旋转参数,平移参数,缩放参数),对研究三维坐标转换可以看一下。
    2022-02-10 08:23:07下载
    积分:1
  • 八路抢答器
    library IEEE;                       --库说明 USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; entity bldzqdqwcb is                 Port ( clr: in  STD_LOGIC;                                 ----qing 0            clk,button0: in  STD_LOGIC; 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
    2022-03-25 18:55:58下载
    积分:1
  • 线性方程组的求解
    1.通过这次实验,我掌握了使用Gauss消去法解线性方程组的方法,加深了我对Gauss消元法的理解。2.Gauss消元法还可以改进,可衍生出列主元消去法和平方根法等,达到减少计算量和减小误差的作用使结果更加准确。3.迭代过程中要求主对角线元素不为零,这在一定程度上限制了可解的线性方程组。
    2022-02-06 11:21:14下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载