文件名称:code
-
所属分类:
- 标签属性:
- 上传时间:2016-05-28
-
文件大小:2.17kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
David A. Huffman published his paper A Method for the Construction of Minimum-Redundancy Codes , and hence printed his name in the history of computer science. As a professor who gives the final exam problem on Huffman codes, I am encountering a big problem: the Huffman codes are NOT unique. For example, given a string aaaxuaxz , we can observe that the frequencies of the characters a , x , u and z are 4, 2, 1 and 1, respectively. We may either encode the symbols as { a =0, x =10, u =110, z =111}, or in another way as { a =1, x =01, u =001, z =000}, both compress the string into 14 bits. Another set of code can be given as { a =0, x =11, u =100, z =101}, but { a =0, x =01, u =011, z =001} is NOT correct since aaaxuaxz and aazuaxax can both be decoded the code 00001011001001. The students are submitting all kinds of codes, and I need a computer program to help me determine which ones are correct and which ones are not.- David A. Huffman published his paper A Method for the Construction of Minimum-Redundancy Codes , and hence printed his name in the history of computer science. As a professor who gives the final exam problem on Huffman codes, I am encountering a big problem: the Huffman codes are NOT unique. For example, given a string aaaxuaxz , we can observe that the frequencies of the characters a , x , u and z are 4, 2, 1 and 1, respectively. We may either encode the symbols as { a =0, x =10, u =110, z =111}, or in another way as { a =1, x =01, u =001, z =000}, both compress the string into 14 bits. Another set of code can be given as { a =0, x =11, u =100, z =101}, but { a =0, x =01, u =011, z =001} is NOT correct since aaaxuaxz and aazuaxax can both be decoded the code 00001011001001. The students are submitting all kinds of codes, and I need a computer program to help me determine which ones are correct and which ones are not.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
code.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.