Im thinking about 8 elemental field. I know about using polynoms, however, is there any possibility to construct the field with 8 elements, and these elements would be 0,1,a,b,c,d,e,f where all a,b,c,d,e,f are real numbers? Something what would behave as well as Zp. I'm simply looking for some relation, which would allow me to sum / multiply easily in real numbers and the result would be transformed. Of course im requiring all 9 axioms. Thank you and have a good evening :-)
-
See this. – Git Gud Oct 23 '15 at 22:35
-
I think you are going to be disappointed here, Leechy. – TonyK Oct 23 '15 at 22:41
2 Answers
In order to find the field with eight elements, which has dimension $3$ over the two element field $\mathbb{F}_2=\{0,1\}$, you just add a root of a cubic irreducible monic polynomial over $\mathbb{F}_2$.
Irreducibility of a degree $3$ polynomial is equivalent to it not having roots. It's clear then that such a polynomial is $f(x)=x^3+x+1$.
The construction is standard: take the polynomial ring $\mathbb{F}_2[x]$ and quotient it by the ideal $I$ generated by $f(x)$. If $\alpha$ is the image under the quotient map of $x$, the elements can be listed as $$ 0, 1\\ \alpha, \alpha+1\\ \alpha^2, \alpha^2+1\\ \alpha^2+\alpha, \alpha^2+\alpha+1 $$ where addition is performed in the natural way, remembering that $\alpha+\alpha=\alpha^2+\alpha^2=0$ and multiplication obeys the standard rules plus $$ \alpha^3=\alpha+1 $$
In particular, \begin{align} \alpha^4&=\alpha^2+\alpha\\ \alpha^5&=\alpha^2+\alpha+1\\ \alpha^6&=\alpha^2+1 \end{align} so the field is also described as $$ \{0,1=\alpha^0,\alpha=\alpha^1, \alpha^2,\alpha^3,\alpha^4,\alpha^5,\alpha^6\} $$
No, you can't represent this with real numbers.

- 238,574
Take the ordinary integers $0, 1, 4, 5, 16, 17, 20, 21$ and associate them with the field elements as listed in egreg's answer as follows: \begin{align} 0 = \mathbf{0}0\mathbf{0}0\mathbf{0} &\leftrightarrow 0\\ 1= \mathbf{0}0\mathbf{0}0\mathbf{1} &\leftrightarrow 1\\ 4 = \mathbf{0}0\mathbf{1}0\mathbf{0} &\leftrightarrow \alpha\\ 5 = \mathbf{0}0\mathbf{1}0\mathbf{1} &\leftrightarrow \alpha +1 = \alpha^3\\ 16 = \mathbf{1}0\mathbf{0}0\mathbf{0} &\leftrightarrow \alpha^2\\ 17 = \mathbf{1}0\mathbf{0}0\mathbf{1} &\leftrightarrow \alpha^2 +1 = \alpha^6\\ 20 = \mathbf{1}0\mathbf{1}0\mathbf{0} &\leftrightarrow \alpha^2 +\alpha = \alpha^4\\ 21 =\mathbf{1}0\mathbf{1}0\mathbf{1} &\leftrightarrow \alpha^2 +\alpha + 1= \alpha^5 \end{align}
In a computer, all these integers can fit into one byte or one word and can be operated on using the integer arithmetic operations of the computer.
Field addition operation:
If you are willing to allow the use of the logical operations permitted on operands, then addition in $\mathbb F_8$
can be implemented as the Exclusive OR (commonly called XOR) operation that is available in most computers
as well as in computer languages such as C: a^b
is the Exclusive OR
of the operands a
and b
. But, if you refuse to countenance
usage of the XOR operation,then you
can implement addition in $\mathbb F_8$ with arithmetic operations
only, though multiple additional steps are required. For
example, the arithmetic sum of
$4 = \mathbf{0}0\mathbf{1}0\mathbf{0}=\alpha$
and $5 = \mathbf{0}0\mathbf{1}0\mathbf{1} = \alpha+1$ is
$9 = \mathbf{0}1\mathbf{0}0\mathbf{1}$ in which
the bits in bold are correct because the sum of
$\alpha$ and $\alpha+1$ is the field element $1$
whose representation is $\mathbf{0}0\mathbf{0}0\mathbf{1}$.
In fact, this will hold true in all the additions: the
bits in bold in the sum are correct. What is needed is
to change any of the bits in the even-numbered positions
(counting from the right with the least significant bit being
in position #1)
that happen to have value $1$ back to value $0$. The easiest way
to do this is to AND the sum $\mathbf{0}1\mathbf{0}0\mathbf{1}$ with $010101$ which will force the bits in the even-numbered locations to $0$,
but since we are eschewing the use of logical operations, we can
use a series of if then
or if then else
operations to achieve the
same result. For example, if the sum is $32$ or more, both the addends must have been
from $\{16,17,20,21\}$ and so subtract $32$ so that
the remaining 5-bit pattern of the sum has a leading $0$. Next,
check whether the remaining $5$-bit pattern has a $1$ in the
secondmost significant bit, and if so, subtract $16$, and so
on.... Alternatively, we can use table look-up: just look up the answer in a table that has $42$ entries and will return $0$ if the sum
is $0,2,8,10,32,34,40, 42$, return $1$ if the sum is $1, 9,33,41$,
return $4$ if the sum is $4,6,36,38$, etc.
Field multiplication operation:
Field multiplication operations also can be implemented starting with
ordinary integer multiplication. Once again, the bits in the odd-numbered
positions are correct while the bits in the even-numbered positions
might have $1$ values that need to be reset back to $0$ For example,
$$21\times 21 = 441 = \mathbf{1}1\mathbf{0}1\mathbf{1}1\mathbf{0}0\mathbf{1}$$
in which, if we set all the unbolded bits to $0$, we get
$\mathbf{1}0\mathbf{0}0\mathbf{1}0\mathbf{0}0\mathbf{1}$
or $\alpha^4+\alpha^2+1$ as the product. Then we have to reduce
everything modulo $\alpha^3+\alpha+1$ etc which again can be done
via arithmetic operations alone. Or, we can implement
a table-lookup algorithm that will return the correct
value $\in \{0,1,4,5,16,17,20,21\}$.
Alternatively, we can use logarithms and antilogarithm
tables which are much smaller. See this answer for some details.
Indeed, if the use of log and antilog tables for field multiplication
and the use of the XOR operation for field addition is acceptable,
then it suffices to use $\{0,1,2,3,4,5,6,7\}$ instead
of $\{0,1,4,5,16,17,20,21\}$ to represent the field elements.

- 25,197