首页 | 官方网站   微博 | 高级检索  
     

一种不用构造二叉树的哈夫曼编码
引用本文:王防修,周康,同小军.一种不用构造二叉树的哈夫曼编码[J].武汉工业学院学报,2012(2):52-54.
作者姓名:王防修  周康  同小军
作者单位:武汉工业学院数学与计算机学院,湖北武汉430023
摘    要:针对传统哈夫曼编码算法都需要建立哈夫曼树的缺点,提出了一种不用建立哈夫曼树也可以进行哈夫曼编码的算法。该算法抛开具体的树结构,只需用一维数组模拟二叉树的创建过程求得每个符号的编码长度,然后根据编码长度为每个符号分配编码。算法分析表明,该算法需要的内存空间比传统哈夫曼编码算法要少很多。同时,算法的时间复杂度为O(n)。

关 键 词:二叉树  哈夫曼树  哈夫曼编码  算法

A Huffman coding Algorithm Based on a binary tree
FANG Wang-xiu,ZHOU Kang,TONG Xiao-jun.A Huffman coding Algorithm Based on a binary tree[J].Journal of Wuhan Polytechnic University,2012(2):52-54.
Authors:FANG Wang-xiu  ZHOU Kang  TONG Xiao-jun
Affiliation:(School of Mathematics and Computer Science,Wuhan Polytechnic University,Wuhan 430023,China)
Abstract:In view of the disadvantage that the traditional Huffman coding algorithm needs to build a huffman tree.this paper presents a huffman coding algorithm that doesn’t rely on establishment of the huffman tree.The algorithm can put aside a specific tree structure,and obtain each symbol coding length from simulating tree creation process used only a one-dimensional array.At last,the algorithm can assign a code for each symbol according to the length of code.The example shows that the algorithm requires much less memory space than the traditional huffman coding algorithm.At the same time,the algorithm’s time complexity is O(n).
Keywords:binary tree  Huffman tree  Huffman coding  algorithm
本文献已被 CNKI 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号