京都大学 情報学研究科 知能情報学専攻 2025年8月実施 専門科目 S-3
Author
Description
Answer the following questions. All logarithms are base 2 (). For calculations, you must use and . Also, round to two decimal places if necessary.
Q.1 Consider a memoryless stationary source defined by the alphabet , where each symbol occurs independently. Their probabilities of occurrence are .
(1) Calculate the entropy .
(2) Design a binary Huffman code based on the above probabilities. Draw a Huffman tree (code tree for an instantaneous code).
(3) Calculate the average code length of the binary Huffman code in (2).
Q.2 Consider a first-order Markov source defined by the alphabet , where the symbols themselves represent the states, and the following transition probability matrix .
For example, if the current symbol is , the probabilities that the next symbol will be are , respectively.
(1) Calculate the stationary distribution of this Markov process. Considering a memoryless source based on the stationary distribution, calculate its entropy .
(2) Calculate the entropy rate (entropy per symbol) of the Markov source .
(3) Compare the magnitudes of and , and explain the reason for their difference.
Q.3 Variable-length blocks are created by concatenating one or more characters from the set . Let the set of five variable-length blocks be an alphabet in which each element represents a single symbol. For this set , consider a memoryless stationary source in which each symbol occurs independently. The probabilities of occurrence for each variable-length block are .
(1) Evaluate the coding efficiency of the source at the character level. First, design a binary Huffman code for , and calculate the average code length per block (). Furthermore, calculate the average code length per character for this code. Here, the average code length per character is defined as , where is the average number of characters in per source symbol of the variable-length block information source. For example, the block consists of two characters in , so its number of characters is 2.
(2) After determining the probability distribution of the characters generated from , consider the average code length of a (binary) Huffman code for a memoryless source that follows this distribution. Discuss the magnitude difference (i.e., which is larger) between the average code length obtained here and the average code length per character found in (1), and explain its cause.
题目描述
回答下列问题。所有对数均以 2 为底,即 。计算时必须使用 、;必要时四舍五入到小数点后两位。
-
考虑字母表
上的无记忆平稳信源 ,各符号独立出现,概率为
(1)计算熵 。
(2)根据上述概率设计二元 Huffman 码,并画出 Huffman 树(即时码的码树)。
(3)计算第(2)问二元 Huffman 码的平均码长 。
-
考虑字母表 上的一阶 Markov 信源 ,符号本身就是状态,转移概率矩阵为
例如当前符号为 时,下一个符号为 的概率依次为 。
(1)计算该 Markov 过程的平稳分布
再把该平稳分布视为无记忆信源 的符号分布,计算其熵 。
(2)计算 Markov 信源 的熵率(每符号熵)。
(3)比较 与 的大小,并解释二者不同的原因。
-
从 中连接一个或多个字符形成变长块。把五个变长块
视为五个单独符号,考虑其上的无记忆平稳信源 。各变长块独立出现,概率为
(1)从字符层面评价信源 的编码效率。先为 设计二元 Huffman 码并计算每块平均码长 ,再计算该码的每字符平均码长。定义
其中 是变长块信源每个源符号所含 中字符数的平均值。例如块 由两个 中的字符组成,字符数为 2。
(2)先确定 生成的各字符的概率分布,再考虑服从该分布的无记忆信源的二元 Huffman 码平均码长。比较此处所得平均码长与第(1)问每字符平均码长的大小,并解释差异产生的原因。
考点
- 熵与 Huffman 编码:计算无记忆信源熵、构造最优前缀码并求平均码长。
- Markov 信源的平稳分布与熵率:求解平稳方程,并按状态平稳概率加权条件熵。
- 记忆性对熵的影响:比较边缘熵与条件熵,解释状态相关性带来的熵率下降。
- 变长分块编码效率:在“每块”和“每字符”尺度间换算,并分析保留块内结构相较逐字符编码的优势。