16
A primitive element of a finite field is a generator of the multiplicative group of the field. In other words, alpha
in F(q)
is called a primitive element if it is a primitive q−1
th root of unity in F(q)
. This means that all the non-zero elements of F(q)
can be written as alpha^i
for some (positive) integer i
.
All elements of the field F_{2^k}
can be written as polynomials of degree at most k-1
with coefficients that are either 1
or 0
. In order to make this complete, your code also needs to output an irreducible polynomial of degree k
which defines the field you are using.
The task is write code that outputs a primitive element of F_{2^k}
of your choosing for each k = 1 .. 32
in order.
Your output must simply list the k
coefficients of the primitive element in any format that you like and then on a separate line the k+1
elements of the irreducible polynomial. Please separate the outputs for each value of k
if possible.
Your code may take as long as you like but you must have run it to completion before submitting your answer.
You may not use any builtin or library function which returns primitive elements of a finite field or tests whether an element is primitive.
An example
For k = 1
the only primitive element is 1
.
For k = 2
we have F_4
. The 4 elements are {0, 1, x, x + 1}
so there are two primitive elements x
and x + 1
. So the code could output
1 1
1 1 1
as the coefficients for example where the second line is the irreducible polynomial which in this case is x^2+x+1
which has coefficients 1 1 1
.
4Got any examples? – Okx – 2017-07-01T16:49:20.643
1May we also output the polynomials and/or field elements encoded as the bits of an integer we output? – orlp – 2017-07-01T17:57:49.513
@orlp Yes absolutely. – None – 2017-07-01T17:58:15.567
1
I think Pari/GP is the only language that has a built-in for this.
– alephalpha – 2017-07-02T01:57:48.307Can I use a built-in to test whether a polynomial is primitive?
– alephalpha – 2017-07-02T02:24:57.790@alephalpha Good question. No please don't. Having said that, if you have a non competing answer. In gp/pari I could add it to the question and use it to produce more examples. – None – 2017-07-02T02:29:33.037
1
@Lembik OK. Try it online!
– alephalpha – 2017-07-02T02:44:43.793@alephalpha: Macaulay2 has a couple of builtins for this too.
– Not a tree – 2017-07-02T03:13:33.577…or you can avoid those builtins with something like
n->(k=GF 2^n;lift(k_0,ambient k))
. – Not a tree – 2017-07-02T03:17:38.590Your examples are wrong. You say
k=1
,k=2
, but the fields you describe areF_1
,F_2
, notF_2
,F_4
. – isaacg – 2017-07-02T04:43:41.047@isaacg, F_1 would be quite the challenge. – Peter Taylor – 2017-07-02T05:39:06.750
@isaacg I think the examples are OK.
– None – 2017-07-02T09:36:30.720F_1
doesn't exist. See https://en.wikipedia.org/wiki/Field_with_one_element@Lembik You're right, I misunderstood the challenge – isaacg – 2017-07-02T10:00:42.467