BIT303 · 2082 · 5 marks
Perform polynomial addition, subtraction and multiplication of 2x2 + 4x + 2 and 5x + 6 over GF(7).
Perform polynomial addition, subtraction and multiplication of $2x^2 + 4x + 2$ and $5x + 6$ over $GF(7)$. [5]
Polynomial Arithmetic over GF(7)
Given
$$A(x) = 2x^2 + 4x + 2$$ $$B(x) = 5x + 6$$
Field: $GF(7)$, so all coefficients reduced $\bmod 7$.
Coefficient vectors:
- $A: [x^2, x^1, x^0] = [2, 4, 2]$
- $B: [x^2, x^1, x^0] = [0, 5, 6]$
Solution
1. Addition $A(x) + B(x)$
| Degree | A | B | Sum | mod 7 |
|---|---|---|---|---|
| $x^2$ | 2 | 0 | 2 | 2 |
| $x^1$ | 4 | 5 | 9 | 2 |
| $x^0$ | 2 | 6 | 8 | 1 |
$$\boxed{A(x) + B(x) = 2x^2 + 2x + 1}$$
2. Subtraction $A(x) - B(x)$
| Degree | A | B | Diff | mod 7 |
|---|---|---|---|---|
| $x^2$ | 2 | 0 | 2 | 2 |
| $x^1$ | 4 | 5 | -1 | 6 |
| $x^0$ | 2 | 6 | -4 | 3 |
$$\boxed{A(x) - B(x) = 2x^2 + 6x + 3}$$
3. Multiplication $A(x) \times B(x)$
Expand: $$(2x^2 + 4x + 2)(5x + 6)$$ $$= 10x^3 + 12x^2 + 20x^2 + 24x + 10x + 12$$
Collect: $$= 10x^3 + 32x^2 + 34x + 12$$
Reduce $\bmod 7$:
| Degree | Raw | mod 7 |
|---|---|---|
| $x^3$ | 10 | 3 |
| $x^2$ | 32 | 4 |
| $x^1$ | 34 | 6 |
| $x^0$ | 12 | 5 |
$$\boxed{A(x) \times B(x) = 3x^3 + 4x^2 + 6x + 5}$$
Summary
| Operation | Result over $GF(7)$ |
|---|---|
| $A + B$ | $2x^2 + 2x + 1$ |
| $A - B$ | $2x^2 + 6x + 3$ |
| $A \times B$ | $3x^3 + 4x^2 + 6x + 5$ |
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.