文件名称:huffman
- 所属分类:
- 其他小程序
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 864kb
- 下载次数:
- 0次
- 提 供 者:
- wsc****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
哈夫曼编码
问题描述与实验目的:
给定n个字母(或字)在文档中出现的频率序列X=<x1,x2,…,xn>,求出这n个字母的Huffman编码。为方便起见,以下将频率用字母出现的次数(或称权值)w1,w2,…,wn代替。
输入样例
2
6
9 8 3 4 1 2
8
60 20 5 5 3 3 3 1
输出样例
Case 1
9 00
8 01
3 100
4 11
1 1011
2 1010
Case 2
60 0
20 10
5 1101
5 1110
3 11000
3 11001
3 11110
1 11111
-Huffman coding
Descr iption and Purpose:
N given letters (or words) in the document the frequency of sequence X = <x1,x2,…,xn>, obtained the n-letter Huffman coding. For convenience, the following will appear with the letter the number of frequencies (or weights) w1, w2, ..., wn instead.
Input sample
2
6
983,412
8
6020553331
Sample Output
Case 1
900
801
3 100
4 11
11011
21010
Case 2
60 0
20 10
51101
51110
311,000
311,001
311,110
问题描述与实验目的:
给定n个字母(或字)在文档中出现的频率序列X=<x1,x2,…,xn>,求出这n个字母的Huffman编码。为方便起见,以下将频率用字母出现的次数(或称权值)w1,w2,…,wn代替。
输入样例
2
6
9 8 3 4 1 2
8
60 20 5 5 3 3 3 1
输出样例
Case 1
9 00
8 01
3 100
4 11
1 1011
2 1010
Case 2
60 0
20 10
5 1101
5 1110
3 11000
3 11001
3 11110
1 11111
-Huffman coding
Descr iption and Purpose:
N given letters (or words) in the document the frequency of sequence X = <x1,x2,…,xn>, obtained the n-letter Huffman coding. For convenience, the following will appear with the letter the number of frequencies (or weights) w1, w2, ..., wn instead.
Input sample
2
6
983,412
8
6020553331
Sample Output
Case 1
900
801
3 100
4 11
11011
21010
Case 2
60 0
20 10
51101
51110
311,000
311,001
311,110
(系统自动生成,下载前可以参看下载内容)
下载文件列表
huffman\huffman.aps
.......\huffman.cpp
.......\huffman.def
.......\huffman.dsp
.......\huffman.dsw
.......\huffman.h
.......\huffman.idl
.......\huffman.ncb
.......\huffman.opt
.......\huffman.rc
.......\huffmanps.def
.......\huffmanps.mk
.......\Resource.h
.......\StdAfx.cpp
.......\StdAfx.h
.......\huffman\huffman.cpp
.......\.......\huffman.dsp
.......\.......\huffman.dsw
.......\.......\huffman.ncb
.......\.......\huffman.opt
.......\.......\huffman.plg
.......\.......\Debug\huffman.exe
.......\.......\.....\huffman.ilk
.......\.......\.....\huffman.obj
.......\.......\.....\huffman.pch
.......\.......\.....\huffman.pdb
.......\.......\.....\vc60.idb
.......\.......\.....\vc60.pdb
.......\.......\Debug
.......\huffman
.......\Debug
huffman
.......\huffman.cpp
.......\huffman.def
.......\huffman.dsp
.......\huffman.dsw
.......\huffman.h
.......\huffman.idl
.......\huffman.ncb
.......\huffman.opt
.......\huffman.rc
.......\huffmanps.def
.......\huffmanps.mk
.......\Resource.h
.......\StdAfx.cpp
.......\StdAfx.h
.......\huffman\huffman.cpp
.......\.......\huffman.dsp
.......\.......\huffman.dsw
.......\.......\huffman.ncb
.......\.......\huffman.opt
.......\.......\huffman.plg
.......\.......\Debug\huffman.exe
.......\.......\.....\huffman.ilk
.......\.......\.....\huffman.obj
.......\.......\.....\huffman.pch
.......\.......\.....\huffman.pdb
.......\.......\.....\vc60.idb
.......\.......\.....\vc60.pdb
.......\.......\Debug
.......\huffman
.......\Debug
huffman