|
|
GAP Instructional MaterialReturn to Index
GAP code is shown [Press ?? to see GAP output] You can also choose to see a page showing ALL GAP output. Finite fields
GAP knows that there is a unique finite field of order n = pk for any prime p. It calls it GF(n). (This stands for Galois Field.)
We can illustrate how this works with GF(11). To create this field and name it F we use the command
One often calculates with the elements of this field as if they were integers { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } but GAP distinguishes between elements of GF(11) and integers. For example 0 is not an element of GF(11), so we get false if we test this
In fact none of the integers { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } are elements of F. The zero of F is given as follows
and the multiplicative identity is
We could denote the zero element by 0
Now we have the elements of F by multiplying the integers { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } each by One(F)
GAP chooses a generating element of the (cyclic) multiplicative group of the field as Z(11) and displays the elements as
There is, however, a better way to convert elements of GF(11) written in GAP notation back to 0, 1, 2, ... using
In general we can convert all the elements of GF(11) back to corresponding integers since 11 is prime.
We can now do calculations in F as follows. All the following calculate the multiplicative inverse of Z(11), which is the same as the multiplicative inverse of "2".
We can add elements of F
A moment's thought shows that this is right: 2 + 4 = 6 is the inverse of 2 in GF(11). Again as above, several different commands will give us the additive inverse (i.e. negative) of Z(11).
Now the non-zero elements of F have multiplicative orders which can be calculated as follows
or for all the elements
We can see that there are four generators of the multiplicative group of GF(11).
We begin by setting up our field GF(3).
We need an indeterminate in order to look at polynomials over GF(3). We'll use x.
We now set up an empty list and add irreducible polynomials (ones which cannot be written as a product of polynomials of lower degree) to the list. We examine all polynomials of degree up to 4, finding whether they are irreducible and if so add them to the list. GAP does not give any ouut here.
To see how many irreducible polynomials there are of degree up to 4 over GF(3) we need only look now at the length of our list.
There are 64 of them. Suppose we want to find how many polynomials of degree up to 4 over GF(3) have one factor, how many have two factors, etc.
Let us see how many there are of each length
Notice there were 64 irreducible polynomials but 67 polynomials with a single factor. This is because 0, 1, -1 are polynomials with a single factor but are not irreducible. The total should be 35 - let us check
We input the field of 4 elements
Let us see how GAP represents its elements
Elements of GF(4) are roots of polynomials over GF(2) and so of course not all the elements of GF(4) have representations as integers. We can only apply
Applying
Now the prime field of F should be GF(2)
and F should have degree 2 over its prime subfield
F must be defined by an irreducible polynomial over its prime subfield. Let us find the one that GAP is using. Note that GAP calls the indeterminate x1 .
To convince ourselves that it is irreducible, look at its irreducible factors.
The generator of
Now we check that Z(4) is a root of 1 + x + x2
We examine exactly the same features of GF( 24 ) as for GF( 4 )
Now the prime field of F should be GF(2) and F should have degree 4 over GF(2)
The defining polynomial in this case is
which, of course, is irreducible
Its root will be Z(24)
and of course Z(24) satisfies this irreducible polynomial
But there are other irreducible polynomials of degree 4 over GF(2) that we could use to define a field with 16 elements. Let us use 1 + x3 + x4.
Now the defining polynomial will be 1 + x3 + x4 because we have defined it to be this.
The root of the defining polynomial will not now be Z(24 ) of course. What is it?
The elements of FF are in fact the same 16 elements that GAP has defines in its version of GF(24).
Note the following important fact relating to finite fields.
will return "true". Of course GF(4) is not contained in GF(8) so
will return "false".
Suppose we wanted to define GF(2n) by means of a trinomial over GF(2). To do this requires there to be an irreducible polynomial of the form 1 + xi + xn over GF(2) for every n. Let us test whether this looks likely. First set up a polynomial ring over GF(2).
for n in [2..20] do We see that there is no such polynomial for degree 8, 13, 16, 19, ... Perhaps we should print out the numbers for which there is no irreducible trinomial. We will use the fact that if 1 + xi + xn is irreducible then so is 1 + x(n-i) + xn. So, for n > 2, we will never find that the first irreducible we reach is beyond 1 + xm + xn where m = Int(n/2), the integer part of n/2. This observation speeds up the calculation.
We have used a It seems as if there is no irreducible trinomial for n a multiple of 8. Is this true? Perhaps we should look for more evidence
So these multiples of 8 all have no irreducible trinomial. Must be worth trying to prove a theorem.
Can you spot any other likely theorems? JOC/EFR January 2003 |
|
Home   |   Members   |   Pre-prints   |   Library   |   Reports   |   Seminars   |   Conferences   |   Research   |   Publicity   |  Pictures   |   GAP   |   Webmail |