最佳前缀码
Rooted Tree and its application
- Best prefix code
Zhaoshengnan information compute science 102 Lvna
Tree is one of the most important concepts in Graph Theory. It has been a wide range of applications especially in the field of computer science. What is a Tree? It is not nature of the tree, the Tree is a finite set T which have n (n> 0) nodes, wherein: there is only a specific node, called Rooted Tree. When n> 1, the rest of the nodes can be divided into m (m> 0) finite sets of disjoint T1, T2 …Tm, each of the set itself is a tree, called the Subtree of Tree. The tree is an important class of non-linear data structure, it is a hierarchy defined based on the branch relationship.
A digraph D, if we omitted the direction of every side then get the resulting non-directed graph become undirected tree, then D is call to the Directed-tree. In the Directed-tree rooted tree play a very important role, and rooted tree has a wide application in the computer. Below we give the definition of the rooted tree:
[Definition]: a non-trivial Directed-tree, if the in-degree of vertex is zero, the rest of it is one. Then we say this is the rooted tree. In the rooted tree, the degree of vertex 0 called the roots; the vertices which into-degree one and out-degree zero become leaves; the vertices that into-degree one out greater than zero called interior point, interior point and the roots are referred to as a branch point collectively.
According to the definition of the root of the tree, we take advantage of the Huffman algorithm to find optimal prefix encoding, Huffman algorithm:
Given real numbers w1,w2,...,wtandw1 w2 wt,
(1) Connect two leaves which weights isw1andw2, to give a branch point, the weightw1 w2;
(2) Choose two minimum weights amongw1 w2,w3,...,wt, connect their corresponding vertices (not necessarily leaves), get a new branch point and weights;
(3) repeat (2), until forming t-1 branch point and t leaves.
One of the applications in communications coding to use Huffman binary tree is to construct a set of optimal prefix coding. In certain communication situations, you need to send the text converted into a string of binary characters.
There are usually two types of binary-coded: one equal-length encoding, the binary string length of such encoding depending on the different number of characters in the message, assumption only four characters in the message which needs to be transmitted, only two characters string can be resolved, but if the message may appear in 26 different characters, such as the length of the long code string 5. The other is unequal-length encoding, each character encoding of unequal length.
The benefit of unequal-length coding is the total length of the string in transmitted message can be as shortly as possible. There is a phenomenon the number of occurrences is not the same, the total length in the transmission message can be reduced because the usually individual characters in the message. But any one character encoding in practical unequal length coding can not be a prefix of another character encoding, such coding is called the prefix code.
Given the definition of the prefix:
前缀-prefix_英语考试_外语学习_教育专区。英语单词前缀英语词汇的奥秘——前缀 www.TopSage.com 大家网 单词的附件——词缀 (一)前缀 1. 2. 3. 4. 5. 6....
英语单词中常见前缀(prefix)和后缀(suffix)大总结。英语英语单词中常见前缀(prefix)和后缀(suffix)大总结 ★ 1.表示否定意义的前缀 1) 纯否定前缀 a-, an-,...
下面是普通的前缀列表的参数: ip prefix-list [name] [permit deny] [prefix]/[len] name 为任意的名字或者数字,prefix 是指定的路由前缀(网段),len 是...
为 我们必须使用前缀编码 前缀编码(Prefix Code) 我们必须使用前缀编码 Prefix Code前缀码 前缀码 任何一个字符的编码都不是同一字符集中 另一个字符的编码的前缀...
2010 数学研究 强前缀码的构造文 亦佳萍陈 ① (...Key Words :st ro ng p refix code ; st rong...ng Prefix Codes W EN Ping H EN Yijia C 3 ....
下面是普通的前缀列表的参数: 下面是普通的前缀列表的参数: prefixip prefix-list [name] [permit deny] [prefix]/[len] 为任意的名字或者数字, 是指定的...
由词根 (或单词) 附加前缀、后缀构 成新词的方法叫派生法。由派生法构成 的词叫派生词 大体上讲,派生法有两种:加前缀、 加后缀。本讲对前缀(prefix)进行概述...
prefix 前缀 July 2012 1 What is the meaning of these prefix? Could you give some examples? ? Anti, auto, bi, ex, mis, mono, multi, over, post...
prefix 前缀 July 2010 1 What is the meaning of these prefix? Could you give some examples? ? Anti, auto, bi, ex, mis, mono, multi, over, post...
? ? ? 读入当前字符后立即得到译码结果的编码称之 为即时码(Instantaneous Code)。即时码必须 是唯一可译码,反之则不然。 前缀码(Prefix Code) 后缀码(Suffix ...
热门文档