Difference between revisions of "Aufgaben:Exercise 1.07: Check and Generator Matrix of the HC (7, 4, 3)"

From LNTwww
m (Text replacement - "Category:Aufgaben zu Kanalcodierung" to "Category:Channel Coding: Exercises")
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{quiz-Header|Buchseite=Kanalcodierung/Allgemeine Beschreibung linearer Blockcodes
+
{{quiz-Header|Buchseite=Channel_Coding/General_Description_of_Linear_Block_Codes
  
 
}}
 
}}
  
[[File:P_ID2390__KC_A_1_7.png|right|frame|Prüfgleichungen des <br>Hamming–Codes &nbsp; $(7, 4, 3)$]]
+
[[File:P_ID2390__KC_A_1_7.png|right|frame|Parity-check equations of the <br>$(7, 4, 3)$ &nbsp;Hamming code ]]
  
Die Grafik zeigt die Prüfgleichungen des&nbsp; $(7, 4, 3)$–Hamming–Codes, der bereits in der&nbsp; [[Aufgaben:1.6_Zum_(7,_4)–Hamming–Code|Aufgabe 1.6]]&nbsp; eingehend betrachtet und anhand der Codetabelle beschrieben wurde.
+
The graph shows the parity-check equations of the&nbsp; $(7, 4, 3)$&nbsp; Hamming code,&nbsp; which has already been considered in detail in the&nbsp; [[Aufgaben:Exercise_1.6:_(7,_4)_Hamming_Code|"Exercise 1.6"]]&nbsp; and described using the code table.
  
In dieser Aufgabe wird dieser Code – wie in der Kanalcodierung allgemein üblich – nun durch zwei Matrizen charakterisiert:
+
In this task,&nbsp; this code is now characterized by two matrices&nbsp; &ndash;&nbsp; as is common in Channel Coding:
  
*Die Prüfmatrix&nbsp; $\boldsymbol{\rm H}$&nbsp; ist eine Matrix mit&nbsp; $m = n - k$&nbsp; Zeilen und&nbsp; $n$&nbsp; Spalten. Sie beschreibt die&nbsp; $m = 3$&nbsp; Prüfgleichungen, wobei sich die erste Zeile auf die Elemente des roten Kreises und die zweite Zeile auf die des grünen Kreises bezieht. Die letzte Zeile gibt die Modulo–2–Summe des blauen Kreises wieder.
+
*The parity-check matrix&nbsp; $\boldsymbol{\rm H}$&nbsp; is a matrix with&nbsp; $m = n - k$&nbsp; rows and&nbsp; $n$&nbsp; columns.&nbsp; It describes the&nbsp; $m = 3$&nbsp; parity-check equations,&nbsp; where the first row refers to the elements of the red circle and the second row refers to those of the green circle.&nbsp; The last row gives the modulo-2 sum of the blue circle.
  
*Eine zweite Beschreibungsmöglichkeit bietet die Generatormatrix&nbsp; $ \boldsymbol{\rm G}$&nbsp; mit&nbsp; $k$&nbsp; Zeilen und&nbsp; $n$&nbsp; Spalten. Sie gibt den Zusammenhang zwischen den Informationsworten&nbsp; $ \underline{u}$&nbsp; und den Codeworten&nbsp; $\underline{x}$&nbsp; an:
+
*A second description possibility is provided by the generator matrix&nbsp; $ \boldsymbol{\rm G}$&nbsp; with&nbsp; $k$&nbsp; rows and&nbsp; $n$&nbsp; columns.&nbsp; It gives the relationship between the information words&nbsp; $ \underline{u}$&nbsp; and the code words&nbsp; $\underline{x}$&nbsp;:
 
:$$ \underline{x} = \underline{u} \cdot { \boldsymbol{\rm G}} \hspace{0.05cm}.$$
 
:$$ \underline{x} = \underline{u} \cdot { \boldsymbol{\rm G}} \hspace{0.05cm}.$$
  
Daraus und aus der Gleichung&nbsp; $ \boldsymbol{\rm H} · \underline{x}^{\rm T} = \underline{0}$&nbsp; kann der Zusammenhang zwischen der Prüfmatrix&nbsp; $ \boldsymbol{\rm H}$&nbsp; und der Generatormatrix&nbsp; $\boldsymbol{\rm G}$&nbsp; hergestellt werden:
+
From this and from the equation&nbsp; $ \boldsymbol{\rm H} · \underline{x}^{\rm T} = \underline{0}$&nbsp; the relation between the parity-check matrix&nbsp; $ \boldsymbol{\rm H}$&nbsp; and the generator matrix&nbsp; $ \boldsymbol{\rm G}$&nbsp; can be established:
 
:$$\underline{x}^{\rm T} = { \boldsymbol{\rm G}}^{\rm T} \cdot \underline{u}^{\rm T} \hspace{0.3cm} \Rightarrow \hspace{0.3cm} { \boldsymbol{\rm H}} \cdot { \boldsymbol{\rm G}}^{\rm T} \cdot \underline{u}^{\rm T} = \underline{0}\hspace{0.5cm} \forall \hspace{0.15cm}\underline{u} \in {\rm GF}(2^k)\hspace{0.3cm}  
 
:$$\underline{x}^{\rm T} = { \boldsymbol{\rm G}}^{\rm T} \cdot \underline{u}^{\rm T} \hspace{0.3cm} \Rightarrow \hspace{0.3cm} { \boldsymbol{\rm H}} \cdot { \boldsymbol{\rm G}}^{\rm T} \cdot \underline{u}^{\rm T} = \underline{0}\hspace{0.5cm} \forall \hspace{0.15cm}\underline{u} \in {\rm GF}(2^k)\hspace{0.3cm}  
 
\Rightarrow \hspace{0.3cm} { \boldsymbol{\rm H}} \cdot { \boldsymbol{\rm G}}^{\rm T} = { \boldsymbol{\rm 0}} \hspace{0.05cm}.$$
 
\Rightarrow \hspace{0.3cm} { \boldsymbol{\rm H}} \cdot { \boldsymbol{\rm G}}^{\rm T} = { \boldsymbol{\rm 0}} \hspace{0.05cm}.$$
  
Anzumerken ist, dass in diesen Gleichungen&nbsp; $\underline{0}$&nbsp; einen Zeilenvektor mit&nbsp; $k$&nbsp; Elementen bezeichnet und&nbsp; $\boldsymbol{\rm 0}$&nbsp; eine Matrix mit&nbsp; $m$&nbsp; Zeilen und&nbsp; $k$&nbsp; Spalten. Alle Elemente von&nbsp; $\underline{0}$&nbsp; bzw.&nbsp; $\boldsymbol{\rm 0}$&nbsp; sind Null.
+
Note that in these equations&nbsp; "$\underline{0}$"&nbsp; denotes a row vector with&nbsp; $k$&nbsp; elements and&nbsp; "$\boldsymbol{\rm 0}$"&nbsp; denotes a matrix with&nbsp; $m$&nbsp; rows and&nbsp; $k$&nbsp; columns.&nbsp; All elements of&nbsp; "$\underline{0}$"&nbsp; or&nbsp; "$\boldsymbol{\rm 0}"$&nbsp; are zero.
  
Handelt es sich um einen&nbsp; [[Channel_Coding/Allgemeine_Beschreibung_linearer_Blockcodes#Systematische_Codes|systematischen Code]], so können die Beschreibungsgrößen&nbsp; $\boldsymbol{\rm H}$&nbsp; und&nbsp; $\boldsymbol{\rm G}$&nbsp; unter Zuhilfenahme von&nbsp; ''Einheitsmatrizen''&nbsp; wie folgt geschrieben werden:
+
If the code is a&nbsp; [[Channel_Coding/General_Description_of_Linear_Block_Codes#Systematic_Codes|systematic code]], the description variables&nbsp; $\boldsymbol{\rm H}$&nbsp; and&nbsp; $\boldsymbol{\rm G}$&nbsp; can be written with the aid of&nbsp; '''identity matrices'''&nbsp; $\boldsymbol{\rm I}$&nbsp; as follows:
  
 
:$${ \boldsymbol{\rm G}} =\left({ \boldsymbol{\rm I}}_k \: ; \: { \boldsymbol{\rm P}}\right) \hspace{0.5cm} \Rightarrow \hspace{0.5cm}
 
:$${ \boldsymbol{\rm G}} =\left({ \boldsymbol{\rm I}}_k \: ; \: { \boldsymbol{\rm P}}\right) \hspace{0.5cm} \Rightarrow \hspace{0.5cm}
 
  { \boldsymbol{\rm H}} = \left({ \boldsymbol{\rm P}}^{\rm T}\: ; \:{ \boldsymbol{\rm I}}_m \right) \hspace{0.05cm}.$$
 
  { \boldsymbol{\rm H}} = \left({ \boldsymbol{\rm P}}^{\rm T}\: ; \:{ \boldsymbol{\rm I}}_m \right) \hspace{0.05cm}.$$
  
$\boldsymbol{\rm P}$&nbsp; ist dabei eine Matrix mit&nbsp; $k$&nbsp; Zeilen und&nbsp; $m$&nbsp; Spalten. Dementsprechend besteht die transponierte Matrix&nbsp; ${ \boldsymbol{\rm P}}^{\rm T}$&nbsp; aus&nbsp; $m$&nbsp; Zeilen und&nbsp; $k$&nbsp; Spalten.
+
$\boldsymbol{\rm P}$&nbsp; is thereby a matrix with&nbsp; $k$&nbsp; rows and&nbsp; $m$&nbsp; columns.&nbsp; Accordingly, the transposed matrix&nbsp; ${ \boldsymbol{\rm P}}^{\rm T}$&nbsp; consists of&nbsp; $m$&nbsp; rows and&nbsp; $k$&nbsp; columns.
 
   
 
   
  
  
  
 +
Hints :
  
 +
*This exercise belongs to the chapter&nbsp; [[Channel_Coding/General_Description_of_Linear_Block_Codes|"General Description of Linear Block Codes"]].
  
 
+
*Reference is made in particular to the sections&nbsp; [[Channel_Coding/General_Description_of_Linear_Block_Codes#Code_definition_by_the_parity-check_matrix|"Code definition by the parity-check matrix"]]&nbsp; and&nbsp; [[Channel_Coding/General_Description_of_Linear_Block_Codes#Code_definition_by_the_generator_matrix|"Code definition by the generator matrix"]].
''Hinweise'' :
 
 
 
*Die Aufgabe gehört zum Kapitel&nbsp; [[Channel_Coding/Allgemeine_Beschreibung_linearer_Blockcodes|Allgemeine Beschreibung linearer Blockcodes]].
 
*Bezug genommen wird insbesondere auf die Seiten&nbsp; [[Channel_Coding/Allgemeine_Beschreibung_linearer_Blockcodes#Codefestlegung_durch_die_Pr.C3.BCfmatrix|Codefestlegung durch die Prüfmatrix]]&nbsp; sowie&nbsp; [[Channel_Coding/Allgemeine_Beschreibung_linearer_Blockcodes#Codefestlegung_durch_die_Generatormatrix|Codefestlegung durch die Generatormatrix]].
 
 
   
 
   
  
Line 42: Line 40:
  
  
===Fragebogen===
+
===Questions===
  
 
<quiz display=simple>
 
<quiz display=simple>
 
+
{What is the format of the parity-check matrix&nbsp; $\boldsymbol{\rm H}$?
{Welches Format hat die Prüfmatrix&nbsp; $\boldsymbol{\rm H}$?
 
 
|type="{}"}
 
|type="{}"}
${\rm Spaltenzahl} \ = \ $ { 7 }
+
$\text{number of columns} \ = \ $ { 7 }
${\rm Zeilenzahl} \ = \ $ { 3 }
+
$\text{number of rows} \ = \ $ { 3 }
  
  
{Welche Aussagen sind  hinsichtlich der Prüfmatrix&nbsp; $\boldsymbol{\rm H}$&nbsp; zutreffend?
+
{Which statements are true regarding the parity-check matrix&nbsp; $\boldsymbol{\rm H}$&nbsp;?
 
|type="[]"}
 
|type="[]"}
  
+ Die erste Zeile lautet: &nbsp; $1101100$.
+
+ The first row is: &nbsp; $(1101100)$.
+ Die zweite Zeile lautet: &nbsp; $0111010$.
+
+ The second row is: &nbsp; $(0111010)$.
+ Die dritte Zeile lautet: &nbsp; $1011001$.
+
+ The third row is: &nbsp; $(1011001)$.
  
{Woran erkennt man, dass ein systematischer Code vorliegt?
+
{How can you tell that there is a systematic code?
 
|type="[]"}
 
|type="[]"}
  
- In jeder Zeile gibt es eine gerade Anzahl von Einsen.
+
- In each row there is an even number of ones.
+ Am Ende von&nbsp; $\boldsymbol{\rm H}$&nbsp; erkennt man eine Einheitsmatrix.
+
+ At the end of&nbsp; $\boldsymbol{\rm H}$&nbsp; you can recognize an identity matrix.
- Die mittlere Spalte von&nbsp; $\boldsymbol{\rm H}$&nbsp; ist mit Einsen besetzt.
+
- The middle column of&nbsp; $\boldsymbol{\rm H}$&nbsp; is occupied by ones.
  
{Geben Sie die Generatormatrix&nbsp; $\boldsymbol{\rm G}$&nbsp; an. Welche Aussagen stimmen?
+
{Give the generator matrix&nbsp; $\boldsymbol{\rm G}$&nbsp;. Which statements are true?
 
|type="[]"}
 
|type="[]"}
  
+ Die erste Zeile lautet: &nbsp; $1000101$,
+
+ The first row is: &nbsp; $(1000101)$,
- Die zweite Zeile lautet: &nbsp; $0111010$,
+
- The second row is: &nbsp; $(0111010)$,
+ Die letzte Zeile lautet: &nbsp; $0001111$.
+
+ The last row is: &nbsp; $(0001111)$.
  
{Welches Codewort&nbsp; $x_{11}$&nbsp; ergibt sich für&nbsp; $u_{11} = (1, 0, 1, 1)$?
+
{What code word&nbsp; $x_{11}$&nbsp; results for&nbsp; $u_{11} = (1, 0, 1, 1)$?
 
|type="[]"}
 
|type="[]"}
  
Line 82: Line 79:
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''(1)'''&nbsp; Die Anzahl der Spalten der Prüfmatrix $\boldsymbol{\rm H}$ ist gleich der Codelänge $\underline{n = 7}$.  
+
'''(1)'''&nbsp; The number of columns of the parity-check matrix&nbsp; $\boldsymbol{\rm H}$&nbsp; is equal to the code length&nbsp; $\underline{n = 7}$.  
:Die Zeilenzahl ist gleich der Anzahl der Prüfgleichungen, im vorliegenden Fall gilt $\underline{m = 3} = n - k$.
+
:The number of rows is equal to the number of parity-check equations,&nbsp; in this case&nbsp; $\underline{m = 3} = n - k$.
  
  
  
'''(2)'''&nbsp;  Ein Vergleich mit der Grafik auf der Angabenseite zeigt, dass <u>alle Aussagen</u> zutreffen. Mit
+
'''(2)'''&nbsp;  A comparison with the graph in the information section shows that&nbsp; <u>all statements</u>&nbsp; are true.&nbsp; With
  
 
:$$\underline{x} = ( x_1, x_2, x_3, x_4, x_5, x_6, x_7) = ( u_1, u_2, u_3, u_4, p_1, p_2, p_3)$$
 
:$$\underline{x} = ( x_1, x_2, x_3, x_4, x_5, x_6, x_7) = ( u_1, u_2, u_3, u_4, p_1, p_2, p_3)$$
  
ergeben sich folgende Prüfgleichungen:
+
results in the following parity-check equations:
  
:$$x_1 \oplus x_2 \oplus x_4 \oplus x_5 \hspace{-0.1cm}\ = \ \hspace{-0.1cm} 0 \hspace{0.3cm}{\rm (roter\hspace{0.15cm}Kreis)}\hspace{0.05cm},$$
+
:$$x_1 \oplus x_2 \oplus x_4 \oplus x_5 \hspace{-0.1cm}\ = \ \hspace{-0.1cm} 0 \hspace{0.3cm}{\rm (red\hspace{0.15cm}circle)}\hspace{0.05cm},$$
:$$x_2 \oplus x_3 \oplus x_4 \oplus x_6 \hspace{-0.1cm}\ = \ \hspace{-0.1cm} 0 \hspace{0.3cm}{\rm (gr\ddot{u}ner\hspace{0.15cm}Kreis)}\hspace{0.05cm},$$
+
:$$x_2 \oplus x_3 \oplus x_4 \oplus x_6 \hspace{-0.1cm}\ = \ \hspace{-0.1cm} 0 \hspace{0.3cm}{\rm (green\hspace{0.15cm}circle)}\hspace{0.05cm},$$
:$$ x_1 \oplus x_3 \oplus x_4 \oplus x_7 \hspace{-0.1cm}\ = \ \hspace{-0.1cm} 0 \hspace{0.3cm}{\rm (blauer\hspace{0.15cm}Kreis)}\hspace{0.05cm}.$$
+
:$$ x_1 \oplus x_3 \oplus x_4 \oplus x_7 \hspace{-0.1cm}\ = \ \hspace{-0.1cm} 0 \hspace{0.3cm}{\rm (blue\hspace{0.15cm}circle)}\hspace{0.05cm}.$$
  
Damit erhält man für die Prüfmatrix:
+
This gives for the parity-check matrix:
  
 
:$${ \boldsymbol{\rm H}} = \begin{pmatrix} 1 &1 &0 &1 &1 &0 &0\\ 0 &1 &1 &1 &0 &1 &0\\ 1 &0 &1 &1 &0 &0 &1 \end{pmatrix}\hspace{0.05cm}.$$
 
:$${ \boldsymbol{\rm H}} = \begin{pmatrix} 1 &1 &0 &1 &1 &0 &0\\ 0 &1 &1 &1 &0 &1 &0\\ 1 &0 &1 &1 &0 &0 &1 \end{pmatrix}\hspace{0.05cm}.$$
  
Die Angabe von &nbsp;$\boldsymbol{\rm H}$&nbsp; ist nicht eindeutig. Bei anderer Reihenfolge der Prüfgleichungen  ergäbe sich beispielsweise eine zweite, ebenfalls richtige Prüfmatrix:
+
The specification of &nbsp;$\boldsymbol{\rm H}$&nbsp; is not unique.&nbsp; A different order of the parity-check equations would,&nbsp; for example,&nbsp; result in a second parity-check matrix which is also correct:
  
 
:$${ \boldsymbol{\rm H}}' = \begin{pmatrix} 1 &0 &1 &1 &0 &0 &1\\ 1 &1 &0 &1 &1 &0 &0\\ 0 &1 &1 &1 &0 &1 &0 \end{pmatrix}\hspace{0.05cm}.$$
 
:$${ \boldsymbol{\rm H}}' = \begin{pmatrix} 1 &0 &1 &1 &0 &0 &1\\ 1 &1 &0 &1 &1 &0 &0\\ 0 &1 &1 &1 &0 &1 &0 \end{pmatrix}\hspace{0.05cm}.$$
Line 109: Line 106:
  
  
'''(3)'''&nbsp; Richtig ist die <u>Aussage 2</u>:
+
'''(3)'''&nbsp;<u>Statement 2</u>&nbsp; is correct:
*Bei einem systematischen Code lässt sich die Prüfmatrix in folgender Form darstellen:
+
*For a systematic code,&nbsp; the parity-check matrix can be represented in the following form:
  
 
:$${ \boldsymbol{\rm H}} =\left({ \boldsymbol{\rm P}}^{\rm T}\: ; \:{ \boldsymbol{\rm I}}_m \right) \hspace{0.05cm}.$$
 
:$${ \boldsymbol{\rm H}} =\left({ \boldsymbol{\rm P}}^{\rm T}\: ; \:{ \boldsymbol{\rm I}}_m \right) \hspace{0.05cm}.$$
  
*Im vorliegenden Beispiel gilt mit $m = 3$:
+
*In the present example,&nbsp; with&nbsp; $m = 3$:
  
 
:$${ \boldsymbol{\rm P}}^{\rm T} = \begin{pmatrix} 1 &1 &0 &1\\ 0 &1 &1 &1\\ 1 &0 &1 &1 \end{pmatrix}\hspace{0.05cm},\hspace{0.3cm} { \boldsymbol{\rm I}}_3 = \begin{pmatrix} 1 &0 &0\\ 0 &1 &0\\ 0 &0 &1 \end{pmatrix}\hspace{0.05cm}.$$
 
:$${ \boldsymbol{\rm P}}^{\rm T} = \begin{pmatrix} 1 &1 &0 &1\\ 0 &1 &1 &1\\ 1 &0 &1 &1 \end{pmatrix}\hspace{0.05cm},\hspace{0.3cm} { \boldsymbol{\rm I}}_3 = \begin{pmatrix} 1 &0 &0\\ 0 &1 &0\\ 0 &0 &1 \end{pmatrix}\hspace{0.05cm}.$$
Line 120: Line 117:
  
  
'''(4)'''&nbsp; Richtig sind  die <u>Aussagen 1 und 3</u>:
+
'''(4)'''&nbsp;<u>Statement 1 and 3</u>&nbsp; are correct:
*Allgemein lautet der Zusammenhang zwischen der $m×n$–Prüfmatrix und der $k×n$–Generatormatrix:
+
*In general,&nbsp; the relationship between the&nbsp; $m×n$&nbsp; parity-check matrix and the&nbsp; $k×n$&nbsp; generator matrix is:
  
 
:$${ \boldsymbol{\rm H}} \cdot { \boldsymbol{\rm G}}^{\rm T} = { \boldsymbol{\rm 0}} \hspace{0.05cm}$$  
 
:$${ \boldsymbol{\rm H}} \cdot { \boldsymbol{\rm G}}^{\rm T} = { \boldsymbol{\rm 0}} \hspace{0.05cm}$$  
  
*Die Matrix $ \boldsymbol{\rm 0}$ ist nur mit Nullen belegt und hat $m$ Zeilen und $k$ Spalten. Bei einem systematischen Code wie hier besteht folgender Zusammenhang:
+
*The matrix&nbsp; "$ \boldsymbol{\rm 0}$"&nbsp; is filled with zeros only and has&nbsp; $m$&nbsp; rows and&nbsp; $k$&nbsp; columns.&nbsp; For a systematic code like here the following relation exists:
  
 
:$${ \boldsymbol{\rm H}} =\left({ \boldsymbol{\rm P}}^{\rm T}\: ; \:{ \boldsymbol{\rm I}}_m \right) \hspace{0.3cm}\Leftrightarrow \hspace{0.3cm}{ \boldsymbol{\rm G}} =\left({ \boldsymbol{\rm I}}_k \: ; \:{ \boldsymbol{\rm P}} \right) \hspace{0.05cm}.$$
 
:$${ \boldsymbol{\rm H}} =\left({ \boldsymbol{\rm P}}^{\rm T}\: ; \:{ \boldsymbol{\rm I}}_m \right) \hspace{0.3cm}\Leftrightarrow \hspace{0.3cm}{ \boldsymbol{\rm G}} =\left({ \boldsymbol{\rm I}}_k \: ; \:{ \boldsymbol{\rm P}} \right) \hspace{0.05cm}.$$
  
*Im vorliegenden Fall erhält man:
+
*In the present case,&nbsp; one&nbsp; obtains:
  
 
:$${ \boldsymbol{\rm I}}_4 = \begin{pmatrix} 1 &0 &0 &0\\ 0 &1 &0 &0\\ 0 &0 &1 &0\\ 0 &0 &0 &1 \end{pmatrix}\hspace{0.05cm},\hspace{0.3cm} { \boldsymbol{\rm P}} = \begin{pmatrix} 1 &0 &1\\ 1 &1 &0\\ 0 &1 &1\\ 1 &1 &1 \end{pmatrix}\hspace{0.3cm}\Rightarrow \hspace{0.3cm} { \boldsymbol{\rm G}} = \begin{pmatrix} 1 &0 &0 &0 &1 &0 &1\\ 0 &1 &0 &0 &1 &1 &0\\ 0 &0 &1 &0 &0 &1 &1\\ 0 &0 &0 &1 &1 &1 &1 \end{pmatrix}\hspace{0.05cm}.$$
 
:$${ \boldsymbol{\rm I}}_4 = \begin{pmatrix} 1 &0 &0 &0\\ 0 &1 &0 &0\\ 0 &0 &1 &0\\ 0 &0 &0 &1 \end{pmatrix}\hspace{0.05cm},\hspace{0.3cm} { \boldsymbol{\rm P}} = \begin{pmatrix} 1 &0 &1\\ 1 &1 &0\\ 0 &1 &1\\ 1 &1 &1 \end{pmatrix}\hspace{0.3cm}\Rightarrow \hspace{0.3cm} { \boldsymbol{\rm G}} = \begin{pmatrix} 1 &0 &0 &0 &1 &0 &1\\ 0 &1 &0 &0 &1 &1 &0\\ 0 &0 &1 &0 &0 &1 &1\\ 0 &0 &0 &1 &1 &1 &1 \end{pmatrix}\hspace{0.05cm}.$$
Line 135: Line 132:
  
  
'''(5)'''&nbsp; Die anzuwendende Gleichung lautet:
+
'''(5)'''&nbsp; The equation to be used is:
 
:$$\underline{x}_{11} \hspace{-0.15cm}\ = \ \hspace{-0.15cm} \underline{u}_{11} \cdot { \boldsymbol{\rm G}} = \begin{pmatrix} 1 &0 &1 &1 \end{pmatrix} \cdot \begin{pmatrix} 1 &0 &0 &0 &1 &0 &1\\ 0 &1 &0 &0 &1 &1 &0\\ 0 &0 &1 &0 &0 &1 &1\\ 0 &0 &0 &1 &1 &1 &1 \end{pmatrix} = \begin{pmatrix} 1 &0 &1 &1 &0 &0 &1 \end{pmatrix}\hspace{0.05cm}.$$
 
:$$\underline{x}_{11} \hspace{-0.15cm}\ = \ \hspace{-0.15cm} \underline{u}_{11} \cdot { \boldsymbol{\rm G}} = \begin{pmatrix} 1 &0 &1 &1 \end{pmatrix} \cdot \begin{pmatrix} 1 &0 &0 &0 &1 &0 &1\\ 0 &1 &0 &0 &1 &1 &0\\ 0 &0 &1 &0 &0 &1 &1\\ 0 &0 &0 &1 &1 &1 &1 \end{pmatrix} = \begin{pmatrix} 1 &0 &1 &1 &0 &0 &1 \end{pmatrix}\hspace{0.05cm}.$$
  
Ein Vergleich mit der Tabelle von [[Aufgaben:1.6_Zum_(7,_4)–Hamming–Code|Aufgabe 1.6]] zeigt die Richtigkeit dieser Berechnung &nbsp; ⇒ &nbsp; <u>Antwort 3</u>.  
+
A comparison with the table of&nbsp;  [[Aufgaben:Exercise_1.6:_(7,_4)_Hamming_Code|"Exercise 1.6"]]&nbsp; shows the correctness of this calculation &nbsp; ⇒ &nbsp; <u>Answer 3</u>.  
*Die Antwort 1 kann schon deshalb nicht richtig sein, weil das keiner systematischen Codierung entspricht.  
+
*The answer 1 cannot be correct already because this does not correspond to any systematic coding.  
* (1, 0, 1, 1, 0, 0, 0) gemäß Vorschlag 2 ist kein gültiges Codewort. Hiermit wird die in der Grafik auf der Angabenseite blau markierte Prüfgleichung nicht erfüllt.
+
* (1, 0, 1, 1, 0, 0)&nbsp; according to suggestion 2 is not a valid code word.&nbsp; Hereby the blue parity-check equation  in the graphic in the information section is not fulfilled.
  
 
{{ML-Fuß}}
 
{{ML-Fuß}}
Line 146: Line 143:
  
  
[[Category:Channel Coding: Exercises|^1.4 Beschreibung linearer Blockcodes
+
[[Category:Channel Coding: Exercises|^1.4 Linear Block Code Description^]]
 
 
^]]
 

Latest revision as of 17:59, 23 January 2023

Parity-check equations of the
$(7, 4, 3)$  Hamming code

The graph shows the parity-check equations of the  $(7, 4, 3)$  Hamming code,  which has already been considered in detail in the  "Exercise 1.6"  and described using the code table.

In this task,  this code is now characterized by two matrices  –  as is common in Channel Coding:

  • The parity-check matrix  $\boldsymbol{\rm H}$  is a matrix with  $m = n - k$  rows and  $n$  columns.  It describes the  $m = 3$  parity-check equations,  where the first row refers to the elements of the red circle and the second row refers to those of the green circle.  The last row gives the modulo-2 sum of the blue circle.
  • A second description possibility is provided by the generator matrix  $ \boldsymbol{\rm G}$  with  $k$  rows and  $n$  columns.  It gives the relationship between the information words  $ \underline{u}$  and the code words  $\underline{x}$ :
$$ \underline{x} = \underline{u} \cdot { \boldsymbol{\rm G}} \hspace{0.05cm}.$$

From this and from the equation  $ \boldsymbol{\rm H} · \underline{x}^{\rm T} = \underline{0}$  the relation between the parity-check matrix  $ \boldsymbol{\rm H}$  and the generator matrix  $ \boldsymbol{\rm G}$  can be established:

$$\underline{x}^{\rm T} = { \boldsymbol{\rm G}}^{\rm T} \cdot \underline{u}^{\rm T} \hspace{0.3cm} \Rightarrow \hspace{0.3cm} { \boldsymbol{\rm H}} \cdot { \boldsymbol{\rm G}}^{\rm T} \cdot \underline{u}^{\rm T} = \underline{0}\hspace{0.5cm} \forall \hspace{0.15cm}\underline{u} \in {\rm GF}(2^k)\hspace{0.3cm} \Rightarrow \hspace{0.3cm} { \boldsymbol{\rm H}} \cdot { \boldsymbol{\rm G}}^{\rm T} = { \boldsymbol{\rm 0}} \hspace{0.05cm}.$$

Note that in these equations  "$\underline{0}$"  denotes a row vector with  $k$  elements and  "$\boldsymbol{\rm 0}$"  denotes a matrix with  $m$  rows and  $k$  columns.  All elements of  "$\underline{0}$"  or  "$\boldsymbol{\rm 0}"$  are zero.

If the code is a  systematic code, the description variables  $\boldsymbol{\rm H}$  and  $\boldsymbol{\rm G}$  can be written with the aid of  identity matrices  $\boldsymbol{\rm I}$  as follows:

$${ \boldsymbol{\rm G}} =\left({ \boldsymbol{\rm I}}_k \: ; \: { \boldsymbol{\rm P}}\right) \hspace{0.5cm} \Rightarrow \hspace{0.5cm} { \boldsymbol{\rm H}} = \left({ \boldsymbol{\rm P}}^{\rm T}\: ; \:{ \boldsymbol{\rm I}}_m \right) \hspace{0.05cm}.$$

$\boldsymbol{\rm P}$  is thereby a matrix with  $k$  rows and  $m$  columns.  Accordingly, the transposed matrix  ${ \boldsymbol{\rm P}}^{\rm T}$  consists of  $m$  rows and  $k$  columns.



Hints :



Questions

1

What is the format of the parity-check matrix  $\boldsymbol{\rm H}$?

$\text{number of columns} \ = \ $

$\text{number of rows} \ = \ $

2

Which statements are true regarding the parity-check matrix  $\boldsymbol{\rm H}$ ?

The first row is:   $(1101100)$.
The second row is:   $(0111010)$.
The third row is:   $(1011001)$.

3

How can you tell that there is a systematic code?

In each row there is an even number of ones.
At the end of  $\boldsymbol{\rm H}$  you can recognize an identity matrix.
The middle column of  $\boldsymbol{\rm H}$  is occupied by ones.

4

Give the generator matrix  $\boldsymbol{\rm G}$ . Which statements are true?

The first row is:   $(1000101)$,
The second row is:   $(0111010)$,
The last row is:   $(0001111)$.

5

What code word  $x_{11}$  results for  $u_{11} = (1, 0, 1, 1)$?

$x_{11} = (1, 1, 1, 1, 0, 0, 0),$
$x_{11} = (1, 0, 1, 1, 0, 0, 0),$
$x_{11} = (1, 0, 1, 1, 0, 0, 1).$


Solution

(1)  The number of columns of the parity-check matrix  $\boldsymbol{\rm H}$  is equal to the code length  $\underline{n = 7}$.

The number of rows is equal to the number of parity-check equations,  in this case  $\underline{m = 3} = n - k$.


(2)  A comparison with the graph in the information section shows that  all statements  are true.  With

$$\underline{x} = ( x_1, x_2, x_3, x_4, x_5, x_6, x_7) = ( u_1, u_2, u_3, u_4, p_1, p_2, p_3)$$

results in the following parity-check equations:

$$x_1 \oplus x_2 \oplus x_4 \oplus x_5 \hspace{-0.1cm}\ = \ \hspace{-0.1cm} 0 \hspace{0.3cm}{\rm (red\hspace{0.15cm}circle)}\hspace{0.05cm},$$
$$x_2 \oplus x_3 \oplus x_4 \oplus x_6 \hspace{-0.1cm}\ = \ \hspace{-0.1cm} 0 \hspace{0.3cm}{\rm (green\hspace{0.15cm}circle)}\hspace{0.05cm},$$
$$ x_1 \oplus x_3 \oplus x_4 \oplus x_7 \hspace{-0.1cm}\ = \ \hspace{-0.1cm} 0 \hspace{0.3cm}{\rm (blue\hspace{0.15cm}circle)}\hspace{0.05cm}.$$

This gives for the parity-check matrix:

$${ \boldsymbol{\rm H}} = \begin{pmatrix} 1 &1 &0 &1 &1 &0 &0\\ 0 &1 &1 &1 &0 &1 &0\\ 1 &0 &1 &1 &0 &0 &1 \end{pmatrix}\hspace{0.05cm}.$$

The specification of  $\boldsymbol{\rm H}$  is not unique.  A different order of the parity-check equations would,  for example,  result in a second parity-check matrix which is also correct:

$${ \boldsymbol{\rm H}}' = \begin{pmatrix} 1 &0 &1 &1 &0 &0 &1\\ 1 &1 &0 &1 &1 &0 &0\\ 0 &1 &1 &1 &0 &1 &0 \end{pmatrix}\hspace{0.05cm}.$$


(3) Statement 2  is correct:

  • For a systematic code,  the parity-check matrix can be represented in the following form:
$${ \boldsymbol{\rm H}} =\left({ \boldsymbol{\rm P}}^{\rm T}\: ; \:{ \boldsymbol{\rm I}}_m \right) \hspace{0.05cm}.$$
  • In the present example,  with  $m = 3$:
$${ \boldsymbol{\rm P}}^{\rm T} = \begin{pmatrix} 1 &1 &0 &1\\ 0 &1 &1 &1\\ 1 &0 &1 &1 \end{pmatrix}\hspace{0.05cm},\hspace{0.3cm} { \boldsymbol{\rm I}}_3 = \begin{pmatrix} 1 &0 &0\\ 0 &1 &0\\ 0 &0 &1 \end{pmatrix}\hspace{0.05cm}.$$


(4) Statement 1 and 3  are correct:

  • In general,  the relationship between the  $m×n$  parity-check matrix and the  $k×n$  generator matrix is:
$${ \boldsymbol{\rm H}} \cdot { \boldsymbol{\rm G}}^{\rm T} = { \boldsymbol{\rm 0}} \hspace{0.05cm}$$
  • The matrix  "$ \boldsymbol{\rm 0}$"  is filled with zeros only and has  $m$  rows and  $k$  columns.  For a systematic code – like here – the following relation exists:
$${ \boldsymbol{\rm H}} =\left({ \boldsymbol{\rm P}}^{\rm T}\: ; \:{ \boldsymbol{\rm I}}_m \right) \hspace{0.3cm}\Leftrightarrow \hspace{0.3cm}{ \boldsymbol{\rm G}} =\left({ \boldsymbol{\rm I}}_k \: ; \:{ \boldsymbol{\rm P}} \right) \hspace{0.05cm}.$$
  • In the present case,  one  obtains:
$${ \boldsymbol{\rm I}}_4 = \begin{pmatrix} 1 &0 &0 &0\\ 0 &1 &0 &0\\ 0 &0 &1 &0\\ 0 &0 &0 &1 \end{pmatrix}\hspace{0.05cm},\hspace{0.3cm} { \boldsymbol{\rm P}} = \begin{pmatrix} 1 &0 &1\\ 1 &1 &0\\ 0 &1 &1\\ 1 &1 &1 \end{pmatrix}\hspace{0.3cm}\Rightarrow \hspace{0.3cm} { \boldsymbol{\rm G}} = \begin{pmatrix} 1 &0 &0 &0 &1 &0 &1\\ 0 &1 &0 &0 &1 &1 &0\\ 0 &0 &1 &0 &0 &1 &1\\ 0 &0 &0 &1 &1 &1 &1 \end{pmatrix}\hspace{0.05cm}.$$


(5)  The equation to be used is:

$$\underline{x}_{11} \hspace{-0.15cm}\ = \ \hspace{-0.15cm} \underline{u}_{11} \cdot { \boldsymbol{\rm G}} = \begin{pmatrix} 1 &0 &1 &1 \end{pmatrix} \cdot \begin{pmatrix} 1 &0 &0 &0 &1 &0 &1\\ 0 &1 &0 &0 &1 &1 &0\\ 0 &0 &1 &0 &0 &1 &1\\ 0 &0 &0 &1 &1 &1 &1 \end{pmatrix} = \begin{pmatrix} 1 &0 &1 &1 &0 &0 &1 \end{pmatrix}\hspace{0.05cm}.$$

A comparison with the table of  "Exercise 1.6"  shows the correctness of this calculation   ⇒   Answer 3.

  • The answer 1 cannot be correct already because this does not correspond to any systematic coding.
  • (1, 0, 1, 1, 0, 0)  according to suggestion 2 is not a valid code word.  Hereby the blue parity-check equation in the graphic in the information section is not fulfilled.