-
0
说明: 给定n种物品和一个背包,物品i的重量是Wi,价值是vi,被包容量是C,应该如何选择装入被包的物品,使得装入背包中物品的总价值最大?对于每种物品i,只有两种选择,装入或者不装入.
输入:第一行两个正整数n(物品数)和C(容量)
第二行n个正整数n,表示物品价值
第三行n个正整数n,表示物品重量
输出:第一行表示总价值
第二行n个数(0/1),0表示物品不装入,1表示装入
例如,
输入:
5 10
6 3 5 4 6
2 2 6 5 4
输出
15
1 1 0 0 1
(Species of a given n items and a backpack, the weight of item i is Wi, the value of vi, was packet capacity is C, should be how to choose a package of items to be loaded, the backpack load in the largest total value of goods? For each item i, there are only two options, loaded or not loaded. Input: the first line of the two positive integer n (the number of items) and C (capacity) of the second line of n positive integer n, that the value of the third line of n positive integer n, that the weight of output: the total value of the first line of the second line, said n number of (0/1), 0 that the items do not load, that load 1 for example, enter: 5,106,354,622 6 5 4 output 15 1 1 0 0 1)
- 2009-07-01 23:07:01下载
- 积分:1
-
Hamiltion
程序理论详见内附的pdf:《Hamilton图的充要条件及圈的矩阵算法》
主程序为
[K]=getPk(A,k)
A表示图的邻接矩阵,k表示k阶长路和圈
返回K表示该图的所有k阶长路和圈
其他函数介绍:
Ppro定义路的乘法
Psum定义路的加法
MatPro定义路矩阵的乘法
isaPorC判断是否为路或圈
P2subP提取路的和式中的所有路
getP1从邻接矩阵得到1阶路矩阵(get a k-path from a graph)
- 2014-09-13 07:05:38下载
- 积分:1
-
secret
基于matlab牛顿-拉夫逊 无功补偿优化设计(Newton- Ralph reactive power compensation optimization design)
- 2013-05-17 21:53:58下载
- 积分:1
-
restore-the-motion-blurred
说明: 根据需要输入模糊参数,生成相应的模糊图像,并对模糊图像进行恢复,验证运动模糊图像的恢复算法(Input fuzzy parameters needed to generate the corresponding blurred image,and restore the blurred image to authenticate the algorithm)
- 2011-03-07 14:10:05下载
- 积分:1
-
book_files
说明: Matlab是一种简洁而容易入手的编程工具,对于学电子的同学在学习《数字信号处理》(清华大学版)的过程中可随课本的学习,联系matlab 一些基本的程序。(Matlab is a simple and easy to start programming tools for students learning electronic learning " Digital Signal Processing" (Tsinghua University, version) in the process of learning can be as textbooks, contact matlab some of the basic procedures.)
- 2010-03-18 14:48:15下载
- 积分:1
-
bp339
利用matlab语言实现的BP算法,很好用。(Using matlab language implementation of the BP algorithm, it just works.)
- 2009-03-25 11:14:07下载
- 积分:1
-
plotbox
cica is most usefule za shaa shaa algorithm. and it is hutsdag pizdanuud yum ahkak.
- 2013-12-17 17:09:21下载
- 积分:1
-
一个MATLAB关于三分之一倍频程处理的程序
使用matlab计算噪声处理:1/3倍频程(Using MATLAB to calculate noise processing: 1/3 octave)
- 2020-07-08 15:58:56下载
- 积分:1
-
LS_ESPRIT
最小均方ESPRIT算法,仿真了随着信噪比的变化RMSE的变化,随着信噪比的增加RMSE减小(Minimum mean square ESPRIT algorithm, and simulated with the change of SNR RMSE of change, with the increase of SNR RMSE decrease)
- 2014-09-15 08:03:25下载
- 积分:1
-
Liu_Zhang_Peterson_Chandra_PV
Large Area DEM Generation Using Airborne LiDAR Data and Quality Control
- 2014-09-18 23:47:06下载
- 积分:1