From: François Fleuret Date: Thu, 18 Jan 2024 19:56:21 +0000 (+0100) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=edce43181d484408f8901abc0c21d3ca7595f20d;p=tex.git Update. --- diff --git a/inftheory.tex b/inftheory.tex index eb9e988..29b0557 100644 --- a/inftheory.tex +++ b/inftheory.tex @@ -53,7 +53,7 @@ Information Theory is awesome so here is a TL;DR about Shannon's entropy. -This field is about quantifying the amount ``of information'' contained +This field is about quantifying the amount of ``information'' contained in a signal and how much can be transmitted under certain conditions. What makes it awesome IMO is that it is very intuitive, and like thermodynamics in Physics it give exact bounds about what is possible or not. @@ -62,17 +62,23 @@ What makes it awesome IMO is that it is very intuitive, and like thermodynamics This is the key concept from which everything is defined. -Imagine that you have a distribution of probabilities p on a finite set of symbols and that you generate a stream of symbols by sampling them one after another independently with that distribution. +Imagine that you have a distribution of probabilities p on a finite +set of symbols and that you generate a stream of symbols by sampling +them one after another independently with that distribution. -To transmit that stream, for instance with bits over a communication line, you can design a coding that takes into account that the symbols are not all as probable, and decode on the other side. +To transmit that stream, for instance with bits over a communication +line, you can design a coding that takes into account that the symbols +are not all as probable, and decode on the other side. For instance if $P('\!\!A')=1/2$, $P('\!\!B')=1/4$, and $P('\!\!C')=1/4$ you would transmit ``0'' for a ``A'' and ``10'' for a ``B'' and ``11'' for a ``C'', 1.5 bits on average. -If the symbol is always the same, you transmit nothing, if they are equiprobable you need $\log_2$(nb symbols) etc. +If the symbol is always the same, you transmit nothing, if they are +equiprobable you need $\log_2$(nb symbols) etc. -Shannon's Entropy (in base 2) is the minimum number of bits you have to emit on average to transmit that stream. +Shannon's Entropy (in base 2) is the minimum number of bits you have +to emit on average to transmit that stream. It has a simple formula: % @@ -82,7 +88,8 @@ It has a simple formula: % where by convention $o \log_2 0 = 0$. -It is often seen as a measure of randomness since the more deterministic the distribution is, the less you have to emit. +It is often seen as a measure of randomness since the more +deterministic the distribution is, the less you have to emit. The codings above are "Huffman coding", which reaches the Entropy bound only for some distributions. The "Arithmetic coding" does it @@ -137,10 +144,11 @@ hence if X is a deterministic function of Y then % \[ - H(X \mid Y)=0 + H(X \mid Y)=0. \] -And since if you send the bits for Y and then the bits to describe X given that Y, you have sent (X, Y), we have the chain rule: +And if you send the bits for Y and then the bits to describe X given +that Y, you have sent (X, Y). Hence we have the chain rule: % \[ H(X, Y) = H(Y) + H(X \mid Y).