Difference between revisions of "Aufgaben:Exercise 4.11Z: Code Rate from the Parity-check Matrix"

From LNTwww
Line 1: Line 1:
{{quiz-Header|Buchseite=Kanalcodierung/Grundlegendes zu den Low–density Parity–check Codes}}
+
{{quiz-Header|Buchseite=Channel_Coding/The_Basics_of_Low-Density_Parity_Check_Codes}}
  
[[File:P_ID3068__KC_Z_4_11_v4.png|right|frame|Vorgegebene Prüfmatrizen]]
+
[[File:P_ID3068__KC_Z_4_11_v4.png|right|frame|Given parity-check matrices]]
In dieser Aufgabe sollen die Coderaten der Codes  $\mathcal {C}_1, \, \mathcal {C}_2, \, \mathcal {C}_3$  und  $\mathcal {C}_4$  ermittelt werden, wobei die Codes allein durch ihre Prüfmatrizen gegeben sind. Eine untere Schranke für die Coderate  $R$  lautet:
+
In this exercise, the code rates of the codes  $\mathcal {C}_1, \, \mathcal {C}_2, \, \mathcal {C}_3$  and  $\mathcal {C}_4$  are to be determined, where the codes are given by their test matrices alone. A lower bound on the code rate  $R$  reads:
 
:$$R \ge 1 - \frac{{\rm E}[w_{\rm S}]}{{\rm E}[w_{\rm Z}]}
 
:$$R \ge 1 - \frac{{\rm E}[w_{\rm S}]}{{\rm E}[w_{\rm Z}]}
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
  
Sind die  $m$  Prüfgleichungen aller Matrix–Zeilen linear unabhängig, so gilt in obiger Ungleichung das Gleichheitszeichen.
+
If the  $m$  parity-check equations of all matrix–rows are linearly independent, then the equal sign in the above inequality holds.
  
Verwendet ist hier die folgende Nomenklatur:
+
Used here is the following nomenclature:
* $w_{\rm Z}(j)$  mit  $1 ≤ j ≤ m$  ist das  [[Channel_Coding/Zielsetzung_der_Kanalcodierung#Einige_wichtige_Definitionen_zur_Blockcodierung|Hamming–Gewicht]]  der  $j$–ten Zeile der Prüfmatrix.
+
* $w_{\rm Z}(j)$  with  $1 ≤ j ≤ m$  being the  [[Channel_Coding/Objective_of_Channel_Coding#Important_definitions_for_block_coding|"Hamming weight"]]  of  $j$th row of the parity-check matrix.
* Durch <i>Erwartungswertbildung</i> ergibt sich:
+
* By <i>expectation value formation</i> results:
 
:$${\rm E}[w_{\rm Z}] =\frac{1}{m} \cdot  \sum_{j = 1}^{m}
 
:$${\rm E}[w_{\rm Z}] =\frac{1}{m} \cdot  \sum_{j = 1}^{m}
 
w_{\rm Z}(j)\hspace{0.05cm}.$$
 
w_{\rm Z}(j)\hspace{0.05cm}.$$
  
* Entsprechend gibt&nbsp; $w_{\rm S}(i)$&nbsp; mit&nbsp; $1 &#8804; i &#8804; n$&nbsp; das Hamming&ndash;Gewicht der&nbsp; $i$&ndash;ten Spalte von&nbsp; $\mathbf{H}$&nbsp; an, mit dem Erwartungswert
+
* Accordingly,&nbsp; $w_{\rm S}(i)$&nbsp; with&nbsp; $1 &#8804; i &#8804; n$&nbsp; gives the Hamming weight of&nbsp; $i$th column of&nbsp; $\mathbf{H}$&nbsp; with expected value
 
:$${\rm E}[w_{\rm S}] =\frac{1}{n} \cdot  \sum_{i = 1}^{n}
 
:$${\rm E}[w_{\rm S}] =\frac{1}{n} \cdot  \sum_{i = 1}^{n}
 
w_{\rm S}(i)\hspace{0.05cm}.$$
 
w_{\rm S}(i)\hspace{0.05cm}.$$
Line 26: Line 26:
  
  
''Hinweise:''
+
Hints:  
* Die Aufgabe gehört zum Kapitel&nbsp; [[Channel_Coding/Grundlegendes_zu_den_Low%E2%80%93density_Parity%E2%80%93check_Codes| Grundlegendes zu den Low&ndash;density Parity&ndash;check Codes]].
+
* This exercise belongs to the chapter&nbsp; [[Channel_Coding/The_Basics_of_Low-Density_Parity_Check_Codes|"Basics of Low&ndash;density Parity&ndash;check Code "s]].
* Bezug genommen wird insbesondere auf die Seite&nbsp; [[Channel_Coding/Grundlegendes_zu_den_Low–density_Parity–check_Codes#Einige_Charakteristika_der_LDPC.E2.80.93Codes|Einige Charakteristika der LDPC&ndash;Codes]].
+
* Reference is made in particular to the page&nbsp; [[Channel_Coding/The_Basics_of_Low-Density_Parity_Check_Codes#Some_characteristics_of_LDPC_codes|"Some characteristics of LDPC codes"]].
  
  
  
  
===Fragebogen===
+
===Questions===
 
<quiz display=simple>
 
<quiz display=simple>
{$\mathbf{H}_1$&nbsp; beschreibt einen systematischen Code. Wie lauten dessen Parameter?
+
{$\mathbf{H}_1$&nbsp; describes a systematic code. What are its parameters?
 
|type="{}"}
 
|type="{}"}
 
$n \hspace{0.27cm} = \ ${ 7 }
 
$n \hspace{0.27cm} = \ ${ 7 }
Line 41: Line 41:
 
$m \hspace{0.15cm} = \ ${ 3 }
 
$m \hspace{0.15cm} = \ ${ 3 }
  
{Wie groß ist die Coderate des Codes&nbsp; $\mathcal {C}_1$&nbsp; mit der Prüfmatrix&nbsp; $\mathbf{H}_1$?
+
{What is the code rate of the code&nbsp; $\mathcal {C}_1$&nbsp; with the parity-check matrix&nbsp; $\mathbf{H}_1$?
 
|type="{}"}
 
|type="{}"}
 
$R \ = \ ${ 0.571 3% }
 
$R \ = \ ${ 0.571 3% }
  
{Wie groß ist die Coderate des Codes&nbsp; $\mathcal {C}_2$&nbsp; mit der Prüfmatrix&nbsp; $\mathbf{H}_2$?
+
{What is the code rate of the code&nbsp; $\mathcal {C}_1$&nbsp; with the parity-check matrix&nbsp; $\mathbf{H}_2$?
 
|type="{}"}
 
|type="{}"}
 
$R \ = \ ${ 0.571 3% }
 
$R \ = \ ${ 0.571 3% }
  
{Wie groß ist die Coderate des Codes&nbsp; $\mathcal {C}_3$&nbsp; mit der Prüfmatrix&nbsp; $\mathbf{H}_3$?
+
{What is the code rate of the code&nbsp; $\mathcal {C}_1$&nbsp; with the parity-check matrix&nbsp; $\mathbf{H}_3$?
 
|type="{}"}
 
|type="{}"}
 
$R \ = \ ${ 0.571 3% }
 
$R \ = \ ${ 0.571 3% }
  
{Wie groß ist die Coderate des Codes&nbsp; $\mathcal {C}_4$&nbsp; mit der Prüfmatrix&nbsp; $\mathbf{H}_4$?
+
{What is the code rate of the code&nbsp; $\mathcal {C}_1$&nbsp; with the parity-check matrix&nbsp; $\mathbf{H}_4$?
 
|type="{}"}
 
|type="{}"}
 
$R \ = \ ${ 0.5 3% }
 
$R \ = \ ${ 0.5 3% }
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''(1)'''&nbsp; Die Matrix $\mathbf{H}_1$ endet mit einer $3 &times 3$&ndash;Diagonalmatrix.  
+
'''(1)'''&nbsp; The matrix $\mathbf{H}_1$ ends with a $3 &times 3$&ndash;diagonal matrix.  
*Dies ist das Kennzeichen eines systematischen Codes mit $\underline{m = 3}$ Prüfgleichungen.  
+
*This is the characteristic of a systematic code with $\underline{m = 3}$ parity-check equations.  
*Die Codelänge ist $\underline{n = 7}$.  
+
*The code length is $\underline{n = 7}$.  
*Damit beinhaltet ein Codewort $\underline{k = 4}$ Informationsbits.
+
*Thus, a codeword contains $\underline{k = 4}$ information bits.
  
 
   
 
   
<i>Hinweis:</i> Es handelt sich um den [[Channel_Coding/Allgemeine_Beschreibung_linearer_Blockcodes#Einige_Eigenschaften_des_.287.2C_4.2C_3.29.E2.80.93Hamming.E2.80.93Codes|systematischen (7, 4, 3)&ndash;Hamming&ndash;Code]].
+
<i>Note:</i> This is the [[Channel_Coding/General_Description_of_Linear_Block_Codes#Some_properties_of_the_.287.2C_4.2C_3.29_Hamming_code|"systematic (7, 4, 3)&ndash;Hamming code"]].
  
  
'''(2)'''&nbsp; Die Coderate des (7, 4, 3)&ndash;Hamming&ndash;Codes ist $\underline{R = 4/7 = 0.571}$.  
+
'''(2)'''&nbsp; The code rate of the (7, 4, 3)&ndash;Hamming&ndash;code is $\underline{R = 4/7 = 0.571}$.  
*Das Hamming&ndash;Gewicht für alle $m = 3$ Zeilen ist $w_{\rm Z} = 4$ und für das mittlere Hamming&ndash;Gewicht über alle Spalten gilt:
+
*The Hamming weight for all $m = 3$ rows is $w_{\rm Z} = 4$ and for the mean Hamming&ndash;weight over all columns holds:
 
:$${\rm E}[w_{\rm S}] =\frac{1}{n} \cdot  \sum_{j = 1}^{ n}
 
:$${\rm E}[w_{\rm S}] =\frac{1}{n} \cdot  \sum_{j = 1}^{ n}
 
w_{\rm S}(j) = 1/7 \cdot [2 + 3 + 2+2 + 1+1 +1]
 
w_{\rm S}(j) = 1/7 \cdot [2 + 3 + 2+2 + 1+1 +1]
 
= 12/7 \hspace{0.05cm}.$$
 
= 12/7 \hspace{0.05cm}.$$
*Damit gilt für die angegebene untere Schranke der Coderate:
+
*This applies to the specified lower bound of the code rate:
 
:$$R \ge 1 - \frac{{\rm E}[w_{\rm S}]}{w_{\rm Z}}
 
:$$R \ge 1 - \frac{{\rm E}[w_{\rm S}]}{w_{\rm Z}}
 
= 1 - \frac{12/7}{4}\hspace{0.15cm} \underline{= 4/7 \approx 0.571}\hspace{0.05cm}.$$
 
= 1 - \frac{12/7}{4}\hspace{0.15cm} \underline{= 4/7 \approx 0.571}\hspace{0.05cm}.$$
*Das bedeutet: Die tatsächliche Coderate ist gleich der unteren Schranke &nbsp; &#8658; &nbsp; die $m = 3$ Prüfgleichungen von $\mathbf{H}_1$ sind linear unabhängig.
+
*This means: the actual code rate is equal to the lower bound &nbsp; &#8658; &nbsp; the $m = 3$ parity-check equations of $\mathbf{H}_1$ are linearly independent.
  
  
'''(3)'''&nbsp; Die erste Zeile von $\mathbf{H}_2$ ist die Summe aus der ersten Zeile $(z_1)$ und der zweiten Zeile $(z_2)$ von $\mathbf{H}_1$.  
+
'''(3)'''&nbsp; The first row of $\mathbf{H}_2$ is the sum of the first row $(z_1)$ and the second row $(z_2)$ of $\mathbf{H}_1$.  
*Die zweite Zeile ist gleich $z_2 + z_3$ und die dritte Zeile ist $z_1 + z_3$.  
+
*The second row is equal to $z_2 + z_3$ and the third row is $z_1 + z_3$.  
*Es handelt sich um den identischen Code &nbsp;&#8658;&nbsp; Rate $\underline{R = 4/7 = 0.571}$.  
+
*This is the identical code &nbsp;&#8658;&nbsp; rate $\underline{R = 4/7 = 0.571}$.  
*Weiterhin gilt&nbsp; $w_{\rm Z} = 4$&nbsp; und&nbsp; ${\rm E}[w_{\rm S}] = 1/7 \cdot [0 + 6 \cdot 2] = 12/7$.
+
*Further,&nbsp; $w_{\rm Z} = 4$&nbsp; and&nbsp; ${\rm E}[w_{\rm S}] = 1/7 \cdot [0 + 6 \cdot 2] = 12/7$.
  
  
 
+
'''(4)'''&nbsp; For this code with&nbsp; $n = 7$&nbsp; (column count) and&nbsp; $m = 4$&nbsp; (row count) holds:
'''(4)'''&nbsp; Für diesen Code mit&nbsp; $n = 7$&nbsp; (Spaltenzahl) und&nbsp; $m = 4$&nbsp; (Zeilenzahl) gilt:
 
 
:$$w_{\rm Z} = 4\hspace{0.05cm},\hspace{0.3cm} {\rm E}[w_{\rm S}] =\frac{1}{n} \cdot  \sum_{j = 1}^{ n}w_{\rm S}(j) = 1/7 \cdot [3 + 1 + 2 +3+2 + 2+3] = 16/7\hspace{0.3cm}
 
:$$w_{\rm Z} = 4\hspace{0.05cm},\hspace{0.3cm} {\rm E}[w_{\rm S}] =\frac{1}{n} \cdot  \sum_{j = 1}^{ n}w_{\rm S}(j) = 1/7 \cdot [3 + 1 + 2 +3+2 + 2+3] = 16/7\hspace{0.3cm}
 
\Rightarrow \hspace{0.3cm} R \ge  1 - \frac{16/7}{4}= 3/7 \hspace{0.05cm}.$$
 
\Rightarrow \hspace{0.3cm} R \ge  1 - \frac{16/7}{4}= 3/7 \hspace{0.05cm}.$$
  
Das Gleichheitszeichen würde nur bei linear unabhängigen Prüfgleichungen gelten, was hier nicht zutrifft:  
+
The equal sign would only apply to linearly independent parity-check equations, which is not the case here:  
*Die dritte Zeile von $\mathbf{H}_3$ wurde von $\mathbf{H}_1$ übernommen.  
+
*The third row of $\mathbf{H}_3$ was taken from $\mathbf{H}_1$.  
*Streicht man diese Zeile, so ist $\mathbf{H}_3 = \mathbf{H}_2$ und deshalb gilt ebenfalls: $\ \underline{R = 4/7 = 0.571}$.
+
*If one deletes this row, $\mathbf{H}_3 = \mathbf{H}_2$ and therefore also holds: $\ \underline{R = 4/7 = 0.571}$.
  
  
  
'''(5)'''&nbsp; Hier gilt&nbsp; $n = 7$&nbsp; und&nbsp; $m = 4$, sowie
+
'''(5)'''&nbsp; Here&nbsp; $n = 7$&nbsp; and&nbsp; $m = 4$, as well as
 
:$${\rm E}[w_{\rm S}] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}1/8 \cdot [4 + 3 + 4 + 3 + 3+2 + 2+2] = 23/8\hspace{0.05cm},\hspace{0.8cm}
 
:$${\rm E}[w_{\rm S}] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}1/8 \cdot [4 + 3 + 4 + 3 + 3+2 + 2+2] = 23/8\hspace{0.05cm},\hspace{0.8cm}
 
{\rm E}[w_{\rm Z}] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}1/4 \cdot [8 + 5 + 5+5] = 23/4$$
 
{\rm E}[w_{\rm Z}] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}1/4 \cdot [8 + 5 + 5+5] = 23/4$$
Line 104: Line 103:
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
  
*Da alle vier Gleichungen linear unabhängig sind, ist die Coderate gleich der unteren Schranke: $\underline{R = 1/2}$.  
+
*Since all four equations are linearly independent, the code rate is equal to the lower bound: $\underline{R = 1/2}$.  
  
  
<i>Hinweis:</i> &nbsp; Es handelt sich um den [[Aufgaben:Aufgabe_1.09:_Erweiterter_Hamming–Code| erweiterten (8, 4, 4)&ndash;Hamming&ndash;Code]].
+
<i>Hint:</i> &nbsp; This is the [[Aufgaben:Exercise_1.09:_Extended_Hamming_Code| "extended (8, 4, 4) Hamming code"]].
 
{{ML-Fuß}}
 
{{ML-Fuß}}
  

Revision as of 21:56, 10 December 2022

Given parity-check matrices

In this exercise, the code rates of the codes  $\mathcal {C}_1, \, \mathcal {C}_2, \, \mathcal {C}_3$  and  $\mathcal {C}_4$  are to be determined, where the codes are given by their test matrices alone. A lower bound on the code rate  $R$  reads:

$$R \ge 1 - \frac{{\rm E}[w_{\rm S}]}{{\rm E}[w_{\rm Z}]} \hspace{0.05cm}.$$

If the  $m$  parity-check equations of all matrix–rows are linearly independent, then the equal sign in the above inequality holds.

Used here is the following nomenclature:

  • $w_{\rm Z}(j)$  with  $1 ≤ j ≤ m$  being the  "Hamming weight"  of  $j$th row of the parity-check matrix.
  • By expectation value formation results:
$${\rm E}[w_{\rm Z}] =\frac{1}{m} \cdot \sum_{j = 1}^{m} w_{\rm Z}(j)\hspace{0.05cm}.$$
  • Accordingly,  $w_{\rm S}(i)$  with  $1 ≤ i ≤ n$  gives the Hamming weight of  $i$th column of  $\mathbf{H}$  with expected value
$${\rm E}[w_{\rm S}] =\frac{1}{n} \cdot \sum_{i = 1}^{n} w_{\rm S}(i)\hspace{0.05cm}.$$





Hints:



Questions

1

$\mathbf{H}_1$  describes a systematic code. What are its parameters?

$n \hspace{0.27cm} = \ $

$k \hspace{0.3cm} = \ $

$m \hspace{0.15cm} = \ $

2

What is the code rate of the code  $\mathcal {C}_1$  with the parity-check matrix  $\mathbf{H}_1$?

$R \ = \ $

3

What is the code rate of the code  $\mathcal {C}_1$  with the parity-check matrix  $\mathbf{H}_2$?

$R \ = \ $

4

What is the code rate of the code  $\mathcal {C}_1$  with the parity-check matrix  $\mathbf{H}_3$?

$R \ = \ $

5

What is the code rate of the code  $\mathcal {C}_1$  with the parity-check matrix  $\mathbf{H}_4$?

$R \ = \ $


Solution

(1)  The matrix $\mathbf{H}_1$ ends with a $3 × 3$–diagonal matrix.

  • This is the characteristic of a systematic code with $\underline{m = 3}$ parity-check equations.
  • The code length is $\underline{n = 7}$.
  • Thus, a codeword contains $\underline{k = 4}$ information bits.


Note: This is the "systematic (7, 4, 3)–Hamming code".


(2)  The code rate of the (7, 4, 3)–Hamming–code is $\underline{R = 4/7 = 0.571}$.

  • The Hamming weight for all $m = 3$ rows is $w_{\rm Z} = 4$ and for the mean Hamming–weight over all columns holds:
$${\rm E}[w_{\rm S}] =\frac{1}{n} \cdot \sum_{j = 1}^{ n} w_{\rm S}(j) = 1/7 \cdot [2 + 3 + 2+2 + 1+1 +1] = 12/7 \hspace{0.05cm}.$$
  • This applies to the specified lower bound of the code rate:
$$R \ge 1 - \frac{{\rm E}[w_{\rm S}]}{w_{\rm Z}} = 1 - \frac{12/7}{4}\hspace{0.15cm} \underline{= 4/7 \approx 0.571}\hspace{0.05cm}.$$
  • This means: the actual code rate is equal to the lower bound   ⇒   the $m = 3$ parity-check equations of $\mathbf{H}_1$ are linearly independent.


(3)  The first row of $\mathbf{H}_2$ is the sum of the first row $(z_1)$ and the second row $(z_2)$ of $\mathbf{H}_1$.

  • The second row is equal to $z_2 + z_3$ and the third row is $z_1 + z_3$.
  • This is the identical code  ⇒  rate $\underline{R = 4/7 = 0.571}$.
  • Further,  $w_{\rm Z} = 4$  and  ${\rm E}[w_{\rm S}] = 1/7 \cdot [0 + 6 \cdot 2] = 12/7$.


(4)  For this code with  $n = 7$  (column count) and  $m = 4$  (row count) holds:

$$w_{\rm Z} = 4\hspace{0.05cm},\hspace{0.3cm} {\rm E}[w_{\rm S}] =\frac{1}{n} \cdot \sum_{j = 1}^{ n}w_{\rm S}(j) = 1/7 \cdot [3 + 1 + 2 +3+2 + 2+3] = 16/7\hspace{0.3cm} \Rightarrow \hspace{0.3cm} R \ge 1 - \frac{16/7}{4}= 3/7 \hspace{0.05cm}.$$

The equal sign would only apply to linearly independent parity-check equations, which is not the case here:

  • The third row of $\mathbf{H}_3$ was taken from $\mathbf{H}_1$.
  • If one deletes this row, $\mathbf{H}_3 = \mathbf{H}_2$ and therefore also holds: $\ \underline{R = 4/7 = 0.571}$.


(5)  Here  $n = 7$  and  $m = 4$, as well as

$${\rm E}[w_{\rm S}] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}1/8 \cdot [4 + 3 + 4 + 3 + 3+2 + 2+2] = 23/8\hspace{0.05cm},\hspace{0.8cm} {\rm E}[w_{\rm Z}] \hspace{-0.15cm} \ = \ \hspace{-0.15cm}1/4 \cdot [8 + 5 + 5+5] = 23/4$$
$$\Rightarrow \hspace{0.3cm}R \ge 1 - \frac{{\rm E}[w_{\rm S}]}{{\rm E}[w_{\rm Z}]} = 1 - \frac{23/8}{23/4} = 1/2 \hspace{0.05cm}.$$
  • Since all four equations are linearly independent, the code rate is equal to the lower bound: $\underline{R = 1/2}$.


Hint:   This is the "extended (8, 4, 4) Hamming code".