-
0-1背包问题
给定N中物品和一个背包。物品i的重量是Wi,其价值位Vi ,背包的容量为C。问应该如何选择装入背包的物品,使得转入背包的物品的总价值为最大。
在选择物品的时候,对每种物品i只有两种选择,即装入背包或不装入背包。不能讲物品i装入多次,也不能只装入物品的一部分。因此,该问题被称为0-1背包问题。该算法中,矩阵c的大小为(m+1)×(n+1),物体的重量、价值和解向量大小都等于物体个数n,故该算法的空间复杂度为O(nm)。对物体重量、价值的初始化(算法实现略)所需时间都为n,解向量和矩阵第0行初始化时间为n,矩阵第0列初始化时间为m,对矩阵c的计算所需时间为n×m,解向量X的确定时间为n,故整个算法的时间复杂度为O(nm)。
- 2022-01-25 23:07:45下载
- 积分:1
-
this a relatively simple program.
this a relatively simple program.
-this is a relatively simple program.
- 2022-01-29 03:30:51下载
- 积分:1
-
通过7个实例来讲解opengl的入门知识。
通过7个实例来讲解opengl的入门知识。-7 through opengl examples to explain the entry of knowledge.
- 2022-11-03 16:20:02下载
- 积分:1
-
用友U8 Ver8.5X的单据控件,包括例子程序
用友U8 Ver8.5X的单据控件,包括例子程序-UFIDA U8 Ver8.5X control documentation, including examples of procedures
- 2022-10-28 07:25:04下载
- 积分:1
-
openssl生成证书,数字签名,加密解码
资源描述
利用openssl 生成根证书,证书发布,数字签名。
握手建立会话长连接,发送,接收数据,最后销毁会话。
- 2022-01-22 10:52:17下载
- 积分:1
-
空件编程,讲述空件常用方法,理论依据和开发方法
空件编程,讲述空件常用方法,理论依据和开发方法-empty pieces of programming, commonly used pieces on the air, and the theoretical basis for the development of methods
- 2023-06-22 09:30:03下载
- 积分:1
-
一个科学计算器,包含表达式计算功能
一个科学计算器,包含表达式计算功能-A scientific calculator, including the expression of computing power
- 2023-06-20 09:50:03下载
- 积分:1
-
操 作系统的实验程序,经典的银行家算法,界面交互性友好性不错...
操 作系统的实验程序,经典的银行家算法,界面交互性友好性不错-A test program of operating system,based on classic banker arithmetic with a friendly interface.
- 2023-08-02 21:15:03下载
- 积分:1
-
operating system is a practicing procedures for the operating system when a memo...
是我一个操作系统练习程序,用于初学操作系统的人模拟内存FIFO调度-operating system is a practicing procedures for the operating system when a memory FIFO scheduling simulation
- 2023-06-19 20:40:03下载
- 积分:1
-
驱动模型的例子,非常好用,如果需要,那你就下载吧,没人拦你的...
驱动模型的例子,非常好用,如果需要,那你就下载吧,没人拦你的-a very useful example of enabling and disabling the usb
- 2022-03-18 21:34:09下载
- 积分:1