Difference between revisions of "Aufgaben:Exercise 1.3: Entropy Approximations"

From LNTwww
Line 17: Line 17:
  
  
Zwischen diesen Entropien bestehen folgende Größenrelationen:   $H \le$ ... $\le H_3 \le H_2 \le H_1 \le H_0 \hspace{0.05cm}.$
+
The following size relations exist between these entropies:   $H \le$ ... $\le H_3 \le H_2 \le H_1 \le H_0 \hspace{0.05cm}.$
  
*Nicht bekannt ist die Zuordnung zwischen den Quellen  $\rm Q1$,  $\rm Q2$,  $\rm Q3$,  $\rm Q4$  und den in der Grafik gezeigten gezeigten Symbolfolgen  (Schwarz, Blau, Rot, Grün).  
+
*What is not known is the correlation between the sources  $\rm Q1$,  $\rm Q2$,  $\rm Q3$,  $\rm Q4$  and the symbol sequences shown in the graph  (black, blue, red, green).  
*Es ist lediglich bekannt, dass die Quelle  $\rm Q4$  einen Wiederholungscode beinhaltet.  Aufgrund der Tatsache, dass bei der entsprechenden Symbolfolge jedes zweite Symbol keinerlei Information lierfert, ist  $H_0 = 0.5 \; \rm bit/Symbol$.  
+
*It is only known that source  $\rm Q4$  contains a repetition code.  Due to the fact that in the corresponding symbol sequence every second symbol does not lier any information,  $H_0 = 0.5 \; \rm bit/symbol$.  
*Zudem sind die Entropienäherungen  $H_1 = 1 \; \rm bit/Symbol$  (gleichwahrscheinliche Symbole)  und  $H_4 \approx 0.789 \; \rm bit/Symbol$  gegeben.
+
*In addition, the entropy approximations  $H_1 = 1 \; \rm bit/symbol$  (equally probable symbols)  and  $H_4 \approx 0.789 \; \rm bit/symbol$  are given.
  
  
Zu bestimmen sind für diese Nachrichtenquelle  $\rm Q4$  schließlich noch die Entropienäherungen  $H_2$  und  $H_3$.
+
Finally, the entropy approximations  $H_2$  and  $H_3$ are to be determined for this news source  $\rm Q4$ .
  
[[File:Inf_A_1_3b_vers2.png|left|frame|Quellenentropie und Näherungen in „bit/Symbol”]]
+
[[File:Inf_A_1_3b_vers2.png|left|frame|Source entropy and approximations in „bit/symbol”]]
 
<br clear=all>
 
<br clear=all>
''Hinweise:''  
+
''Hints:''  
*Die Aufgabe gehört zum  Kapitel&nbsp; [[Information_Theory/Nachrichtenquellen_mit_Gedächtnis|Nachrichtenquellen mit Gedächtnis]].
+
*This task belongs to the chapter&nbsp; [[Information_Theory/Nachrichtenquellen_mit_Gedächtnis|Sources with Memory]].
 
   
 
   
*Für die&nbsp; $k$&ndash;te Entropienäherung gilt bei Binärquellen&nbsp; $(M = 2)$&nbsp; mit der Verbundwahrscheinlichkeit&nbsp; $ p_i^{(k)}$&nbsp; eines&nbsp; $k$&ndash;Tupels:
+
*For the&nbsp; $k$&ndash;th entropy approximation, the following holds for binary sources&nbsp; $(M = 2)$&nbsp; with the composite probability&nbsp; $ p_i^{(k)}$&nbsp; of a&nbsp; $k$&ndash;tuple:
:$$H_k = \frac{1}{k} \cdot \sum_{i=1}^{2^k} p_i^{(k)} \cdot {\rm log}_2\hspace{0.1cm}\frac {1}{p_i^{(k)}} \hspace{0.5cm}({\rm Einheit\hspace{-0.1cm}: \hspace{0.1cm}bit/Symbol})
+
:$$H_k = \frac{1}{k} \cdot \sum_{i=1}^{2^k} p_i^{(k)} \cdot {\rm log}_2\hspace{0.1cm}\frac {1}{p_i^{(k)}} \hspace{0.5cm}({\rm unit\hspace{-0.1cm}: \hspace{0.1cm}bit/Symbol})
 
  \hspace{0.05cm}.$$
 
  \hspace{0.05cm}.$$
  
  
===Fragebogen===
+
===Questions===
  
 
<quiz display=simple>
 
<quiz display=simple>
{Von welcher Quelle stammt die <u>schwarze Symbolfolge</u>?
+
{What is the source of the <u>black symbol sequence</u>?
 
|type="()"}
 
|type="()"}
 
- $\rm Q1$,
 
- $\rm Q1$,
Line 47: Line 47:
  
  
{Von welcher Quelle stammt die <u>blaue Symbolfolge</u>?
+
{What is the source of the <u>blue symbol sequence</u>?
 
|type="()"}
 
|type="()"}
 
+ $\rm Q1$,
 
+ $\rm Q1$,
Line 55: Line 55:
  
  
{Von welcher Quelle stammt die <u>rote Symbolfolge</u>?
+
{What is the source of the <u>red symbol sequence</u>?
 
|type="()"}
 
|type="()"}
 
- $\rm Q1$,
 
- $\rm Q1$,
Line 63: Line 63:
  
  
{Berechnen Sie die Entropienäherung&nbsp; $H_2$&nbsp; des Wiederholungscodes&nbsp; $\rm Q4$.
+
{Calculate the entropy approximation&nbsp; $H_2$&nbsp; of the repetition code&nbsp; $\rm Q4$.
 
|type="{}"}
 
|type="{}"}
$H_2 \ = \ $ { 0.906 3% } $\ \rm bit/Symbol$
+
$H_2 \ = \ $ { 0.906 3% } $\ \rm bit/symbol$
  
  
{Berechnen Sie die Entropienäherung&nbsp; $H_3$&nbsp; des Wiederholungscodes&nbsp;  $\rm Q4$.
+
{Calculate the entropy approximation&nbsp; $H_3$&nbsp; of the repetition code&nbsp;  $\rm Q4$.
 
|type="{}"}
 
|type="{}"}
$H_3 \ =  \ $ { 0.833 3% } $\ \rm bit/Symbol$
+
$H_3 \ =  \ $ { 0.833 3% } $\ \rm bit/symbol$
  
  
Line 76: Line 76:
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''(1)'''&nbsp; Die schwarze Binärfolge stammt von der Quelle&nbsp; $\underline{\rm Q3}$,  
+
'''(1)'''&nbsp; The black binary sequence comes from the source&nbsp; $\underline{\rm Q3}$,  
*da die Symbole gleichwahrscheinlich sind &nbsp;&nbsp;&#8658;&nbsp;&nbsp; $H_1 = H_0$ und
+
*since the symbols are equally probable &nbsp;&nbsp;&#8658;&nbsp;&nbsp; $H_1 = H_0$ and
*keine statistischen Bindungen zwischen den Symbolen bestehen &nbsp;&nbsp;&#8658;&nbsp;&nbsp; $H=$ ...  $= H_2 = H_1$.
+
*there are no statistical ties between the symbols &nbsp;&nbsp;&#8658;&nbsp;&nbsp; $H=$ ...  $= H_2 = H_1$.
  
  
  
'''(2)'''&nbsp; Man erkennt bei der blauen Binärfolge, dass&nbsp; $\rm A$&nbsp; sehr viel häufiger auftritt als&nbsp; $\rm B$, so dass&nbsp; $H_1 < H_0$&nbsp; gelten muss.  
+
'''(2)'''&nbsp; It can be seen in the blue binary sequence that&nbsp; $\rm A$&nbsp; occurs much more frequently than&nbsp; $\rm B$, so that&nbsp; $H_1 < H_0$&nbsp; must hold.
*Entsprechend der Tabelle erfüllt nur die Quelle&nbsp; $\underline{\rm Q1}$&nbsp; diese Bedingung.  
+
*According to the table, only source&nbsp; $\underline{\rm Q1}$&nbsp; fulfils this condition.  
*Aus&nbsp; $H_1 = 0.5 \; \rm bit/Symbol$&nbsp; kann man die Symbolwahrscheinlichkeiten&nbsp; $p_{\rm A} = 0.89$&nbsp; und&nbsp; $p_{\rm B} = 0.11$&nbsp; ermitteln.
+
*From&nbsp; $H_1 = 0.5 \; \rm bit/symbol$&nbsp; one can determine the symbol probabilities&nbsp; $p_{\rm A} = 0.89$&nbsp; and&nbsp; $p_{\rm B} = 0.11$&nbsp;.
  
  
  
'''(3)'''&nbsp; Durch Ausschlussverfahren kommt man für die rote Binärfolge zum Ergebnis&nbsp; $\underline{\rm Q2}$:  
+
'''(3)'''&nbsp; By exclusion procedure one arrives at the result&nbsp; $\underline{\rm Q2}$ for the red binary sequence:  
*Die Quelle&nbsp; $\rm Q1$&nbsp; gehört nämlich zur blauen Folge,&nbsp; $\rm Q3$&nbsp; zur schwarzen und&nbsp; $\rm Q4$&nbsp; zum Wiederholungscode und damit offensichtlich zur grünen Symbolfolge.  
+
*The source&nbsp; $\rm Q1$&nbsp;belongs to the blue sequence,&nbsp; $\rm Q3$&nbsp; to the black and&nbsp; $\rm Q4$&nbsp; to the repetition code and thus obviously to the green symbol sequence.
*Die rote Symbolfolge weist folgende Eigenschaften auf:
+
*The red symbol sequence has the following properties:
:* Wegen&nbsp; $H_1 = H_0$&nbsp; sind die Symbole gleichwahrscheinlich: &nbsp; $p_{\rm A} = p_{\rm B} = 0.5$.
+
:* Because of&nbsp; $H_1 = H_0$&nbsp;, the symbols are equally probable: &nbsp; $p_{\rm A} = p_{\rm B} = 0.5$.
:* Wegen&nbsp; $H < H_1$&nbsp; bestehen statistische Bindungen innerhalb der Folge.  
+
:* Because of&nbsp; $H < H_1$&nbsp; , there are statistical bonds within the sequence.
*Diese erkennt man daran, dass es zwischen&nbsp; $\rm A$&nbsp; und&nbsp; $\rm B$&nbsp; mehr Übergänge als bei statistischer Unabhängigkeit gibt.
+
*This can be recognised by the fact that there are more transitions between&nbsp; $\rm A$&nbsp; and&nbsp; $\rm B$&nbsp; than with statistical independence.
 +
 
  
  

Revision as of 19:53, 14 May 2021

Different binary sequences

The diagram shows four symbol sequences  $\langle q_\nu \rangle $ , each with length  $N = 60$.  The source symbols are  $\rm A$  and  $\rm B$ respectively.

  • It follows directly that  $H_0 = 1 \; \rm bit/symbol$  applies to the decision content of all sources considered.
  • However, the symbols  $\rm A$  and  $\rm B$  do not occur with equal probability, but with the probabilities  $p_{\rm A}$  and  $p_{\rm B}$.


In addition to  $H_0$ , the table below shows the entropy approximations

  • $H_1$,  based on  $p_{\rm A}$  und  $p_{\rm B}$  (column 2),
  • $H_2$,  based on two-tuples (column 3),
  • $H_3$,  based on three-tuples (column 4),
  • $H_4$,  based on four-tuples (column 5),
  • the actual entropy  $H$, which is obtained from  $H_k$  by the boundary transition for  $k \to \infty$  (last column).


The following size relations exist between these entropies:   $H \le$ ... $\le H_3 \le H_2 \le H_1 \le H_0 \hspace{0.05cm}.$

  • What is not known is the correlation between the sources  $\rm Q1$,  $\rm Q2$,  $\rm Q3$,  $\rm Q4$  and the symbol sequences shown in the graph  (black, blue, red, green).
  • It is only known that source  $\rm Q4$  contains a repetition code.  Due to the fact that in the corresponding symbol sequence every second symbol does not lier any information,  $H_0 = 0.5 \; \rm bit/symbol$.
  • In addition, the entropy approximations  $H_1 = 1 \; \rm bit/symbol$  (equally probable symbols)  and  $H_4 \approx 0.789 \; \rm bit/symbol$  are given.


Finally, the entropy approximations  $H_2$  and  $H_3$ are to be determined for this news source  $\rm Q4$ .

Source entropy and approximations in „bit/symbol”


Hints:

  • For the  $k$–th entropy approximation, the following holds for binary sources  $(M = 2)$  with the composite probability  $ p_i^{(k)}$  of a  $k$–tuple:
$$H_k = \frac{1}{k} \cdot \sum_{i=1}^{2^k} p_i^{(k)} \cdot {\rm log}_2\hspace{0.1cm}\frac {1}{p_i^{(k)}} \hspace{0.5cm}({\rm unit\hspace{-0.1cm}: \hspace{0.1cm}bit/Symbol}) \hspace{0.05cm}.$$


Questions

1

What is the source of the black symbol sequence?

$\rm Q1$,
$\rm Q2$,
$\rm Q3$,
$\rm Q4$.

2

What is the source of the blue symbol sequence?

$\rm Q1$,
$\rm Q2$,
$\rm Q3$,
$\rm Q4$.

3

What is the source of the red symbol sequence?

$\rm Q1$,
$\rm Q2$,
$\rm Q3$,
$\rm Q4$.

4

Calculate the entropy approximation  $H_2$  of the repetition code  $\rm Q4$.

$H_2 \ = \ $

$\ \rm bit/symbol$

5

Calculate the entropy approximation  $H_3$  of the repetition code  $\rm Q4$.

$H_3 \ = \ $

$\ \rm bit/symbol$


Solution

(1)  The black binary sequence comes from the source  $\underline{\rm Q3}$,

  • since the symbols are equally probable   ⇒   $H_1 = H_0$ and
  • there are no statistical ties between the symbols   ⇒   $H=$ ... $= H_2 = H_1$.


(2)  It can be seen in the blue binary sequence that  $\rm A$  occurs much more frequently than  $\rm B$, so that  $H_1 < H_0$  must hold.

  • According to the table, only source  $\underline{\rm Q1}$  fulfils this condition.
  • From  $H_1 = 0.5 \; \rm bit/symbol$  one can determine the symbol probabilities  $p_{\rm A} = 0.89$  and  $p_{\rm B} = 0.11$ .


(3)  By exclusion procedure one arrives at the result  $\underline{\rm Q2}$ for the red binary sequence:

  • The source  $\rm Q1$ belongs to the blue sequence,  $\rm Q3$  to the black and  $\rm Q4$  to the repetition code and thus obviously to the green symbol sequence.
  • The red symbol sequence has the following properties:
  • Because of  $H_1 = H_0$ , the symbols are equally probable:   $p_{\rm A} = p_{\rm B} = 0.5$.
  • Because of  $H < H_1$  , there are statistical bonds within the sequence.
  • This can be recognised by the fact that there are more transitions between  $\rm A$  and  $\rm B$  than with statistical independence.



(4)  Bei der grünen Symbolfolge  $($Quelle $\rm Q4)$  sind die Symbole  $\rm A$  und  $\rm B$  gleichwahrscheinlich:

Symbolfolgen eines binären Wiederholungscodes
$$p_{\rm A} = p_{\rm B} = 0.5 \hspace{0.3cm}\Rightarrow\hspace{0.3cm}H_1 = 1\,{\rm bit/Symbol} \hspace{0.05cm}.$$

Zur  $H_2$-Ermittlung betrachtet man Zweiertupel.  Die Verbundwahrscheinlichkeiten  $p_{\rm AA}$,  $p_{\rm AB}$,  $p_{\rm BA}$  und  $p_{\rm BB}$  können daraus berechnet werden.  Aus der Skizze erkennt man:

  • Die Kombinationen  $\rm AB$  und  $\rm BA$  sind nur dann möglich, wenn ein Tupel bei geradzahligem  $\nu$  beginnt.  Für die Verbundwahrscheinlichkeiten  $p_{\rm AB}$  und  $p_{\rm BA}$  gilt dann:
$$p_{\rm AB} \hspace{0.1cm} = \hspace{0.1cm} {\rm Pr}(\nu {\rm \hspace{0.15cm}ist\hspace{0.15cm}gerade}) \cdot {\rm Pr}( q_{\nu} = \mathbf{A}) \cdot {\rm Pr}(q_{\nu+1} = \mathbf{B}\hspace{0.05cm} | q_{\nu} = \mathbf{A}) = {1}/{2} \cdot {1}/{2} \cdot {1}/{2} = {1}/{8} = p_{\rm BA} \hspace{0.05cm}.$$
  • Dagegen gelten für die beiden weiteren Kombinationen  $\rm AA$  und  $\rm BB$:
$$p_{\rm AA} ={\rm Pr}(\nu = 1) \cdot {\rm Pr}( q_1 = \mathbf{A}) \cdot {\rm Pr}(q_{2} = \mathbf{A}\hspace{0.05cm} | q_{1} = \mathbf{A}) + {\rm Pr}(\nu=2) \cdot {\rm Pr}( q_{2} = \mathbf{A}) \cdot {\rm Pr}(q_{3} = \mathbf{A}\hspace{0.05cm} | q_{2} = \mathbf{A}) \hspace{0.05cm}.$$
$$\Rightarrow \hspace{0.3cm}p_{\rm AA} = \frac{1}{2} \cdot \frac{1}{2} \cdot 1+ \frac{1}{2} \cdot \frac{1}{2} \cdot \frac{1}{2} = \frac{3}{8} = p_{\rm BB} \hspace{0.05cm}.$$
Hierbei steht  $\nu = 1$  für alle ungeradzahligen Indizes und  $\nu = 2$  für alle geradzahligen Indizes.
  • Damit ergibt sich für die Entropienäherung:
$$H_2 = \frac{1}{2} \cdot \left [ 2 \cdot \frac{3}{8} \cdot {\rm log}_2\hspace{0.1cm}\frac {8}{3} + 2 \cdot \frac{1}{8} \cdot {\rm log}_2\hspace{0.1cm}(8)\right ] = \frac{3}{8} \cdot {\rm log}_2\hspace{0.1cm}(8) - \frac{3}{8} \cdot {\rm log}_2\hspace{0.1cm}(3) + \frac{1}{8} \cdot {\rm log}_2\hspace{0.1cm}(8) \hspace{0.15cm} \underline {= 0.906 \,{\rm bit/Symbol}} \hspace{0.05cm}.$$


(5)  Nach ähnlichem Vorgehen kommt man bei Dreiertupeln zu den Verbundwahrscheinlichkeiten

$$p_{\rm AAA} \hspace{0.1cm} = \hspace{0.1cm} p_{\rm BBB} = 1/4 \hspace{0.05cm},\hspace{0.2cm} p_{\rm ABA} = p_{\rm BAB} = 0 \hspace{0.05cm},\hspace{0.2cm} p_{\rm AAB} \hspace{0.1cm} = \hspace{0.1cm} p_{\rm ABB} = p_{\rm BBA} = p_{\rm BAA} = 1/8$$

und daraus zur Entropienäherung

$$H_3 = \frac{1}{3} \cdot \left [ 2 \cdot \frac{1}{4} \cdot {\rm log}_2\hspace{0.1cm}(4) + 4 \cdot \frac{1}{8} \cdot {\rm log}_2\hspace{0.1cm}(8)\right ] = \frac{2.5}{3} \hspace{0.15cm} \underline {= 0.833 \,{\rm bit/Symbol}} \hspace{0.05cm}.$$

Zur Berechnung von  $H_4$  ergeben sich folgende  $16$  Wahrscheinlichkeiten:

$$p_{\rm AAAA} \hspace{0.1cm} = \hspace{0.1cm} p_{\rm BBBB} = 3/16 \hspace{0.05cm},\hspace{0.2cm} p_{\rm AABB} = p_{\rm BBAA} = 2/16 \hspace{0.05cm},$$
$$ p_{\rm AAAB} \hspace{0.1cm} = \hspace{0.1cm} p_{\rm ABBA} = p_{\rm ABBB} = p_{\rm BBBA} = p_{\rm BAAB} = p_{\rm BAAA}= 1/16 \hspace{0.05cm}$$
$$ p_{\rm AABA} \hspace{0.1cm} = \hspace{0.1cm} p_{\rm ABAA} = p_{\rm ABAB} = p_{\rm BBAB} = p_{\rm BABB} = p_{\rm BABA}= 0\hspace{0.05cm}.$$

Daraus folgt:

$$H_4= \frac{1}{4} \hspace{-0.05cm}\cdot \hspace{-0.05cm}\left [ 2 \hspace{-0.05cm}\cdot \hspace{-0.05cm} \frac{3}{16} \hspace{-0.05cm}\cdot \hspace{-0.05cm} {\rm log}_2\hspace{0.1cm}\frac{16}{3} + 2 \hspace{-0.05cm}\cdot \hspace{-0.05cm} \frac{1}{8} \hspace{-0.05cm}\cdot \hspace{-0.05cm}{\rm log}_2\hspace{0.1cm}(8) + 6 \hspace{-0.05cm}\cdot \hspace{-0.05cm} \frac{1}{16} \hspace{-0.05cm}\cdot \hspace{-0.05cm} {\rm log}_2\hspace{0.1cm}(16)\right ] =\frac{\left [ 6 \hspace{-0.05cm}\cdot \hspace{-0.05cm} {\rm log}_2\hspace{0.01cm}(16) - 6 \hspace{-0.05cm}\cdot \hspace{-0.05cm} {\rm log}_2\hspace{0.01cm}(3) + 4 \hspace{-0.05cm}\cdot \hspace{-0.05cm} {\rm log}_2\hspace{0.01cm}(8) + 6\hspace{-0.05cm}\cdot \hspace{-0.05cm} {\rm log}_2\hspace{0.01cm}(16)\right ]}{32} .$$

Man erkennt:

  • Auch die Näherung  $H_4 = 0.789\,{\rm bit/Symbol}$  weicht noch deutlich vom Entropie-Endwert  $H = 0.5\,{\rm bit/Symbol}$  ab.
  • Der Wiederholungscode kann offensichtlich nicht durch eine Markovquelle modelliert werden.  Wäre  $\rm Q4$  eine Markovquelle, so müsste nämlich gelten:
$$H = 2 \cdot H_2 - H_1 \hspace{0.3cm}\Rightarrow\hspace{0.3cm}H_2 = 1/2 \cdot (H+H_1) = 1/2 \cdot (0.5+1) = 0.75 \,{\rm bit/Symbol}\hspace{0.05cm}.$$