Difference between revisions of "Aufgaben:Exercise 1.12Z: Comparison of HC (7, 4, 3) and HC (8, 4, 4)"

From LNTwww
 
(48 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{quiz-Header|Buchseite=Kanalcodierung/Decodierung linearer Blockcodes
+
{{quiz-Header|Buchseite=Channel_Coding/Decoding_of_Linear_Block_Codes}}
  
 +
[[File:EN_KC_Z_1_12_neu.png|right|frame|Block error probabilities of  $\rm HC \ (7, 4, 3)$  and  $\rm HC \ (8, 4, 4)$]]
  
}}
+
Now the block error probabilities
 +
*of the  $(7, 4, 3)$  Hamming code and
 +
*of the extended  $(8, 4, 4)$  Hamming code
  
[[File:P_ID2409__KC_Z_1_12.png|right|frame|Blockfehlerwahrscheinlichkeit von (7, 4, 3)– und (8, 4, 4)–Code]]
 
  
Nun sollen die Blockfehlerwahrscheinlichkeiten
+
are compared with each other.  The following are used as a basis:
*des (7, 4, 3)–Hamming–Codes und
+
*The  [[Channel_Coding/Channel_Models_and_Decision_Structures#Binary_Symmetric_Channel_.E2.80.93_BSC|"BSC channel model"]]  $($parameters  $\varepsilon$,  in particular  $\varepsilon = 0.01$  for numerical results$)$,
*des erweiterten (8, 4, 4)–Hamming–Codes
 
miteinander verglichen werden. Zugrunde gelegt werden
 
*das [[Kanalcodierung/Kanalmodelle_und_Entscheiderstrukturen#Binary_Symmetric_Channel_.E2.80.93_BSC|BSC–Kanalmodell]] (Parameter $\varepsilon$, insbesondere $\varepsilon = 0.01$ für numerische Ergebnisse),
 
*die [[Kanalcodierung/Decodierung_linearer_Blockcodes#Prinzip_der_Syndromdecodierung|Syndromdecodierung]], mit der bei beiden Codes eine Maximum–Likelihood–Detektion realisiert wird. Bei richtiger Belegung der Syndromtabelle ergibt sich jeweils die minimale Blockfehlerwahrscheinlichkeit.
 
  
Für den (7, 4, 3)–Code wurde in der [[Aufgaben:1.12_Hard_/_Soft_Decision|Aufgabe 1.12]] berechnet:
+
*the  [[Channel_Coding/Decoding_of_Linear_Block_Codes#Principle_of_syndrome_decoding|"syndrome decoding"]],  which implements maximum likelihood detection for both codes;  correct assignment of the syndrome table yields the minimum block error probability in each case.
  
:$${\rm Pr(Blockfehler)} = 1 - (1 - \varepsilon)^7 - 7 \cdot \varepsilon \cdot (1 - \varepsilon)^6 \hspace{0.05cm}.$$
 
  
Die Zahlenwerte sind in der Spalte 2 der obigen Tabelle angegeben. Es handelt sich um die tatsächlichen Werte, also nicht um die in Aufgabe 1.12 hergeleitete Näherung: ${\rm Pr(Blockfehler)} \approx 21 · \varepsilon^2$.
 
  
Anzumerken ist, dass aufgrund des BSC–Kanalmodells nur harte Entscheidungen möglich sind. Mit [[Kanalcodierung/Decodierung_linearer_Blockcodes#Codiergewinn_.E2.80.93_Bitfehlerrate_bei_AWGN|Soft–Decision]] ergeben sich etwas kleinere Blockfehlerwahrscheinlichkeiten.
+
For the  $(7, 4, 3)$  Hamming code was calculated in  [[Aufgaben:Exercise_1.12:_Hard_Decision_vs._Soft_Decision|"Exercise 1.12"]]:
  
Nun soll die Blockfehlerwahrscheinlichkeit für den erweiterten (8, 4, 4)–Code ermittelt werden:
+
:$${\rm Pr(block\:error)} = 1 - (1 - \varepsilon)^7 - 7 \cdot \varepsilon \cdot (1 - \varepsilon)^6 \hspace{0.05cm}.$$
*Die Berechnung in Teilaufgabe 4) erfolgt unter der Maßgabe, dass wie beim (7, 4, 3)–Code nur die Fehlermuster mit einer einzigen „1” korrigiert werden. In der rechten Spalte obiger Tabelle sind die Ergebnisse eingetragen, bis auf den Wert für $\varepsilon = 0.01$, der explizit berechnet werden soll.
 
  
*In der Teilaufgabe 5) soll dagegen berücksichtigt werden, dass beim erweitereten (8, 4, 4)–Code Teile der Syndromtabelle noch mit Gewicht–2–Fehlermustern aufgefüllt werden können.
+
The numerical values are given in the second column of the table above.  They are the actual values,  i.e. not the approximation derived in  [[Aufgaben:Exercise_1.12:_Hard_Decision_vs._Soft_Decision|"Exercise 1.12"]]:    ${\rm Pr(block\:error)} \approx 21 \cdot \varepsilon^2$.
  
 +
It should be noted that only hard decisions are possible due to the BSC channel model.  With  [[Channel_Coding/Decoding_of_Linear_Block_Codes#Coding_gain_-_bit_error_rate_with_AWGN|"Soft Decision"]]  slightly smaller block error probabilities result.
  
''Hinweis:''  
+
Now the block error probability for the extended  $(8, 4, 4)$  code is to be determined:
 +
*The calculation in subtask  '''(4)'''  is made with the proviso that,  as for the  $(7, 4, 3)$  code,  only the error patterns with a single  "$1$"  are corrected.  In the right column of the above table,  the results are entered,  except for the value for  $\varepsilon = 0.01$,  which is to be calculated explicitly.
  
Die Aufgabe bezieht sich auf [[Kanalcodierung/Decodierung_linearer_Blockcodes|Kapitel Decodierung linearer Blockcodes]]. Von Interesse für die Lösung dieser Aufgabe ist insbesondere die Seite [[Kanalcodierung/Decodierung_linearer_Blockcodes#Verallgemeinerung_der_Syndromdecodierung|Verallgemeinerung der Syndromdecodierung (2)]].
+
*In subtask  '''(5)'''   it is to be taken into account that with the extended  $(8, 4, 4)$  code,  parts of the syndrome table can still be filled with weight-2 error patterns.
  
===Fragebogen===
 
  
{Wieviele Einträge beinhalten die jeweiligen Syndromtabellen?
+
 
 +
Hints:
 +
* This exercise belongs to the chapter  [[Channel_Coding/Decoding_of_Linear_Block_Codes|"Decoding of Linear Block Codes"]].
 +
 +
* Of particular interest for solving this exercise is the section  [[Channel_Coding/Decoding_of_Linear_Block_Codes#Generalization_of_syndrome_coding|"Generalization of Syndrome Decoding"]].
 +
 
 +
 
 +
 
 +
 
 +
===Questions===
 +
<quiz display=simple>
 +
{How many entries do the respective syndrome tables contain in total?
 
|type="{}"}
 
|type="{}"}
$\ (7, 4, 3)–Code: \ \ \ \ N_{\rm ges}$ = { 8 3% }
+
$(7, 4, 3)\:{\rm code} \text{:} \hspace{0.4cm} N_{\rm ges} \ = \ $ { 8 }
$\ (8, 4, 4)–Code: \ \ \ \ N_{\rm ges}$ = { 16 3% }
+
$(8, 4, 4)\:{\rm code} \text{:} \hspace{0.4cm} N_{\rm ges} \ = \ $ { 16 }
  
{Wieviele Gewicht–2–Fehlermuster gibt es insgesamt?
+
{How many weight-2 error patterns&nbsp; $(N_2')$&nbsp; are there in total?
 
|type="{}"}
 
|type="{}"}
$\ (7, 4, 3)–Code: \ \ \ \ N_{2} ' $ = { 21 3% }
+
$(7, 4, 3)\:{\rm code} \text{:} \hspace{0.4cm} N_2' \ = \ $ { 21 }
$\ (8, 4, 4)–Code: \ \ \ \ N_{2} ' $ = { 28 3% }
+
$(8, 4, 4)\:{\rm code} \text{:} \hspace{0.4cm} N_2' \ = \ $ { 28 }
  
 +
{How many error patterns in the syndrome tables&nbsp; $(N_2)$&nbsp; contain two ones?
 +
|type="{}"}
 +
$(7, 4, 3)\:{\rm code} \text{:} \hspace{0.4cm} N_2 \ = \ $ { 0. }
 +
$(8, 4, 4)\:{\rm code} \text{:} \hspace{0.4cm} N_2 \ = \ $ { 7 }
  
{Wieviele Fehlermuster in den Syndromtabellen beinhalten zwei Einsen?
+
{Let it now&nbsp; $\varepsilon = 0.01$.&nbsp; What is the block error probability for the extended&nbsp; $(8, 4, 4)$ code&nbsp; <u>without weight-2 error correction</u>?
 
|type="{}"}
 
|type="{}"}
$\7, 4, 3)–Code: \ \ \ \ N_{2}$ = { 0 3% }
+
${\rm Pr(block\:error)} \ = \ $ { 2.69 3% } $\ \cdot 10^{-3}$  
$\ (8, 4, 4)–Code: \ \ \ \ N_{2}$ = { 7 3% }
 
  
{Es gelte nun $\varepsilon = 0.01.$ Welche Blockfehlerwahrscheinlichkeit ergibt sich für den erweiterten (8, 4, 4)–Code <u>ohne</u> Gewicht–2–Fehlerkorrektur?
+
{In contrast,&nbsp; what result is obtained&nbsp; <u>with weight-2 error correction</u>?
 
|type="{}"}
 
|type="{}"}
$\ {\rm  Pr(Blockfehler)} $ = { 2.69 3% }\ \cdot 10^{-3} $
+
$\ {\rm  Pr(block\:error)} \ = \ $ { 2.03 3% } $\ \cdot 10^{-3}$  
 +
</quiz>
 +
 
 +
===Solution===
 +
{{ML-Kopf}}
 +
'''(1)'''&nbsp; The size of the syndrome table is generally&nbsp; $N_{\rm ges} = 2^m$,&nbsp; where&nbsp; $m = n - k$&nbsp; indicates the number of parity bits.
 +
*In the&nbsp; $(7, 4, 3)$&nbsp; Hamming code,&nbsp; $m = n - k = 3$ &nbsp;⇒&nbsp; the length of the table is&nbsp; $N_{\rm ges} =2^3 \ \underline{= 8}.$
 +
 
 +
*The syndrome table of the&nbsp; $(8, 4, 4)$&nbsp; code is twice as large: &nbsp; $N_{\rm ges} = 2^4 \ \underline{= 16}$.
 +
 
 +
 
 +
 
 +
'''(2)'''&nbsp;  In general,&nbsp; for the number of entries with weight-2 error patterns, $N_2' = $"$n {\rm \ over \ } 2$".&nbsp; This results in the numerical values
 +
*$N_2' \ \underline{= 21} \ $ für $n = 7 \ \ ⇒ \ \ (7, 4, 3)$ code,
 +
*$N_2' \ \underline{= 28} \ $ für $n = 8 \ \ \Rightarrow \ \  (8, 4, 4)$ code.
 +
 
 +
 
 +
 
 +
'''(3)'''&nbsp;  In the&nbsp; $\rm HC (7, 4, 3)$,&nbsp; the syndrome table is filled with
 +
:*one entry for the error-free case&nbsp; $(N_{0}= 1)$&nbsp;
 +
:*and&nbsp; $n = 7$&nbsp; entries with weight-1 error patterns&nbsp; $(N_{1} = 7)$.&nbsp;
 +
 
 +
 +
*Thus,&nbsp; the number of entries with weight-2 error patterns is
 +
 
 +
:$$N_2 = N_{\rm ges} - N_0 - N_1 \hspace{0.15cm} \underline{= 0} \hspace{0.05cm}.$$
 +
 
 +
*In contrast,&nbsp; for the extended&nbsp; $(8, 4, 4)$&nbsp; Hamming code:
  
 +
:$$N_0 = 1\hspace{0.05cm},\hspace{0.2cm}N_1 = 8 \hspace{0.3cm} \Rightarrow \hspace{0.3cm} N_2 = N_{\rm ges} - N_0 - N_1 \hspace{0.15cm} \underline{= 7} \hspace{0.05cm}.$$
  
{Welches Ergebnis erzielt man demgegenüber <u>mit</u> Gewicht–2–Fehlerkorrektur?
 
|type="{}"}
 
$\ {\rm  Pr(Blockfehler)} $ = { 2.03 3% }\ \cdot 10^{-3} $
 
  
  
 +
'''(4)'''&nbsp; Analogous to the&nbsp; [[Aufgaben:Exercise_1.12:_Hard_Decision_vs._Soft_Decision| "solution"]]&nbsp; of the first two parts of Exercise 1.12,&nbsp; here you get:
 +
[[File:EN_KC_A_1_12d_neu.png|right|frame|Block error probability of&nbsp; $(7, 4, 3)$&nbsp; and&nbsp; $(8, 4, 4)$&nbsp; code]]
 +
:$${\rm Pr(block\:error)} = 1 - (1 - \varepsilon)^8 - 8 \cdot \varepsilon \cdot (1 - \varepsilon)^7$$
 +
:$$\Rightarrow \hspace{0.3cm}{\rm Pr(block\:error)} =1 - 0.922745 - 0.074655\hspace{0.15cm} \underline{= 2.69 \cdot 10^{-3}} \hspace{0.05cm}.$$
  
</quiz>
+
*In the table for this case and for different BSC parameters&nbsp; $ε$,&nbsp; the results are entered in the third column &nbsp; &rArr; &nbsp; ${\rm Pr}(\ge \text{2 errors)}$.
 +
 +
*Compared to the&nbsp; $(7, 4, 3)$ Hamming code corresponding to the second column,&nbsp; there is always a deterioration.
  
===Musterlösung===
 
{{ML-Kopf}}
 
'''1.'''
 
'''2.'''
 
'''3.'''
 
'''4.'''
 
'''5.'''
 
'''6.'''
 
'''7.'''
 
{{ML-Fuß}}
 
  
 +
'''(5)'''&nbsp;  With the best possible correction&nbsp; ("filled syndrome table"),&nbsp; seven weight-2 error patterns are also corrected.
 +
*This reduces the block error probability by the&nbsp; "improvement"&nbsp; (column 4):
 +
 +
:$${\rm Pr(corrected\hspace{0.15cm}weight\hspace{-0.1cm}-\hspace{-0.1cm}2\hspace{0.15cm}error\hspace{0.15cm} pattern)} = 7 \cdot \varepsilon^2 \cdot (1 - \varepsilon)^6 \hspace{0.05cm}.$$
  
 +
*For&nbsp; $\varepsilon = 0.01$,&nbsp; this&nbsp; "improvement"&nbsp; accounts for about $6.59\cdot10^{-4}$.
 +
 +
*The block error probability of the&nbsp; $(8, 4, 4)$&nbsp; code (last column)&nbsp; is thus given by
  
[[Category:Aufgaben zu  Kanalcodierung|^1.5 Decodierung linearer Blockcodes
+
:$${\rm Pr(block\:error)} = 2.69 \cdot 10^{-3} - 0.66 \cdot 10^{-3} \underline{= 2.03 \cdot 10^{-3}} \hspace{0.05cm}.$$
 +
 
 +
In the table above,&nbsp; this calculation is performed for different BSC parameters&nbsp; $\varepsilon$.&nbsp; One can see:
 +
#The block error probability of the&nbsp; $(8, 4, 4)$&nbsp; extended Hamming code&nbsp; (last column)&nbsp; exactly matches that of the&nbsp; $(7, 4, 3)$ Hamming code&nbsp; (column 2).
 +
#The&nbsp; $25\%$&nbsp; correction to the weight-2 error patterns exactly balances the fact that error patterns with more than one error&nbsp; (column 3)&nbsp; are more likely for the&nbsp; $(8, 4, 4)$&nbsp; code than for the&nbsp; $(7, 4, 3)$&nbsp; code&nbsp; (column 2).
 +
{{ML-Fuß}}
  
  
^]]
+
[[Category:Channel Coding: Exercises|^1.5 Linear Block Code Decoding^]]

Latest revision as of 12:30, 5 April 2023

Block error probabilities of  $\rm HC \ (7, 4, 3)$  and  $\rm HC \ (8, 4, 4)$

Now the block error probabilities

  • of the  $(7, 4, 3)$  Hamming code and
  • of the extended  $(8, 4, 4)$  Hamming code


are compared with each other.  The following are used as a basis:

  • The  "BSC channel model"  $($parameters  $\varepsilon$,  in particular  $\varepsilon = 0.01$  for numerical results$)$,
  • the  "syndrome decoding",  which implements maximum likelihood detection for both codes;  correct assignment of the syndrome table yields the minimum block error probability in each case.


For the  $(7, 4, 3)$  Hamming code was calculated in  "Exercise 1.12":

$${\rm Pr(block\:error)} = 1 - (1 - \varepsilon)^7 - 7 \cdot \varepsilon \cdot (1 - \varepsilon)^6 \hspace{0.05cm}.$$

The numerical values are given in the second column of the table above.  They are the actual values,  i.e. not the approximation derived in  "Exercise 1.12":   ${\rm Pr(block\:error)} \approx 21 \cdot \varepsilon^2$.

It should be noted that only hard decisions are possible due to the BSC channel model.  With  "Soft Decision"  slightly smaller block error probabilities result.

Now the block error probability for the extended  $(8, 4, 4)$  code is to be determined:

  • The calculation in subtask  (4)  is made with the proviso that,  as for the  $(7, 4, 3)$  code,  only the error patterns with a single  "$1$"  are corrected.  In the right column of the above table,  the results are entered,  except for the value for  $\varepsilon = 0.01$,  which is to be calculated explicitly.
  • In subtask  (5)  it is to be taken into account that with the extended  $(8, 4, 4)$  code,  parts of the syndrome table can still be filled with weight-2 error patterns.


Hints:



Questions

1

How many entries do the respective syndrome tables contain in total?

$(7, 4, 3)\:{\rm code} \text{:} \hspace{0.4cm} N_{\rm ges} \ = \ $

$(8, 4, 4)\:{\rm code} \text{:} \hspace{0.4cm} N_{\rm ges} \ = \ $

2

How many weight-2 error patterns  $(N_2')$  are there in total?

$(7, 4, 3)\:{\rm code} \text{:} \hspace{0.4cm} N_2' \ = \ $

$(8, 4, 4)\:{\rm code} \text{:} \hspace{0.4cm} N_2' \ = \ $

3

How many error patterns in the syndrome tables  $(N_2)$  contain two ones?

$(7, 4, 3)\:{\rm code} \text{:} \hspace{0.4cm} N_2 \ = \ $

$(8, 4, 4)\:{\rm code} \text{:} \hspace{0.4cm} N_2 \ = \ $

4

Let it now  $\varepsilon = 0.01$.  What is the block error probability for the extended  $(8, 4, 4)$ code  without weight-2 error correction?

${\rm Pr(block\:error)} \ = \ $

$\ \cdot 10^{-3}$

5

In contrast,  what result is obtained  with weight-2 error correction?

$\ {\rm Pr(block\:error)} \ = \ $

$\ \cdot 10^{-3}$


Solution

(1)  The size of the syndrome table is generally  $N_{\rm ges} = 2^m$,  where  $m = n - k$  indicates the number of parity bits.

  • In the  $(7, 4, 3)$  Hamming code,  $m = n - k = 3$  ⇒  the length of the table is  $N_{\rm ges} =2^3 \ \underline{= 8}.$
  • The syndrome table of the  $(8, 4, 4)$  code is twice as large:   $N_{\rm ges} = 2^4 \ \underline{= 16}$.


(2)  In general,  for the number of entries with weight-2 error patterns, $N_2' = $"$n {\rm \ over \ } 2$".  This results in the numerical values

  • $N_2' \ \underline{= 21} \ $ für $n = 7 \ \ ⇒ \ \ (7, 4, 3)$ code,
  • $N_2' \ \underline{= 28} \ $ für $n = 8 \ \ \Rightarrow \ \ (8, 4, 4)$ code.


(3)  In the  $\rm HC (7, 4, 3)$,  the syndrome table is filled with

  • one entry for the error-free case  $(N_{0}= 1)$ 
  • and  $n = 7$  entries with weight-1 error patterns  $(N_{1} = 7)$. 


  • Thus,  the number of entries with weight-2 error patterns is
$$N_2 = N_{\rm ges} - N_0 - N_1 \hspace{0.15cm} \underline{= 0} \hspace{0.05cm}.$$
  • In contrast,  for the extended  $(8, 4, 4)$  Hamming code:
$$N_0 = 1\hspace{0.05cm},\hspace{0.2cm}N_1 = 8 \hspace{0.3cm} \Rightarrow \hspace{0.3cm} N_2 = N_{\rm ges} - N_0 - N_1 \hspace{0.15cm} \underline{= 7} \hspace{0.05cm}.$$


(4)  Analogous to the  "solution"  of the first two parts of Exercise 1.12,  here you get:

Block error probability of  $(7, 4, 3)$  and  $(8, 4, 4)$  code
$${\rm Pr(block\:error)} = 1 - (1 - \varepsilon)^8 - 8 \cdot \varepsilon \cdot (1 - \varepsilon)^7$$
$$\Rightarrow \hspace{0.3cm}{\rm Pr(block\:error)} =1 - 0.922745 - 0.074655\hspace{0.15cm} \underline{= 2.69 \cdot 10^{-3}} \hspace{0.05cm}.$$
  • In the table for this case and for different BSC parameters  $ε$,  the results are entered in the third column   ⇒   ${\rm Pr}(\ge \text{2 errors)}$.
  • Compared to the  $(7, 4, 3)$ Hamming code corresponding to the second column,  there is always a deterioration.


(5)  With the best possible correction  ("filled syndrome table"),  seven weight-2 error patterns are also corrected.

  • This reduces the block error probability by the  "improvement"  (column 4):
$${\rm Pr(corrected\hspace{0.15cm}weight\hspace{-0.1cm}-\hspace{-0.1cm}2\hspace{0.15cm}error\hspace{0.15cm} pattern)} = 7 \cdot \varepsilon^2 \cdot (1 - \varepsilon)^6 \hspace{0.05cm}.$$
  • For  $\varepsilon = 0.01$,  this  "improvement"  accounts for about $6.59\cdot10^{-4}$.
  • The block error probability of the  $(8, 4, 4)$  code (last column)  is thus given by
$${\rm Pr(block\:error)} = 2.69 \cdot 10^{-3} - 0.66 \cdot 10^{-3} \underline{= 2.03 \cdot 10^{-3}} \hspace{0.05cm}.$$

In the table above,  this calculation is performed for different BSC parameters  $\varepsilon$.  One can see:

  1. The block error probability of the  $(8, 4, 4)$  extended Hamming code  (last column)  exactly matches that of the  $(7, 4, 3)$ Hamming code  (column 2).
  2. The  $25\%$  correction to the weight-2 error patterns exactly balances the fact that error patterns with more than one error  (column 3)  are more likely for the  $(8, 4, 4)$  code than for the  $(7, 4, 3)$  code  (column 2).