知识卡片
前缀码避免解码歧义
前缀码要求任一码字都不是另一完整码字的前缀。串接后可从开头唯一确定第一个字符,再继续解码;若一个码字是另一个的前缀,就不能如此即时判定码字是否结束。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第15章 贪心算法 · 查看原书依据
We consider here only codes in which no codeword is also a prefix of some other codeword. Such codes are called prefix-free codes.
参考来源
- 位置:《算法导论(第4版)》第15章《贪心算法》(OEBPS/chapter015.xhtml,文本字符[35000,40000))。
- 结论依据:15.3 节定义前缀码为任一码字不作其他码字前缀;按编码树从根到叶读路径时可即时识别码字结束并继续解码。
- 原始内容:We consider here only codes in which no codeword is also a prefix of some other codeword. Such codes are called prefix-free codes .