最佳的霍夫曼code的斐波那契数霍夫曼、code

2023-09-11 05:27:57 作者:微咸海风

什么是最佳的霍夫曼code以下字符的   频率是第8 Fibonacci数:一:1,B:1,C 2,D   :3,E:5,F:8,G:13,H:21?一般化的情况下找到一个   当频率是前n个斐波纳契数最佳code。

What is an optimal Huffman code for the following characters whose frequencies are the first 8 Fibonacci numbers: a : 1, b : 1, c : 2, d : 3, e : 5, f : 8, g : 13, h : 21? Generalize the case to find an optimal code when the frequencies are the first n Fibonacci numbers.

这是分配问题,我有一个。我不要求一个直接的答案,只是一些资源。

This is one of the assignment problems I have. I'm not asking for a straight answer, just for some resources.

我应该在哪里看把碎片拼凑起来,回答这些问题?

Where should I look to put the pieces together to answer the questions?

推荐答案

阅读 - 的http:// EN。 wikipedia.org/wiki/Huffman_coding~~V - 特别是要注意二进制树由左到右取两个最可能的符号,将它们整合在一起,形成另一种等价的符号具有等同的概率产生的那句两个符号的总和。重复该过程,直到只有一个符号。

Read - http://en.wikipedia.org/wiki/Huffman_coding - In particular, pay attention to the phrase "A binary tree is generated from left to right taking the two least probable symbols and putting them together to form another equivalent symbol having a probability that equals the sum of the two symbols. The process is repeated until there is just one symbol".

如何上面涉及到的斐波纳契数列?

How does the above relate to the fibonacci series?