Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

Difference between revisions of "Aufgaben:Exercise 4.4Z: Supplement to Exercise 4.4"

From LNTwww
 
(24 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{quiz-Header|Buchseite=Kanalcodierung/Soft–in Soft–out Decoder}}
+
{{quiz-Header|Buchseite=Channel_Coding/Soft-in_Soft-Out_Decoder}}
  
[[File:P_ID2994__KC_Z_4_4_v3.png |right|frame|Hamming–Gewichte und Wahrscheinlichkeiten ]]
+
[[File:P_ID2994__KC_Z_4_4_v3.png |right|frame|Hamming weights&nbsp; wH(x_), <br>sequence probabilities&nbsp; Pr(x_) ]]
Der Informationstheoretiker [https://de.wikipedia.org/wiki/Robert_Gray_Gallager| Robert G. Gallager] hat sich bereits 1963 mit folgender Fragestellung beschäftigt:
+
The information theorist&nbsp; [https://en.wikipedia.org/wiki/Robert_G._Gallager $\text{Robert G. Gallager}$]&nbsp; dealt already in 1963 with the following problem:
* Gegeben ist ein Zufallsvektor x_=(x1,x2, ...,xn) mit n binären Elementen x_i &#8712; \{0, \, 1\}.
+
* Given a random vector&nbsp; x_=(x1,x2, ...,xn)&nbsp; with&nbsp; n&nbsp; binary elements&nbsp; x_i &#8712; \{0, \, 1\}.
* Bekannt sind alle Wahrscheinlichkeiten pi=Pr(xi=1) und qi=Pr(xi=0)=1pi mit Index i=1, ..., n.
 
* Gesucht ist die Wahrscheinlichkeit, dass die Anzahl der Einsen in diesem Vektor geradzahlig ist.
 
* Oder ausgedrückt mit dem [[Kanalcodierung/Zielsetzung_der_Kanalcodierung#Einige_wichtige_Definitionen_zur_Blockcodierung|Hamming&ndash;Gewicht]]: Wie groß ist die Wahrscheinlichkeit Pr[wH(x_) ist gerade]?
 
  
 +
* Known are all probabilities&nbsp; pi=Pr(xi=1)&nbsp; and&nbsp; qi=Pr(xi=0)=1pi&nbsp; with index&nbsp; i=1, ..., n.
  
Die Grafik verdeutlicht die Aufgabenstellung für das Beispiel n=4 sowie p1=0.2, p2=0.9, p3=0.3 und p4=0.6.  
+
* What we are looking for is the probability that the number of&nbsp; "ones"&nbsp; in this vector is even.
* Für die grün hinterlegte Zeile &nbsp; &#8658; &nbsp; x_=(1,0,0,1) gilt wH(x_)=2 und
+
 
 +
* Or expressed using the&nbsp; [[Channel_Coding/Objective_of_Channel_Coding#Important_definitions_for_block_coding|"Hamming weight"]]: &nbsp; What is the probability&nbsp; Pr[wH(x_) is even]?
 +
 
 +
 
 +
The graph illustrates the task for the example&nbsp; n=4&nbsp; and&nbsp; p1=0.2,&nbsp; p2=0.9,&nbsp; p3=0.3&nbsp; and&nbsp; p4=0.6.  
 +
* For the row highlighted in green &nbsp; &#8658; &nbsp; x_=(1,0,0,1)&nbsp; holds&nbsp; wH(x_)=2&nbsp; and
 
:Pr(x_)=p1q2q3p4=0.0084.
 
:Pr(x_)=p1q2q3p4=0.0084.
* Blaue Schrift bedeutet &bdquo;wH(x_) ist gerade&rdquo;. Rote Schrift steht für &bdquo;wH(x_) ist ungerade&rdquo;.
+
* Blue font means&nbsp; "wH(x_)&nbsp; is even".&nbsp; Red font stands for&nbsp; "wH(x_)&nbsp; is odd."
* Die Wahrscheinlichkeit ${\rm Pr}[w_{\rm H}(\underline{x}) {\rm \ ist \ gerade}]$ ist die Summe der blauen Zahlen in der letzten Spalte.  
+
 
*Die Summe der roten Zahlen ergibt ${\rm Pr}[w_{\rm H}(\underline{x}) {\rm \ ist \ ungerade}] = 1 - {\rm Pr}[w_{\rm H}(\underline{x}) {\rm \ ist \ gerade}]$.
+
*The probability&nbsp; ${\rm Pr}[w_{\rm H}(\underline{x}) {\rm \ is \ even}]$&nbsp; is the sum of the blue numbers in the last column.
 +
 +
*The sum of the red numbers gives&nbsp; ${\rm Pr}[w_{\rm H}(\underline{x}) {\rm \ is \ odd}] = 1 - {\rm Pr}[w_{\rm H}(\underline{x}) {\rm \ is \ even}]$.
  
  
Gallager hat das Problem in analytischer Weise gelöst:
+
Gallager solved the problem in an analytical way:
:$$ {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm ist \hspace{0.15cm} gerade} \right ]
+
:$$ {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm is \hspace{0.15cm} even} \right ]
 
\hspace{-0.15cm} \ = \ \hspace{-0.15cm} 1/2 \cdot [1 + \pi]\hspace{0.05cm},$$
 
\hspace{-0.15cm} \ = \ \hspace{-0.15cm} 1/2 \cdot [1 + \pi]\hspace{0.05cm},$$
:$${\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm ist \hspace{0.15cm} ungerade}
+
:$${\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm is \hspace{0.15cm} odd}
 
\right ] \hspace{-0.15cm} \ = \ \hspace{-0.15cm} 1/2 \cdot [1 - \pi]\hspace{0.05cm}.$$
 
\right ] \hspace{-0.15cm} \ = \ \hspace{-0.15cm} 1/2 \cdot [1 - \pi]\hspace{0.05cm}.$$
  
Hierbei ist die folgende Hilfsgröße verwendet:
+
Here the following auxiliary variable is used:
 
:$$\pi = \prod\limits_{i =1}^{n} \hspace{0.25cm}(1-2p_i)  
 
:$$\pi = \prod\limits_{i =1}^{n} \hspace{0.25cm}(1-2p_i)  
 
  \hspace{0.05cm}.$$
 
  \hspace{0.05cm}.$$
  
Die Gleichung wendet man zum Beispiel an, um die extrinsischen $L$&ndash;Werte eines <i>Single Parity&ndash;check Codes</i> zu berechnen. Wie bereits in [[Aufgaben:4.4_Extrinsische_L%E2%80%93Werte_beim_SPC| Aufgabe A4.4]] dargelegt, lautet nämlich der extrinsische L&ndash;Wert mit dem Hamming&ndash;Gewicht wH der verkürzten Folge x_(i):
+
One applies the equation,&nbsp; for example,&nbsp; to calculate the extrinsic&nbsp; L&ndash;values of a&nbsp; "single parity&ndash;check code".  
:$$L_{\rm E}(i) = {\rm ln} \hspace{0.15cm}\frac{{\rm Pr} \left [w_{\rm H}(\underline{x}^{(-i)})\hspace{0.15cm}{\rm ist \hspace{0.15cm} gerade} \hspace{0.05cm} | \hspace{0.05cm}\underline{y} \hspace{0.05cm}\right ]}{{\rm Pr} \left [w_{\rm H}(\underline{x}^{(-i)})\hspace{0.15cm}{\rm ist \hspace{0.15cm} ungerade} \hspace{0.05cm} | \hspace{0.05cm}\underline{y} \hspace{0.05cm}\right ]}
+
 
 +
Indeed,&nbsp; as already pointed out in&nbsp; [[Aufgaben:Exercise_4.4:_Extrinsic_L-values_at_SPC| $\text{Exercise 4.4}$]]&nbsp; the extrinsic log likelihood ratio with Hamming&ndash;weight&nbsp; wH&nbsp; is the truncated sequence&nbsp; x_(i):
 +
:$$L_{\rm E}(i) = {\rm ln} \hspace{0.15cm}\frac{{\rm Pr} \left [w_{\rm H}(\underline{x}^{(-i)})\hspace{0.15cm}{\rm is \hspace{0.15cm} even} \hspace{0.05cm} | \hspace{0.05cm}\underline{y} \hspace{0.05cm}\right ]}{{\rm Pr} \left [w_{\rm H}(\underline{x}^{(-i)})\hspace{0.15cm}{\rm is \hspace{0.15cm} odd} \hspace{0.05cm} | \hspace{0.05cm}\underline{y} \hspace{0.05cm}\right ]}
 
  \hspace{0.05cm}.$$
 
  \hspace{0.05cm}.$$
  
Hierbei ist berücksichtigt, dass man für LE(i) nur die anderen Symbole (j &ne; i) heranziehen darf:
+
Here it is taken into account that for&nbsp; LE(i)&nbsp; one may refer only to the other symbols&nbsp; (j &ne; i)&nbsp;:
 
:x_(i)=(x1, ...,xi1,xi+1, ...,xn).
 
:x_(i)=(x1, ...,xi1,xi+1, ...,xn).
  
Line 39: Line 46:
  
  
''Hinweise:''
+
<u>Hints:</u>
* Die Aufgabe gehört zum Kapitel [[Kanalcodierung/Soft%E2%80%93in_Soft%E2%80%93out_Decoder#Hard_Decision_vs._Soft_Decision| Soft&ndash;in Soft&ndash;out Decoder]]  
+
*This exercise belongs to the chapter&nbsp; [[Channel_Coding/Soft%E2%80%93in_Soft%E2%80%93out_Decoder|"Soft&ndash;in Soft&ndash;out Decoder"]].
*Sie ist als Ergänzung zur [[Aufgaben:Aufgabe_4.4:_Extrinsische_L–Werte_beim_SPC| Aufgabe 4.4]] gedacht.
 
* Sollte die Eingabe des Zahlenwertes &bdquo;0&rdquo; erforderlich sein, so geben Sie bitte &bdquo;0.&rdquo; ein.
 
  
 +
*Reference is made in particular to the section&nbsp; [[Channel_Coding/Soft-in_Soft-Out_Decoder#Calculation_of_extrinsic_log_likelihood_ratios|"For calculating the extrinsic log likelihood ratios"]].
  
 +
*The exercise is intended as a supplement to&nbsp; [[Aufgaben:Exercise_4.4:_Extrinsic_L-values_at_SPC| Exercise 4.4]]&nbsp;.
 +
  
===Fragebogen===
+
 
 +
 
 +
===Questions===
 
<quiz display=simple>
 
<quiz display=simple>
{Wir betrachten den Vektor x_=(x1,x2)  n=2 mit x_i &#8712; \{0, \, 1\}. Wie groß ist die Wahrscheinlichkeit, dass x_ eine gerade Anzahl an Einsen beinhaltet?
+
{We consider the vector&nbsp; x_=(x1,x2)  n=2&nbsp; with&nbsp; x_i &#8712; \{0, \, 1\}&nbsp; and&nbsp; $p_1 = 0.2, \ p_2 = 0.9$.  <br>What is the probability that &nbsp; x_ &nbsp; contains an even number of&nbsp; "ones"&nbsp;?
 
|type="{}"}
 
|type="{}"}
$p_1 = 0.2, \ p_2 = 0.9 \text{:} \hspace{0.2cm} {\rm Pr}[{\rm gerades} \ w_{\rm H}] \ = \ ${ 0.26 3% }
+
${\rm Pr}\big [w_{\rm H}(\underline{x}) \ {\rm is \ even}\big ] \ = \ ${ 0.26 3% }
  
{Berechnen Sie die gleiche Wahrscheinlichkeit für x_=(x1,x2,x3)  n=3.
+
{Compute the same probability for&nbsp; $\underline{x} = (x_1, \, x_2, \, x_3) \ \Rightarrow \ n = 3&nbsp;   and&nbsp;p_1 = 0.2, \ p_2 = 0.9, \ p_3 = 0.3$.
 
|type="{}"}
 
|type="{}"}
$... \ , \ p_3 = 0.3 \text{:} \hspace{0.2cm} {\rm Pr}[{\rm gerades} \ w_{\rm H}] \ = \ ${ 0.404 3% }
+
${\rm Pr}\big [w_{\rm H}(\underline{x}) \ {\rm is \ even}\big ] \ = \ ${ 0.404 3% }
  
{Nun gelte n=4 und p1=0.2, p2=0.9, p3=0.3, p4=0.6. Berechnen Sie nach der Gallager&ndash;Gleichung folgende Größen:
+
{Now let be&nbsp; n=4&nbsp; and&nbsp; p1=0.2, p2=0.9, p3=0.3, p4=0.6.&nbsp; Calculate the following quantities according to Gallager's equation:
 
|type="{}"}
 
|type="{}"}
${\rm Pr(blau) = Pr}[w_{\rm H}(\underline{x}) \ {\rm ist \ gerade}] \ = \ ${ 0.5192 3% }
+
${\rm Pr(blue) = Pr}\big [w_{\rm H}(\underline{x}) \ {\rm is \ even}\big ] \hspace{0.33cm} = \ ${ 0.5192 3% }
${\rm Pr(rot) = Pr}[w_{\rm H}(\underline{x}) \ {\rm ist \ ungerade}] \ = \ ${ 0.4808 3% }
+
${\rm Pr(red) = Pr}\big [w_{\rm H}(\underline{x}) \ {\rm is \ odd}\big ] \hspace{0.1cm} = \ ${ 0.4808 3% }
Q=Pr(blau)/Pr(rot) = { 1.0799 3% }
+
$\text{Quotient }Q = {\rm Pr(blau)/Pr(rot)} \hspace{0.4cm} = \ ${ 1.0799 3% }
  
{Wie groß ist der extrinsische L&ndash;Wert für das Symbol i=5 beim SPC (5, 4, 2) mit p1=0.2, p2=0.9, p3=0.3, p4=0.6, p5=0.9?
+
{What is the extrinsic log likelihood ratio for the symbol&nbsp; i=5&nbsp; at&nbsp; $\text{SPC (5, 4, 2)}$&nbsp; with&nbsp; p1=0.2, p2=0.9, p3=0.3, p4=0.6, p5=0.9?
 
|type="{}"}
 
|type="{}"}
 
LE(i=5) = { 0.077 3% }
 
LE(i=5) = { 0.077 3% }
  
{Wie ändert sich LE(i=5), wenn man stattdessen von p5=0.1 ausgeht?
+
{How does&nbsp; LE(i=5)&nbsp; change if we assume&nbsp; p5=0.1&nbsp; instead?
|type="[]"}
+
|type="()"}
- LE(i=5) wird größer.
+
- LE(i=5)&nbsp; becomes larger.
- LE(i=5) wird kleiner.
+
- LE(i=5)&nbsp; becomes smaller.
+ LE(i=5) wird gegenüber Teilaufgabe (4) nicht verändert.
+
+ LE(i=5)&nbsp; is not changed compared to subtask&nbsp; '''(4)'''.
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''(1)'''&nbsp; [[File:P_ID2996__KC_Z_4_4a_v1.png|frame|right|Herleitung „wH ist gerade” für n=2]] Entsprechend nebenstehender Tabelle gilt:
+
[[File:P_ID2996__KC_Z_4_4a_v1.png|frame|right|Derivation&nbsp; "wH is even"&nbsp; for code length&nbsp; n=2.]]
:$${\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.10cm}{\rm ist \hspace{0.10cm} gerade}\right ] =
+
'''(1)'''&nbsp;  According to the adjacent table applies:
 +
:$${\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.10cm}{\rm is \hspace{0.10cm} even}\right ] =
 
{\rm Pr} \left [w_{\rm H} = 0 \right] + {\rm Pr} \left [w_{\rm H} = 2 \right]
 
{\rm Pr} \left [w_{\rm H} = 0 \right] + {\rm Pr} \left [w_{\rm H} = 2 \right]
 
\hspace{0.05cm}. $$
 
\hspace{0.05cm}. $$
  
Mit den Wahrscheinlichkeiten
+
*With the probabilities
 
:p1=Pr(x1=1) = 0.2,q1=Pr(x1=0)=0.8,
 
:p1=Pr(x1=1) = 0.2,q1=Pr(x1=0)=0.8,
 
:p2=Pr(x2=1) = 0.9,q2=Pr(x2=0)=0.1
 
:p2=Pr(x2=1) = 0.9,q2=Pr(x2=0)=0.1
  
erhält man:
+
:one obtains:
 
:$${\rm Pr} \left [w_{\rm H}(\underline{x}) = 0\right] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}  
 
:$${\rm Pr} \left [w_{\rm H}(\underline{x}) = 0\right] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}  
 
{\rm Pr} \left [(x_1 = 0)\cap (x_2 = 0) \right] = q_1 \cdot q_2 = 0.8 \cdot 0.1
 
{\rm Pr} \left [(x_1 = 0)\cap (x_2 = 0) \right] = q_1 \cdot q_2 = 0.8 \cdot 0.1
Line 90: Line 101:
 
:$${\rm Pr} \left [w_{\rm H}(\underline{x}) = 2\right] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}  
 
:$${\rm Pr} \left [w_{\rm H}(\underline{x}) = 2\right] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}  
 
{\rm Pr} \left [(x_1 = 1)\cap (x_2 = 1) \right] = p_1 \cdot p_2 = 0.2 \cdot 0.9 = 0.18$$
 
{\rm Pr} \left [(x_1 = 1)\cap (x_2 = 1) \right] = p_1 \cdot p_2 = 0.2 \cdot 0.9 = 0.18$$
:$$\Rightarrow \hspace{0.3cm} {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm ist \hspace{0.15cm} gerade}\right] = 0.8 + 0.18 \hspace{0.15cm} \underline{= 0.26}
+
:$$\Rightarrow \hspace{0.3cm} {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm is \hspace{0.15cm} even}\right] = 0.8 + 0.18 \hspace{0.15cm} \underline{= 0.26}
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
  
Die Gallager&ndash;Gleichung liefert für den gleichen Parametersatz:
+
*The Gallager's equation provides for the same set of parameters:
:$${\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm ist \hspace{0.15cm} gerade}\right] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}  0.5 + 0.5 \cdot \prod\limits_{i =1}^{2} \hspace{0.25cm}(1-2\cdot p_i) =$$
+
:$${\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm is \hspace{0.15cm} even}\right] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}  0.5 + 0.5 \cdot \prod\limits_{i =1}^{2} \hspace{0.25cm}(1-2\cdot p_i) = 0.5 + 0.5 \cdot  (1 - 2 \cdot 0.2)\cdot  (1 - 2 \cdot 0.9) = 0.26
:$$\ = \ \hspace{-0.15cm} 0.5 + 0.5 \cdot  (1 - 2 \cdot 0.2)\cdot  (1 - 2 \cdot 0.9) = 0.26
 
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
  
Die von Gallager 1963 angegebene Gleichung wurde hiermit für n=2 verifiziert.
+
*The equation given by Gallager 1963 was hereby verified for&nbsp; n=2.
  
  
'''(2)'''&nbsp; [[File:P_ID2997__KC_Z_4_4b_v1.png|right|frame|Herleitung „wH ist gerade” für n=3]] In der nebenstehenden Tabelle sind die vier Kombinationen mit einer geraden Anzahl an Einsen blau markiert. Die Auftrittswahrscheinlichkeiten der einzelnen Kombinationen sind in der letzten Spalte angegeben. Somit ergibt sich hier:
+
 
:$$ {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm ist \hspace{0.15cm} gerade}\right] =  0.056 + $$
+
'''(2)'''&nbsp; In the second table,&nbsp; the four combinations with an even number of&nbsp; "ones"&nbsp; are marked in blue.&nbsp;
:$$+0.216 + 0.006 + 0.126 \hspace{0.15cm} \underline{= 0.404}
+
[[File:P_ID2997__KC_Z_4_4b_v1.png|right|frame|Derivation "wH is even"&nbsp;  for code length&nbsp; n=3.]]  
 +
 
 +
*The occurrence probabilities  of each combination are given in the last column.&nbsp; Thus,&nbsp; the result is:
 +
:$$ {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm is \hspace{0.15cm} even}\right] =  0.056 + 0.216 + 0.006 + 0.126 \hspace{0.15cm} \underline{= 0.404}
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
  
Die roten Zeilen liefern das Komplementärereignis:
+
*The red rows provide the complementary event:
:$$ {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm ist \hspace{0.15cm} ungerade}\right] =  0.024 + $$
+
:$$ {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm is \hspace{0.15cm} odd}\right] =  0.024 + 0.504 + 0.014 + 0.054= 0.596
:$$+0.504 + 0.014 + 0.054= 0.596
 
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
  
Die Gallager&ndash;Gleichung liefert auch hier wieder das exakt gleiche Ergebnis.
+
*Gallager's equation again gives the exact same result,&nbsp; although it should be noted that this equation is valid for all&nbsp; n&nbsp; and all arbitrary probabilities:
:$${\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm ist \hspace{0.15cm} gerade}\right] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}  0.5 + 0.5 \cdot \prod\limits_{i =1}^{3} \hspace{0.25cm}(1-2\cdot p_i) =$$
+
:$${\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm is \hspace{0.15cm} even}\right] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}  0.5 + 0.5 \cdot \prod\limits_{i =1}^{3} \hspace{0.25cm}(1-2\cdot p_i) $$
:$$\ = \ \hspace{-0.15cm} 0.5 + 0.5 \cdot  (+0.6) \cdot  (-0.8) \cdot  (+0.4) = 0.404
+
:$$\Rightarrow\hspace{0.3cm}{\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm is \hspace{0.15cm} even}\right] \hspace{-0.15cm} \ = \ \hspace{-0.15cm} 0.5 + 0.5 \cdot  (+0.6) \cdot  (-0.8) \cdot  (+0.4) = 0.404
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
  
Anzumerken ist, dass diese Gleichung für alle n und alle beliebigen Wahrscheinlichkeiten gültig ist.
 
  
 
+
'''(3)'''&nbsp; According to the specification page applies:
'''(3)'''&nbsp; Entsprechend der Angabenseite gilt:
+
:π=4i=1(12pi) = (120.2)(120.9)(120.3)(120.6)
:$$\pi = \prod\limits_{i =1}^{4} \hspace{0.25cm}(1-2\cdot p_i) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} (1 - 2 \cdot 0.2) \cdot  (1 - 2 \cdot 0.9) \cdot  (1 - 2 \cdot 0.3) \cdot  (1 - 2 \cdot 0.6) =$$
+
:$$\Rightarrow\hspace{0.3cm}\pi = \prod\limits_{i =1}^{4} \hspace{0.25cm}(1-2\cdot p_i) \hspace{-0.15cm} \ = \ \hspace{-0.15cm}(+0.6) \cdot  (-0.8) \cdot  (+0.4) \cdot  (-0.2) = 0.0384  
:$$\ = \ \hspace{-0.15cm} (+0.6) \cdot  (-0.8) \cdot  (+0.4) \cdot  (-0.2) = 0.0384  
 
 
  \hspace{0.05cm}.$$
 
  \hspace{0.05cm}.$$
  
Daraus lassen sich berechnen:
+
*From this can be calculated:
:$${\rm Pr}({\rm blau}) = {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm ist \hspace{0.15cm} gerade}\right] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}  0.5 + 0.5 \cdot \pi  = 0.5 + 0.5 \cdot 0.0384\hspace{0.15cm} \underline{= 0.5192}\hspace{0.05cm},$$
+
:$${\rm Pr}({\rm blue}) = {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm is \hspace{0.15cm} even}\right] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}  0.5 + 0.5 \cdot \pi  = 0.5 + 0.5 \cdot 0.0384\hspace{0.15cm} \underline{= 0.5192}\hspace{0.05cm},$$
:$${\rm Pr}({\rm rot}) = {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm ist \hspace{0.15cm} ungerade}\right] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}  0.5 - 0.5 \cdot \pi  = 0.5 - 0.5 \cdot 0.0384\hspace{0.15cm} \underline{= 0.4808}\hspace{0.05cm}. $$
+
:$${\rm Pr}({\rm red}) = {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm is \hspace{0.15cm} odd}\right] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}  0.5 - 0.5 \cdot \pi  = 0.5 - 0.5 \cdot 0.0384\hspace{0.15cm} \underline{= 0.4808}\hspace{0.05cm}. $$
  
Addiert man die blauen bzw. die roten Wahrscheinlichkeiten auf der Angabenseite, so erhält man exakt die hier berechneten Werte. Für den Quotienten ergibt sich:
+
*If you add up the blue and red probabilities on the information page,V you get exactly the values calculated here.&nbsp; For the quotient we get:
:$$Q = \frac{{\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm ist \hspace{0.15cm} gerade}\right]} { {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm ist \hspace{0.15cm} ungerade}\right]} = \frac{0.5192}{0.4808}\hspace{0.15cm} \underline{= 1.0799}
+
:$$Q = \frac{{\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm is \hspace{0.15cm} even}\right]} { {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm is \hspace{0.15cm} odd}\right]} = \frac{0.5192}{0.4808}\hspace{0.15cm} \underline{= 1.0799}
 
\hspace{0.05cm}. $$
 
\hspace{0.05cm}. $$
  
  
'''(4)'''&nbsp; Für den <i>Single Parity&ndash;check Code</i> wurde der extrinsische L&ndash;Wert bezüglich des i&ndash;ten Bits wie folgt angegeben:
+
 
:$$L_{\rm E}(i) = {\rm ln} \hspace{0.15cm}\frac{{\rm Pr} \left [w_{\rm H}(\underline{x}^{(-i)})\hspace{0.15cm}{\rm ist \hspace{0.15cm} gerade} \hspace{0.05cm} | \hspace{0.05cm}\underline{y} \hspace{0.05cm}\right ]}{{\rm Pr} \left [w_{\rm H}(\underline{x}^{(-i)})\hspace{0.15cm}{\rm ist \hspace{0.15cm} ungerade} \hspace{0.05cm} | \hspace{0.05cm}\underline{y} \hspace{0.05cm}\right ]}
+
'''(4)'''&nbsp; For the&nbsp; "single parity&ndash;check code",&nbsp; the extrinsic log likelihood ratio with respect to the&nbsp; $i^{th}$&nbsp; bit was specified as follows:
 +
:$$L_{\rm E}(i) = {\rm ln} \hspace{0.15cm}\frac{{\rm Pr} \left [w_{\rm H}(\underline{x}^{(-i)})\hspace{0.15cm}{\rm is \hspace{0.15cm} even} \hspace{0.05cm} | \hspace{0.05cm}\underline{y} \hspace{0.05cm}\right ]}{{\rm Pr} \left [w_{\rm H}(\underline{x}^{(-i)})\hspace{0.15cm}{\rm is \hspace{0.15cm} odd} \hspace{0.05cm} | \hspace{0.05cm}\underline{y} \hspace{0.05cm}\right ]}
 
  \hspace{0.05cm},$$
 
  \hspace{0.05cm},$$
  
oder:
+
*Or:
 
:$$L_{\rm E}(i) = {\rm ln} \hspace{0.15cm}\frac{1+\prod_{j \ne i} \hspace{0.25cm}(1-2\cdot p_j)}{1-\prod_{j \ne i} \hspace{0.25cm}(1-2\cdot p_j)}
 
:$$L_{\rm E}(i) = {\rm ln} \hspace{0.15cm}\frac{1+\prod_{j \ne i} \hspace{0.25cm}(1-2\cdot p_j)}{1-\prod_{j \ne i} \hspace{0.25cm}(1-2\cdot p_j)}
 
  \hspace{0.05cm}.$$
 
  \hspace{0.05cm}.$$
  
Beim SPC (5, 4, 2) &nbsp;&#8658;&nbsp; n=5 ergibt sich dieses Produkt für i=5 aus folgenden vier Multiplikanden:
+
*At&nbsp; $\text{SPC (5, 4, 2}$) &nbsp; &#8658; &nbsp; n=5,&nbsp; this product for&nbsp; i=5&nbsp; results from the following four factors:
 
:$$\pi = \prod\limits_{j = 1,  \hspace{0.05cm}2,  \hspace{0.05cm}3,  \hspace{0.05cm}4} \hspace{0.05cm}(1-2\cdot p_j) =  
 
:$$\pi = \prod\limits_{j = 1,  \hspace{0.05cm}2,  \hspace{0.05cm}3,  \hspace{0.05cm}4} \hspace{0.05cm}(1-2\cdot p_j) =  
 
(1-2\cdot p_1) \cdot (1-2\cdot p_2) \cdot (1-2\cdot p_3) \cdot (1-2\cdot p_4)
 
(1-2\cdot p_1) \cdot (1-2\cdot p_2) \cdot (1-2\cdot p_3) \cdot (1-2\cdot p_4)
 
  \hspace{0.05cm}.$$
 
  \hspace{0.05cm}.$$
  
Der Vergleich mit der Teilaufgabe (3) zeigt, dass LE(i=5)=lnQ=ln(1.0799) 0.077_ ist.
+
The comparison with subtask&nbsp; '''(3)'''&nbsp; shows that&nbsp; LE(i=5)=lnQ=ln(1.0799) 0.077_.
  
  
'''(5)'''&nbsp; Richtig ist der <u>Lösungsvorschlag 3</u>, weil das Ergebnis für LE(i=5) unabhängig von p5 ist.
+
'''(5)'''&nbsp; Correct is the&nbsp; <u>proposed solution 3</u>&nbsp; because the result for&nbsp; LE(i=5)&nbsp; is independent of&nbsp; p5.
 
{{ML-Fuß}}
 
{{ML-Fuß}}
  
  
[[Category:Aufgaben zu  Kanalcodierung|^4.1 Soft–in Soft–out Decoder^]]
+
[[Category:Channel Coding: Exercises|^4.1 Soft–in Soft–out Decoder^]]

Latest revision as of 16:29, 3 December 2022

Hamming weights  wH(x_),
sequence probabilities  Pr(x_)

The information theorist  Robert G. Gallager  dealt already in 1963 with the following problem:

  • Given a random vector  x_=(x1,x2, ...,xn)  with  n  binary elements  xi{0,1}.
  • Known are all probabilities  pi=Pr(xi=1)  and  qi=Pr(xi=0)=1pi  with index  i=1, ..., n.
  • What we are looking for is the probability that the number of  "ones"  in this vector is even.
  • Or expressed using the  "Hamming weight":   What is the probability  Pr[wH(x_) is even]?


The graph illustrates the task for the example  n=4  and  p1=0.2p2=0.9p3=0.3  and  p4=0.6.

  • For the row highlighted in green   ⇒   x_=(1,0,0,1)  holds  wH(x_)=2  and
Pr(x_)=p1q2q3p4=0.0084.
  • Blue font means  "wH(x_)  is even".  Red font stands for  "wH(x_)  is odd."
  • The probability  Pr[wH(x_) is even]  is the sum of the blue numbers in the last column.
  • The sum of the red numbers gives  Pr[wH(x_) is odd]=1Pr[wH(x_) is even].


Gallager solved the problem in an analytical way:

Pr[wH(x_)iseven] = 1/2[1+π],
Pr[wH(x_)isodd] = 1/2[1π].

Here the following auxiliary variable is used:

π=ni=1(12pi).

One applies the equation,  for example,  to calculate the extrinsic  L–values of a  "single parity–check code".

Indeed,  as already pointed out in  Exercise 4.4  the extrinsic log likelihood ratio with Hamming–weight  wH  is the truncated sequence  x_(i):

LE(i)=lnPr[wH(x_(i))iseven|y_]Pr[wH(x_(i))isodd|y_].

Here it is taken into account that for  LE(i)  one may refer only to the other symbols  (ji) :

x_(i)=(x1, ...,xi1,xi+1, ...,xn).




Hints:



Questions

1

We consider the vector  x_=(x1,x2)  n=2  with  xi{0,1}  and  p1=0.2, p2=0.9.
What is the probability that   x_   contains an even number of  "ones" ?

Pr[wH(x_) is even] = 

2

Compute the same probability for  x_=(x1,x2,x3)  n=3  and  p1=0.2, p2=0.9, p3=0.3.

Pr[wH(x_) is even] = 

3

Now let be  n=4  and  p1=0.2, p2=0.9, p3=0.3, p4=0.6.  Calculate the following quantities according to Gallager's equation:

Pr(blue)=Pr[wH(x_) is even]= 

Pr(red)=Pr[wH(x_) is odd]= 

Quotient Q=Pr(blau)/Pr(rot)= 

4

What is the extrinsic log likelihood ratio for the symbol  i=5  at  SPC (5, 4, 2)  with  p1=0.2, p2=0.9, p3=0.3, p4=0.6, p5=0.9?

LE(i=5) = 

5

How does  LE(i=5)  change if we assume  p5=0.1  instead?

LE(i=5)  becomes larger.
LE(i=5)  becomes smaller.
LE(i=5)  is not changed compared to subtask  (4).


Solution

Derivation  "wH is even"  for code length  n=2.

(1)  According to the adjacent table applies:

Pr[wH(x_)iseven]=Pr[wH=0]+Pr[wH=2].
  • With the probabilities
p1=Pr(x1=1) = 0.2,q1=Pr(x1=0)=0.8,
p2=Pr(x2=1) = 0.9,q2=Pr(x2=0)=0.1
one obtains:
Pr[wH(x_)=0] = Pr[(x1=0)(x2=0)]=q1q2=0.80.1=0.08,
Pr[wH(x_)=2] = Pr[(x1=1)(x2=1)]=p1p2=0.20.9=0.18
Pr[wH(x_)iseven]=0.8+0.18=0.26_.
  • The Gallager's equation provides for the same set of parameters:
Pr[wH(x_)iseven] = 0.5+0.52i=1(12pi)=0.5+0.5(120.2)(120.9)=0.26.
  • The equation given by Gallager 1963 was hereby verified for  n=2.


(2)  In the second table,  the four combinations with an even number of  "ones"  are marked in blue. 

Derivation "wH is even"  for code length  n=3.
  • The occurrence probabilities of each combination are given in the last column.  Thus,  the result is:
Pr[wH(x_)iseven]=0.056+0.216+0.006+0.126=0.404_.
  • The red rows provide the complementary event:
Pr[wH(x_)isodd]=0.024+0.504+0.014+0.054=0.596.
  • Gallager's equation again gives the exact same result,  although it should be noted that this equation is valid for all  n  and all arbitrary probabilities:
Pr[wH(x_)iseven] = 0.5+0.53i=1(12pi)
Pr[wH(x_)iseven] = 0.5+0.5(+0.6)(0.8)(+0.4)=0.404.


(3)  According to the specification page applies:

π=4i=1(12pi) = (120.2)(120.9)(120.3)(120.6)
π=4i=1(12pi) = (+0.6)(0.8)(+0.4)(0.2)=0.0384.
  • From this can be calculated:
Pr(blue)=Pr[wH(x_)iseven] = 0.5+0.5π=0.5+0.50.0384=0.5192_,
Pr(red)=Pr[wH(x_)isodd] = 0.50.5π=0.50.50.0384=0.4808_.
  • If you add up the blue and red probabilities on the information page,V you get exactly the values calculated here.  For the quotient we get:
Q=Pr[wH(x_)iseven]Pr[wH(x_)isodd]=0.51920.4808=1.0799_.


(4)  For the  "single parity–check code",  the extrinsic log likelihood ratio with respect to the  ith  bit was specified as follows:

LE(i)=lnPr[wH(x_(i))iseven|y_]Pr[wH(x_(i))isodd|y_],
  • Or:
LE(i)=ln1+ji(12pj)1ji(12pj).
  • At  SPC (5, 4, 2)   ⇒   n=5,  this product for  i=5  results from the following four factors:
π=j=1,2,3,4(12pj)=(12p1)(12p2)(12p3)(12p4).

The comparison with subtask  (3)  shows that  LE(i=5)=lnQ=ln(1.0799) 0.077_.


(5)  Correct is the  proposed solution 3  because the result for  LE(i=5)  is independent of  p5.