二十个问题:$D$ -元长度有界前缀编码
Twenty (or so) Questions: $D$-ary Length-Bounded Prefix Coding
摘要:
有效的最佳前缀编码早已通过霍夫曼算法实现。然而,关于霍夫曼问题的变体,仍然有改进和探索的空间。对许多实际应用有用的长度受限霍夫曼编码就是这样一种变体,对于该变体,代码被限制为其中没有$n$码字长于给定长度$l_{\max}$的代码集合。二进制长度受限编码可以通过广泛使用的Package-Merge算法在$O(n l_{\max})$时间和O(n)空间中完成,并且使用不太知名的算法具有更小的渐近复杂度。在本文中,这些算法进行了推广,而不增加复杂性,以引入一个最小的码字长度约束$l_{\min}$,允许目标函数以外的预期码字长度的最小化,并适用于二进制和非二进制代码;非二进制代码以前使用较慢的动态规划的方法来解决。这些扩展具有各种应用--包括快速解压缩和游戏"二十步“的修改版本--并且可以用于解决寻找具有有限边缘的最佳代码的问题,即,在最长和最短码字之间具有最大差异的代码中寻找最佳代码。以前提出的解决这个问题的方法是非多项式时间的,而使用新的线性空间算法解决这个问题只需要$O(n (l_{\max}- l_{\min})^2)$时间,或者如果$l_{\max}- l_{\min}$不是$O(\log n)$,甚至更少。
英文摘要:
Efficient optimal prefix coding has long been accomplished via the Huffman algorithm. However, there is still room for improvement and exploration regarding variants of the Huffman problem. Length-limited Huffman coding, useful for many practical applications, is one such variant, for which codes are restricted to the set of codes in which none of the $n$ codewords is longer than a given length, $l_{\max}$. Binary length-limited coding can be done in $O(n l_{\max})$ time and O(n) space via the widely used Package-Merge algorithm and with even smaller asymptotic complexity using a lesser-known algorithm. In this paper these algorithms are generalized without increasing complexity in order to introduce a minimum codeword length constraint $l_{\min}$, to allow for objective functions other than the minimization of expected codeword length, and to be applicable to both binary and nonbinary codes; nonbinary codes were previously addressed using a slower dynamic programming approach. These extensions have various applications -- including fast decompression and a modified version of the game ``Twenty Questions'' -- and can be used to solve the problem of finding an optimal code with limited fringe, that is, finding the best code among codes with a maximum difference between the longest and shortest codewords. The previously proposed method for solving this problem was nonpolynomial time, whereas solving this using the novel linear-space algorithm requires only $O(n (l_{\max}- l_{\min})^2)$ time, or even less if $l_{\max}- l_{\min}$ is not $O(\log n)$.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。