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
Line 2: Line 2:
  
 
[[File:P_ID2994__KC_Z_4_4_v3.png |right|frame|Hamming weights and sequence probabilities ]]
 
[[File:P_ID2994__KC_Z_4_4_v3.png |right|frame|Hamming weights and sequence probabilities ]]
Der Informationstheoretiker  [https://en.wikipedia.org/wiki/Robert_G._Gallager "Robert G. Gallager"]  hat sich bereits 1963 mit folgender Fragestellung beschäftigt:
+
The information theorist  [https://en.wikipedia.org/wiki/Robert_G._Gallager "Robert G. Gallager"]  already in 1963 dealt with the following problem:
* Gegeben ist ein Zufallsvektor  x_=(x1,x2, ...,xn)  mit  n  binären Elementen  x_i ∈ \{0, \, 1\}.
+
* Given a random vector  x_=(x1,x2, ...,xn)  with  n  binary elements  x_i ∈ \{0, \, 1\}.
* Bekannt sind alle Wahrscheinlichkeiten  pi=Pr(xi=1)  und  qi=Pr(xi=0)=1pi  mit Index  i=1, ..., n.
+
* Known are all probabilities  pi=Pr(xi=1)  and  qi=Pr(xi=0)=1pi  with index  i=1, ..., n.
* Gesucht ist die Wahrscheinlichkeit, dass die Anzahl der Einsen in diesem Vektor geradzahlig ist.
+
* What we are looking for is the probability that the number of ones in this vector is even.
* Oder ausgedrückt mit dem  [[Channel_Coding/Objective_of_Channel_Coding#Important_definitions_for_block_coding|"Hamming–Gewicht"]]:   Wie groß ist die Wahrscheinlichkeit  ${\rm Pr}[w_{\rm H}(\underline{x}) {\rm \ ist \ gerade}]$?
+
* Or expressed using the  [[Channel_Coding/Objective_of_Channel_Coding#Important_definitions_for_block_coding|"Hamming weight"]]:   What is the probability  ${\rm Pr}[w_{\rm H}(\underline{x}) {\rm \ is \ even}]$?
  
  
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.  
+
The graph illustrates the task for the example  n=4  and  p1=0.2,  p2=0.9,  p3=0.3  and  p4=0.6.  
* Für die grün hinterlegte Zeile   ⇒   x_=(1,0,0,1)  gilt  wH(x_)=2  und
+
* For the row highlighted in green   ⇒   x_=(1,0,0,1)  holds  wH(x_)=2  and
 
:Pr(x_)=p1q2q3p4=0.0084.
 
:Pr(x_)=p1q2q3p4=0.0084.
* Blaue Schrift bedeutet "wH(x_) ist gerade". Rote Schrift steht für "wH(x_) ist ungerade".
+
* Blue font means "wH(x_) is even". Red font stands for "wH(x_) is odd."
* Die Wahrscheinlichkeit  ${\rm Pr}[w_{\rm H}(\underline{x}) {\rm \ ist \ gerade}]$  ist die Summe der blauen Zahlen in der letzten Spalte.  
+
*The probability  ${\rm Pr}[w_{\rm H}(\underline{x}) {\rm \is \even}]$  is the sum of the blue numbers in the last column.  
*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 sum of the red numbers gives  ${\rm Pr}[w_{\rm H}(\underline{x}) {\rm \ is \ odd}] = 1 - {\rm Pr}[w_{\rm H}(\underline{x}) {\rm \ is \ even}]$.
  
  
Line 65: Line 65:
 
|type="{}"}
 
|type="{}"}
 
Pr(blue)=Pr[wH(x_) is even]= { 0.5192 3% }
 
Pr(blue)=Pr[wH(x_) is even]= { 0.5192 3% }
${\rm Pr(red) = Pr}\big [w_{\rm H}(\underline{x}) \ {\rm is \ uneven}\big ] \hspace{0.1cm} = \ ${ 0.4808 3% }
+
${\rm Pr(red) = Pr}\big [w_{\rm H}(\underline{x}) \ {\rm is \ odd}\big ] \hspace{0.1cm} = \ ${ 0.4808 3% }
 
Quotient Q=Pr(blau)/Pr(rot)= { 1.0799 3% }
 
Quotient Q=Pr(blau)/Pr(rot)= { 1.0799 3% }
  
Line 113: Line 113:
  
 
The red rows provide the complementary event:
 
The red rows provide the complementary event:
:$$ {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm is \hspace{0.15cm} uneven}\right] =  0.024 + 0.504 + 0.014 + 0.054= 0.596
+
:$$ {\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
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
  
Line 129: Line 129:
 
From this can be calculated:
 
From this can be calculated:
 
:Pr(blue)=Pr[wH(x_)iseven] = 0.5+0.5π=0.5+0.50.0384=0.5192_,
 
:Pr(blue)=Pr[wH(x_)iseven] = 0.5+0.5π=0.5+0.50.0384=0.5192_,
:$${\rm Pr}({\rm red}) = {\rm Pr} \left [w_{\rm H}(\underline{x})\hspace{0.15cm}{\rm is \hspace{0.15cm} uneven}\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}. $$
  
 
If you add up the blue and red probabilities on the information page, you get exactly the values calculated here.  
 
If you add up the blue and red probabilities on the information page, you get exactly the values calculated here.  
  
 
For the quotient we get:
 
For the quotient we get:
:$$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} uneven}\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; For the <i>single parity&ndash;check code</i>, the extrinsic L value with respect to the ith bit was specified as follows:
 
'''(4)'''&nbsp; For the <i>single parity&ndash;check code</i>, the extrinsic L value with respect to the ith 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} uneven} \hspace{0.05cm} | \hspace{0.05cm}\underline{y} \hspace{0.05cm}\right ]}
+
:$$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},$$
  

Revision as of 00:06, 30 October 2022

Hamming weights and sequence probabilities

The information theorist  "Robert G. Gallager"  already in 1963 dealt 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 hat das Problem in analytischer Weise gelöst:

Pr[wH(x_)istgerade] = 1/2[1+π],
Pr[wH(x_)istungerade] = 1/2[1π].

Hierbei ist die folgende Hilfsgröße verwendet:

π=ni=1(12pi).

Die Gleichung wendet man zum Beispiel an, um die extrinsischen  L–Werte eines  Single Parity–check Codes  zu berechnen.

Wie bereits in der  "Aufgabe A4.4"  dargelegt, lautet nämlich der extrinsische L–Wert mit dem Hamming–Gewicht  wH  der verkürzten Folge  x_(i):

LE(i)=lnPr[wH(x_(i))istgerade|y_]Pr[wH(x_(i))istungerade|y_].

Hierbei ist berücksichtigt, dass man für  LE(i)  nur die anderen Symbole  (ji)  heranziehen darf:

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

Berechnen Sie die gleiche Wahrscheinlichkeit für  x_=(x1,x2,x3)  n=3  und  p1=0.2, p2=0.9, p3=0.3.

Pr[wH(x_) is even] = 

3

Now let  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  L value 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.


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

(2)  In the second table, the four combinations with an even number of ones are marked in blue. The probabilities of occurrence 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.

The 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, 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 L value 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 the subtask (3) shows that LE(i=5)=lnQ=ln(1.0799) 0.077_.


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