为什么左眼皮一直跳| 榛子是什么树的果实| 上午十点是什么时辰| 粉皮是什么做的| 沐沐是什么意思| 碱性磷酸酶高是什么原因| 1月29日是什么星座| 渣是什么意思| 增强胃动力吃什么药| 口腔溃疡看什么科室| 结售汇是什么意思| 总是口渴是什么原因| 成都有什么特色美食| 凤梨跟菠萝有什么区别| 吃什么能去湿气最好| 癫痫是什么意思| 什么的风采| 什么品种的榴莲最好吃| 多吃木瓜有什么好处| 脚背浮肿是什么原因引起的| 慢性肾功能不全是什么意思| 一路繁花的意思是什么| hw是什么牌子| 口腔扁平苔藓是什么原因造成的| 和解少阳是什么意思| 氟斑牙是什么原因造成的| 状元是什么意思| 郑少秋为什么娶沈殿霞| 什么是规培| 什么是双修| 泌乳素高是什么原因引起的| 梦见自己会开车了是什么意思| 几年是什么年| 早上6点是什么时辰| 车仔面为什么叫车仔面| 流汗多是什么原因| mri检查是什么| 黑猫警长是什么猫| 过敏性鼻炎吃什么水果好| 治疗宫颈炎用什么药好得快| 甲亢和甲减有什么区别| 藏在我回忆里的那个人什么歌| 大人退烧吃什么药| 天经地义是什么意思| 股骨头疼痛什么原因| 生物医学工程专业学什么| 心脏无力吃什么药最好| 海绵是什么材料做的| 言字旁可念什么| 儿童喝蜂蜜水有什么好处和坏处| 冠冕堂皇是什么意思| 肋骨疼挂什么科| 猪肝色是什么颜色| 抄送和密送是什么意思| 紫水晶五行属什么| 白帆是什么| 阴险表情什么意思| 五行什么意思| 1和0是什么意思| 赤是什么意思| 红袖什么意思| 桃子不能和什么一起吃| 头疼头晕去医院挂什么科| 腰肌劳损看什么科| 鼻烟壶是干什么用的| usp是什么意思| 脓疱疮是什么原因引起的| 清洁度lv是什么意思| 花心什么意思| 罗锅是什么意思| 桑拿是什么| 猪肉炖什么好吃| 什么是痔疮| 64岁属什么| 香茅是什么东西| 手部湿疹用什么药膏| 容易静电的人说明什么| 八月二十是什么星座| 肛门下坠感是什么症状| 最大的罩杯是什么杯| 脑梗是什么| 欲购从速什么意思| 依依不舍的依依是什么意思| 什么样的脚好看| 肠胃功能紊乱什么症状| 尿素低是什么原因| 不一般是什么意思| db是什么意思| 补办医保卡需要什么资料| 揾什么意思| 阴道撕裂用什么药| 费洛蒙是什么| 心电图j点抬高什么意思| 多发纳氏囊肿是什么意思| 阴虚火旺吃什么中成药好| afc是什么意思| 脖子上长小肉粒是什么| 更年期什么时候结束| 双喜临门指什么生肖| 宫颈肥大需要注意什么| 玫瑰茄是什么东西| 被草是什么感觉| 路程等于什么| 营养不良会导致身体出现什么症状| cl是什么单位| 心慌是什么意思| 区块链是什么| 大拇指麻木是什么原因| 橄榄菜长什么样子图片| 湿气重吃什么蔬菜| 脸上长粉刺是什么原因| 意面是什么做的| 困惑什么意思| 松垮是什么意思| 烧心吃什么药| 球蛋白高是什么意思| 什么的脸庞| 肝病有什么征兆| s 是什么意思| 猪肉排酸是什么意思| 水肿吃什么消肿最快| 抽动症是什么引起的| 有机物是什么| 拉新是什么意思| 蛇用什么呼吸| 长期失眠挂什么科| 腊月是什么月| 慢性咽喉炎什么症状| 小孩什么时候换牙| 胃酸反流是什么原因| chest是什么意思| 神农架为什么是禁区| 肺火吃什么中成药| 刘邦为什么要杀韩信| 什么什么不什么| 5月1号是什么星座| 红眼鱼是什么鱼| 法大大是什么| 北漂是什么意思| 做梦梦见屎是什么意思| 军用水壶为什么是铝的| 蜂蜜什么时候吃最好| 麝香是什么| 梦到拔牙是什么预兆| spect是什么检查| 什么的小朋友| 炭疽病是什么病| 矜贵是什么意思| 偏头痛吃什么药见效快| 女团ace是什么意思| 九层塔是什么| 彷徨是什么意思| 高粱是什么颜色| pacu是什么意思| 水泡型脚气用什么药| 吸烟人吃什么清肺最快| 古来稀是什么意思| 乳头疼吃什么药| 阴道炎用什么洗| 1993年出生属什么生肖| 吃毓婷有什么副作用| 富不过三代是什么意思| 出汗吃什么药| dmf是什么溶剂| 胆囊炎用什么药| 右是什么结构| 感染幽门螺旋杆菌吃什么药| 122是什么号码| 痛风检查什么项目| 成双成对是什么意思| 电饭锅内胆是什么材质| 陈皮为什么越陈越好| 五什么十什么| 什么样的智齿不需要拔| 清胃火吃什么药| score是什么意思| 声线是什么意思| 足及念什么| 薄荷不能和什么一起吃| 一九七二年属什么生肖| 下野是什么意思| 溥仪和慈禧什么关系| 孕检无创是检查什么的| 什么情况下血压会升高| 产假什么时候开始休| 河南属于什么气候| 牙出血什么原因| 息肉有什么危害| 肆虐是什么意思| 补气血喝什么茶| 好人卡什么意思| 过敏忌口不能吃什么| 血压高吃什么降压药| 冯庸大学现在叫什么| 脑血管堵塞吃什么药| 不可理喻什么意思| 九月十七日是什么星座| 巴沙鱼为什么不能吃| 舌苔开裂是什么原因呢| 爱出汗吃什么药| 从容不迫什么意思| 窦性心律不齐是什么意思| 惊世骇俗的意思是什么| porridge什么意思| 猴子偷桃是什么意思| 眼黄瘤什么方法治疗最好| 肚子疼去医院挂什么科| 小ck属于什么档次| 盆腔积液是什么引起的| 摔纹皮是什么皮| 刻舟求剑是什么生肖| 熊猫血有什么好处| 黑色素通过什么排出来| 1级高血压是什么意思| 咖啡烘培度有什么区别| 帆状胎盘是什么意思| mar是什么意思| 不来月经吃什么药催经| 铅中毒用什么解毒| 君山银针属于什么茶| 棚改是什么意思| 眼带用什么方法消除| 环移位了有什么症状| 头孢呋辛钠主治什么病| 点痣去医院挂什么科| 叕什么意思| 天上的云像什么| 洗衣机什么牌子的好| 什么东西最刮油减肥| cm2是什么单位| 长针眼是什么意思| 感冒反复发烧是什么原因引起的| 新生儿干呕是什么原因| 排卵试纸一深一浅说明什么| 端午节应该吃什么| 薄幸是什么意思| 胎儿左侧侧脑室增宽的原因是什么| 中耳炎吃什么| 鼻炎是什么原因引起的| k9什么意思| 拉稀肚子疼是什么原因| 坐镇是什么意思| 牛马是什么意思| 小孩风寒感冒吃什么药| 瘆人是什么意思| 手指头麻木吃什么药| 痛风不能喝什么饮料| 洗面奶什么牌子好| 为什么口水是臭的| 血脂高胆固醇高吃什么好| 去医院检查怀孕挂什么科| 土耳其烤肉是用什么肉| 5月23号是什么星座| 左脸长痘是什么原因| 猪头三是什么意思| 干咳喝什么止咳糖浆好| 为什么一来月经就拉肚子| 查幽门螺旋杆菌挂什么科| 可乐不能和什么一起吃| 眼袋肿是什么原因| cd代表什么意思| 油条配什么好吃| 共轭什么意思| 人工荨麻疹是什么原因引起的| 百度Jump to content

秘鲁部长赞中国是“很好的贸易伙伴” 英媒:打脸蒂勒森

From Wikipedia, the free encyclopedia
百度 由于大部分酸奶并没有标明到底有多少活的A菌和B菌,有多少幸运菌真的进入身体,就不必期待过高了,只要相信有比没有好就行了。

Adaptive Huffman coding (also called Dynamic Huffman coding) is an adaptive coding technique based on Huffman coding. It permits building the code as the symbols are being transmitted, having no initial knowledge of source distribution, that allows one-pass encoding and adaptation to changing conditions in data.[1]

The benefit of one-pass procedure is that the source can be encoded in real time, though it becomes more sensitive to transmission errors, since just a single loss ruins the whole code, requiring error detection and correction.

Algorithms

[edit]

There are a number of implementations of this method, the most notable are FGK (Faller-Gallager-Knuth) and Vitter algorithm.

FGK Algorithm

[edit]

It is an online coding technique based on Huffman coding. Having no initial knowledge of occurrence frequencies, it permits dynamically adjusting the Huffman's tree as data are being transmitted. In a FGK Huffman tree, a special external node, called 0-node, is used to identify a newly coming character. That is, whenever new data is encountered, output the path to the 0-node followed by the data. For a past-coming character, just output the path of the data in the current Huffman's tree. Most importantly, we have to adjust the FGK Huffman tree if necessary, and finally update the frequency of related nodes. As the frequency of a datum is increased, the sibling property of the Huffman's tree may be broken. The adjustment is triggered for this reason. It is accomplished by consecutive swappings of nodes, subtrees, or both. The data node is swapped with the highest-ordered node of the same frequency in the Huffman's tree, (or the subtree rooted at the highest-ordered node). All ancestor nodes of the node should also be processed in the same manner.

Since the FGK Algorithm has some drawbacks about the node-or-subtree swapping, Vitter proposed another algorithm to improve it.

Vitter algorithm

[edit]

Some important terminologies & constraints :-

  • Implicit Numbering : It simply means that nodes are numbered in increasing order by level and from left to right. i.e. nodes at bottom level will have low implicit number as compared to upper level nodes and nodes on same level are numbered in increasing order from left to right. In other terms, when we have built the Huffman tree, when merging two nodes into a parent node, we have set the one with the lower value as the left child, and the one with the higher value as the right child.
  • Invariant : For each weight w, all leaves of weight w precede all internal nodes having weight w. In other terms, when we have built the Huffman tree, if several nodes had the same value, we prioritized merging the leaves over the internal nodes.
  • Blocks : Nodes of same weight and same type (i.e. either leaf node or internal node) form a Block.
  • Leader : Highest numbered node in a block.

Blocks are interlinked by increasing order of their weights.

A leaf block always precedes internal block of same weight, thus maintaining the invariant.

NYT (Not Yet Transferred) is a special node used to represent symbols which are 'not yet transferred'.

Slide_And_Increment(leaf node) sliding starts. P is a leaf node.
Slide_And_Increment(leaf node) sliding step 2. As P is leaf node, it slides in front of next block nodes of equal weight.
Slide_And_Increment(leaf node) sliding step 3. Here we increase the current weight by 1.
Slide_And_Increment(leaf node) sliding step 4. Method comes to an end. P is the new parent.
Slide_And_Increment(internal node) sliding starts. P is an internal node.
Slide_And_Increment(internal node) sliding step 2. Node P slides in front of next block of leaves nodes, with weight wt+1.
Slide_And_Increment(internal node) sliding step 3. Now we increase the weight to 9. Thus the invariant is maintained as the current node is an internal node and should occur in front of leaf nodes of equal weight as we have increased the weight.
Slide_And_Increment(internal node) sliding step 4. Now the 'P' points to the former parent ( as in the case of internal node according to algorithm)
algorithm for adding a symbol is
    leaf_to_increment := NULL
    p := pointer to the leaf node containing the next symbol

    if (p is NYT) then
        Extend p by adding two children
        Left child becomes new NYT and right child is the new symbol leaf node
        p := parent of new symbol leaf node
        leaf_to_increment := Right Child of p
    else
        Swap p with leader of its block
        if (new p is sibling to NYT) then
            leaf_to_increment := p
            p := parent of p

    while (p ≠ NULL) do
        Slide_And_Increment(p)

    if (leaf_to_increment != NULL) then
        Slide_And_Increment(leaf_to_increment)
function Slide_And_Increment(p) is
    previous_p := parent of p

    if (p is an internal node) then
        Slide p in the tree higher than the leaf nodes of weight wt + 1
        increase weight of p by 1
        p := previous_p
    else
        Slide p in the tree higher than the internal nodes of weight wt
        increase weight of p by 1
        p := new parent of p.

Encoder and decoder start with only the root node, which has the maximum number. In the beginning it is our initial NYT node.

When we transmit an NYT symbol, we have to transmit code for the NYT node, then for its generic code.

For every symbol that is already in the tree, we only have to transmit code for its leaf node.

Example

[edit]

Encoding "abb" gives 01100001 001100010 11.

Step 1:

Start with an empty tree.

For "a" transmit its binary code.

Step 2:

NYT spawns two child nodes: 254 and 255, both with weight 0. Increase weight for root and 255. Code for "a", associated with node 255, is 1.

For "b" transmit 0 (for NYT node) then its binary code.

Step 3:

NYT spawns two child nodes: 252 for NYT and 253 for leaf node, both with weight 0. Increase weights for 253, 254, and root. To maintain Vitter's invariant that all leaves of weight w precede (in the implicit numbering) all internal nodes of weight w, the branch starting with node 254 should be swapped (in terms of symbols and weights, but not number ordering) with node 255. Code for "b" is 11.

For the second "b" transmit 11.

For the convenience of explanation this step doesn't exactly follow Vitter's algorithm,[2] but the effects are equivalent.

Step 4:

Go to leaf node 253. Notice we have two blocks with weight 1. Node 253 and 254 is one block (consisting of leaves), node 255 is another block (consisting of internal nodes). For node 253, the biggest number in its block is 254, so swap the weights and symbols of nodes 253 and 254. Now node 254 and the branch starting from node 255 satisfy the SlideAndIncrement condition[2] and hence must be swapped. At last increase node 255 and 256's weight.

Future code for "b" is 1, and for "a" is now 01, which reflects their frequency.

References

[edit]
  1. ^ Ze-Nian Li; Mark S. Drew; Jiangchuan Liu (9 April 2014). Fundamentals of Multimedia. Springer Science & Business Media. ISBN 978-3-319-05290-8.
  2. ^ a b "Adaptive Huffman Coding". Cs.duke.edu. Retrieved 2025-08-06.
  • Vitter's original paper: J. S. Vitter, "Design and Analysis of Dynamic Huffman Codes", Journal of the ACM, 34(4), October 1987, pp 825–845.
  • J. S. Vitter, "ALGORITHM 673 Dynamic Huffman Coding", ACM Transactions on Mathematical Software, 15(2), June 1989, pp 158–167. Also appears in Collected Algorithms of ACM.
  • Donald E. Knuth, "Dynamic Huffman Coding", Journal of Algorithm, 6(2), 1985, pp 163–180.
[edit]
清真什么意思 孕妇胃疼吃什么药 燕子喜欢吃什么 三氯蔗糖是什么 泪腺堵塞是什么症状
嘴唇发红是什么原因 boby是什么意思 咳嗽吃什么食物好得最快最有效 梦见涨水是什么兆头 心绞痛吃什么药缓解最快
盗墓笔记讲了什么 身体发冷是什么原因 qeelin是什么牌子 追什么 芦荟胶有什么用
猝死是什么意思 见路不走是什么意思 鲁迅的真名叫什么 什么人不适合喝咖啡 兰州市区有什么好玩的地方
痛经是什么原因引起的hcv7jop4ns8r.cn 尿隐血是什么问题hcv8jop3ns2r.cn 咳嗽发烧是什么原因hcv8jop3ns3r.cn 来姨妈喝什么汤好hcv7jop5ns5r.cn 老人家头晕是什么原因hcv9jop3ns3r.cn
金字旁目字读什么hcv8jop7ns0r.cn 4.12是什么星座hcv8jop3ns8r.cn 注会什么时候考试hcv8jop9ns2r.cn 抢沙发是什么意思xjhesheng.com 蜘蛛属于什么wzqsfys.com
什么开什么笑hcv8jop6ns8r.cn 查乙肝五项挂什么科hcv7jop6ns8r.cn cc代表什么意思hcv9jop0ns3r.cn 吃什么可以化掉息肉hcv8jop4ns5r.cn 91年五行属什么hcv8jop9ns2r.cn
rad是什么单位hcv9jop4ns6r.cn 手足口不能吃什么食物hcv9jop1ns3r.cn 乌江鱼是什么鱼hcv7jop7ns2r.cn 痔疮挂什么科hcv8jop3ns9r.cn 边界清是什么意思hcv8jop9ns9r.cn
百度