登录
首页 » 算法 » 实现背包问题的三种贪心策略,背包问题描述如下: 已知 背包容量M=120 物品种类数n=10 各种物品的总效益pi(i=1,2,………10)...

实现背包问题的三种贪心策略,背包问题描述如下: 已知 背包容量M=120 物品种类数n=10 各种物品的总效益pi(i=1,2,………10)...

于 2022-03-10 发布 文件大小:844.44 kB
0 245
下载积分: 2 下载次数: 1

代码说明:

实现背包问题的三种贪心策略,背包问题描述如下: 已知 背包容量M=120 物品种类数n=10 各种物品的总效益pi(i=1,2,………10) : 50,60,70,80,90,80,70,60,50,40 各种物品的总重量wi(i=1,2………10) : 17,30,25,41,80,70,64,56,47,38 求: 各种物品所取重量占其总重量的比例xi(i=1,2,…..10),满足0

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 用树的思想求解素因数
    读过很多方法求解的首要因素,今天撞在树上想解决这个问题,定义 typedef 结构节点 {int 树节点数据结构节点 * pleft; 结构节点 * pright ;}节点,* pNode ;1,和我的想法是首先要判断这一数字是大于 2 的如果是少而 2 返回 2,如果是更多比 2 周期法官是否可以分解为两个数字相乘,如果不输出这个数字返回 3,如果大于 2 且可以分解为两个数字相乘是让这两个因素为此数目的左和右儿童跳周期时间复杂程度日志 (n)
    2022-01-26 04:42:39下载
    积分:1
  • image texture MRF synthesis
    资源描述本压缩包包含相应的代码和对应的论文,具体的信息请见包。Semi Causal Nonparametric Markov Random Field Texture Synthesis,Texture synthesis via a noncausal nonparametric multiscale Markov random field,"" IEEE Transactions on Image Processing。
    2022-02-05 21:07:51下载
    积分:1
  • 基于回溯法解决n后问题
    资源描述此程序是利用回溯法的思想,来解决N皇后问题。利用C#语言进行开发,可以更加直观的观察回溯法的运用步骤。
    2022-09-04 05:45:02下载
    积分:1
  • 图的着色
    我们介绍了图形着色和应用程序在以前的帖子。正如在前面的文章中讨论,广泛用于图形着色。不幸的是,有没有高效的算法供图着色与颜色的最小数目,由于问题是一个已知的NP 完全问题。有近似算法虽然解决这个问题。以下是基本的贪婪算法来指定颜色。它并不能保证使用最低的颜色,但它保证颜色的数量上限。更多 d + 1 颜色的基本算法从不使用其中 d 是给定的图形中的一个顶点的最大程度。
    2022-02-05 18:00:34下载
    积分:1
  • 2022-07-22 23:57:23下载
    积分:1
  • Fifty Years of Shannon Theory
    应用背景 Fifty Years of Shannon Theory: A brief chronicle is given of the historical development of the central problems in the theory of fundamental limits of data compression and reliable communication. 关键技术Shannon’s A mathematical theory of communication”published in July and October of 1948 is the Magna Carta of the information age. Shannon’s discoveryof the fundamental laws of data compression and transmission marks the birth of Information Theory. A unifying theory with profound intersections with Probability, Statistics, Computer Science, and other fields, Information Theory continues to set the stage for the development of communications, data storage and processing, and other information technologies.
    2022-02-13 17:00:08下载
    积分:1
  • % [nearest_neighbours] = find_nearest_neighbours( database, desc, max_dist ) %...
    % [nearest_neighbours] = find_nearest_neighbours( database, desc, max_dist ) % Find the indices of the nearest neighbours of the given desriptors in the近邻点寻找算法,在非线性时间序列中很有用,是常用的算法- [Nearest_neighbours] = find_nearest_neighbours (database, desc, max_dist) Find the indices of the nearest neighbours of the given desriptors in the neighbor-point search algorithm, the nonlinear time series of very useful, is a commonly used algorithm
    2022-05-24 09:30:26下载
    积分:1
  • c语言编写的卡尔曼滤波器算法,可用于对信号进行滤波处理
    c语言编写的卡尔曼滤波器算法,可用于对信号进行滤波处理-prepared by the Kalman filter algorithm can be used to signal filtering
    2022-10-02 19:45:08下载
    积分:1
  • This is a java language used by solving a dichotomy at a designated function on...
    这是一个用java语言编写的,用二分法求解某个函数在某个指定区间上的根,方便实用。-This is a java language used by solving a dichotomy at a designated function on the root zone, convenient and practical.
    2022-03-29 17:37:41下载
    积分:1
  • STL 源码实现
    最权威的STL源码实现,并附有文档。是学习 C++ stl的好帮手。                                            
    2022-03-11 14:44:26下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载