Difference between revisions of "Aufgaben:Exercise 2.3Z: Polynomial Division"

From LNTwww
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{quiz-Header|Buchseite=Kanalcodierung/Erweiterungskörper}}
+
{{quiz-Header|Buchseite=Channel_Coding/Extension_Field}}
  
[[File:P_ID2504__KC_Z_2_3.png|right|frame|Zur Multiplikation und Division von $\rm GF(2)$–Polynomen]]
+
[[File:P_ID2504__KC_Z_2_3.png|right|frame|Multiplication and division of polynomials in&nbsp; $\rm GF(2)$ <br><u>Note.</u> &nbsp; remainder&nbsp; $r(x)$]]
In dieser Aufgabe beschäftigen wir uns mit der Multiplikation und insbesondere der Division von Polynomen im Galoisfeld $\rm GF(2)$. In der Abbildung ist jeweils die Vorgehensweise an einem einfachen und selbsterklärenden Beispiel verdeutlicht:
+
In this exercise we deal with the multiplication and especially the division of polynomials in the Galois field&nbsp; $\rm GF(2)$.&nbsp; In the graph the procedure is indicated by a simple and&nbsp; (hopefully)&nbsp; self-explanatory example:
* Die Multiplikation der beiden Polynome $x^2 + 1$ und $x +1$ liefert das Ergebnis $a(x) = x^3 + x^2 + x + 1$.
+
* Multiplying the two polynomials &nbsp; $x^2 + 1$ &nbsp; and &nbsp; $x +1$ &nbsp; yields the result &nbsp; $a(x) = x^3 + x^2 + x + 1$.
* Die Division des Polynoms $a(x) = x^3$ durch $p(x) = x + 1$ liefert den Quotienten $q(x) = x^2 + x$ und den Rest $r(x) = x$.
 
* Man kann das letztere Ergebnis wie folgt überprüfen:
 
:$$a(x) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} p(x) \cdot q(x) + r(x)\hspace{0.05cm}= $$
 
:$$\hspace{-0.15cm} \ = \ \hspace{-0.15cm}[(x+1) \cdot (x^2+x)] +x =$$
 
:$$\hspace{-0.15cm} \ = \ \hspace{-0.15cm}[x^3+ x^2+x^2+ x] +x = x^3\hspace{0.05cm}.$$
 
  
''Hinweis:''
+
* Dividing the polynomial &nbsp; $b(x) = x^3$ &nbsp; by &nbsp; $p(x) = x + 1$ &nbsp; gives the quotient &nbsp; $q(x) = x^2 + x$ &nbsp; and the remainder &nbsp; $r(x) = x$.
* Die Aufgabe gehört zum Themengebiet des Kapitels [[Kanalcodierung/Erweiterungsk%C3%B6rper| Erweiterungskörper]].
 
  
 +
* One can check the latter result as follows:
 +
:$$b(x) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} p(x) \cdot q(x) + r(x)\hspace{0.05cm}= \big[(x+1) \cdot (x^2+x)\big] +x =\big[x^3+ x^2+x^2+ x\big] +x = x^3\hspace{0.05cm}.$$
  
  
 +
Hint:&nbsp; This exercise belongs to the chapter&nbsp; [[Channel_Coding/Extension_Field| "Extension field"]].
  
  
  
===Fragebogen===
+
 
 +
 
 +
 
 +
===Questions===
 
<quiz display=simple>
 
<quiz display=simple>
{Welches Ergebnis liefert $a(x) = (x^3 + x + 1) \cdot (x^2 + 1)$?
+
{What is the result&nbsp; $a(x) = (x^3 + x + 1) \cdot (x^2 + 1)$?
|type="[]"}
+
|type="()"}
 
- $a(x) = x^5 + x^3 + x^2 + 1$,
 
- $a(x) = x^5 + x^3 + x^2 + 1$,
 
+ $a(x) = x^5 + x^2 + x + 1$.
 
+ $a(x) = x^5 + x^2 + x + 1$.
 
- $a(x) = x^6 + x^3 + x^2 + 1$-
 
- $a(x) = x^6 + x^3 + x^2 + 1$-
  
{Welche der Polynomdivisionen ergeben keinen Rest $r(x)$?
+
{Which of the polynomial divisions do not yield a remainder&nbsp; $r(x) \ne 0$?
 
|type="[]"}
 
|type="[]"}
 
+ $(x^5 + x^2 + x + 1)/(x^3 + x + 1)$.
 
+ $(x^5 + x^2 + x + 1)/(x^3 + x + 1)$.
Line 33: Line 33:
 
- $(x^5 + x^2 + x)/(x^2 + 1)$.
 
- $(x^5 + x^2 + x)/(x^2 + 1)$.
  
{Es sei $a(x) = x^6 + x^5 + 1$ und $p(x) = x^3 + x^2 + 1$. Bestimmen Sie $q(x)$ und $r(x)$ entsprechend der Beschreibungsgleichung $a(x) = p(x) \cdot q(x) + r(x)$.
+
{It is &nbsp;  $a(x) = x^6 + x^5 + 1$ &nbsp;  and &nbsp;  $p(x) = x^3 + x^2 + 1$. <br>Determine&nbsp; $q(x)$&nbsp; and&nbsp; $r(x)$&nbsp; according to the description equation &nbsp; $a(x) = p(x) \cdot q(x) + r(x)$.
|type="[]"}
+
|type="()"}
 
- $q(x) = x^3 + x^2 + 1, \hspace{0.2cm} r(x) = 0$,
 
- $q(x) = x^3 + x^2 + 1, \hspace{0.2cm} r(x) = 0$,
 
- $q(x) = x^3 + 1, \hspace{0.2cm} r(x) = 0$,
 
- $q(x) = x^3 + 1, \hspace{0.2cm} r(x) = 0$,
Line 40: Line 40:
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''(1)'''&nbsp; Die Modulo&ndash;2&ndash;Multiplikation der beiden Polynome führt zum Ergebnis
+
'''(1)'''&nbsp; The modulo-2 multiplication of the two polynomials leads to the result
:$$a(x) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} (x^3+  x+1) \cdot (x^2+1)= $$
+
:$$a(x) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} (x^3+  x+1) \cdot (x^2+1)= x^5+x^3+ x^2+ x^3+x+1 = x^5+ x^2+x+1\hspace{0.05cm}.$$
:$$\hspace{0.70625cm} \ = \ \hspace{-0.15cm} x^5+x^3+ x^2+ x^3+x+1 = x^5+ x^2+x+1\hspace{0.05cm}.$$
 
  
Richtig ist somit der <u>Lösungsvorschlag 2</u>. Der letzte Lösungsvorschlag kann schon alleine deshalb nicht simmen, da der Grad des Produktpolynoms $&ne; 5$ wäre.
+
*Thus the&nbsp; <u>proposed solution 2</u>&nbsp; is correct.  
  
 +
*The last solution suggestion cannot be valid already alone,&nbsp; since the degree of the product polynomial would be unequal&nbsp; $5$.
  
'''(2)'''&nbsp; Mit den Abkürzungen
+
 
 +
[[File:P_ID2506__KC_Z_2_3b_neu.png|right|frame|'''Example 1'''&nbsp; for polynomial division]]
 +
'''(2)'''&nbsp; With the abbreviations
 
:$$a(x) = x^5+ x^2+x+1\hspace{0.05cm},\hspace{0.4cm}p(x) = x^3+ x+1\hspace{0.05cm},\hspace{0.4cm}q(x) = x^2+ 1$$
 
:$$a(x) = x^5+ x^2+x+1\hspace{0.05cm},\hspace{0.4cm}p(x) = x^3+ x+1\hspace{0.05cm},\hspace{0.4cm}q(x) = x^2+ 1$$
  
und dem Ergebnis aus der Teilaufgabe (1) erhält man $a(x) = p(x) \cdot q(x)$. Das heißt: Die Divisionen $a(x)/p(x)$ und $a(x)/q(x)$ sind restfrei möglich &nbsp;&#8658;&nbsp; Richtig sind die <u>Lösungsvorschläge 1 und 2</u>. Auch ohne Rechnung erkennt man, dass $a(x)/x^2$ einen Rest ergeben muss. Nach Rechnung ergibt sich explizit:
+
and the result from subtask&nbsp; '''(1)'''&nbsp; we get&nbsp; $a(x) = p(x) \cdot q(x)$.  
:$$(x^5 + x^2+x+1)/(x^2) = x^3 + 1 \hspace{0.05cm},\hspace{0.4cm}{\rm Rest}\hspace{0.15cm} r(x) = x+1\hspace{0.05cm}.$$
+
 
 +
That is: &nbsp; The divisions&nbsp; $a(x)/p(x)$&nbsp; and&nbsp; $a(x)/q(x)$&nbsp; are free of remainders &nbsp;
 +
&#8658; &nbsp; Correct are the&nbsp; <u>solutions 1 and 2</u>.  
  
[[File:P_ID2506__KC_Z_2_3b_neu.png|right|frame|Beispiel 1 zur Polynomdivision]]
+
Even without calculation one recognizes that&nbsp; $a(x)/x^2$&nbsp; must result in a remainder.&nbsp; After calculation it results explicitly:
 +
:$$(x^5 + x^2+x+1)/(x^2) = x^3 + 1 \hspace{0.05cm},\hspace{0.4cm}{\rm remainder}\hspace{0.15cm} r(x) = x+1\hspace{0.05cm}.$$
  
Zum letzten Lösungsvorschlag. Wir verwenden zur Abkürzung $b(x) = x^5 + x^2 + x = a(x) + 1$. Damit ist der vorgegebene Quotient:
+
To the last proposed solution:&nbsp; We use for shortcut&nbsp; $b(x) = x^5 + x^2 + x = a(x) + 1$.&nbsp; This is the given quotient:
 
:$$b(x)/q(x) = a(x)/q(x) + 1/q(x) \hspace{0.05cm}.$$
 
:$$b(x)/q(x) = a(x)/q(x) + 1/q(x) \hspace{0.05cm}.$$
  
Der erste Quotient $a(x)/q(x)$ ergibt entsprechend der Teilaufgabe (2) genau $p(x)$ ohne Rest, der zweite Quotient $0$ mit Rest $1$. Somit ist hier der Rest des Quotienten $b(x)/q(x)$ gleich $r(x) = 1$, wie auch die nebenstehende Rechnung zeigt.
+
[[File:P_ID2505__KC_Z_2_3c.png|Right|frame|'''Example 2'''&nbsp; for polynomial division]]
 +
*The first quotient&nbsp; $a(x)/q(x)$&nbsp; gives exactly&nbsp; $p(x)$&nbsp; without remainder,&nbsp; the second quotient&nbsp; $0$,&nbsp;  remainder&nbsp; $1$.
 +
 +
*Thus the remainder of the quotient&nbsp; $b(x)/q(x)$&nbsp; is equal to $r(x) = 1$,&nbsp; as the calculation in Example 1 shows.
  
 
   
 
   
'''(3)'''&nbsp; Die Polynomdivision ist nachfolgend ausführlich erläutert. Richtig ist der <u>Lösungsvorschlag 3</u>.
+
'''(3)'''&nbsp; The polynomial division is explained in detail in Example 2.&nbsp; Correct is the&nbsp; <u>proposed solution 3</u>.
 +
 
  
[[File:P_ID2505__KC_Z_2_3c.png|center|frame|Beispiel 2 zur Polynomdivision]]
 
 
{{ML-Fuß}}
 
{{ML-Fuß}}
  
  
  
[[Category:Aufgaben zu  Kanalcodierung|^2.2 Erweiterungskörper^]]
+
[[Category:Channel Coding: Exercises|^2.2 Extension Field^]]

Latest revision as of 18:17, 29 September 2022

Multiplication and division of polynomials in  $\rm GF(2)$
Note.   remainder  $r(x)$

In this exercise we deal with the multiplication and especially the division of polynomials in the Galois field  $\rm GF(2)$.  In the graph the procedure is indicated by a simple and  (hopefully)  self-explanatory example:

  • Multiplying the two polynomials   $x^2 + 1$   and   $x +1$   yields the result   $a(x) = x^3 + x^2 + x + 1$.
  • Dividing the polynomial   $b(x) = x^3$   by   $p(x) = x + 1$   gives the quotient   $q(x) = x^2 + x$   and the remainder   $r(x) = x$.
  • One can check the latter result as follows:
$$b(x) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} p(x) \cdot q(x) + r(x)\hspace{0.05cm}= \big[(x+1) \cdot (x^2+x)\big] +x =\big[x^3+ x^2+x^2+ x\big] +x = x^3\hspace{0.05cm}.$$


Hint:  This exercise belongs to the chapter  "Extension field".




Questions

1

What is the result  $a(x) = (x^3 + x + 1) \cdot (x^2 + 1)$?

$a(x) = x^5 + x^3 + x^2 + 1$,
$a(x) = x^5 + x^2 + x + 1$.
$a(x) = x^6 + x^3 + x^2 + 1$-

2

Which of the polynomial divisions do not yield a remainder  $r(x) \ne 0$?

$(x^5 + x^2 + x + 1)/(x^3 + x + 1)$.
$(x^5 + x^2 + x + 1)/(x^2 + 1)$,
$(x^5 + x^2 + x + 1)/(x^2)$,
$(x^5 + x^2 + x)/(x^2 + 1)$.

3

It is   $a(x) = x^6 + x^5 + 1$   and   $p(x) = x^3 + x^2 + 1$.
Determine  $q(x)$  and  $r(x)$  according to the description equation   $a(x) = p(x) \cdot q(x) + r(x)$.

$q(x) = x^3 + x^2 + 1, \hspace{0.2cm} r(x) = 0$,
$q(x) = x^3 + 1, \hspace{0.2cm} r(x) = 0$,
$q(x) = x^3 + 1, \hspace{0.2cm} r(x) = x^2$.


Solution

(1)  The modulo-2 multiplication of the two polynomials leads to the result

$$a(x) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} (x^3+ x+1) \cdot (x^2+1)= x^5+x^3+ x^2+ x^3+x+1 = x^5+ x^2+x+1\hspace{0.05cm}.$$
  • Thus the  proposed solution 2  is correct.
  • The last solution suggestion cannot be valid already alone,  since the degree of the product polynomial would be unequal  $5$.


Example 1  for polynomial division

(2)  With the abbreviations

$$a(x) = x^5+ x^2+x+1\hspace{0.05cm},\hspace{0.4cm}p(x) = x^3+ x+1\hspace{0.05cm},\hspace{0.4cm}q(x) = x^2+ 1$$

and the result from subtask  (1)  we get  $a(x) = p(x) \cdot q(x)$.

That is:   The divisions  $a(x)/p(x)$  and  $a(x)/q(x)$  are free of remainders   ⇒   Correct are the  solutions 1 and 2.

Even without calculation one recognizes that  $a(x)/x^2$  must result in a remainder.  After calculation it results explicitly:

$$(x^5 + x^2+x+1)/(x^2) = x^3 + 1 \hspace{0.05cm},\hspace{0.4cm}{\rm remainder}\hspace{0.15cm} r(x) = x+1\hspace{0.05cm}.$$

To the last proposed solution:  We use for shortcut  $b(x) = x^5 + x^2 + x = a(x) + 1$.  This is the given quotient:

$$b(x)/q(x) = a(x)/q(x) + 1/q(x) \hspace{0.05cm}.$$
Example 2  for polynomial division
  • The first quotient  $a(x)/q(x)$  gives exactly  $p(x)$  without remainder,  the second quotient  $0$,  remainder  $1$.
  • Thus the remainder of the quotient  $b(x)/q(x)$  is equal to $r(x) = 1$,  as the calculation in Example 1 shows.


(3)  The polynomial division is explained in detail in Example 2.  Correct is the  proposed solution 3.