Difference between revisions of "Aufgaben:Exercise 2.10: Reed-Solomon Error Detection"

From LNTwww
 
(41 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{quiz-Header|Buchseite=Kanalcodierung/Definition und Eigenschaften von Reed–Solomon–Codes}}
+
{{quiz-Header|Buchseite=Channel_Coding/Definition_and_Properties_of_Reed-Solomon_Codes}}
  
[[File: P_ID2524__KC_A_2_10.png|right|frame|Distanzspektren zweier Reed–Solomon–Codes]]
+
[[File: P_ID2524__KC_A_2_10.png|right|frame|Distance spectra of two <br>different Reed-Solomon codes]]
Bei einem linearen Blockcode können bis zu $e = d_{\rm min} - 1$ Fehler erkannt werden. Bei allen Reed&ndash;Solomon&ndash;Codes beträgt dabei die minimale Distanz
+
For a linear block code,&nbsp; up to &nbsp; $e = d_{\rm min} - 1$ &nbsp; errors can be detected.&nbsp; For all Reed&ndash;Solomon codes the minimum distance is
 
:$$d_{\rm min} = n-k+1  \hspace{0.05cm}.$$
 
:$$d_{\rm min} = n-k+1  \hspace{0.05cm}.$$
  
Man muss folgende Fälle unterscheiden:
+
One must distinguish the following cases:
* Treten nicht mehr als $e = n - k$ Symbolfehler auf, so wird der Block als fehlerhaft erkannt.
+
* If no more than&nbsp; $e = d_{\rm min} - 1= n - k$&nbsp; symbol errors occur,&nbsp; the block is always detected as faulty.
* Die Fehlererkennung kann auch bei mehr als $n - k$ Symbolfehlern noch funktionieren, und zwar dann, wenn das Empfangswort kein gültiges Codewort des Reed&ndash;Solomon&ndash;Codes ist:
+
 
:$$\underline {y} \notin C_{\rm RS} = \{ \underline {c}_{\hspace{0.05cm}0}, \hspace{0.05cm}... \hspace{0.05cm}, \underline {c}_i,  \hspace{0.05cm}... \hspace{0.05cm},  \underline {c}_{\hspace{0.05cm}n -1} \}
+
* Error detection can still work even if more than&nbsp; $n - k$&nbsp; symbol errors occur.&nbsp; This is when the received word is not a valid code word of the Reed&ndash;Solomon code:
 +
:$$\underline {y} \notin C_{\rm RS} = \{ \underline {c}_{\hspace{0.05cm}0}, \hspace{0.05cm}\text{...} \hspace{0.1cm}, \underline {c}_i,  \hspace{0.05cm}\text{...} \hspace{0.1cm},  \underline {c}_{\hspace{0.05cm}n -1} \}
 
  \hspace{0.05cm}. $$
 
  \hspace{0.05cm}. $$
* Ist aber das verfälschte Empfangswort $(\underline{y} &ne; \underline{c})$ ein gültiges Codewort &nbsp;&#8658;&nbsp; $\underline{y}$, so bleibt bei der Decodierung der fehlerhafte Block unentdeckt. Wir definieren als Blockfehlerwahrscheinlichkeit.
+
* However,&nbsp; if the falsified received word&nbsp; $(\underline{y} &ne; \underline{c})$&nbsp; is a valid code word&nbsp; $(\underline{y\in C_{\rm RS}})$,&nbsp; the decoding process will leave the falsified block undetected.  
:$${\rm Pr}({\rm Blockfehler}) = {\rm Pr}(\underline {y} \ne \underline {c})
+
 
 +
 
 +
We define as&nbsp; '''block error probability''':
 +
:$${\rm Pr}({\rm block\hspace{0.15cm}error}) = {\rm Pr}(\underline {y} \ne \underline {c})
 
  \hspace{0.05cm}.$$
 
  \hspace{0.05cm}.$$
  
In dieser Aufgabe soll diese Wahrscheinlichkeit für folgende Codes ermittelt werden:
+
In this exercise,&nbsp; this probability is to be determined for the following codes:
* Reed&ndash;Solomon&ndash;Code $(7, \, 3, \, 5)_8 \ \Rightarrow \ d_{\rm min} = 5$,
+
* Reed&ndash;Solomon code&nbsp; $(7, \, 3, \, 5)_8 \ \Rightarrow \ d_{\rm min} = 5$,
* Reed&ndash;Solomon&ndash;Code $(7, \, 5, \, 3)_8 \ \Rightarrow \ d_{\rm min} = 3$.
+
 
 +
* Reed&ndash;Solomon code&nbsp; $(7, \, 5, \, 3)_8 \ \Rightarrow \ d_{\rm min} = 3$.
  
  
Weiterhin soll gelten:
+
Furthermore,&nbsp; let it hold:
* Jedes Symbol wird mit der Wahrscheinlichkeit $\epsilon_{\rm S} = 0.1$ in ein anderes Symbol verfälscht und mit der Wahrscheinlichkeit $1 - \epsilon_{\rm S} = 0.9$ richtig übertragen.
+
* Each symbol is falsified into another symbol with probability&nbsp; $\varepsilon_{\rm S} = 0.1$&nbsp; and correctly transferred with probability&nbsp; $1 - \varepsilon_{\rm S} = 0.9$.
* Für das Distanzspektrum eines Reed&ndash;Solomon&ndash;Codes der Länge $n$ gilt mit $d = d_{\rm min}$:
+
* For the distance spectrum of a Reed&ndash;Solomon code of length&nbsp; $n$&nbsp; holds with&nbsp; $d = d_{\rm min}$:
 
:$$W_i =  {n \choose i} \cdot \sum_{j = 0}^{i-d}\hspace{0.15cm}(-1)^j \cdot {i \choose j} \cdot \big  [\hspace{0.03cm}q^{i\hspace{0.03cm}-\hspace{0.03cm}j\hspace{0.03cm}-\hspace{0.03cm}d\hspace{0.03cm}+\hspace{0.03cm}1}-1 \hspace{0.03cm} \big ]\hspace{0.05cm}.$$
 
:$$W_i =  {n \choose i} \cdot \sum_{j = 0}^{i-d}\hspace{0.15cm}(-1)^j \cdot {i \choose j} \cdot \big  [\hspace{0.03cm}q^{i\hspace{0.03cm}-\hspace{0.03cm}j\hspace{0.03cm}-\hspace{0.03cm}d\hspace{0.03cm}+\hspace{0.03cm}1}-1 \hspace{0.03cm} \big ]\hspace{0.05cm}.$$
  
Daneben sollen zwei Schranken für die Blockfehlerwahrscheinlichkeit betrachtet und bewertet werden:
+
Besides,&nbsp; two bounds for the block error probability will be considered and evaluated:
* Ist allein die minimale Distanz bekannt, so kann man daraus eine <i>obere Schranke</i> ableiten. Die Gewichtsfaktoren $W_i$ sind dabei so zu wählen, dass sicher (&#8658; bei allen Konstellationen) gilt:
+
* If alone the minimum distance is known,&nbsp; one can derive an&nbsp; "upper bound"&nbsp; from it.&nbsp; The weight enumerating factors&nbsp; $W_i$&nbsp; are to be chosen in such a way,&nbsp; that certainly (that is: &nbsp; with all constellations)&nbsp; applies:
:$${\rm Pr}({\rm Obere\hspace{0.15cm} Schranke}) \ge {\rm Pr}({\rm Blockfehler})
+
:$${\rm Pr}({\rm upper\hspace{0.15cm} bound}) \ge {\rm Pr}({\rm block\hspace{0.15cm}error})
 
  \hspace{0.05cm}. $$
 
  \hspace{0.05cm}. $$
* Eine <i>untere Schranke</i> erfordert zusätzlich die Kenntnis der Gewichtsfunktion $W_i$ für $i = d_{\rm min}$. Damit kann folgende Bedingung erfüllt werden:
+
* A&nbsp; "lower bound"&nbsp; additionally requires knowledge of the weight function&nbsp; $W_i$&nbsp; for&nbsp; $i = d_{\rm min}$.&nbsp; Thus,&nbsp; the following condition can be satisfied:
:$${\rm Pr}({\rm Untere\hspace{0.15cm} Schranke}) \le {\rm Pr}({\rm Blockfehler})
+
:$${\rm Pr}({\rm lower\hspace{0.15cm} bound}) \le {\rm Pr}({\rm block\hspace{0.15cm}error})
 
  \hspace{0.05cm}.$$
 
  \hspace{0.05cm}.$$
  
''Hinweise:''
 
* Die Aufgabe gehört zum Kapitel [[Kanalcodierung/Definition_und_Eigenschaften_von_Reed%E2%80%93Solomon%E2%80%93Codes|Definition und Eigenschaften von Reed&ndash;Solomon&ndash;Codes]].
 
* Zu berechnen sind die in der obigen Grafik rot markierten Gewichte $W_i$.
 
* Sollte die Eingabe des Zahlenwertes &bdquo;0&rdquo; erforderlich sein, so geben Sie bitte &bdquo;0.&rdquo; ein.
 
  
  
  
  
===Fragebogen===
+
Hints:
 +
*The exercise belongs to the chapter&nbsp; [[Channel_Coding/Definition_and_Properties_of_Reed-Solomon_Codes|"Definition and Properties of Reed-Solomon Codes"]].
 +
 
 +
*Reference is made in particular to the page&nbsp; [[Channel_Coding/Definition_and_Properties_of_Reed-Solomon_Codes#Singleton_bound_and_minimum_distance|"Singleton Bound and Minimum Distance"]].
 +
 
 +
* The weights&nbsp; $W_i$&nbsp; marked in red in the above graph are to be calculated.
 +
 +
 
 +
 
 +
 
 +
 
 +
===Questions===
 
<quiz display=simple>
 
<quiz display=simple>
{Berechnen Sie das Distanzspektrum für den $\rm RSC \, (7, \, 3, \, 5)_8$.
+
{Calculate the distance spectrum for the&nbsp; $\rm RSC \, (7, \, 3, \, 5)_8$.
 
|type="{}"}
 
|type="{}"}
${\rm RSC} \, (7, \, 3, \, 5) \text{:} \hspace{0.2cm} W_3 \ = \ ${ 0 3% }
+
$W_3 \ = \ ${ 0. }
$\hspace{2.5cm} W_4 \ = \ ${ 0 3% }
+
$W_4 \ = \ ${ 0. }
$\hspace{2.5cm} W_5 \ = \ ${ 147 3% }
+
$W_5 \ = \ ${ 147 }
$\hspace{2.5cm} W_6 \ = \ ${ 147 3% }
+
$W_6 \ = \ ${ 147 }
$\hspace{2.5cm} W_7 \ = \ ${ 217 3% }
+
$W_7 \ = \ ${ 217 }
  
{Wie lautet das in der Grafik fehlende Gewicht des $\rm RSC \, (7, \, 5, \, 3)_8$?
+
{What is the missing weight of the&nbsp; $\rm RSC \, (7, \, 5, \, 3)_8$&nbsp; in the graph?
 
|type="{}"}
 
|type="{}"}
${\rm RSC} \, (7, \, 5, \, 3) \text{:} \hspace{0.2cm} W_3 \ = \ ${ 245 3% }
+
$W_3 \ = \ ${ 245 }
  
{Mit welcher Wahrscheinlichkeit bleibt ein fehlerhafter Block unerkannt? Die Verfälschungswahrscheinlichkeit eines Symbols sei $\epsilon = 0.1$.
+
{What is the probability that an incorrect block remains undetected? Let the falsification probability of each symbol be&nbsp; $\varepsilon = 0.1$.
 
|type="{}"}
 
|type="{}"}
$\rm RSC \, (7, \, 3, \, 5) \text{:} \hspace{0.2cm} Pr(Blockfehler) \ = \ ${ 0.263 3% } $\ \cdot 10^{-5}$
+
$\rm RSC \, (7, \, 3, \, 5) \text{:} \hspace{0.4cm} Pr(block error) \ = \ ${ 0.263 3% } $\ \cdot 10^{-5}$
$\rm RSC \, (7, \, 5, \, 3) \text{:} \hspace{0.2cm} Pr(Blockfehler) \ = \ ${ 0.942 3% } $\ \cdot 10^{-5}$
+
$\rm RSC \, (7, \, 5, \, 3) \text{:} \hspace{0.4cm} Pr(block error) \ = \ ${ 0.942 3% } $\ \cdot 10^{-5}$
  
{Berechnen und bewerten Sie für beide Codes die in der Angabe vorgeschlagene obere Schranke $p_{\rm oben} = \rm Pr(Obere \ Schranke)$.
+
{Calculate and evaluate for both codes the&nbsp; "upper bound"&nbsp; proposed in the specification:&nbsp; $p_{\rm upper} = \rm Pr(upper \ bound)$.
 
|type="{}"}
 
|type="{}"}
${\rm RSC} \, (7, \, 3, \, 5) \text{:} \hspace{0.2cm} p_{\rm oben} \ = \ ${ 0.81 3% } $\ \cdot 10^{-5}$
+
${\rm RSC} \, (7, \, 3, \, 5) \text{:} \hspace{0.4cm} p_{\rm upper} \ = \ ${ 0.81 3% } $\ \cdot 10^{-5}$
${\rm RSC} \, (7, \, 5, \, 3) \text{:} \hspace{0.2cm} p_{\rm oben} \ = \ ${ 0.656 3% } $\ \cdot 10^{-3}$
+
${\rm RSC} \, (7, \, 5, \, 3) \text{:} \hspace{0.4cm} p_{\rm upper} \ = \ ${ 65.6 3% } $\ \cdot 10^{-5}$
  
{Berechnen und bewerten Sie für beide Codes die in der Angabe vorgeschlagene untere Schranke $p_{\rm unten} = \rm Pr(Untere \ Schranke)$.
+
{Calculate and evaluate for both codes the&nbsp; "lower bound"&nbsp; proposed in the specification:&nbsp; $p_{\rm lower} = \rm Pr(lower \ bound)$.
 
|type="{}"}
 
|type="{}"}
${\rm RSC} \, (7, \, 3, \, 5) \text{:} \hspace{0.2cm} p_{\rm unten} \ = \ ${ 0.233 3% } $\ \cdot 10^{-5}$
+
${\rm RSC} \, (7, \, 3, \, 5) \text{:} \hspace{0.4cm} p_{\rm lower} \ = \ ${ 0.233 3% } $\ \cdot 10^{-5}$
${\rm RSC} \, (7, \, 5, \, 3) \text{:} \hspace{0.2cm} p_{\rm unten} \ = \ ${ 0.494 3% } $\ \cdot 10^{-5}$
+
${\rm RSC} \, (7, \, 5, \, 3) \text{:} \hspace{0.4cm} p_{\rm lower} \ = \ ${ 0.494 3% } $\ \cdot 10^{-5}$
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''(1)'''&nbsp;  
+
'''(1)'''&nbsp; The equation describing the weights&nbsp; $W_i$&nbsp; is&nbsp; $($the minimum distance&nbsp; $d_{\rm min}$&nbsp; is abbreviated here as&nbsp; $d)$:
'''(2)'''&nbsp;  
+
:$$W_i =  {n \choose i} \cdot \sum_{j = 0}^{i-d}\hspace{0.15cm}(-1)^j \cdot {i \choose j} \cdot \big  [\hspace{0.03cm}q^{i\hspace{0.03cm}-\hspace{0.03cm}j\hspace{0.03cm}-\hspace{0.03cm}d\hspace{0.03cm}+\hspace{0.03cm}1}-1 \hspace{0.03cm} \big ]\hspace{0.05cm}.$$
'''(3)'''&nbsp;  
+
 
'''(4)'''&nbsp;  
+
*Because of the minimum distance&nbsp; $d_{\min} = 5$,&nbsp; $W_3 \ \underline{= 0}$&nbsp; and&nbsp; $W_4 \ \underline{= 0}$.&nbsp; The other weights result in
'''(5)'''&nbsp;  
+
:$$W_5 =  {7 \choose 5} \cdot (8^1 - 1) = \frac {7 \cdot 6 \cdot 5 \cdot4 \cdot 3}{1 \cdot 2 \cdot 3 \cdot4 \cdot 5} \cdot 7 = 21 \cdot 7
 +
\hspace{0.15cm}\underline {= 147}\hspace{0.05cm},$$
 +
:$$W_6 \hspace{-0.15cm} \ = \ \hspace{-0.15cm}  {7 \choose 6} \cdot \sum_{j = 0}^{1}\hspace{0.15cm}(-1)^j \cdot {6 \choose j} \cdot \big  (\hspace{0.03cm}8^{2\hspace{0.03cm}-\hspace{0.03cm}j} -1 \big )=7 \cdot \left [ (8^2 - 1) - 6 \cdot (8^1 - 1)\right ] = 7 \cdot (63-42)
 +
\hspace{0.15cm}\underline {= 147}\hspace{0.05cm},$$
 +
:$$W_7 \hspace{-0.15cm} \ = \ \hspace{-0.15cm}  {7 \choose 7} \cdot \sum_{j = 0}^{2}\hspace{0.15cm}(-1)^j \cdot {7 \choose j} \cdot \big  (\hspace{0.03cm}8^{3\hspace{0.03cm}-\hspace{0.03cm}j} -1 \big )= (8^3 - 1) - 7 \cdot (8^2 - 1) +21 \cdot (8^1 - 1) = 511 - 7 \cdot 63 + 21 \cdot 7
 +
\hspace{0.15cm}\underline {= 217}\hspace{0.05cm},$$
 +
:$$\Rightarrow  \hspace{0.3cm}W_0 + W_5 + W_6 + W_7  = 1 + 147 + 147 + 217 = 512 = 8^3 = q^k\hspace{0.05cm}.$$
 +
 
 +
 
 +
'''(2)'''&nbsp; Analogous to subtask&nbsp; '''(1)''',&nbsp; we obtain:
 +
:$$W_3 =  {7 \choose 3} \cdot (8^1 - 1) = \frac {7 \cdot 6 \cdot 5 }{1 \cdot 2 \cdot 3 } \cdot 7 = 35 \cdot 7
 +
\hspace{0.15cm}\underline {= 245}\hspace{0.05cm}.$$
 +
 
 +
 
 +
'''(3)'''&nbsp; The falsification probability of a symbol is given by&nbsp; $\varepsilon_{\rm S} = 0.1$.
 +
 
 +
:Then,&nbsp; for the probability that in a code word with&nbsp; $n = 7$&nbsp; symbols
 +
* exactly three symbols are falsified:
 +
:$$p_3 =  0.1^3  \cdot 0.9^4 = 0.6561  \cdot 10^{-3}
 +
\hspace{0.05cm},$$
 +
* exactly four symbols are falsified:
 +
:$$p_4 =  0.1^4  \cdot 0.9^3 = 0.729  \cdot 10^{-4}
 +
\hspace{0.05cm},$$
 +
* exactly five symbols are falsified:
 +
:$$p_5 =  0.1^5  \cdot 0.9^2 = 0.81  \cdot 10^{-5}
 +
\hspace{0.05cm},$$
 +
* exactly six symbols are falsified:
 +
:$$p_6 =  0.1^6  \cdot 0.9 = 0.9  \cdot 10^{-6}\hspace{0.05cm},$$
 +
* all $n = 7$ symbols are falsified:
 +
:$$p_7 =  0.1^7  = 10^{-7}\hspace{0.05cm}.$$
 +
 
 +
&rArr; &nbsp; At the&nbsp; $\rm RSC \, (7, \, 3, \, 5)_8$&nbsp; the zero word can be falsified by symbol errors into one of&nbsp; $q^k - 1 = 8^3 - 1 = 511$&nbsp; other code words.&nbsp; Thus,&nbsp; using the weight enumerating functions of subtask&nbsp; '''(1)''',&nbsp; we obtain:
 +
:$${\rm Pr}({\rm block\hspace{0.15cm}error}) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} \frac {W_5 \cdot p_5 + W_6 \cdot p_6 + W_7 \cdot p_7}{511} =\frac {147 \cdot 0.81  \cdot 10^{-5} + 147 \cdot 0.9  \cdot 10^{-6} + 217 \cdot 10^{-7}}{511}
 +
\hspace{0.15cm}\underline {\approx  0.263  \cdot 10^{-5}} \hspace{0.05cm}.$$
 +
 
 +
&rArr; &nbsp; At the&nbsp; $\rm RSC \, (7, \, 5, \, 3)_8$&nbsp; we have to average over&nbsp; $8^5 - 1 = 32767$&nbsp; falsification probabilities because of&nbsp; $k = 5$.&nbsp; With&nbsp; $W_3 = 245$&nbsp; from subtask&nbsp; '''(2)'''&nbsp; and the weights&nbsp;
 +
:$$W_4 = 1224, \ W_5 = 5586, \ W_6 = 12838, \ W_7 = 12873$$
 +
according to the specification sheet,&nbsp; we obtain for this:
 +
:$${\rm Pr}({\rm block\hspace{0.15cm}error}) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} \frac {W_3 \cdot p_3 + W_4 \cdot p_4 + W_5 \cdot p_5 + W_6 \cdot p_6 + W_7 \cdot p_7}{32767} =\frac {245 \cdot 0.656  \cdot 10^{-3} + \hspace{0.15cm}... \hspace{0.15cm}+ 12873 \cdot 10^{-7}}{32767}
 +
\hspace{0.15cm}\underline {\approx  0.942  \cdot 10^{-5}} \hspace{0.05cm}. $$
 +
 
 +
 
 +
'''(4)'''&nbsp; Let only&nbsp; $d_{\rm min}$&nbsp; $($further abbreviated as&nbsp; $d)$&nbsp; be known and thus also&nbsp; $p_d = \varepsilon_{\rm S}^d \cdot (1 - \varepsilon_{\rm S})^{n-d}$.&nbsp;
 +
*This is also the upper bound we are looking for:
 +
:* ${\rm RSC} \, (7, \, 3, \, 5)_8 \text{:} \hspace{0.33cm} {\rm Pr(upper \ bound)} = p_5 = \underline{0.81 \cdot 10^{-5}}$,
 +
 
 +
:* ${\rm RSC} \, (7, \, 5, \, 3)_8 \text{:} \hspace{0.33cm} {\rm Pr(upper \ bound)} = p_3 = \underline{65.6 \cdot 10^{-5}}$.
 +
 
 +
*Since the weight&nbsp; $W_d$&nbsp; was assumed to be unknown,&nbsp; it is set to the maximum possible value&nbsp; $(W_5 = 511$&nbsp; or&nbsp; $W_3 = 32767)$&nbsp; so that the prefactors in the equations for subtask&nbsp; '''(3)'''&nbsp; disappear.&nbsp; This is the only way to ensure an upper bound.
 +
 
 +
*In both cases,&nbsp; the upper bound is significantly higher than the results of subtask&nbsp; '''(3)''':
 +
:* $\rm RSC \, (7, \, 3, \, 5)_8 \text{:} \hspace{0.33cm} 0.810 \cdot 10^{-5}$&nbsp; instead of &nbsp;$0.263 \cdot 10^{-5}$&nbsp; $($faktor approx.&nbsp; $3)$,
 +
 
 +
:* $\rm RSC \, (7, \, 5, \, 3)_8 \text{:} \hspace{0.33cm} 65.6 \cdot 10^{-5}$&nbsp; instead of &nbsp;$0.942 \cdot 10^{-5}$&nbsp; $($faktor approx.&nbsp; $70)$.
 +
 
 +
 
 +
 
 +
'''(5)'''&nbsp; Using the abbreviation&nbsp;  $d = d_{\rm min}$,&nbsp; one obtains for the lower bound:
 +
:$${\rm Pr}({\rm lower\hspace{0.15cm} bound})= \frac{W_d \cdot p_d}{q^k -1}
 +
\hspace{0.05cm}. $$
 +
* For the&nbsp; $\rm RSC \, (7, \, 3, \, 5)_8$,&nbsp; because of&nbsp; $W_d = W_5$&nbsp;and&nbsp; $p_d = p_5$,&nbsp; the lower bound is about&nbsp; $11\%$&nbsp; below the actual value $(0.263 \cdot 10^{-5})$:
 +
:$${\rm Pr}({\rm lower\hspace{0.15cm} bound}) = \frac{147 \cdot 0.81  \cdot 10^{-5}}{511}
 +
\hspace{0.15cm}\underline {\approx  0.233  \cdot 10^{-5}}$$
 +
* For the&nbsp; $\rm RSC \, (7, \, 5, \, 3)_8$&nbsp; holds with&nbsp; $W_d = W_3$&nbsp; and&nbsp; $p_d = p_3$,&nbsp; the lower bound here deviates from the actual value&nbsp; $(0.942 \cdot 10^{-5})$&nbsp; more strongly,&nbsp; because in this code the contributions of the higher weights&nbsp; $(W_4, \ W_5, \ W_6, \ W_7)$&nbsp; are more relevant in relation to&nbsp; $W_3$:
 +
:$${\rm Pr}({\rm lower\hspace{0.15cm} bound}) = \frac{245 \cdot 0.656  \cdot 10^{-3}}{32767}
 +
\hspace{0.15cm}\underline {\approx  0.494  \cdot 10^{-5}}\hspace{0.05cm}.$$
 
{{ML-Fuß}}
 
{{ML-Fuß}}
  
  
  
[[Category:Aufgaben zu  Kanalcodierung|^2.3 Definition und Eigenschaften von Reed–Solomon–Codes^]]
+
[[Category:Channel Coding: Exercises|^2.3 Reed–Solomon Codes^]]

Latest revision as of 16:27, 23 January 2023

Distance spectra of two
different Reed-Solomon codes

For a linear block code,  up to   $e = d_{\rm min} - 1$   errors can be detected.  For all Reed–Solomon codes the minimum distance is

$$d_{\rm min} = n-k+1 \hspace{0.05cm}.$$

One must distinguish the following cases:

  • If no more than  $e = d_{\rm min} - 1= n - k$  symbol errors occur,  the block is always detected as faulty.
  • Error detection can still work even if more than  $n - k$  symbol errors occur.  This is when the received word is not a valid code word of the Reed–Solomon code:
$$\underline {y} \notin C_{\rm RS} = \{ \underline {c}_{\hspace{0.05cm}0}, \hspace{0.05cm}\text{...} \hspace{0.1cm}, \underline {c}_i, \hspace{0.05cm}\text{...} \hspace{0.1cm}, \underline {c}_{\hspace{0.05cm}n -1} \} \hspace{0.05cm}. $$
  • However,  if the falsified received word  $(\underline{y} ≠ \underline{c})$  is a valid code word  $(\underline{y\in C_{\rm RS}})$,  the decoding process will leave the falsified block undetected.


We define as  block error probability:

$${\rm Pr}({\rm block\hspace{0.15cm}error}) = {\rm Pr}(\underline {y} \ne \underline {c}) \hspace{0.05cm}.$$

In this exercise,  this probability is to be determined for the following codes:

  • Reed–Solomon code  $(7, \, 3, \, 5)_8 \ \Rightarrow \ d_{\rm min} = 5$,
  • Reed–Solomon code  $(7, \, 5, \, 3)_8 \ \Rightarrow \ d_{\rm min} = 3$.


Furthermore,  let it hold:

  • Each symbol is falsified into another symbol with probability  $\varepsilon_{\rm S} = 0.1$  and correctly transferred with probability  $1 - \varepsilon_{\rm S} = 0.9$.
  • For the distance spectrum of a Reed–Solomon code of length  $n$  holds with  $d = d_{\rm min}$:
$$W_i = {n \choose i} \cdot \sum_{j = 0}^{i-d}\hspace{0.15cm}(-1)^j \cdot {i \choose j} \cdot \big [\hspace{0.03cm}q^{i\hspace{0.03cm}-\hspace{0.03cm}j\hspace{0.03cm}-\hspace{0.03cm}d\hspace{0.03cm}+\hspace{0.03cm}1}-1 \hspace{0.03cm} \big ]\hspace{0.05cm}.$$

Besides,  two bounds for the block error probability will be considered and evaluated:

  • If alone the minimum distance is known,  one can derive an  "upper bound"  from it.  The weight enumerating factors  $W_i$  are to be chosen in such a way,  that certainly (that is:   with all constellations)  applies:
$${\rm Pr}({\rm upper\hspace{0.15cm} bound}) \ge {\rm Pr}({\rm block\hspace{0.15cm}error}) \hspace{0.05cm}. $$
  • A  "lower bound"  additionally requires knowledge of the weight function  $W_i$  for  $i = d_{\rm min}$.  Thus,  the following condition can be satisfied:
$${\rm Pr}({\rm lower\hspace{0.15cm} bound}) \le {\rm Pr}({\rm block\hspace{0.15cm}error}) \hspace{0.05cm}.$$



Hints:

  • The weights  $W_i$  marked in red in the above graph are to be calculated.



Questions

1

Calculate the distance spectrum for the  $\rm RSC \, (7, \, 3, \, 5)_8$.

$W_3 \ = \ $

$W_4 \ = \ $

$W_5 \ = \ $

$W_6 \ = \ $

$W_7 \ = \ $

2

What is the missing weight of the  $\rm RSC \, (7, \, 5, \, 3)_8$  in the graph?

$W_3 \ = \ $

3

What is the probability that an incorrect block remains undetected? Let the falsification probability of each symbol be  $\varepsilon = 0.1$.

$\rm RSC \, (7, \, 3, \, 5) \text{:} \hspace{0.4cm} Pr(block error) \ = \ $

$\ \cdot 10^{-5}$
$\rm RSC \, (7, \, 5, \, 3) \text{:} \hspace{0.4cm} Pr(block error) \ = \ $

$\ \cdot 10^{-5}$

4

Calculate and evaluate for both codes the  "upper bound"  proposed in the specification:  $p_{\rm upper} = \rm Pr(upper \ bound)$.

${\rm RSC} \, (7, \, 3, \, 5) \text{:} \hspace{0.4cm} p_{\rm upper} \ = \ $

$\ \cdot 10^{-5}$
${\rm RSC} \, (7, \, 5, \, 3) \text{:} \hspace{0.4cm} p_{\rm upper} \ = \ $

$\ \cdot 10^{-5}$

5

Calculate and evaluate for both codes the  "lower bound"  proposed in the specification:  $p_{\rm lower} = \rm Pr(lower \ bound)$.

${\rm RSC} \, (7, \, 3, \, 5) \text{:} \hspace{0.4cm} p_{\rm lower} \ = \ $

$\ \cdot 10^{-5}$
${\rm RSC} \, (7, \, 5, \, 3) \text{:} \hspace{0.4cm} p_{\rm lower} \ = \ $

$\ \cdot 10^{-5}$


Solution

(1)  The equation describing the weights  $W_i$  is  $($the minimum distance  $d_{\rm min}$  is abbreviated here as  $d)$:

$$W_i = {n \choose i} \cdot \sum_{j = 0}^{i-d}\hspace{0.15cm}(-1)^j \cdot {i \choose j} \cdot \big [\hspace{0.03cm}q^{i\hspace{0.03cm}-\hspace{0.03cm}j\hspace{0.03cm}-\hspace{0.03cm}d\hspace{0.03cm}+\hspace{0.03cm}1}-1 \hspace{0.03cm} \big ]\hspace{0.05cm}.$$
  • Because of the minimum distance  $d_{\min} = 5$,  $W_3 \ \underline{= 0}$  and  $W_4 \ \underline{= 0}$.  The other weights result in
$$W_5 = {7 \choose 5} \cdot (8^1 - 1) = \frac {7 \cdot 6 \cdot 5 \cdot4 \cdot 3}{1 \cdot 2 \cdot 3 \cdot4 \cdot 5} \cdot 7 = 21 \cdot 7 \hspace{0.15cm}\underline {= 147}\hspace{0.05cm},$$
$$W_6 \hspace{-0.15cm} \ = \ \hspace{-0.15cm} {7 \choose 6} \cdot \sum_{j = 0}^{1}\hspace{0.15cm}(-1)^j \cdot {6 \choose j} \cdot \big (\hspace{0.03cm}8^{2\hspace{0.03cm}-\hspace{0.03cm}j} -1 \big )=7 \cdot \left [ (8^2 - 1) - 6 \cdot (8^1 - 1)\right ] = 7 \cdot (63-42) \hspace{0.15cm}\underline {= 147}\hspace{0.05cm},$$
$$W_7 \hspace{-0.15cm} \ = \ \hspace{-0.15cm} {7 \choose 7} \cdot \sum_{j = 0}^{2}\hspace{0.15cm}(-1)^j \cdot {7 \choose j} \cdot \big (\hspace{0.03cm}8^{3\hspace{0.03cm}-\hspace{0.03cm}j} -1 \big )= (8^3 - 1) - 7 \cdot (8^2 - 1) +21 \cdot (8^1 - 1) = 511 - 7 \cdot 63 + 21 \cdot 7 \hspace{0.15cm}\underline {= 217}\hspace{0.05cm},$$
$$\Rightarrow \hspace{0.3cm}W_0 + W_5 + W_6 + W_7 = 1 + 147 + 147 + 217 = 512 = 8^3 = q^k\hspace{0.05cm}.$$


(2)  Analogous to subtask  (1),  we obtain:

$$W_3 = {7 \choose 3} \cdot (8^1 - 1) = \frac {7 \cdot 6 \cdot 5 }{1 \cdot 2 \cdot 3 } \cdot 7 = 35 \cdot 7 \hspace{0.15cm}\underline {= 245}\hspace{0.05cm}.$$


(3)  The falsification probability of a symbol is given by  $\varepsilon_{\rm S} = 0.1$.

Then,  for the probability that in a code word with  $n = 7$  symbols
  • exactly three symbols are falsified:
$$p_3 = 0.1^3 \cdot 0.9^4 = 0.6561 \cdot 10^{-3} \hspace{0.05cm},$$
  • exactly four symbols are falsified:
$$p_4 = 0.1^4 \cdot 0.9^3 = 0.729 \cdot 10^{-4} \hspace{0.05cm},$$
  • exactly five symbols are falsified:
$$p_5 = 0.1^5 \cdot 0.9^2 = 0.81 \cdot 10^{-5} \hspace{0.05cm},$$
  • exactly six symbols are falsified:
$$p_6 = 0.1^6 \cdot 0.9 = 0.9 \cdot 10^{-6}\hspace{0.05cm},$$
  • all $n = 7$ symbols are falsified:
$$p_7 = 0.1^7 = 10^{-7}\hspace{0.05cm}.$$

⇒   At the  $\rm RSC \, (7, \, 3, \, 5)_8$  the zero word can be falsified by symbol errors into one of  $q^k - 1 = 8^3 - 1 = 511$  other code words.  Thus,  using the weight enumerating functions of subtask  (1),  we obtain:

$${\rm Pr}({\rm block\hspace{0.15cm}error}) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} \frac {W_5 \cdot p_5 + W_6 \cdot p_6 + W_7 \cdot p_7}{511} =\frac {147 \cdot 0.81 \cdot 10^{-5} + 147 \cdot 0.9 \cdot 10^{-6} + 217 \cdot 10^{-7}}{511} \hspace{0.15cm}\underline {\approx 0.263 \cdot 10^{-5}} \hspace{0.05cm}.$$

⇒   At the  $\rm RSC \, (7, \, 5, \, 3)_8$  we have to average over  $8^5 - 1 = 32767$  falsification probabilities because of  $k = 5$.  With  $W_3 = 245$  from subtask  (2)  and the weights 

$$W_4 = 1224, \ W_5 = 5586, \ W_6 = 12838, \ W_7 = 12873$$

according to the specification sheet,  we obtain for this:

$${\rm Pr}({\rm block\hspace{0.15cm}error}) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} \frac {W_3 \cdot p_3 + W_4 \cdot p_4 + W_5 \cdot p_5 + W_6 \cdot p_6 + W_7 \cdot p_7}{32767} =\frac {245 \cdot 0.656 \cdot 10^{-3} + \hspace{0.15cm}... \hspace{0.15cm}+ 12873 \cdot 10^{-7}}{32767} \hspace{0.15cm}\underline {\approx 0.942 \cdot 10^{-5}} \hspace{0.05cm}. $$


(4)  Let only  $d_{\rm min}$  $($further abbreviated as  $d)$  be known and thus also  $p_d = \varepsilon_{\rm S}^d \cdot (1 - \varepsilon_{\rm S})^{n-d}$. 

  • This is also the upper bound we are looking for:
  • ${\rm RSC} \, (7, \, 3, \, 5)_8 \text{:} \hspace{0.33cm} {\rm Pr(upper \ bound)} = p_5 = \underline{0.81 \cdot 10^{-5}}$,
  • ${\rm RSC} \, (7, \, 5, \, 3)_8 \text{:} \hspace{0.33cm} {\rm Pr(upper \ bound)} = p_3 = \underline{65.6 \cdot 10^{-5}}$.
  • Since the weight  $W_d$  was assumed to be unknown,  it is set to the maximum possible value  $(W_5 = 511$  or  $W_3 = 32767)$  so that the prefactors in the equations for subtask  (3)  disappear.  This is the only way to ensure an upper bound.
  • In both cases,  the upper bound is significantly higher than the results of subtask  (3):
  • $\rm RSC \, (7, \, 3, \, 5)_8 \text{:} \hspace{0.33cm} 0.810 \cdot 10^{-5}$  instead of  $0.263 \cdot 10^{-5}$  $($faktor approx.  $3)$,
  • $\rm RSC \, (7, \, 5, \, 3)_8 \text{:} \hspace{0.33cm} 65.6 \cdot 10^{-5}$  instead of  $0.942 \cdot 10^{-5}$  $($faktor approx.  $70)$.


(5)  Using the abbreviation  $d = d_{\rm min}$,  one obtains for the lower bound:

$${\rm Pr}({\rm lower\hspace{0.15cm} bound})= \frac{W_d \cdot p_d}{q^k -1} \hspace{0.05cm}. $$
  • For the  $\rm RSC \, (7, \, 3, \, 5)_8$,  because of  $W_d = W_5$ and  $p_d = p_5$,  the lower bound is about  $11\%$  below the actual value $(0.263 \cdot 10^{-5})$:
$${\rm Pr}({\rm lower\hspace{0.15cm} bound}) = \frac{147 \cdot 0.81 \cdot 10^{-5}}{511} \hspace{0.15cm}\underline {\approx 0.233 \cdot 10^{-5}}$$
  • For the  $\rm RSC \, (7, \, 5, \, 3)_8$  holds with  $W_d = W_3$  and  $p_d = p_3$,  the lower bound here deviates from the actual value  $(0.942 \cdot 10^{-5})$  more strongly,  because in this code the contributions of the higher weights  $(W_4, \ W_5, \ W_6, \ W_7)$  are more relevant in relation to  $W_3$:
$${\rm Pr}({\rm lower\hspace{0.15cm} bound}) = \frac{245 \cdot 0.656 \cdot 10^{-3}}{32767} \hspace{0.15cm}\underline {\approx 0.494 \cdot 10^{-5}}\hspace{0.05cm}.$$