other exercises: [[20241128_DiskMat_Serie10.pdf]]
further references:
5.10 a)
To show that
Thus,
Thus,
5.10 b)
We will find a generator of
Since
Thus, an element
We assume
Since
Since
Thus,
5.10 c)
Let
The roots of
Since
Because
Thus, each element in
where
By substituting each of the 27 elements of
from sympy import symbols, div, Poly, GF
# Define the variables
x,y = symbols('x y')
# define all (27) elements
elements = [0,1,2,x,2*x,x**2,2*x**2, x**2+1, x**2+2, 2*x**2+1, 2*x**2+2,
x**2+x, 2*x**2+x, x**2+2*x+1, x**2+2*x+2, x**2+x+1, x**2+x+2,
2*x**2+2*x+1, 2*x**2+2*x+2, 2*x**2+x+1, 2*x**2+x+2, 2*x+1, 2*x+2,
x+1, x+2, x**2+2*x, 2*x**2+2*x]
denominator = Poly(x**3+2*x**2+1,x)
# compute all elements
for idx, y in enumerate(elements):
numerator = Poly(y**2+y*2*(x**2+x)+(x**2+2), x)
# Perform division in Z_3
quotient, remainder = div(numerator, denominator, domain=GF(3))
# the remainder of the division is the same as modulo polynomial
print(f"{str(idx).zfill(2)}: {y}".ljust(20), remainder)
The results of the inserted elements:
00: 0 Poly(x**2 - 1, x, modulus=3)
01: 1 Poly(-x, x, modulus=3)
02: 2 Poly(-x**2 + x, x, modulus=3)
03: x Poly(0, x, modulus=3)
04: 2*x Poly(x**2 + 1, x, modulus=3)
05: x**2 Poly(0, x, modulus=3)
06: 2*x**2 Poly(x**2 + x - 1, x, modulus=3)
07: x**2 + 1 Poly(x**2 - x + 1, x, modulus=3)
08: x**2 + 2 Poly(-x**2 + x + 1, x, modulus=3)
09: 2*x**2 + 1 Poly(x**2, x, modulus=3)
10: 2*x**2 + 2 Poly(x**2 - x, x, modulus=3)
11: x**2 + x Poly(x**2 - 1, x, modulus=3)
12: 2*x**2 + x Poly(x**2 + x - 1, x, modulus=3)
13: x**2 + 2*x + 1 Poly(-x**2 - 1, x, modulus=3)
14: x**2 + 2*x + 2 Poly(-1, x, modulus=3)
15: x**2 + x + 1 Poly(-x**2 + x, x, modulus=3)
16: x**2 + x + 2 Poly(-x, x, modulus=3)
17: 2*x**2 + 2*x + 1 Poly(x, x, modulus=3)
18: 2*x**2 + 2*x + 2 Poly(x, x, modulus=3)
19: 2*x**2 + x + 1 Poly(x**2 - x, x, modulus=3)
20: 2*x**2 + x + 2 Poly(x**2, x, modulus=3)
21: 2*x + 1 Poly(-1, x, modulus=3)
22: 2*x + 2 Poly(-x**2 - 1, x, modulus=3)
23: x + 1 Poly(-x**2 + x + 1, x, modulus=3)
24: x + 2 Poly(x**2 - x + 1, x, modulus=3)
25: x**2 + 2*x Poly(x**2 + 1, x, modulus=3)
26: 2*x**2 + 2*x Poly(x - 1, x, modulus=3)
As we can see,
- for
:
- for
:
Since