文件名称:greedy
介绍说明--下载内容来自于网络,使用问题请自行百度
1)编程实现背包问题贪心算法和最小生成树prim算法。通过具体算法理解如何通过局部最优实现全局最优,并验证算法的时间复杂性。
2)输入5个的图的邻接矩阵,程序加入统计prim算法访问图的节点数和边数的语句。
3) 将统计数与复杂性函数所计算的比较次数比较,用表格列出比较结果,给出文字分析。
4)背包问题的实验数据如下表:n=8,m=110
-1) programming to implement the knapsack problem greedy algorithm and minimum spanning tree prim algorithm. Through the concrete algorithm, it is understood how to achieve the global optimization through local optimization, and the time complexity of the algorithm is verified.
2) enter the adjacency matrix of the 5 graphs, add the number of nodes and the number of edges in the prim algorithm.
3) comparison of the number of statistics and the calculation of the complexity function, the comparison results are listed in the table.
4) the experimental data of knapsack problem are as follows: m=110, n=8
2)输入5个的图的邻接矩阵,程序加入统计prim算法访问图的节点数和边数的语句。
3) 将统计数与复杂性函数所计算的比较次数比较,用表格列出比较结果,给出文字分析。
4)背包问题的实验数据如下表:n=8,m=110
-1) programming to implement the knapsack problem greedy algorithm and minimum spanning tree prim algorithm. Through the concrete algorithm, it is understood how to achieve the global optimization through local optimization, and the time complexity of the algorithm is verified.
2) enter the adjacency matrix of the 5 graphs, add the number of nodes and the number of edges in the prim algorithm.
3) comparison of the number of statistics and the calculation of the complexity function, the comparison results are listed in the table.
4) the experimental data of knapsack problem are as follows: m=110, n=8
(系统自动生成,下载前可以参看下载内容)
下载文件列表
背包问题的贪心算法.docx
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.