Difference between revisions of "Aufgaben:Exercise 4.12: Regular and Irregular Tanner Graph"

From LNTwww
 
(24 intermediate revisions by 5 users not shown)
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_ID3072__KC_A_4_12_v1.png|right|frame|Vorgegebener Tanner–Graph für Code A]]
+
[[File:P_ID3072__KC_A_4_12_v1.png|right|frame|Tanner graph for code  $\rm A$]]
Dargestellt ist ein Tanner–Graph eines Codes A mit
+
Shown is a Tanner graph of a code  $\rm A$  with
* den <i>Variable Nodes</i> (abgekürzt VNs) $V_1, \ ... \ , \ V_6$, wobei $V_i$ das $i$&ndash;te Codewortbit kennzeichnet (egal, ob Informations &ndash; oder Paritybit) und der $i$&ndash;ten Spalte der Prüfmatrix entspricht;
+
* the&nbsp; variable nodes&nbsp;  $V_1, \hspace{0.05cm} \text{...} \hspace{0.05cm} , \ V_6$,&nbsp;. where&nbsp; $V_i$&nbsp; denotes the&nbsp; $i$<sup>th</sup>&nbsp; code word bit&nbsp; $($whether information bit or parity bit$)$&nbsp; and corresponds to the&nbsp; $i$<sup>th</sup>&nbsp; column of the parity-check matrix;
* den <i>Check Nodes</i> (abgekürzt CNs) $C_1, \ ... \ , \ C_3$, die die Zeilen der $\mathbf{H}_{\rm A}$&ndash;Matrix und damit die Prüfgleichungen repräsentieren.
 
  
 +
* the&nbsp; check nodes</i>&nbsp; $C_1, \hspace{0.05cm} \text{...} \hspace{0.05cm} , \ C_3$,&nbsp; which represent the rows of the&nbsp; $\mathbf{H}_{\rm A}$&nbsp; matrix and hence the parity-check equations.
  
Eine Verbindungslinie (englisch: <i>Edge</i>) zwischen $V_i$ und $C_j$ zeigt an, dass das $i$&ndash;te Codewortsymbol an der $j$&ndash;ten Prüfgleichung beteiligt ist. In diesem Fall ist das Element $h_{j,i}$ der Prüfmatrix gleich $1$.
 
  
In der Aufgabe soll der Zusammenhang zwischen dem oben dargestellten Tanner&ndash;Graphen (gültig für den Code A) und der Matrix $\mathbf{H}_{\rm A}$ angegeben werden. Außerdem ist der Tanner&ndash;Graph zu einer Prüfmatrix $\mathbf{H}_{\rm B}$ aufzustellen, die sich aus $\mathbf{H}_{\rm A}$ durch Hinzufügen einer weiteren Zeile ergibt. Diese ist so zu ermitteln, dass der zugehörige Code B regulär ist. Das bedeutet:
+
An edge between&nbsp; $V_i$&nbsp; and&nbsp; $C_j$&nbsp; indicates that the&nbsp; $i$<sup>th</sup>&nbsp; code word symbol is involved in the&nbsp; $j$<sup>th</sup>&nbsp; parity-check equation.&nbsp; In this case,&nbsp; the element&nbsp; $h_{j,\hspace{0.05cm}i}$&nbsp; of the parity-check matrix is equal&nbsp; $1$.
* Von allen <i>Variable Nodes</i> $V_i$ (mit $1 &#8804; i &#8804; n$) gehen gleich viele Linien (<i>Edges</i>) ab, ebenso von allen <i>Check Nodes</i> $C_j$ (mit $1 &#8804; j &#8804; m$).
+
 
* Die Hamming&ndash;Gewichte aller Zeilen von $\mathbf{H}_{\rm B}$ sollen jeweils gleich sein $(w_{\rm Z})$, ebenso die Hamming&ndash;Gewichte aller Spalten $(w_{\rm S})$.
+
In this exercise, the relation between the above Tanner graph &nbsp;$($valid for the code&nbsp; $\rm A)$&nbsp; and the matrix&nbsp; $\mathbf{H}_{\rm A}$&nbsp; shall be given.&nbsp;
* Für die Rate des zu konstruierenden regulären Codes B gilt dann die folgende untere Schranke:
+
 
:$$R \ge 1 - \frac{w_{\rm S}}{w_{\rm Z}}
+
In addition,&nbsp; the Tanner graph to a parity-check matrix&nbsp; $\mathbf{H}_{\rm B}$&nbsp; shall be set up,&nbsp; resulting from&nbsp; $\mathbf{H}_{\rm A}$&nbsp; adding another row.&nbsp; This is to be determined so that the associated code&nbsp; $\rm B$&nbsp; is regular.&nbsp; This means:
 +
* From all&nbsp; variable nodes&nbsp; $V_i$&nbsp; $($with&nbsp; $1 &#8804; i &#8804; n)$&nbsp; go off an equal number of edges,&nbsp; <br>likewise from all&nbsp; check nodes&nbsp; $C_j$&nbsp; $($with&nbsp; $1 &#8804; j &#8804; m)$.
 +
 
 +
* The Hamming weights of all rows of&nbsp; $\mathbf{H}_{\rm B}$&nbsp; are each said to be equal&nbsp; $(w_{\rm R})$,&nbsp; as are the Hamming weights of all columns&nbsp; $(w_{\rm C})$.
 +
 
 +
* For the rate of the regular code&nbsp;$\rm B$&nbsp; to be constructed,&nbsp; the following lower bound then applies:
 +
:$$R \ge 1 - \frac{w_{\rm C}}{w_{\rm R}}
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
  
''Hinweis:''
 
* Die Aufgabe gehört zum Themengebiet des Kapitels [[Kanalcodierung/Grundlegendes_zu_den_Low%E2%80%93density_Parity%E2%80%93check_Codes|Grundlegendes zu den Low&ndash;density Parity&ndash;check Codes]].
 
  
  
===Fragebogen===
+
 
 +
<u>Hints:</u>
 +
*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 Codes"]].
 +
 
 +
*Reference is made in particular to the section&nbsp; [[Channel_Coding/The_Basics_of_Low-Density_Parity_Check_Codes#Two-part_LDPC_graph_representation_-_Tanner_graph|"Two-part LDPC graph representation &ndash; Tanner graph"]].
 +
 +
 
 +
 
 +
 
 +
 
 +
===Questions===
 
<quiz display=simple>
 
<quiz display=simple>
{Multiple-Choice
+
{How many rows&nbsp; $(m)$&nbsp; and columns&nbsp; $(n)$&nbsp; does the parity-check matrix&nbsp; $\mathbf{H}_{\rm A}$ have?
 +
|type="{}"}
 +
$m \hspace{0.18cm} = \ ${ 3 }
 +
$n \hspace{0.3cm} = \ ${ 6 }
 +
 
 +
{Which statements are true based on the Tanner graph?
 +
|type="[]"}
 +
+ The row 1 of the&nbsp; $\mathbf{H}_{\rm A}$&nbsp; matrix is&nbsp; "$1 \ 1 \ 0 \ 1 \ 0 \ 0$".
 +
- The row 2 of the&nbsp; $\mathbf{H}_{\rm A}$&nbsp; matrix is&nbsp; "$1 \ 0 \ 1 \ 0 \ 0 \ 1$".
 +
+ The row 3 of the&nbsp; $\mathbf{H}_{\rm A}$&nbsp; matrix is&nbsp; "$0 \ 1 \ 1 \ 0 \ 0 \ 1$".
 +
 
 +
{What are the properties of code&nbsp; $\rm A$&nbsp;?
 +
|type="[]"}
 +
+ The code is systematic.
 +
- The code is regular.
 +
+ The code rate is&nbsp; $R = 1/2$.
 +
- The code rate is&nbsp; $R = 1/3$.
 +
 
 +
{The matrix&nbsp; $\mathbf{H}_{\rm B}$&nbsp; is obtained from&nbsp; $\mathbf{H}_{\rm A}$&nbsp; by adding one more row.&nbsp; By which fourth row does a regular code&nbsp; $\rm B$&nbsp; result?
 
|type="[]"}
 
|type="[]"}
+ correct
+
+By adding "$0 \ 0 \ 0 \ 1 \ 1 \ 1$".
- false
+
- By adding "$1 \ 1 \ 1 \ 1 \ 1 \ 1$".
 +
- By adding any other row.
  
{Input-Box Frage
+
{What are the properties of code&nbsp; $\rm B$?
|type="{}"}
+
|type="[]"}
$xyz \ = \ ${ 5.4 3% } $ab$
+
- The code is systematic.
 +
+ The code is regular.
 +
+ The code rate is&nbsp; $R = 1/2$.
 +
- The code rate is&nbsp; $R = 1/3$.
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solutiojn===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''(1)'''&nbsp;  
+
'''(1)'''&nbsp; The number of&nbsp; $\mathbf{H}_{\rm A}$&nbsp; rows is equal to the number of check nodes&nbsp; $C_j$&nbsp; in the Tanner graph &nbsp; &#8658; &nbsp; $\underline{m = 3}$,&nbsp; <br>and the number&nbsp; $\underline{n = 6}$&nbsp; of variable nodes&nbsp; $V_i$&nbsp; is equal to the column number.
'''(2)'''&nbsp;  
+
 
'''(3)'''&nbsp;  
+
 
'''(4)'''&nbsp;  
+
[[File:P_ID3073__KC_A_4_12c_v1.png|right|frame|Underlying parity-check equations]]
'''(5)'''&nbsp;  
+
 
 +
'''(2)'''&nbsp; Correct are the&nbsp; <u>answers 1 and 3</u>&nbsp; in contrast to statement 2:
 +
*The second&nbsp; $\mathbf{H}_{\rm A}$&nbsp; row is rather&nbsp; "$1 \ 0 \ 1 \ 0 \ 1 \ 0$".
 +
 
 +
*Thus,&nbsp; this exercise is based on the following parity-check equation:
 +
:$${ \boldsymbol{\rm H}}_{\rm A} =
 +
\begin{pmatrix}
 +
1 &1 &0 &1 &0 &0\\
 +
1 &0 &1 &0 &1 &0\\ 
 +
0 &1 &1 &0 &0 &1
 +
\end{pmatrix}\hspace{0.05cm}.$$
 +
 
 +
*In the diagram,&nbsp; the parity-check equations are illustrated as red&nbsp; (row 1),&nbsp; green&nbsp; (row 2)&nbsp; resp. blue&nbsp; (row 3)&nbsp; groupings.
 +
 
 +
 
 +
 
 +
'''(3)'''&nbsp; Correct are the&nbsp; <u>solutions 1 and 3</u>:
 +
* The&nbsp; $\mathbf{H}$&nbsp; matrix ends with a&nbsp; $3 &times 3$&nbsp; diagonal matrix &nbsp; &#8658; &nbsp; systematic code.
 +
 
 +
* Thus,&nbsp; the Hamming weights of the last three columns are&nbsp; $w_{\rm C}(4) = w_{\rm C}(5) = w_{\rm C}(6) = 1$.
 +
 +
* For the first three columns,&nbsp; $w_{\rm C}(1) = w_{\rm C}(2) = w_{\rm C}(3) = 2$ &nbsp; &#8658; &nbsp; irregular code.
 +
 
 +
* The three matrix rows are linearly independent.&nbsp;
 +
 
 +
*Thus&nbsp; $k = n - m = 6 - 3 = 3$&nbsp; and&nbsp; $R = k/n = 1/2$&nbsp; holds.
 +
 
 +
 
 +
 
 +
[[File: P_ID3074__KC_A_4_12d_v1.png|right|frame|Modified Tanner graph for code&nbsp; $\rm B$]] 
 +
'''(4)'''&nbsp; Correct is the&nbsp; <u>proposed solution 1</u>:
 +
*Looking at the previous Tanner  graph,&nbsp; one can see the correctness of the proposed solution 1.
 +
 +
*By adding the row&nbsp; "$0 \ 0 \ 0 \ 1 \ 1 \ 1$"&nbsp; to the&nbsp; $\mathbf{H}_{\rm A}$&nbsp; matrix,&nbsp; one obtains:
 +
:$${ \boldsymbol{\rm H}}_{\rm B} =
 +
\begin{pmatrix}
 +
1 &1 &0 &1 &0 &0\\
 +
1 &0 &1 &0 &1 &0\\ 
 +
0 &1 &1 &0 &0 &1\\
 +
                0 &0 &0 &1 &1 &1
 +
\end{pmatrix}\hspace{0.05cm}.$$
 +
 
 +
:The modifications are marked in red in the adjacent graphic.
 +
 
 +
*Due to the newly added check node&nbsp; $C_4$&nbsp; and the connections with&nbsp; $V_4, \ V_5$ and $V_6$,&nbsp; there are now
 +
:* from all variable nodes&nbsp; $V_i$&nbsp; two lines,&nbsp; and
 +
 
 +
:* from all check nodes&nbsp; $C_j$&nbsp; uniformly four.
 +
*This is the condition for the code&nbsp; $\rm B$&nbsp; to be regular.
 +
 
 +
 
 +
 
 +
'''(5)'''&nbsp; Correct are the&nbsp; <u>solutions 2 and 3</u>:
 +
*The construction in subtask&nbsp; '''(4)'''&nbsp; yields a regular code.
 +
 +
*The Hamming weights of the rows and columns,&nbsp; respectively,&nbsp; are $w_{\rm R} = 3$&nbsp; and&nbsp; $w_{\rm C} = 2$.
 +
*This gives as lower bound for the code rate:
 +
:$$R \ge 1 - \frac{w_{\rm C}}{w_{\rm R}}
 +
= 1 - {2}/{3} = 1/3
 +
\hspace{0.05cm}.$$
 +
*The&nbsp; $\mathbf{H}$&nbsp; manipulation does not change the generator matrix&nbsp; $\mathbf{G}$.
 +
 +
*The same code is still sent with code rate&nbsp; $R = 1/2$.
 
{{ML-Fuß}}
 
{{ML-Fuß}}
  
  
  
[[Category:Aufgaben zu  Kanalcodierung|^4.4 Grundlegendes zu den Low–density Parity–check Codes^]]
+
[[Category:Channel Coding: Exercises|^4.4 Low–density Parity–check Codes^]]

Latest revision as of 17:39, 17 December 2022

Tanner graph for code  $\rm A$

Shown is a Tanner graph of a code  $\rm A$  with

  • the  variable nodes  $V_1, \hspace{0.05cm} \text{...} \hspace{0.05cm} , \ V_6$, . where  $V_i$  denotes the  $i$th  code word bit  $($whether information bit or parity bit$)$  and corresponds to the  $i$th  column of the parity-check matrix;
  • the  check nodes  $C_1, \hspace{0.05cm} \text{...} \hspace{0.05cm} , \ C_3$,  which represent the rows of the  $\mathbf{H}_{\rm A}$  matrix and hence the parity-check equations.


An edge between  $V_i$  and  $C_j$  indicates that the  $i$th  code word symbol is involved in the  $j$th  parity-check equation.  In this case,  the element  $h_{j,\hspace{0.05cm}i}$  of the parity-check matrix is equal  $1$.

In this exercise, the relation between the above Tanner graph  $($valid for the code  $\rm A)$  and the matrix  $\mathbf{H}_{\rm A}$  shall be given. 

In addition,  the Tanner graph to a parity-check matrix  $\mathbf{H}_{\rm B}$  shall be set up,  resulting from  $\mathbf{H}_{\rm A}$  adding another row.  This is to be determined so that the associated code  $\rm B$  is regular.  This means:

  • From all  variable nodes  $V_i$  $($with  $1 ≤ i ≤ n)$  go off an equal number of edges, 
    likewise from all  check nodes  $C_j$  $($with  $1 ≤ j ≤ m)$.
  • The Hamming weights of all rows of  $\mathbf{H}_{\rm B}$  are each said to be equal  $(w_{\rm R})$,  as are the Hamming weights of all columns  $(w_{\rm C})$.
  • For the rate of the regular code $\rm B$  to be constructed,  the following lower bound then applies:
$$R \ge 1 - \frac{w_{\rm C}}{w_{\rm R}} \hspace{0.05cm}.$$



Hints:



Questions

1

How many rows  $(m)$  and columns  $(n)$  does the parity-check matrix  $\mathbf{H}_{\rm A}$ have?

$m \hspace{0.18cm} = \ $

$n \hspace{0.3cm} = \ $

2

Which statements are true based on the Tanner graph?

The row 1 of the  $\mathbf{H}_{\rm A}$  matrix is  "$1 \ 1 \ 0 \ 1 \ 0 \ 0$".
The row 2 of the  $\mathbf{H}_{\rm A}$  matrix is  "$1 \ 0 \ 1 \ 0 \ 0 \ 1$".
The row 3 of the  $\mathbf{H}_{\rm A}$  matrix is  "$0 \ 1 \ 1 \ 0 \ 0 \ 1$".

3

What are the properties of code  $\rm A$ ?

The code is systematic.
The code is regular.
The code rate is  $R = 1/2$.
The code rate is  $R = 1/3$.

4

The matrix  $\mathbf{H}_{\rm B}$  is obtained from  $\mathbf{H}_{\rm A}$  by adding one more row.  By which fourth row does a regular code  $\rm B$  result?

By adding "$0 \ 0 \ 0 \ 1 \ 1 \ 1$".
By adding "$1 \ 1 \ 1 \ 1 \ 1 \ 1$".
By adding any other row.

5

What are the properties of code  $\rm B$?

The code is systematic.
The code is regular.
The code rate is  $R = 1/2$.
The code rate is  $R = 1/3$.


Solutiojn

(1)  The number of  $\mathbf{H}_{\rm A}$  rows is equal to the number of check nodes  $C_j$  in the Tanner graph   ⇒   $\underline{m = 3}$, 
and the number  $\underline{n = 6}$  of variable nodes  $V_i$  is equal to the column number.


Underlying parity-check equations

(2)  Correct are the  answers 1 and 3  in contrast to statement 2:

  • The second  $\mathbf{H}_{\rm A}$  row is rather  "$1 \ 0 \ 1 \ 0 \ 1 \ 0$".
  • Thus,  this exercise is based on the following parity-check equation:
$${ \boldsymbol{\rm H}}_{\rm A} = \begin{pmatrix} 1 &1 &0 &1 &0 &0\\ 1 &0 &1 &0 &1 &0\\ 0 &1 &1 &0 &0 &1 \end{pmatrix}\hspace{0.05cm}.$$
  • In the diagram,  the parity-check equations are illustrated as red  (row 1),  green  (row 2)  resp. blue  (row 3)  groupings.


(3)  Correct are the  solutions 1 and 3:

  • The  $\mathbf{H}$  matrix ends with a  $3 × 3$  diagonal matrix   ⇒   systematic code.
  • Thus,  the Hamming weights of the last three columns are  $w_{\rm C}(4) = w_{\rm C}(5) = w_{\rm C}(6) = 1$.
  • For the first three columns,  $w_{\rm C}(1) = w_{\rm C}(2) = w_{\rm C}(3) = 2$   ⇒   irregular code.
  • The three matrix rows are linearly independent. 
  • Thus  $k = n - m = 6 - 3 = 3$  and  $R = k/n = 1/2$  holds.


Modified Tanner graph for code  $\rm B$

(4)  Correct is the  proposed solution 1:

  • Looking at the previous Tanner graph,  one can see the correctness of the proposed solution 1.
  • By adding the row  "$0 \ 0 \ 0 \ 1 \ 1 \ 1$"  to the  $\mathbf{H}_{\rm A}$  matrix,  one obtains:
$${ \boldsymbol{\rm H}}_{\rm B} = \begin{pmatrix} 1 &1 &0 &1 &0 &0\\ 1 &0 &1 &0 &1 &0\\ 0 &1 &1 &0 &0 &1\\ 0 &0 &0 &1 &1 &1 \end{pmatrix}\hspace{0.05cm}.$$
The modifications are marked in red in the adjacent graphic.
  • Due to the newly added check node  $C_4$  and the connections with  $V_4, \ V_5$ and $V_6$,  there are now
  • from all variable nodes  $V_i$  two lines,  and
  • from all check nodes  $C_j$  uniformly four.
  • This is the condition for the code  $\rm B$  to be regular.


(5)  Correct are the  solutions 2 and 3:

  • The construction in subtask  (4)  yields a regular code.
  • The Hamming weights of the rows and columns,  respectively,  are $w_{\rm R} = 3$  and  $w_{\rm C} = 2$.
  • This gives as lower bound for the code rate:
$$R \ge 1 - \frac{w_{\rm C}}{w_{\rm R}} = 1 - {2}/{3} = 1/3 \hspace{0.05cm}.$$
  • The  $\mathbf{H}$  manipulation does not change the generator matrix  $\mathbf{G}$.
  • The same code is still sent with code rate  $R = 1/2$.