香农信源编码定理

来自集智百科 - 复杂系统|人工智能|复杂科学|复杂网络|自组织
Moonscar讨论 | 贡献2020年10月25日 (日) 17:50的版本 (Moved page from wikipedia:en:Shannon's source coding theorem (history))
跳到导航 跳到搜索

此词条暂由彩云小译翻译,翻译字数共1005,未经人工整理和审校,带来阅读不便,请见谅。

模板:Information theory



In information theory, Shannon's source coding theorem (or noiseless coding theorem) establishes the limits to possible data compression, and the operational meaning of the Shannon entropy.

In information theory, Shannon's source coding theorem (or noiseless coding theorem) establishes the limits to possible data compression, and the operational meaning of the Shannon entropy.

在信息论中,香农信源编码定理(或无噪声编码定理)建立了可能数据压缩的极限,以及香农熵的操作意义。


Named after Claude Shannon, the source coding theorem shows that (in the limit, as the length of a stream of independent and identically-distributed random variable (i.i.d.) data tends to infinity) it is impossible to compress the data such that the code rate (average number of bits per symbol) is less than the Shannon entropy of the source, without it being virtually certain that information will be lost. However it is possible to get the code rate arbitrarily close to the Shannon entropy, with negligible probability of loss.

Named after Claude Shannon, the source coding theorem shows that (in the limit, as the length of a stream of independent and identically-distributed random variable (i.i.d.) data tends to infinity) it is impossible to compress the data such that the code rate (average number of bits per symbol) is less than the Shannon entropy of the source, without it being virtually certain that information will be lost. However it is possible to get the code rate arbitrarily close to the Shannon entropy, with negligible probability of loss.

以香农命名的信源编码定理表明(在极限下,作为独立同分布随机变量(i.i.d)流的长度数据趋于无穷大)不可能压缩数据,使码率(每个符号的平均比特数)小于信源的香农熵,而事实上又不能确定信息会丢失。然而,可以任意地使码率接近香农熵,损失的概率可以忽略不计。


The source coding theorem for symbol codes places an upper and a lower bound on the minimal possible expected length of codewords as a function of the entropy of the input word (which is viewed as a random variable) and of the size of the target alphabet.

The source coding theorem for symbol codes places an upper and a lower bound on the minimal possible expected length of codewords as a function of the entropy of the input word (which is viewed as a random variable) and of the size of the target alphabet.

符号码的信源编码定理在最小可能期望码字长度上设置了一个上下界,该上下界是输入字(被视为一个随机变量)熵和目标字母表大小的函数。


Statements

Source coding is a mapping from (a sequence of) symbols from an information source to a sequence of alphabet symbols (usually bits) such that the source symbols can be exactly recovered from the binary bits (lossless source coding) or recovered within some distortion (lossy source coding). This is the concept behind data compression.

Source coding is a mapping from (a sequence of) symbols from an information source to a sequence of alphabet symbols (usually bits) such that the source symbols can be exactly recovered from the binary bits (lossless source coding) or recovered within some distortion (lossy source coding). This is the concept behind data compression.

信源编码是从信源符号序列到字母符号序列(通常是比特)的映射,以使信源符号能够准确地从二进制比特位(无损源编码)恢复或在某种失真(有损源编码)内恢复。这就是数据压缩的概念。


Source coding theorem

In information theory, the source coding theorem (Shannon 1948)[1] informally states that (MacKay 2003, pg. 81,[2] Cover 2006, Chapter 5[3]):

In information theory, the source coding theorem (Shannon 1948) informally states that (MacKay 2003, pg. 81, Cover 2006, Chapter 5):

在信息论中,信源编码定理(Shannon,1948)非正式地指出(MacKay,2003,pg。81,2006年封面,第5章) :


N i.i.d. random variables each with entropy H(X) can be compressed into more than N H(X) bits with negligible risk of information loss, as N → ∞; but conversely, if they are compressed into fewer than N H(X) bits it is virtually certain that information will be lost.

i.i.d. random variables each with entropy can be compressed into more than bits with negligible risk of information loss, as ; but conversely, if they are compressed into fewer than bits it is virtually certain that information will be lost.

I.i.i.d.随机变量中每一个都有熵,可以压缩成多个比特,信息丢失的风险可以忽略不计,但反过来,如果它们被压缩成比特少于比特,信息几乎肯定会丢失。


Source coding theorem for symbol codes

Let Σ1, Σ2 denote two finite alphabets and let Σ模板:Su and Σ模板:Su denote the set of all finite words from those alphabets (respectively).

Let denote two finite alphabets and let }} and }} denote the set of all finite words from those alphabets (respectively).

让我们表示两个有限的字母,并且让}和}分别表示来自这两个字母的所有有限单词的集合。


Suppose that X is a random variable taking values in Σ1 and let f be a uniquely decodable code from Σ模板:Su to Σ模板:Su where 2| = a. Let S denote the random variable given by the length of codeword f (X).

Suppose that is a random variable taking values in and let be a uniquely decodable code from }} to }} where Σ2 a}}. Let denote the random variable given by the length of codeword .

假设这是一个随机变量,其中 σ < sub > 2 a }}是一个唯一可解码的。用码字长度表示随机变量。


If f is optimal in the sense that it has the minimal expected word length for X, then (Shannon 1948):

If is optimal in the sense that it has the minimal expected word length for , then (Shannon 1948):

如果是最优的,在这个意义上,它有最小的预期字长度,那么(香农1948) :


[math]\displaystyle{ \frac{H(X)}{\log_2 a} \leq \mathbb{E}[S] \lt \frac{H(X)}{\log_2 a} +1 }[/math]

[math]\displaystyle{ \frac{H(X)}{\log_2 a} \leq \mathbb{E}[S] \lt \frac{H(X)}{\log_2 a} +1 }[/math]

{ math > frac { h (x)}{ log _ 2a } leq mathbb { e }[ s ] < frac { h (x)}{ log _ 2a } + 1 </math >


Where [math]\displaystyle{ \mathbb{E} }[/math] denotes the expected value operator.

Where [math]\displaystyle{ \mathbb{E} }[/math] denotes the expected value operator.

其中 < math > mathbb { e } </math > 表示期望值操作符。


Proof: Source coding theorem

Given X is an i.i.d. source, its time series X1, ..., Xn is i.i.d. with entropy H(X) in the discrete-valued case and differential entropy in the continuous-valued case. The Source coding theorem states that for any ε > 0, i.e. for any rate H(X) + ε larger than the entropy of the source, there is large enough n and an encoder that takes n i.i.d. repetition of the source, X1:n, and maps it to n(H(X) + ε) binary bits such that the source symbols X1:n are recoverable from the binary bits with probability of at least 1 − ε.

Given is an i.i.d. source, its time series is i.i.d. with entropy in the discrete-valued case and differential entropy in the continuous-valued case. The Source coding theorem states that for any , i.e. for any rate larger than the entropy of the source, there is large enough and an encoder that takes i.i.d. repetition of the source, , and maps it to binary bits such that the source symbols are recoverable from the binary bits with probability of at least .

特定的是内部识别码。来源,它的时间序列是内部识别码。离散值情形和连续值情形的熵微分熵。信源编码定理指出,对于任何。对于任何大于信号源熵值的速率,都有足够大的编码器,它采用内部识别技术。重复的源,,并映射到二进制位,以便源符号是可恢复的二进制位的概率至少为。


Proof of Achievability. Fix some ε > 0, and let

Proof of Achievability. Fix some , and let

可达性的证明。修复一些,然后让


[math]\displaystyle{ p(x_1, \ldots, x_n) = \Pr \left[X_1 = x_1, \cdots, X_n = x_n \right]. }[/math]

[math]\displaystyle{ p(x_1, \ldots, x_n) = \Pr \left[X_1 = x_1, \cdots, X_n = x_n \right]. }[/math]

P (x _ 1,点,x _ n) = Pr 左[ x _ 1 = x _ 1,点,x _ n = x _ n 右]


The typical set, A模板:Su, is defined as follows:

The typical set, }}, is defined as follows:

典型的集合,}} ,定义如下:


[math]\displaystyle{ A_n^\varepsilon =\left\{(x_1, \cdots, x_n) \ : \ \left|-\frac{1}{n} \log p(x_1, \cdots, x_n) - H_n(X)\right| \lt \varepsilon \right\}. }[/math]

[math]\displaystyle{ A_n^\varepsilon =\left\{(x_1, \cdots, x_n) \ : \ \left|-\frac{1}{n} \log p(x_1, \cdots, x_n) - H_n(X)\right| \lt \varepsilon \right\}. }[/math]

[ math > a _ n ^ varepsilon = left {(x _ 1,cdots,x _ n) : left |-frac {1}{ n } log p (x _ 1,cdots,x _ n)-h _ n (x) right | < varepsilon right } . </math >


The Asymptotic Equipartition Property (AEP) shows that for large enough n, the probability that a sequence generated by the source lies in the typical set, A模板:Su, as defined approaches one. In particular, for sufficiently large n, [math]\displaystyle{ P((X_1,X_2,\cdots,X_n) \in A_n^\varepsilon) }[/math] can be made arbitrarily close to 1, and specifically, greater than [math]\displaystyle{ 1-\varepsilon }[/math] (See

The Asymptotic Equipartition Property (AEP) shows that for large enough , the probability that a sequence generated by the source lies in the typical set, }}, as defined approaches one. In particular, for sufficiently large , [math]\displaystyle{ P((X_1,X_2,\cdots,X_n) \in A_n^\varepsilon) }[/math] can be made arbitrarily close to 1, and specifically, greater than [math]\displaystyle{ 1-\varepsilon }[/math] (See

渐近等同分割特性表明,对于足够大的数据,由源生成的序列位于典型集合中的概率,} ,正如定义的接近一样。特别是,对于足够大来说,a _ n ^ varepsilon 中的 p ((x _ 1,x _ 2,点,x _ n) </math > 可以任意接近于1,特别是,比 math > 1-varepsilon </math > 更大

AEP for a proof).

AEP for a proof).

为证明 AEP)。


The definition of typical sets implies that those sequences that lie in the typical set satisfy:

The definition of typical sets implies that those sequences that lie in the typical set satisfy:

典型集合的定义意味着处于典型集合中的序列满足:


[math]\displaystyle{ 2^{-n(H(X)+\varepsilon)} \leq p \left (x_1, \cdots, x_n \right ) \leq 2^{-n(H(X)-\varepsilon)} }[/math]

[math]\displaystyle{ 2^{-n(H(X)+\varepsilon)} \leq p \left (x_1, \cdots, x_n \right ) \leq 2^{-n(H(X)-\varepsilon)} }[/math]

2 ^ {-n (h (x) + varepsilon)} leq p left (x _ 1,cdots,x _ n right) leq 2 ^ {-n (h (x)-varepsilon)} </math >


Note that:

Note that:

请注意:


  • The probability of a sequence [math]\displaystyle{ (X_1,X_2,\cdots X_n) }[/math] being drawn from A模板:Su is greater than 1 − ε.
  • [math]\displaystyle{ \left| A_n^\varepsilon \right| \leq 2^{n(H(X)+\varepsilon)} }[/math], which follows from the left hand side (lower bound) for [math]\displaystyle{ p(x_1,x_2,\cdots x_n) }[/math].
  • [math]\displaystyle{ \left| A_n^\varepsilon \right| \geq (1-\varepsilon) 2^{n(H(X)-\varepsilon)} }[/math], which follows from upper bound for [math]\displaystyle{ p(x_1,x_2,\cdots x_n) }[/math] and the lower bound on the total probability of the whole set A模板:Su.


Since [math]\displaystyle{ \left| A_n^\varepsilon \right| \leq 2^{n(H(X)+\varepsilon)}, n(H(X)+\varepsilon) }[/math] bits are enough to point to any string in this set.

Since [math]\displaystyle{ \left| A_n^\varepsilon \right| \leq 2^{n(H(X)+\varepsilon)}, n(H(X)+\varepsilon) }[/math] bits are enough to point to any string in this set.

由于 < math > 左 | a _ n ^ varepslon 右 | leq 2 ^ { n (h (x) + varepslon)} ,n (h (x) + varepslon) </math > 位足以指向该集合中的任何字符串。


The encoding algorithm: The encoder checks if the input sequence lies within the typical set; if yes, it outputs the index of the input sequence within the typical set; if not, the encoder outputs an arbitrary n(H(X) + ε) digit number. As long as the input sequence lies within the typical set (with probability at least 1 − ε), the encoder doesn't make any error. So, the probability of error of the encoder is bounded above by ε.

The encoding algorithm: The encoder checks if the input sequence lies within the typical set; if yes, it outputs the index of the input sequence within the typical set; if not, the encoder outputs an arbitrary digit number. As long as the input sequence lies within the typical set (with probability at least ), the encoder doesn't make any error. So, the probability of error of the encoder is bounded above by .

编码算法: 编码器检查输入序列是否在典型集合中; 如果是,它输出典型集合中输入序列的索引; 如果不是,编码器输出任意数字号。只要输入序列位于典型集(至少概率)内,编码器就不会出错。因此,该编码器的错误概率是以上有界的。


Proof of Converse. The converse is proved by showing that any set of size smaller than A模板:Su (in the sense of exponent) would cover a set of probability bounded away from 1.

Proof of Converse. The converse is proved by showing that any set of size smaller than }} (in the sense of exponent) would cover a set of probability bounded away from .

逆向的证明。通过证明任意一个小于}(指数意义下)的集合可以覆盖一个远离有界的概率集合,从而证明了逆向的结论。


Proof: Source coding theorem for symbol codes

For 1 ≤ in let si denote the word length of each possible xi. Define [math]\displaystyle{ q_i = a^{-s_i}/C }[/math], where C is chosen so that q1 + ... + qn = 1. Then

For let denote the word length of each possible . Define [math]\displaystyle{ q_i = a^{-s_i}/C }[/math], where is chosen so that 1}}. Then

因为 let 表示每个可能的单词的长度。定义 < math > q _ i = a ^ {-s _ i }/c </math > ,在哪里选择以便1}}。然后


[math]\displaystyle{ \begin{align} \lt math\gt \begin{align} 1.1.1.2.2.2.2.2.2.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.4.3.3.3.3.3.3.3.3.3.3.3.4.3.3.3.3.3.3.3.3.3 H(X) &= -\sum_{i=1}^n p_i \log_2 p_i \\ H(X) &= -\sum_{i=1}^n p_i \log_2 p_i \\ H (x) & =-sum _ { i = 1} ^ n p _ i log _ 2 p _ i &\leq -\sum_{i=1}^n p_i \log_2 q_i \\ &\leq -\sum_{i=1}^n p_i \log_2 q_i \\ &\leq -\sum_{i=1}^n p_i \log_2 q_i \\ &= -\sum_{i=1}^n p_i \log_2 a^{-s_i} + \sum_{i=1}^n p_i \log_2 C \\ &= -\sum_{i=1}^n p_i \log_2 a^{-s_i} + \sum_{i=1}^n p_i \log_2 C \\ & =-sum { i = 1} ^ n p _ i log _ 2 a ^ {-s _ i } + sum _ { i = 1} ^ n p _ i log _ 2 c &= -\sum_{i=1}^n p_i \log_2 a^{-s_i} + \log_2 C \\ &= -\sum_{i=1}^n p_i \log_2 a^{-s_i} + \log_2 C \\ & =-sum { i = 1} ^ n p _ i log _ 2 a ^ {-s _ i } + log _ 2 c &\leq -\sum_{i=1}^n - s_i p_i \log_2 a \\ &\leq -\sum_{i=1}^n - s_i p_i \log_2 a \\ &\leq -\sum_{i=1}^n - s_i p_i \log_2 a \\ &\leq \mathbb{E} S \log_2 a \\ &\leq \mathbb{E} S \log_2 a \\ 2 a \end{align} }[/math]

\end{align}</math>

结束{ align } </math >


where the second line follows from Gibbs' inequality and the fifth line follows from Kraft's inequality:

where the second line follows from Gibbs' inequality and the fifth line follows from Kraft's inequality:

第二行来自吉布斯的不平等,第五行来自卡夫的不平等:


[math]\displaystyle{ C = \sum_{i=1}^n a^{-s_i} \leq 1 }[/math]

[math]\displaystyle{ C = \sum_{i=1}^n a^{-s_i} \leq 1 }[/math]

[数学] c = sum { i = 1} ^ n a ^ {-s _ i } leq 1


so log C ≤ 0.

so .

所以。


For the second inequality we may set

For the second inequality we may set

对于第二个不等式,我们可以设定


[math]\displaystyle{ s_i = \lceil - \log_a p_i \rceil }[/math]

[math]\displaystyle{ s_i = \lceil - \log_a p_i \rceil }[/math]

[数学][数学]


so that

so that

所以


[math]\displaystyle{ - \log_a p_i \leq s_i \lt -\log_a p_i + 1 }[/math]

[math]\displaystyle{ - \log_a p_i \leq s_i \lt -\log_a p_i + 1 }[/math]

[数学]-log _ a p _ i leq s _ i <-log _ a p _ i + 1


and so

and so

所以


[math]\displaystyle{ a^{-s_i} \leq p_i }[/math]

[math]\displaystyle{ a^{-s_i} \leq p_i }[/math]

[ math ] a ^ {-s _ i } leq p _ i


and

and


[math]\displaystyle{ \sum a^{-s_i} \leq \sum p_i = 1 }[/math]

[math]\displaystyle{ \sum a^{-s_i} \leq \sum p_i = 1 }[/math]

[ math ] sum a ^ {-s _ i } leq sum p _ i = 1 </math >


and so by Kraft's inequality there exists a prefix-free code having those word lengths. Thus the minimal S satisfies

and so by Kraft's inequality there exists a prefix-free code having those word lengths. Thus the minimal satisfies

因此,根据卡夫的不平等性,存在一种无前缀的代码,其单词长度与前缀无关。因此,最小值满足


[math]\displaystyle{ \begin{align} \lt math\gt \begin{align} 1.1.1.2.2.2.2.2.2.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.4.3.3.3.3.3.3.3.3.3.3.3.4.3.3.3.3.3.3.3.3.3 \mathbb{E} S & = \sum p_i s_i \\ \mathbb{E} S & = \sum p_i s_i \\ 数学家们正在研究这个问题 & \lt \sum p_i \left( -\log_a p_i +1 \right) \\ & \lt \sum p_i \left( -\log_a p_i +1 \right) \\ & \lt sum p _ i left (- log _ a p _ i + 1 right) & = \sum - p_i \frac{\log_2 p_i}{\log_2 a} +1 \\ & = \sum - p_i \frac{\log_2 p_i}{\log_2 a} +1 \\ 和 = sum-p _ i frac { log _ 2 p _ i }{ log _ 2 a } + 1 & = \frac{H(X)}{\log_2 a} +1 \\ & = \frac{H(X)}{\log_2 a} +1 \\ & = frac { h (x)}{ log _ 2 a } + 1 \end{align} }[/math]

\end{align}</math>

结束{ align } </math >


Extension to non-stationary independent sources

Fixed Rate lossless source coding for discrete time non-stationary independent sources

Define typical set A模板:Su as:

Define typical set }} as:

定义典型的集合}}如下:


[math]\displaystyle{ A_n^\varepsilon = \left \{x_1^n \ : \ \left|-\frac{1}{n} \log p \left (X_1, \cdots, X_n \right ) - \overline{H_n}(X)\right| \lt \varepsilon \right \}. }[/math]

[math]\displaystyle{ A_n^\varepsilon = \left \{x_1^n \ : \ \left|-\frac{1}{n} \log p \left (X_1, \cdots, X_n \right ) - \overline{H_n}(X)\right| \lt \varepsilon \right \}. }[/math]

< math > a _ n ^ varepsilon = left { x _ 1 ^ n: left |-frac {1}{ n } log p left (x _ 1,cdots,x _ n right)-overline { h _ n }(x) right | < varepsilon right }.数学


Then, for given δ > 0, for n large enough, Pr(A模板:Su) > 1 − δ. Now we just encode the sequences in the typical set, and usual methods in source coding show that the cardinality of this set is smaller than [math]\displaystyle{ 2^{n(\overline{H_n}(X)+\varepsilon)} }[/math]. Thus, on an average, 模板:Overline(X) + ε bits suffice for encoding with probability greater than 1 − δ, where ε and δ can be made arbitrarily small, by making n larger.

Then, for given , for large enough, ) > 1 − δ}}. Now we just encode the sequences in the typical set, and usual methods in source coding show that the cardinality of this set is smaller than [math]\displaystyle{ 2^{n(\overline{H_n}(X)+\varepsilon)} }[/math]. Thus, on an average, (X) + ε}} bits suffice for encoding with probability greater than , where and can be made arbitrarily small, by making larger.

然后,对于给定的,对于足够大的,) > 1-δ }}。现在我们只对序列进行典型集合编码,通常的信源编码方法表明,这个集合的基数小于 < math > 2 ^ { n (overline { h _ n }(x) + varepsilon)} </math > 。因此,在一个平均值上,(x) + ε }位足够用于编码的概率大于,其中,可以任意小,通过使更大。


See also


References

引用错误:Closing tag missing for <references>

}}

Category:Information theory

范畴: 信息论

Category:Coding theory

类别: 编码理论

Category:Data compression

类别: 数据压缩

Category:Presentation layer protocols

分类: 表示层协议

Category:Mathematical theorems in theoretical computer science

范畴: 理论计算机科学中的数学定理

Category:Articles containing proofs

类别: 包含证明的文章


This page was moved from wikipedia:en:Shannon's source coding theorem. Its edit history can be viewed at 香农信源编码定理/edithistory

  1. C.E. Shannon, "A Mathematical Theory of Communication", Bell System Technical Journal, vol. 27, pp. 379–423, 623-656, July, October, 1948
  2. David J. C. MacKay. Information Theory, Inference, and Learning Algorithms Cambridge: Cambridge University Press, 2003.
  3. Cover, Thomas M. (2006). "Chapter 5: Data Compression". Elements of Information Theory. John Wiley & Sons. ISBN 0-471-24195-4.