Difference between revisions of "Aufgaben:Exercise 1.08: Identical Codes"

From LNTwww
m (Text replacement - "„" to """)
 
(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_ID2393__KC_A_1_8_neu.png|right|frame|Zuordnung des  $(6, 3)$–Blockcodes]]
+
[[File:P_ID2393__KC_A_1_8_neu.png|right|frame|Assignment of the  $(6, 3)$  block code]]
  
Wir betrachten einen Blockcode  $\mathcal{C}$, der durch folgende Generatormatrix beschrieben wird:
+
We consider a block code  $\mathcal{C}$  described by the following generator matrix:
  
 
:$${ \boldsymbol{\rm G}} = \begin{pmatrix} 0 &0 &1 &0 &1 &1\\ 1 &0 &0 &1 &1 &0\\ 0 &1 &1 &1 &1 &0 \end{pmatrix} \hspace{0.05cm}.$$
 
:$${ \boldsymbol{\rm G}} = \begin{pmatrix} 0 &0 &1 &0 &1 &1\\ 1 &0 &0 &1 &1 &0\\ 0 &1 &1 &1 &1 &0 \end{pmatrix} \hspace{0.05cm}.$$
  
Die Zuordnung zwischen den Informationsworten  $\underline{u}$  und den Codeworten  $\underline{x}$  kann der Tabelle entnommen werden. Man erkennt, dass es sich dabei nicht um einen systematischen Code handelt.
+
The mapping between the information words  $\underline{u}$  and the code words  $\underline{x}$  can be seen in the table.  It can be seen that this is not a  "systematic code".
  
Durch Manipulation der Generatormatrix  $\boldsymbol {\rm G}$  lassen sich daraus identische Codes konstruieren. Darunter versteht man Codes mit gleichen Codeworten, jedoch unterschiedlicher Zuordnung  $\underline{u} \rightarrow \underline{x}$.  
+
By manipulating the generator matrix  $\boldsymbol {\rm G}$,  identical codes can be constructed from it.  This refers to codes with the same code words but different assignments  $\underline{u} \rightarrow \underline{x}$.  
  
Folgende Operationen sind erlaubt, um einen identischen Code zu erhalten:
+
The following operations are allowed to obtain identical code:
  
*Vertauschen oder Permutieren der Zeilen,
+
*swapping or permuting the rows,
*Multiplizieren aller Zeilen mit einem konstanten Vektor ungleich  $0$,
 
*Ersetzen einer Zeile durch eine Linearkombination zwischen dieser Zeile und einer anderen.
 
  
 +
*Multiplying all rows by a constant vector not equal to  "$\underline{0}$".
  
Für den in der Teilaufgabe '''(3)''' gesuchten Code  $\mathcal{C}_{\rm sys}$  mit Generatormatrix  $\boldsymbol{\rm G}_{\rm sys}$  wird weiter gefordert, dass er systematisch ist.
+
*Replacing a row with a linear combination between this row and another one.
  
  
 +
For the code  $\mathcal{C}_{\rm sys}$  sought in subtask  '''(3)'''   it is further required to be systematic   ⇒    generator matrix  $\boldsymbol{\rm G}_{\rm sys}$.
  
  
  
 +
Hints:
  
 +
*This exercise belongs to the chapter  [[Channel_Coding/General_Description_of_Linear_Block_Codes|"General Description of Linear Block Codes"]].
  
 +
*Reference is made in particular to the section  [[Channel_Coding/General_Description_of_Linear_Block_Codes#Systematic_Codes|"Systematic Codes"]].
  
''Hinweise'' :
+
*Reference is also made to the so-called  "Singleton bound". 
  
*Die Aufgabe gehört zum Kapitel  [[Channel_Coding/Allgemeine_Beschreibung_linearer_Blockcodes|Allgemeine Beschreibung linearer Blockcodes]].
+
*This states that the minimum Hamming distance of a  $(n, k)$  block code is upper bounded:   $d_{\rm min} \le n - k +1.$
*Bezug genommen wird insbesondere auf die Seite  [[Channel_Coding/Allgemeine_Beschreibung_linearer_Blockcodes#Systematische_Codes|Systematische Codes]].
 
*Bezug genommen wird zudem auf die so genannte  ''Singleton–Schranke''. Diese besagt, dass die minimale Hamming–Distanz eines  $(n, k)$–Blockcodes nach oben beschränkt ist:   $d_{\rm min} \le n - k +1.$
 
 
   
 
   
  
Line 39: Line 40:
  
  
===Fragebogen===
+
===Questions===
  
 
<quiz display=simple>
 
<quiz display=simple>
{Geben Sie die Kenngrößen des gegebenen Codes&nbsp; $\mathcal{C}$&nbsp; an.
+
{Give the characteristics of the given code&nbsp; $\mathcal{C}$&nbsp;.
 
|type="{}"}
 
|type="{}"}
 
$n \hspace{0.3cm} = \ $ { 6 }
 
$n \hspace{0.3cm} = \ $ { 6 }
Line 51: Line 52:
 
$d_{\rm min} \hspace{0.01cm} = \ $ { 3 }
 
$d_{\rm min} \hspace{0.01cm} = \ $ { 3 }
  
{Gibt es einen&nbsp; $(6, 3)$–Blockcode mit größerer Minimaldistanz?
+
{Is there any&nbsp; $(6, 3)$&nbsp; block code with larger minimum distance?
 
|type="()"}
 
|type="()"}
+ Ja.
+
+ Yes.
- Nein.
+
- No.
  
{Wie lautet die Generatormatrix&nbsp; ${\boldsymbol{\rm G}}_{\rm sys}$&nbsp; des identischen systematischen Codes?
+
{What is the generator matrix&nbsp; ${\boldsymbol{\rm G}}_{\rm sys}$&nbsp; of the identical systematic code?
 
|type="[]"}
 
|type="[]"}
- Die 1. Zeile lautet &nbsp; "$1 \ 0 \ 1 \ 1 \ 0 \ 1$".
+
- The 1st row is &nbsp; "$1 \ 0 \ 1 \ 1 \ 0 \ 1$".
+ Die 2. Zeile lautet &nbsp;  "$0 \ 1 \ 0 \ 1 \ 0 \ 1$".
+
+ The 2nd row is &nbsp;  "$0 \ 1 \ 0 \ 1 \ 0 \ 1$".
+ Die 3. Zeile lautet &nbsp;  "$0 \ 0 \ 1 \ 0 \ 1 \ 1$".
+
+ The 3rd row is &nbsp;  "$0 \ 0 \ 1 \ 0 \ 1 \ 1$".
  
{Welche Zuordnungen ergeben sich bei dieser Codierung?
+
{What assignments result from this coding?
 
|type="[]"}
 
|type="[]"}
 
+ $\underline{u} = (0, 0, 0)  \ \Rightarrow \  \underline{x}_{\rm sys} = (0, 0, 0, 0, 0, 0)$.
 
+ $\underline{u} = (0, 0, 0)  \ \Rightarrow \  \underline{x}_{\rm sys} = (0, 0, 0, 0, 0, 0)$.
Line 69: Line 70:
  
  
{Welche Prüfbits hat der systematische Code&nbsp; $\underline{x}_{\rm sys} = (u_{1}, u_{2}, u_{3}, p_{1}, p_{2}, p_{3})$?
+
{Which parity bits has the systematic code&nbsp; $\underline{x}_{\rm sys} = (u_{1},\ u_{2},\ u_{3},\ p_{1},\ p_{2},\ p_{3})$?
 
|type="[]"}
 
|type="[]"}
 
+$p_{1} = u_{1} \oplus u_{2},$
 
+$p_{1} = u_{1} \oplus u_{2},$
Line 79: Line 80:
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''(1)'''&nbsp; Der vorgegebene Code $\mathcal{C}$ wird durch folgende Kenngrößen charakterisiert:
+
'''(1)'''&nbsp; The given code&nbsp; $\mathcal{C}$&nbsp;is characterized by the following parameters:
*Bitanzahl der Codeworte:&nbsp; $\underline{n = 6}$,
+
*Number of bits of the code words:&nbsp; $\underline{n = 6}$,
*Bitanzahl der Informationsworte:&nbsp; $\underline{k = 3}$,
 
*Anzahl der Prüfbitgleichungen:&nbsp; $\underline{m = n - k = 3}$,
 
*Coderate:&nbsp; $R = k/n = 3/6 \Rightarrow  \underline{R = 0.5}$,
 
*Anzahl der Codeworte (Codeumfang):&nbsp; $|\mathcal{C}| = 2^k  \Rightarrow  \underline{|C| = 8}$,
 
*minimale Hamming–Distanz (siehe Tabelle):&nbsp; $\underline{d}_{\rm min} \underline{= 3}$.
 
  
 +
*Number of bits of the information words:&nbsp; $\underline{k = 3}$,
  
 +
*Number of parity bit equations:&nbsp; $\underline{m = n - k = 3}$,
  
'''(2)'''&nbsp; Richtig ist $\underline{\rm JA}$:
+
*Code rate:&nbsp; $R = k/n = 3/6 \Rightarrow  \underline{R = 0.5}$,
*Nach der Singleton–Schranke gilt $d_{\rm min} ≤ n – k + 1$. Mit $n = 6$ und $k = 3$ erhält man hierfür $d_{\rm min} ≤ 4$.
 
*Es kann also durchaus ein (6, 3)–Blockcode mit größerer Minimaldistanz konstruiert werden. Wie ein solcher Code aussieht, wurde freundlicherweise nicht gefragt.
 
  
 +
*Number of code words&nbsp; (code size):&nbsp; $|\mathcal{C}| = 2^k  \Rightarrow  \underline{|C| = 8}$,
  
Die Minimaldistanz aller Hamming–Codes ist $d_{\rm min} = 3$, und nur der Sonderfall mit $n = 3$ und $k = 1$ erreicht den Grenzwert. Dagegen erreichen das Maximum entsprechend der Singleton–Schranke:
+
*minimum Hamming distance (see table):&nbsp; $\underline{d}_{\rm min} \underline{= 3}$.
  
*alle [[Channel_Coding/Beispiele_binärer_Blockcodes#Wiederholungscodes|Wiederholungscodes]] (''Repetition Codes'', RC) wegen $k = 1$und $d_{\rm min} = n$; hierzu gehört auch der (3, 1)–Hamming–Code, der ja bekannterweise identisch ist mit RC (3, 1),
 
  
*alle [[Channel_Coding/Beispiele_binärer_Blockcodes#Single_Parity.E2.80.93check_Codes|Single Parity–check Codes]] (SPC): $k = n 1, d_{\rm min} = 2$.
+
 
 +
'''(2)'''&nbsp; Correct is $\underline{\rm Yes}$:
 +
*According to the singleton bound &nbsp; &rArr; &nbsp;  $d_{\rm min} ≤ n - k + 1$.&nbsp; With&nbsp; $n = 6$&nbsp; and&nbsp; $k = 3$&nbsp; one obtains $d_{\rm min} ≤ 4$.
 +
 +
*It is thus quite possible to construct a&nbsp; $(6, 3)$&nbsp; block code with larger minimal distance.&nbsp; How such a code looks,&nbsp; was kindly not asked.
 +
 
 +
 
 +
The minimum distance of all Hamming codes is&nbsp; $d_{\rm min} = 3$,&nbsp; and only the special case with&nbsp; $n = 3$&nbsp; and&nbsp; $k = 1$&nbsp; reaches the limit.&nbsp; In contrast,&nbsp; the maximum reach according to the Singleton bound:
 +
 
 +
*all&nbsp; [[Channel_Coding/Examples_of_Binary_Block_Codes#Repetition_Codes|repetition codes]]&nbsp; $\rm (RC)$&nbsp; because&nbsp; $k = 1$&nbsp; and&nbsp; $d_{\rm min} = n$;&nbsp; this includes the&nbsp; $\rm (3, 1)$&nbsp; Hamming code,&nbsp; which is known to be identical to&nbsp; $\rm RC\ (3, 1)$,
 +
 
 +
*all&nbsp; [[Channel_Coding/Examples_of_Binary_Block_Codes#Single_Parity-check_Codes|single parity–check codes]]&nbsp; $\rm (SPC)$:&nbsp; $k = n - 1,d_{\rm min} = 2$.
  
  
  
'''(3)'''&nbsp; Richtig sind die <u>Lösungsvorschläge 2 und 3</u>:
+
'''(3)'''&nbsp; Correct are th&nbsp;e <u>solutions 2 and 3</u>:
*Vertauscht man Zeilen in der Generatormatrix $\boldsymbol {\rm G}$, so kommt man zu einem identischen Code $\mathcal{C}'$. Das heißt: Die Codes $\mathcal{C}$ und $\mathcal{C}'$ beinhalten die genau gleichen Codeworte.  
+
*If we swap rows in the generator matrix&nbsp; $\boldsymbol {\rm G}$,&nbsp; we arrive at an identical code&nbsp; $\mathcal{C}'$.&nbsp; That is,&nbsp; the codes&nbsp; $\mathcal{C}$&nbsp; and&nbsp; $\mathcal{C}'$&nbsp; contain the exact same code words.
*Beispielsweise erhält man nach zyklischem Zeilentausch $2 \rightarrow 1, 3 \rightarrow 2$ und $1 \rightarrow 3$ die neue Matrix
+
 +
*For example,&nbsp; after cyclic row swapping&nbsp; $2 \rightarrow 1,\ 3 \rightarrow 2$,&nbsp; and&nbsp; $1 \rightarrow 3$,&nbsp; one obtains the new matrix
  
 
:$${ \boldsymbol{\rm G}}' = \begin{pmatrix} 1 &0 &0 &1 &1 &0\\ 0 &1 &1 &1 &1 &0\\ 0 &0 &1 &0 &1 &1 \end{pmatrix} \hspace{0.05cm}.$$
 
:$${ \boldsymbol{\rm G}}' = \begin{pmatrix} 1 &0 &0 &1 &1 &0\\ 0 &1 &1 &1 &1 &0\\ 0 &0 &1 &0 &1 &1 \end{pmatrix} \hspace{0.05cm}.$$
  
*Die erste und die letzte Zeile der neuen Matrix entsprechen schon den Vorgaben eines systematischen Codes, nämlich, dass deren Generatormatrix ${ \boldsymbol{\rm G}_{\rm sys}}$ mit einer Diagonalmatrix beginnen muss.  
+
*The first and the last row of the new matrix already comply with the requirements of a systematic code &nbsp; &rArr; &nbsp; matrix ${ \boldsymbol{\rm G}_{\rm sys}}$ must start with a diagonal matrix.
*Ersetzt man die Zeile 2 durch die Modulo–2–Summe von Zeile 2 und 3, so erhält man:
+
 +
*Replacing row 2 by the modulo 2 sum of rows 2 and 3, we get:
  
 
:$${ \boldsymbol{\rm G}}_{\rm sys} = \begin{pmatrix} 1 &0 &0 &1 &1 &0\\ 0 &1 &0 &1 &0 &1\\ 0 &0 &1 &0 &1 &1 \end{pmatrix} \hspace{0.05cm}.$$
 
:$${ \boldsymbol{\rm G}}_{\rm sys} = \begin{pmatrix} 1 &0 &0 &1 &1 &0\\ 0 &1 &0 &1 &0 &1\\ 0 &0 &1 &0 &1 &1 \end{pmatrix} \hspace{0.05cm}.$$
  
*Dieser systematische Code beinhaltet genau die gleichen Codeworte wie die Codes $\mathcal{C}$ und $\mathcal{C}'$.
+
*This systematic code contains exactly the same code words as the codes&nbsp; $\mathcal{C}$&nbsp; and&nbsp; $\mathcal{C}'$.
 +
 
 +
 
  
 +
'''(4)'''&nbsp; Correct are the&nbsp; <u>solutions 1 and 2</u>:
 +
*Applying the equation&nbsp; $\underline{x}_{\rm sys} = \underline{u} \cdot \boldsymbol{\rm G}_{\rm sys}$&nbsp; to the above examples,&nbsp; we see that the first two statements are correct,&nbsp; but not the last one.
 +
*Without calculation one comes to the same result,&nbsp; if one considers that
  
 +
:*the systematic code word&nbsp; $\underline{x}_{\rm sys}$&nbsp; must start with&nbsp; $\underline{u}$,
 +
:*the code&nbsp; $\mathcal{C}_{\rm sys}$&nbsp; contains the same code words as the given code&nbsp; $\mathcal{C}$.
  
'''(4)'''&nbsp; Richtig sind die <u>Lösungsvorschläge 1 und 2</u>:
+
*For&nbsp; $\underline{u} = (0, 1, 0)$,&nbsp; the code word is thus&nbsp; $(0, 1, 0, ?, ?, ?)$.&nbsp;
*Wendet man die Gleichung $\underline{x}_{\rm sys} = \underline{u} \cdot \boldsymbol{\rm G}_{\rm sys}$ auf die obigen Beispiele an, so erkennt man, dass die beiden ersten Aussagen richtig sind, nicht aber die letzte.
 
*Ohne Rechnung kommt man zum gleichen Ergebnis, wenn man berücksichtigt, dass
 
  
:*das systematische Codewort $\underline{x}_{\rm sys}$ mit $\underline{u}$ beginnen muss,
+
*A comparison with the code table of&nbsp; $\mathcal{C}$&nbsp; in the information section leads to&nbsp; $\underline{x}_{\rm sys} = (0, 1, 0, 1, 0, 1)$.
:*der Code $\mathcal{C}_{\rm sys}$ die gleichen Codeworte beinhaltet wie der vorgegebene Code ''\mathcal{C}''.
 
  
*Für $\underline{u} = (0, 1, 0)$ lautet somit das Codewort $(0, 1, 0, ?, ?, ?)$. Ein Vergleich mit der Codetabelle von $\mathcal{C}$ auf der Angabenseite führt zu $\underline{x}_{\rm sys} = (0, 1, 0, 1, 0, 1)$.
 
  
  
 +
'''(5)'''&nbsp; Only&nbsp; <u>statement 1</u> is correct.&nbsp; The statements for&nbsp; $p_{2}$&nbsp; and&nbsp; $p_{3}$,&nbsp; on the other hand,&nbsp; are exactly reversed.
  
'''(5)'''&nbsp; Richtig ist nur die <u>Aussage 1</u>. Die Angaben für $p_{2}$ und $p_{3}$ sind dagegen genau vertauscht.
+
*With systematic coding,&nbsp; the following relationship exists between the generator matrix and the parity-check matrix:  
*Bei systematischer Codierung besteht folgender Zusammenhang zwischen Generator– und Prüfmatrix:  
 
  
 
:$${ \boldsymbol{\rm G}} =\left({ \boldsymbol{\rm I}}_k \: ; \:{ \boldsymbol{\rm P}} \right) \hspace{0.3cm}\Leftrightarrow \hspace{0.3cm} { \boldsymbol{\rm H}} =\left({ \boldsymbol{\rm P}}^{\rm T}\: ; \:{ \boldsymbol{\rm I}}_m \right) \hspace{0.05cm}.$$
 
:$${ \boldsymbol{\rm G}} =\left({ \boldsymbol{\rm I}}_k \: ; \:{ \boldsymbol{\rm P}} \right) \hspace{0.3cm}\Leftrightarrow \hspace{0.3cm} { \boldsymbol{\rm H}} =\left({ \boldsymbol{\rm P}}^{\rm T}\: ; \:{ \boldsymbol{\rm I}}_m \right) \hspace{0.05cm}.$$
  
[[File:P_ID2395__KC_A_1_8_ML.png|right|frame|Schaubild der Prüfgleichungen]]
+
[[File:P_ID2395__KC_A_1_8_ML.png|right|frame|Chart of parity-check equations]]
*Angewendet auf das aktuelle Beispiel erhält man so:
+
*Applied to the current example,&nbsp; we obtain thus:
  
 
:$${ \boldsymbol{\rm G}}_{\rm sys} = \begin{pmatrix} 1 &0 &0 &1 &1 &0\\ 0 &1 &0 &1 &0 &1\\ 0 &0 &1 &0 &1 &1 \end{pmatrix} \hspace{0.3cm} \Rightarrow\hspace{0.3cm} { \boldsymbol{\rm H}}_{\rm sys} = \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}.$$
 
:$${ \boldsymbol{\rm G}}_{\rm sys} = \begin{pmatrix} 1 &0 &0 &1 &1 &0\\ 0 &1 &0 &1 &0 &1\\ 0 &0 &1 &0 &1 &1 \end{pmatrix} \hspace{0.3cm} \Rightarrow\hspace{0.3cm} { \boldsymbol{\rm H}}_{\rm sys} = \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}.$$
  
Daraus ergeben sich Prüfgleichungen (siehe Grafik):
+
*This results in parity-check equations&nbsp; (see graph):
 
:$$u_1 \oplus u_2 \oplus p_1 \hspace{-0.15cm} \ = \ \hspace{-0.15cm}0 \hspace{0.3cm} \Rightarrow\hspace{0.3cm} p_1 = u_1 \oplus u_2 \hspace{0.05cm},$$
 
:$$u_1 \oplus u_2 \oplus p_1 \hspace{-0.15cm} \ = \ \hspace{-0.15cm}0 \hspace{0.3cm} \Rightarrow\hspace{0.3cm} p_1 = u_1 \oplus u_2 \hspace{0.05cm},$$
 
:$$ u_1 \oplus u_3 \oplus p_2 \hspace{-0.15cm} \ = \ \hspace{-0.15cm} 0 \hspace{0.3cm} \Rightarrow\hspace{0.3cm} p_2 = u_1 \oplus u_3 \hspace{0.05cm},$$
 
:$$ u_1 \oplus u_3 \oplus p_2 \hspace{-0.15cm} \ = \ \hspace{-0.15cm} 0 \hspace{0.3cm} \Rightarrow\hspace{0.3cm} p_2 = u_1 \oplus u_3 \hspace{0.05cm},$$
Line 150: Line 162:
  
  
[[Category:Channel Coding: Exercises|^1.4 Beschreibung linearer Blockcodes
+
[[Category:Channel Coding: Exercises|^1.4 Linear Block Code Description
  
 
^]]
 
^]]

Latest revision as of 18:00, 23 January 2023

Assignment of the  $(6, 3)$  block code

We consider a block code  $\mathcal{C}$  described by the following generator matrix:

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

The mapping between the information words  $\underline{u}$  and the code words  $\underline{x}$  can be seen in the table.  It can be seen that this is not a  "systematic code".

By manipulating the generator matrix  $\boldsymbol {\rm G}$,  identical codes can be constructed from it.  This refers to codes with the same code words but different assignments  $\underline{u} \rightarrow \underline{x}$.

The following operations are allowed to obtain identical code:

  • swapping or permuting the rows,
  • Multiplying all rows by a constant vector not equal to  "$\underline{0}$".
  • Replacing a row with a linear combination between this row and another one.


For the code  $\mathcal{C}_{\rm sys}$  sought in subtask  (3)  it is further required to be systematic   ⇒   generator matrix  $\boldsymbol{\rm G}_{\rm sys}$.


Hints:

  • Reference is also made to the so-called  "Singleton bound". 
  • This states that the minimum Hamming distance of a  $(n, k)$  block code is upper bounded:   $d_{\rm min} \le n - k +1.$



Questions

1

Give the characteristics of the given code  $\mathcal{C}$ .

$n \hspace{0.3cm} = \ $

$k \hspace{0.3cm} = \ $

$m \hspace{0.15cm} = \ $

$R \hspace{0.2cm} = \ $

$|\hspace{0.05cm}\mathcal{C}\hspace{0.05cm}| \hspace{-0.05cm} = \ $

$d_{\rm min} \hspace{0.01cm} = \ $

2

Is there any  $(6, 3)$  block code with larger minimum distance?

Yes.
No.

3

What is the generator matrix  ${\boldsymbol{\rm G}}_{\rm sys}$  of the identical systematic code?

The 1st row is   "$1 \ 0 \ 1 \ 1 \ 0 \ 1$".
The 2nd row is   "$0 \ 1 \ 0 \ 1 \ 0 \ 1$".
The 3rd row is   "$0 \ 0 \ 1 \ 0 \ 1 \ 1$".

4

What assignments result from this coding?

$\underline{u} = (0, 0, 0) \ \Rightarrow \ \underline{x}_{\rm sys} = (0, 0, 0, 0, 0, 0)$.
$\underline{u} = (0, 0, 1) \ \Rightarrow \ \underline{x}_{\rm sys}= (0, 0, 1, 0, 0, 1)$.
$\underline{u} = (0, 1, 0) \ \Rightarrow \ \underline{x}_{\rm sys} = (0, 1, 0, 1, 1, 0)$.

5

Which parity bits has the systematic code  $\underline{x}_{\rm sys} = (u_{1},\ u_{2},\ u_{3},\ p_{1},\ p_{2},\ p_{3})$?

$p_{1} = u_{1} \oplus u_{2},$
$p_{2} = u_{2} \oplus u_{3},$
$p_{3} = u_{1} \oplus u_{3}.$


Solution

(1)  The given code  $\mathcal{C}$ is characterized by the following parameters:

  • Number of bits of the code words:  $\underline{n = 6}$,
  • Number of bits of the information words:  $\underline{k = 3}$,
  • Number of parity bit equations:  $\underline{m = n - k = 3}$,
  • Code rate:  $R = k/n = 3/6 \Rightarrow \underline{R = 0.5}$,
  • Number of code words  (code size):  $|\mathcal{C}| = 2^k \Rightarrow \underline{|C| = 8}$,
  • minimum Hamming distance (see table):  $\underline{d}_{\rm min} \underline{= 3}$.


(2)  Correct is $\underline{\rm Yes}$:

  • According to the singleton bound   ⇒   $d_{\rm min} ≤ n - k + 1$.  With  $n = 6$  and  $k = 3$  one obtains $d_{\rm min} ≤ 4$.
  • It is thus quite possible to construct a  $(6, 3)$  block code with larger minimal distance.  How such a code looks,  was kindly not asked.


The minimum distance of all Hamming codes is  $d_{\rm min} = 3$,  and only the special case with  $n = 3$  and  $k = 1$  reaches the limit.  In contrast,  the maximum reach according to the Singleton bound:

  • all  repetition codes  $\rm (RC)$  because  $k = 1$  and  $d_{\rm min} = n$;  this includes the  $\rm (3, 1)$  Hamming code,  which is known to be identical to  $\rm RC\ (3, 1)$,


(3)  Correct are th e solutions 2 and 3:

  • If we swap rows in the generator matrix  $\boldsymbol {\rm G}$,  we arrive at an identical code  $\mathcal{C}'$.  That is,  the codes  $\mathcal{C}$  and  $\mathcal{C}'$  contain the exact same code words.
  • For example,  after cyclic row swapping  $2 \rightarrow 1,\ 3 \rightarrow 2$,  and  $1 \rightarrow 3$,  one obtains the new matrix
$${ \boldsymbol{\rm G}}' = \begin{pmatrix} 1 &0 &0 &1 &1 &0\\ 0 &1 &1 &1 &1 &0\\ 0 &0 &1 &0 &1 &1 \end{pmatrix} \hspace{0.05cm}.$$
  • The first and the last row of the new matrix already comply with the requirements of a systematic code   ⇒   matrix ${ \boldsymbol{\rm G}_{\rm sys}}$ must start with a diagonal matrix.
  • Replacing row 2 by the modulo 2 sum of rows 2 and 3, we get:
$${ \boldsymbol{\rm G}}_{\rm sys} = \begin{pmatrix} 1 &0 &0 &1 &1 &0\\ 0 &1 &0 &1 &0 &1\\ 0 &0 &1 &0 &1 &1 \end{pmatrix} \hspace{0.05cm}.$$
  • This systematic code contains exactly the same code words as the codes  $\mathcal{C}$  and  $\mathcal{C}'$.


(4)  Correct are the  solutions 1 and 2:

  • Applying the equation  $\underline{x}_{\rm sys} = \underline{u} \cdot \boldsymbol{\rm G}_{\rm sys}$  to the above examples,  we see that the first two statements are correct,  but not the last one.
  • Without calculation one comes to the same result,  if one considers that
  • the systematic code word  $\underline{x}_{\rm sys}$  must start with  $\underline{u}$,
  • the code  $\mathcal{C}_{\rm sys}$  contains the same code words as the given code  $\mathcal{C}$.
  • For  $\underline{u} = (0, 1, 0)$,  the code word is thus  $(0, 1, 0, ?, ?, ?)$. 
  • A comparison with the code table of  $\mathcal{C}$  in the information section leads to  $\underline{x}_{\rm sys} = (0, 1, 0, 1, 0, 1)$.


(5)  Only  statement 1 is correct.  The statements for  $p_{2}$  and  $p_{3}$,  on the other hand,  are exactly reversed.

  • With systematic coding,  the following relationship exists between the generator matrix and the parity-check matrix:
$${ \boldsymbol{\rm G}} =\left({ \boldsymbol{\rm I}}_k \: ; \:{ \boldsymbol{\rm P}} \right) \hspace{0.3cm}\Leftrightarrow \hspace{0.3cm} { \boldsymbol{\rm H}} =\left({ \boldsymbol{\rm P}}^{\rm T}\: ; \:{ \boldsymbol{\rm I}}_m \right) \hspace{0.05cm}.$$
Chart of parity-check equations
  • Applied to the current example,  we obtain thus:
$${ \boldsymbol{\rm G}}_{\rm sys} = \begin{pmatrix} 1 &0 &0 &1 &1 &0\\ 0 &1 &0 &1 &0 &1\\ 0 &0 &1 &0 &1 &1 \end{pmatrix} \hspace{0.3cm} \Rightarrow\hspace{0.3cm} { \boldsymbol{\rm H}}_{\rm sys} = \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}.$$
  • This results in parity-check equations  (see graph):
$$u_1 \oplus u_2 \oplus p_1 \hspace{-0.15cm} \ = \ \hspace{-0.15cm}0 \hspace{0.3cm} \Rightarrow\hspace{0.3cm} p_1 = u_1 \oplus u_2 \hspace{0.05cm},$$
$$ u_1 \oplus u_3 \oplus p_2 \hspace{-0.15cm} \ = \ \hspace{-0.15cm} 0 \hspace{0.3cm} \Rightarrow\hspace{0.3cm} p_2 = u_1 \oplus u_3 \hspace{0.05cm},$$
$$ u_2 \oplus u_3 \oplus p_3 \hspace{-0.15cm} \ = \ \hspace{-0.15cm} 0 \hspace{0.3cm} \Rightarrow\hspace{0.3cm} p_3 = u_2 \oplus u_3 \hspace{0.05cm}.$$