登录
首页 » 算法 » 贪心算法解决部分背包问题

贪心算法解决部分背包问题

于 2022-01-30 发布 文件大小:1.01 kB
0 214
下载积分: 2 下载次数: 1

代码说明:

本程序研究了贪心算法,并把此算法用于部分背包问题上,基于C语言实现,达到最优解。所谓贪心算法是指,在对问题求解时,总是做出在当前看来是最好的选择。也就是说,不从整体最优上加以考虑,所做出的仅是在某种意义上的局部最优解。贪心算法不是对所有问题都能得到整体最优解,但对范围相当广泛的许多问题他能产生整体最优解或者是整体最优解的近似解。部分背包问题:     给定一个最大载重量为M的卡车和N种食品,有食盐,白糖,大米等。已知第 i 种食品的最多拥有Wi 公斤,其商品价值为Vi元/公斤,编程确定一个装货方案,使得装入卡车中的所有物品总价值最大。

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

发表评论

0 个回复

  • 基于9轴融合输出欧拉角
    资源描述基于9轴传感器融合,串口输出姿态欧拉角。
    2022-07-07 22:55:31下载
    积分:1
  • 基数排序
    资源描述在本资源中提供了基数排序的实现源码,并附有相应的注释,在vs2012中可以成功编译运行。
    2023-08-27 19:30:03下载
    积分:1
  • dtw语音识别
    dtw是语音识别中的一种重要算法,该算法在语音识别中得到广泛的应用,是一种很实用的算法。
    2023-05-10 17:05:03下载
    积分:1
  • 面向物联网的无线传感器网络综述
    资源描述摘要:在分析无线传感器网络国内外研究现状及技术成熟度的基础上,从技术层面阐述了无线传感器网络与物联 网之间的相互关系,总结了无线传感器网络系统执行所需要的信息采集系统设计、网络服务支持和网络通信协议设 计等关键技术,说明了无线传感器网络未来发展所面临的挑战,并提出了面向物联网的无线传感器网络发展新思路。 关键词:无线传感器网络;物联网;信息采集系统;网络服务支持;网络通信协议
    2022-02-02 04:57:36下载
    积分:1
  • SPHysics - SPH Free-surface Flow Solver
    SPHysics is a platform of Smoothed Particle Hydrodynamics (SPH) codes inspired by the formulation of Monaghan (1992) developed jointly by researchers at the Johns Hopkins University (U.S.A.), the University of Vigo (Spain), the University of Manchester (U.K.) and the University of Rome La Sapienza (Italy). Developed over a number of years primarily to study free-surface flow phenomena where Eulerian methods can be difficult to apply, such as waves, impact of dam-breaks on off-shore structures.
    2022-05-26 05:01:36下载
    积分:1
  • This is an improved Euler algorithm source code
    这是改进的欧拉算法源码-This is an improved Euler algorithm source code
    2022-02-01 18:12:29下载
    积分:1
  • 经典关联分析apriori java版
    经典关联分析算法apriori java版。可解决关联分析问题,比如分析超市购物关联关系,产品交叉销售可能性,客户价值提升等
    2022-01-24 15:00:25下载
    积分:1
  • 自动谱分析:可用于丢失/采样/子束光谱分析;矢量自动迭代,可用于建模,故障诊断;...
    自动谱分析:可用于丢失/采样/子束光谱分析;矢量自动迭代,可用于建模,故障诊断;-The applications of this additional toolbox are: - Automatic spectral analysis for Irregular sampling/Missing data, analysis of spectral subbands, - Vector Autoregressive modeling and Detection [uses ARMASA] - Reduced statistics ARMAsel: A compact yet accurate ARMA model is obtained based on a given power spectrum. Can be used for generation of colored noise with a prescribed spectrum. - ARfil algorithm: The analysis of missing data/irregularly sampled signals - Subband analysis: Accurate analysis of a part of the power spectrum - Detection: Generally applicable test statistic to determine whether two signals have been generated by the same process or not. Based on the Kullback-Leibler index or Likelihood Ratio. - Analysis of segments of data, possibly of unequal length.
    2022-03-04 02:22:26下载
    积分:1
  • 经典循环赛日程表
    经典循环赛日程表算法-classic round robin schedule algorithm
    2023-05-19 15:40:03下载
    积分:1
  • 在模式识别中,尤其需要对一些样本进行分类,聚类分析是常用的方,本程序基于最小最大距离的聚类原则实现对样本的聚类...
    在模式识别中,尤其需要对一些样本进行分类,聚类分析是常用的方法,本程序基于最小最大距离的聚类原则实现对样本的聚类-At pattern recognition, in particular a number of samples required for classification, clustering analysis is a commonly used method, the procedure based on the smallest maximum distance of the cluster principle implementation on sample clustering
    2023-02-23 19:00:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载