简体   繁体   English

棘手的霍夫曼树问题

[英]tricky huffman tree issue

I'm wondering how to create the following tree using the sum of rows and columns , for example, the numbers on ( ) are the probability 我想知道如何使用rowscolumns的总和创建下面的树,例如()上的数字是概率

C (0.056)   O (0.076)   G (0.020)   P (0.019)   A (0.081)   B (0.041)   
H (0.034)   D (0.030)   E (0.115)   F (0.027)   I (0.028)   J (0.002)   
K (0.005)   L (0.038)   M (0.018)   N (0.070)   Q (0.0008)  R (0.063)   
£ (0.064)   * (0.100)   - (0.029)   = (0.009)   + (0.016)   % (0.012)   

Each row is totalled at the end of each row, and each column is totalled at the bottom.Using the rows and columns totals to create a tree that will be able to find for example the letter M which is in column 3 row 3. 每行的总和在每一行的末尾,每列的总和在底部。使用行和列的总和创建一个树,该树将能够找到例如第3列第3行中的字母M

Thanks for any possible help. 感谢您提供任何可能的帮助。

You would make two Huffman codes, one with six symbols for the columns and one with four symbols for the rows, using the respective probabilities of each. 您将使用两个各自的概率制作两个霍夫曼代码,其中一个对列使用六个符号,对一个对行使用四个符号。 Each letter would be coded with one of each code. 每个字母将使用每个代码之一进行编码。

However this is a dumb idea, as you would get better compression using a single Huffman code with 24 symbols. 但这是一个愚蠢的主意,因为使用带有24个符号的单个霍夫曼代码将获得更好的压缩效果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM