文件名称:tanxinsuanfa
介绍说明--下载内容均来自于网络,请自行研究使用
贪心算法又被称为登山法,根本思想是逐步获得最优解,使用贪心算法选取那些最可能实现结果的解来考虑,即以逐步的最优达到最终的全局最优。哈夫曼算法是构造最优前缀码的贪心算法,以自底向上的方式构造表示最优前缀码的二叉树T,在算法中编码字符集中的每一字符c的频率为f(c),以f为键值的优先队列Q用在贪心选择时,有效地确定算法当前要合并的两棵具有最小频率的树,一旦两棵具有最小频率的树合并后,产生一棵新的树,其频率为合并的两棵树的频率之和,并将新树插入优先队列Q。-Greedy algorithm is also known as mountain climbing method, the basic idea is to gradually obtain the optimal solution, using the greedy algorithm select those most likely to consider solutions to achieve results, that is the best step by step to reach the final of the global optimum. Huffman algorithm is to construct a prefix code of the greedy algorithm is optimal, bottom-up approach to construct the optimal prefix code, said binary tree T, the algorithm coded character set for each character c, frequency f (c) to f as a key priority queue Q with the greedy choice, effectively determine the current algorithm to merge the two trees with a minimum frequency, minimum frequency of once the two have merged tree to produce a new tree, The frequency of the frequency of the combined sum of the two trees, and the new tree into the priority queue Q.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
tanxinsuanfa.txt