文件名称:huffman_coding
介绍说明--下载内容均来自于网络,请自行研究使用
本程序建立了哈夫曼树并求出了各字符哈夫曼编码,但不能对需要编码的文件进行分析,作出最优或
近似最优的决策
建树的时间复杂度:O(nlogn)
求解编码的平均时间复杂度:O(n*d)
d为哈夫曼树叶子的深度的期望,最坏情况的d=(n^2+n-2)/2n.
编码的最坏时间复杂度为O(n^2)-This procedure established a Huffman tree and calculated the various characters in Huffman coding, but not on the need for analysis of encoded files to make the optimal or near optimal policy-making achievements of the time complexity: O (nlogn) Solution encoding The average time complexity: O (n* d) d is the depth Huffman leaves the expectations, the worst case of d = (n ^ 2+ n-2)/2n. encoding the worst time complexity O (n ^ 2)
近似最优的决策
建树的时间复杂度:O(nlogn)
求解编码的平均时间复杂度:O(n*d)
d为哈夫曼树叶子的深度的期望,最坏情况的d=(n^2+n-2)/2n.
编码的最坏时间复杂度为O(n^2)-This procedure established a Huffman tree and calculated the various characters in Huffman coding, but not on the need for analysis of encoded files to make the optimal or near optimal policy-making achievements of the time complexity: O (nlogn) Solution encoding The average time complexity: O (n* d) d is the depth Huffman leaves the expectations, the worst case of d = (n ^ 2+ n-2)/2n. encoding the worst time complexity O (n ^ 2)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
哈夫曼编码.cpp