首页 | 本学科首页   官方微博 | 高级检索  
     


Three space-economical algorithms for calculatingminimum-redundancy prefix codes
Authors:Milidiu  RL Pessoa  AA Laber  ES
Affiliation:Dept. de Inf., Pontificia Univ. Catolica do Rio de Janeiro;
Abstract:The minimum-redundancy prefix code problem is to determine, for a given list W=ω1,..., ωn] of n positive symbol weights, a list L=l1,...,ln] of n corresponding integer codeword lengths such that Σi=1 n 2-li⩽1 and Σi=1n ωili is minimized. Let us consider the case where W is already sorted. In this case, the output list L can be represented by a list M=m1,..., mH], where ml, for l=1,...,H, denotes the multiplicity of the codeword length l in L and H is the length of the greatest codeword. Fortunately, H is proved to be O(min(log(1/p1),n)), where p1 is the smallest symbol probability, given by ω1i=1n ωi. We present the Fast LazyHuff (F-LazyHuff), the Economical LazyHuff (E-LazyHuff), and the Best LazyHuff (B-LazyHuff) algorithms. F-LazyHuff runs in O(n) time but requires O(min(H2, n)) additional space. On the other hand, E-LazyHuff runs in O(n+nlog(n/H)) time, requiring only O(H) additional space. Finally, B-LazyHuff asymptotically overcomes, the previous algorithms, requiring only O(n) time and O(H) additional space. Moreover, our three algorithms have the advantage of not writing over the input buffer during code calculation, a feature that is very useful in some applications
Keywords:
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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