尿ph值是什么| 女性尿路感染有什么症状| 三千年前是什么朝代| 羊后马前对是什么生肖| 半夜醒来口干舌燥是什么原因| 古尔丹代价是什么| 唐僧成了什么佛| 胸是什么| 莲白是什么菜| 南京有什么好玩的景点| 为什么会一直咳嗽| 肛裂是什么原因引起的| 臆想症是什么| 弱智的人有什么表现| aut0是什么意思| 1987年出生属什么生肖| EV71疫苗是什么| 什么东西解酒| 累觉不爱是什么意思| 食之无味什么意思| 路由器坏了有什么症状| 口若悬河是什么意思| 放任是什么意思| 绿豆跟什么一起煮最好| 刚愎自用什么意思| 为感是什么意思| 深圳市长什么级别| 祸从天降是什么生肖| 而已是什么意思| 阴道有褐色分泌物是什么原因| 两个人背靠背是什么牌子| 拉肚子吃什么好| 疱疹用什么药| 奇可以加什么偏旁| 美丽的邂逅是什么意思| 舌尖疼是什么原因| 排卵期什么症状和反应| 什么虫子咬了像针扎一样疼| h是什么意思| 倒斗是什么意思| 瞒天过海是什么意思| da医学上是什么意思| 早餐吃什么最有营养又减肥| sport什么牌子| 齁不住是什么意思| 掌中宝是什么部位| yet是什么意思| 什么水果补铁效果最好的| 预防肺结核吃什么药| navy是什么颜色| 射手座是什么性格| 海蜇长什么样| 菌群失调是什么意思| 健康证都检查什么项目| 什么叫ins风格| 嘴唇发白什么原因| 水军是什么意思| 牙疼用什么药| 吃什么药会死| 猫驱虫药什么牌子好| 四六风是什么病| 孕妇吃什么胎儿智商高| 同房为什么会出血| 什么的嗓门| 骨膜炎是什么症状| 最长的河流是什么河| 间接胆红素偏高是什么原因| 糖化血红蛋白是查什么的| 乌纱帽是什么意思| 前白蛋白偏低是什么意思| 警备区是干什么的| 什么生意好做又赚钱| 脖子上长疣是什么原因| 什么是债权| 经常自言自语是什么原因| 阑尾炎吃什么食物好| 积液是什么原因造成的怎么治疗| 胆没了对身体有什么影响| 一什么不什么的成语| 灵枢是什么意思| 学什么设计最赚钱| 什么是痤疮图片| 真命天子是什么生肖| 胸腔里面像岔气了的疼是什么原因| hushpuppies是什么牌子| 寒性和凉性有什么区别| 电解质水是什么| 身上长湿疹是什么原因导致| 口腔溃疡喝什么饮料| 双侧甲状腺弥漫病变是什么意思| 工作性质是什么意思| 脊柱侧弯是什么原因引起的| 经典什么意思| 便秘是什么原因引起的| 榴莲吃多了有什么坏处| 宝宝睡觉出汗是什么原因| 通便吃什么药最快| 阿华田是什么| 北京市市长是什么级别| 天才是什么意思| 奶奶过生日送什么礼物| 胃痛吃什么| 喜欢穿黑色衣服的女人是什么性格| 大黄鸭是什么牌子| 歹且念什么| 败血症是什么| 调和油是什么油| 什么茶女人长期喝最好| 安全三原则是指什么| skg是什么品牌| 跟腱炎吃什么药| 为什么今年有两个六月| 开边珠牛皮是什么意思| 镶牙和种牙有什么区别| 十一朵玫瑰花代表什么意思| 空心菜长什么样| 什么叫hpv| 怔忡是什么意思| 相知是什么意思| 梦见枕头是什么意思| 尿道炎什么症状| 6月8号什么星座| 草字头的字有什么| 3月10日什么星座| 前胸后背出汗是什么原因造成的| 霸王硬上弓什么意思| 30岁属什么的生肖| 淋巴细胞偏高说明什么| 左肾积水是什么意思| 3月15号是什么星座| 鹅蛋脸适合什么样的发型| 守字五行属什么| 为什么门牙突然有缝了| 跑步对身体有什么好处| 阑尾炎属于什么科室| 物美价廉是什么意思| 粘液阳性是什么意思| 不care是什么意思| 学分是什么| 花代表什么数字| 男性性功能减退吃什么药| 小学生什么时候放暑假| 亲故是什么意思| 木耳菜是什么菜| 理想血压是什么意思| 84年属鼠是什么命| 咕咕咕咕叫是什么鸟| 花是植物的什么器官| 精字五行属什么| 宫外孕是什么症状| 4.19是什么星座| 效果是什么意思| 阳痿挂什么科| 低迷是什么意思| 鸡翅木是什么木| 齐天大圣是什么意思| cu什么意思| 名声是什么意思| 汗疱疹涂什么药膏| 查乙肝挂什么科| 饿了手抖是什么原因| 搬家送什么水果| 糖丸是什么疫苗| 杏仁有什么营养| 子宫形态不规则是什么意思| 吃什么补骨髓造血| 什么人不能吃香蕉| 牙龈肿痛发炎吃什么药| 衣的部首是什么| 肺部积液吃什么药| 今天晚上吃什么| 芹菜炒什么好吃| 怕是什么生肖| 阳虚吃什么中药调理| 芦荟有什么用| 豆种翡翠属于什么档次| 胎儿畸形是什么原因造成的| 碳酸钠呈什么性| 支气管炎性改变是什么意思| 裂纹舌是什么原因引起的| 肌肉萎缩什么症状| 荨麻疹吃什么药好的快| 灵芝泡水喝有什么好处| 的确良是什么面料| 人大副主任是什么级别| joway是什么牌子| 火腿肠炒什么好吃| 子宫肌瘤是什么原因导致的| 大肠杆菌是什么意思| 梦见酒是什么意思| 籺是什么意思| 为什么女人阴唇会变大| 量化是什么意思| 发泄是什么意思| 毛五行属什么| 皇帝菜是什么菜| 疝气是什么| 9.21是什么星座| 东厂是什么意思| 低压低有什么危害| 脚上有青筋是什么原因| 麻古是什么| 眉目比喻什么| 脾肾亏虚的症状是什么| 什么是换手率| 三个白念什么| 隐血阳性什么意思| 大便长期不成形是什么原因| 什么是龟头炎| 头脑灵活是什么生肖| 妈妈过生日送什么礼物好| 吃什么食物降血压最快最好| 被螨虫咬了擦什么药膏| 韵五行属什么| 骨质疏松有什么症状表现| 来例假不能吃什么东西| 孩子爱流鼻血是什么原因| 嘴苦是什么情况| 随心而欲是什么意思| 什么叫阳痿| 女人喝什么茶叶最好| 神经纤维瘤挂什么科| 女人手心热吃什么药好| 森林里有什么| 掉头发去医院挂什么科| 七六年属什么| 炸油条用什么油最好| 精修照片用什么软件| 口腔溃疡是什么原因| 脚侧面骨头突出叫什么| 婚检是什么意思| 剖腹产后可以吃什么| 食古不化是什么意思| 褐色分泌物是什么原因| 婕妤是什么意思| 礼成是什么意思| 双子座前面是什么星座| 牛肉饺子配什么菜好吃| 龙骨是什么东西| 大脚趾头麻木是什么原因| 竹荪是什么| 手抖是什么症状| tp代表什么| 月子中心是做什么的| 条索影是什么意思| 非油炸是什么意思| 4月份是什么季节| 热射病是什么病| pin什么意思| 屁股出汗多是什么原因| 胃疼吐酸水是什么原因| 天王星是什么颜色| 黄皮果是什么水果| 吃米饭配什么菜好吃| skap是什么牌子| 肌酐是检查什么的| 5.21什么星座| 儿童正常体温在什么范围| 9月9号是什么星座| 复方血栓通片功效作用治疗什么病| 槐树什么时候开花| 口酸吃什么药效果好| 上火吃什么可以降火| 盆腔炎吃什么消炎药效果好| 百度Jump to content

月亮的肚子指的是什么

From Wikipedia, the free encyclopedia
百度 那么是否当腹中无食、无消化不良症状时就不需要用药,而仅仅是在饭后服用药物来消除腹胀等情况呢实际上,饭后服用胃动力药物,会导致药物吸收减慢,无法快速达到有效血药浓度而发挥药效,还可能引发饥饿感。

In computer science and information theory, a canonical Huffman code is a particular type of Huffman code with unique properties which allow it to be described in a very compact manner. Rather than storing the structure of the code tree explicitly, canonical Huffman codes are ordered in such a way that it suffices to only store the lengths of the codewords, which reduces the overhead of the codebook.

Motivation

[edit]

Data compressors generally work in one of two ways. Either the decompressor can infer what codebook the compressor has used from previous context, or the compressor must tell the decompressor what the codebook is. Since a canonical Huffman codebook can be stored especially efficiently, most compressors start by generating a "normal" Huffman codebook, and then convert it to canonical Huffman before using it.

In order for a symbol code scheme such as the Huffman code to be decompressed, the same model that the encoding algorithm used to compress the source data must be provided to the decoding algorithm so that it can use it to decompress the encoded data. In standard Huffman coding this model takes the form of a tree of variable-length codes, with the most frequent symbols located at the top of the structure and being represented by the fewest bits.

However, this code tree introduces two critical inefficiencies into an implementation of the coding scheme. Firstly, each node of the tree must store either references to its child nodes or the symbol that it represents. This is expensive in memory usage and if there is a high proportion of unique symbols in the source data then the size of the code tree can account for a significant amount of the overall encoded data. Secondly, traversing the tree is computationally costly, since it requires the algorithm to jump randomly through the structure in memory as each bit in the encoded data is read in.

Canonical Huffman codes address these two issues by generating the codes in a clear standardized format; all the codes for a given length are assigned their values sequentially. This means that instead of storing the structure of the code tree for decompression only the lengths of the codes are required, reducing the size of the encoded data. Additionally, because the codes are sequential, the decoding algorithm can be dramatically simplified so that it is computationally efficient.

Algorithm

[edit]

The canonical Huffman algorithm converts a standard Huffman codebook into a standardized, or canonical, form. This is achieved by ordering the symbols according to a clear convention: first, sort all symbols by the length of their codeword, from shortest to longest. Second, for any symbols that have the same codeword length, sort them by their alphabetical or numerical value. This creates a definitive, sorted list of symbols.

The normal Huffman coding algorithm assigns a variable length code to every symbol in the alphabet. More frequently used symbols will be assigned a shorter code. For example, suppose we have the following non-canonical codebook:

A = 11
B = 0
C = 101
D = 100

Here the letter A has been assigned 2 bits, B has 1 bit, and C and D both have 3 bits. To make the code a canonical Huffman code, the codes are renumbered. The bit lengths stay the same with the code book being sorted first by codeword length and secondly by alphabetical value of the letter:

B = 0
A = 11
C = 101
D = 100

Each of the existing codes are replaced with a new one of the same length, using the following algorithm:

  • The first symbol in the list gets assigned a codeword which is the same length as the symbol's original codeword but all zeros. This will often be a single zero ('0').
  • Each subsequent symbol is assigned the next binary number in sequence, ensuring that following codes are always higher in value.
  • When you reach a longer codeword, then after incrementing, append zeros until the length of the new codeword is equal to the length of the old codeword. This can be thought of as a left shift.

By following these three rules, the canonical version of the code book produced will be:

B = 0
A = 10
C = 110
D = 111

As a fractional binary number

[edit]

Another perspective on the canonical codewords is that they are the digits past the radix point (binary point) in a binary representation of a certain series. Specifically, suppose the lengths of the codewords are l1 ... ln. Then the canonical codeword for symbol i is the first li binary digits past the radix point in the binary representation of

This perspective is particularly useful in light of Kraft's inequality, which says that the sum above will always be less than or equal to 1 (since the lengths come from a prefix free code). This shows that adding one in the algorithm above never overflows and creates a codeword that is longer than intended.

Encoding the codebook

[edit]

The advantage of a canonical Huffman tree is that it can be encoded in fewer bits than an arbitrary tree.

Let us take our original Huffman codebook:

A = 11
B = 0
C = 101
D = 100

There are several ways we could encode this Huffman tree. For example, we could write each symbol followed by the number of bits and code:

('A',2,11), ('B',1,0), ('C',3,101), ('D',3,100)

Since we are listing the symbols in sequential alphabetical order, we can omit the symbols themselves, listing just the number of bits and code:

(2,11), (1,0), (3,101), (3,100)

With our canonical version we have the knowledge that the symbols are in sequential alphabetical order and that a later code will always be higher in value than an earlier one. The only parts left to transmit are the bit-lengths (number of bits) for each symbol. Note that our canonical Huffman tree always has higher values for longer bit lengths and that any symbols of the same bit length (C and D) have higher code values for higher symbols:

A = 10    (code value: 2 decimal, bits: 2)
B = 0     (code value: 0 decimal, bits: 1)
C = 110   (code value: 6 decimal, bits: 3)
D = 111   (code value: 7 decimal, bits: 3)

Since two-thirds of the constraints are known, only the number of bits for each symbol need be transmitted:

2, 1, 3, 3

With knowledge of the canonical Huffman algorithm, it is then possible to recreate the entire table (symbol and code values) from just the bit-lengths. Unused symbols are normally transmitted as having zero bit length.

Another efficient way representing the codebook is to list all symbols in increasing order by their bit-lengths, and record the number of symbols for each bit-length. For the example mentioned above, the encoding becomes:

(1,1,2), ('B','A','C','D')

This means that the first symbol B is of length 1, then the A of length 2, and remaining 2 symbols (C and D) of length 3. Since the symbols are sorted by bit-length, we can efficiently reconstruct the codebook. A pseudo code describing the reconstruction is introduced on the next section.

This type of encoding is advantageous when only a few symbols in the alphabet are being compressed. For example, suppose the codebook contains only 4 letters C, O, D and E, each of length 2. To represent the letter O using the previous method, we need to either add a lot of zeros (Method1):

0, 0, 2, 2, 2, 0, ... , 2, ...

or record which 4 letters we have used. Each way makes the description longer than the following (Method2):

(0,4), ('C','O','D','E')

The JPEG File Interchange Format uses Method2 of encoding, because at most only 162 symbols out of the 8-bit alphabet, which has size 256, will be in the codebook.

Pseudocode

[edit]

Given a list of symbols sorted by bit-length, the following pseudocode will print a canonical Huffman code book:

code := 0
while more symbols do
    print symbol, code
    code := (code + 1) << ((bit length of the next symbol) ? (current bit length))
algorithm compute huffman code is
    input:  message ensemble (set of (message, probability)).
                  base D.
    output: code ensemble (set of (message, code)).
 
    1- sort the message ensemble by decreasing probability.
    2- N is the cardinal of the message ensemble (number of different
       messages).
    3- compute the integer ?? such as ?? and ?? is integer.
    4- select the ?? least probable messages, and assign them each a
       digit code.
    5- substitute the selected messages by a composite message summing
       their probability, and re-order it.
    6- while there remains more than one message, do steps thru 8.
    7-    select D least probable messages, and assign them each a
          digit code.
    8-    substitute the selected messages by a composite message
          summing their probability, and re-order it.
    9- the code of each message is given by the concatenation of the
       code digits of the aggregate they've been put in.

[1][2]

References

[edit]
  1. ^ This algorithm described in: "A Method for the Construction of Minimum-Redundancy Codes" David A. Huffman, Proceedings of the I.R.E.
  2. ^ Managing Gigabytes: A book with an implementation of canonical Huffman codes for word dictionaries.
偏旁部首是什么意思 柳丁是什么 强化是什么意思 济公原名叫什么 他是什么意思
妩媚是什么意思 吉祥三宝是什么意思 五月二十号是什么星座 每天早上起床口苦是什么原因 霉菌性阴道炎用什么药好得快
花生为什么叫落花生 梦见婆婆去世预示什么 咳嗽买什么药 阴囊潮湿什么原因 楼房风水主要看什么
下嘴唇跳动是什么原因 孩子咬嘴唇是什么原因 粘液丝高是什么原因 什么是焦虑 拉肚子什么原因造成的
gopro是什么hcv9jop2ns5r.cn 泰勒为什么叫霉霉hcv8jop7ns6r.cn 怀孕会有什么症状hcv9jop5ns6r.cn 肌肉萎缩有什么症状hcv8jop3ns5r.cn 落汤鸡是什么意思96micro.com
mirror什么意思hcv9jop5ns7r.cn 肌无力是什么症状hcv7jop6ns4r.cn 吃什么水果治便秘hcv7jop7ns2r.cn 酸笋炒什么好吃hcv9jop0ns5r.cn 梦见捡到很多钱是什么意思hcv8jop1ns0r.cn
黑米和什么一起搭配煮粥最佳hanqikai.com 辽宁古代叫什么hcv8jop8ns2r.cn 天之骄子是什么意思520myf.com 用一什么就什么造句jasonfriends.com 皮肤长小肉粒是什么原因hcv9jop1ns3r.cn
梦见和死人一起吃饭是什么意思hcv9jop7ns4r.cn ein是什么牌子dayuxmw.com 人中深浅代表什么xinjiangjialails.com 低烧吃什么药最好hcv8jop1ns6r.cn fte是什么意思hanqikai.com
百度