1. Introduction
The finite fields GF(
) with a prime of
p and an integer of
have been widely used in modern information coding, information processing, cryptography, and so on. Specifically, in the study of
linear network coding (LNC), conventional LNC [
1] transmits data symbols along the edges over GF(
), and every outgoing edge of a node
v transmits a data symbol that is a GF(
)-linear combination of the incoming data symbols to
v. A general LNC framework called
vector LNC [
2] models the
data unit transmitted along every edge as an
L-dimensional vector of data symbols over GF(
p). Correspondingly, the coding operations at
v involve GF(
p)-linear combinations of all data symbols in incoming data unit vectors and are naturally represented by
matrices over GF(
p).
Recently, many works [
3,
4,
5,
6,
7] have shown that vector LNC has the potential to reduce extra coding overheads in networks relative to conventional LNC. In order to achieve vector LNC, a
matrix representation of GF(
) [
8] is
matrices over GF(
p) so that the arithmetic of GF(
) can be realized by the arithmetic among these matrices over GF(
p). Based on the matrix representation of GF(
), a conventional LNC scheme over GF(
) can be transformed to an
L-dimensional vector LNC scheme over GF(
p). In addition to the theory of LNC, many existing implementations of linear codes, such as the Cauchy-RS codes in the Longhair library [
9] and the RS codes in the Jerasure library [
10,
11] and the latest release of the ISA-L library [
12], also practically achieve arithmetic over GF(
) using matrix representation.
In order to achieve the matrix representation of GF(
), a classical result obtained in [
13] relies on polynomial multiplications to describe the corresponding matrix of an element over GF(
). A number of current implementations and studies (see, e.g., [
9,
10,
11,
12,
13,
14,
15]) utilize such a characterization to achieve the matrix representation of GF(
). However, the characterization in the present form focuses more on the structure of every individual matrix and does not shed light on the inherent correlation between matrices that corresponds to different elements. As a result, in the aforementioned existing implementations, the corresponding binary matrix is either independently computed on demand or fully stored in a lookup table as an
matrix over GF(2) in advance.
In the first part of this paper, we shall generalize the characterization of matrix representation from over GF(
to over GF(
) and paraphrase it from the perspective of matrices with different powers so that the inherent correlation among these matrices will become more transparent. More importantly, this correlation motivates us to devise a lookup table to pre-store the matrix representation with a smaller size. Specifically, compared to the one adopted in the latest release of the ISA-L library [
12], the table size is reduced by a factor of
. Additionally, this correlation also implies useful theoretical results that can be adopted to further demonstrate the advantages of binary matrix representation in vector LNC. In the second part, we focus on the study of vector LNC and show the applications of matrix representation related to the aspects of random and deterministic coding. In random coding, we theoretically analyze the coding complexity of conventional and vector LNC via matrix representation under the same alphabet size
. The comparison results show that vector LNC via matrix representation can reduce at least half of the coding complexity to achieve multiplications. Then, in deterministic LNC, we focus on the special choice of coding operations that can be efficiently implemented. In particular, we illustrate that the choice of primitive polynomial can influence the distributions of matrices with different numbers of non-zero entries and propose an algorithm to obtain a set of sparse matrices that can be good candidates for the coefficients of a practical LNC scheme.
This paper is structured as follows.
Section 2 reviews the mathematical fundamentals of representations to an extension field GF(
).
Section 3 paraphrases the matrix representation from the perspective of matrices in different powers and then devises a lookup table to pre-store the matrix representation with a smaller size.
Section 4 focuses on the study of vector LNC and shows the applications of matrix representation related to the aspects of random and deterministic coding.
Section 5 summarizes this paper.
Notation. In this paper, every bold symbol represents a vector or a matrix. In particular, refers to the identity matrix of size L, and 0, 1, respectively, represent an all-zero or all-one matrix, whose size, if not explicitly explained, can be inferred in the context.
2. Preliminaries
In this section, we review three different approaches to express an extension field GF(
) with
elements, where
p is a prime. The first approach is the standard
polynomial representation. Let
denote an irreducible polynomial of degree
L over GF(
p) and
be a root of
. Every element of GF(
) can be uniquely expressed as a polynomial in
over GF(
p) with a degree less than
L, and
forms a basis GF(
) over GF(
p). In particular, every
can be uniquely represented in the form of
with
. In the polynomial representation, the element
is expressed as the
L-dimensional
representative vector over GF(
p). In order to further simplify this expression,
can be written as the integer
such that
where
is the integer representation of
, that is,
where 1 is to be the multiplicative unit of GF(
p).
The second approach is called the
generator representation, which further requires
to be a primitive polynomial such that
is a primitive element, and all
non-zero elements in GF(
) can be generated as
. Thus, every non-zero
is uniquely expressed as the integer
subject to
The
polynomial representation clearly specifies the additive structure of GF(
) as a vector space or a quotient ring of polynomials over GF(
p) while leaving the multiplicative structure hard to determine. Meanwhile, the
generator representation explicitly illustrates the cyclic multiplicative group structure of
without clearly demonstrating the additive structure. It turns out that the addition operation and its inverse in
are easy to implement based on the
polynomial representation, while the multiplicative operations and its inverse in
are easy to be implement based on the
generator representation. In particular, for
,
where the operation ⊕ between two integers
and
means the component-wise
p-ary addition
between the
p-ary expression
,
of them. This is the key reason that in practice both representations are always adopted interchangeably when conducting operations in GF(
).
Unfortunately, except for some special
, such as
,
, there is not a straightforward way to establish the mapping between
and
without computation, and a built-in lookup table is always adopted in practice to establish the mapping between two types of representations. For instance,
Table 1 lists the mapping between
and
for non-zero elements
in
with
.
By convention, elements
in GF(
) are represented as
. It takes
L p-ary additions to compute
. Based on the lookup table, it takes 3 lookups (which, respectively, map
,
to
,
and
to
), 1 integer addition, and at most 1 modulo
operation to compute
. Meanwhile, it is worthwhile to note that the calculation of
without the table follows the multiplication of polynomials
and
with coefficient vectors
and
, respectively, and finally falls into
where the computational complexity compared with the following matrix representation will be fully discussed in
Section 4.
The third approach, which is the focus of this paper, is given by means of matrices called the
matrix representation [
8]. Let
be the
companion matrix of an irreducible polynomial
of degree
L over GF(
p). In particular, if
with
,
It can be easily verified that
is the characteristic polynomial of
, and according to the Cayley–Hamilton theorem,
. As a result,
forms a basis of GF(
) over GF(
p), and for every
with the representative vector
based on the polynomial representation, the matrix representation
of
is defined as
If the considered
further qualifies as a primitive polynomial, then similar to the role of the primitive element
defined above,
is also a multiplicative generator of all non-zero elements in GF(
), that is,
for all
. One advantage for the matrix representation is that all operations in GF(
) can be realized by matrix operations over GF(
p) among the matrices in
such that there is no need to interchange between the polynomial and the generator representations in performing field operations. For more detailed discussions of representation of an extension field, please refer to [
16].
Based on the polynomial representation and generator representation, even though the arithmetic over GF(
) can be efficiently realized by (
3), (
4) and a lookup table, it requires two different types of calculation systems, i.e., one over GF(
p) and the other over integers. This hinders the deployment practicality in applications with resource-constrained edge devices, such as in ad hoc networks or Internet of Things applications. In comparison, the matrix representation of GF(
) interprets the arithmetic of GF(
) solely over the arithmetic over GF(
p), so it is also a good candidate for realization of the efficient implementation of linear codes over GF(
) such as in [
9,
10,
11,
12,
13].
3. Useful Characterization of the Matrix Representation
Let
be a defined irreducible polynomial over GF(
p) of degree
L and let
be a root of
. When
, a useful characterization of the matrix representation
of
(with respect to
) can be deduced based on the following classical result obtained in Construction 4.1 and Lemma 4.2 of [
13]: For
, the
jth column in
is equal to the binary expression of
based on the polynomial representation. A number of implementations and studies (see, e.g., [
9,
10,
11,
12,
13,
14,
15]) of linear codes utilize such characterization to achieve the matrix representation of GF(
). However, the characterization in the present form relies on polynomial multiplications and focuses more on the structure of every individual
. It does not explicitly shed light on the inherent correlation among
of different
. It turns out that in existing implementations, such as the Cauchy-RS codes in the Longhair library [
9] and the RS codes in the Jerasure library [
10,
11], and the latest release of ISA-L library [
12],
is either independently computed on demand or fully stored in a lookup table as an
matrix over GF(2) in advance.
In this section, we shall generalize the characterization of matrix representation from over GF( to over GF() and paraphrase it based on the interplay with the generator representation instead of the conventional polynomial representation so that the correlation among of different will become more transparent. From now on, we assume that is further qualified to be a primitive polynomial such that is a primitive element in . For simplicity, let , , denote the representative (column) vector of based on the polynomial representation. Then, the following theorem asserts that the matrix representation consists of L representative vectors with consecutive subscripts.
Theorem 1. For , the matrix representation can be written as follows:As , we omit the modulo- expressions on the exponent of and subscript of throughout this paper for brevity. Proof. First, the matrix
can be characterized by multiplication iterations based on (
6) as follows. When
,
where
matrix
. Further, when
,
The entries in (
9) and (
10) iteratively qualify
and
When
, it can be easily checked that each vector in
is a unit vector such that the only non-zero entry 1 of
locates at
th row. Therefore,
, and (
8) holds. When
, consider
with
, i.e.,
Obviously,
and (
8) holds.
Assume when
, (
8) holds, i.e.,
. The
Lth column vector
of
based on (
9) corresponds to the representative vector of
, that is, the matrix
is equal to
It remains to prove, by induction, that
As the column vectors indexed from 1th to
th of matrix
are exactly same as the ones indexed from 2th to
Lth of
, it suffices to show that the
Lth column vector of
corresponds to
. The following is based on (
13) and (
14):
It can be easily checked that
and
with
in
calculated by (
12) exactly consist of the representative vector of
, i.e.,
. This completes the proof. □
The above theorem draws an interesting conclusion that every non-zero matrix in
is composed of
L representative vectors. Specifically, the first column vector of the matrix representation
is the representative vector of
, and its
jth column vector,
, corresponds to the representative vector of
. For the case
, even though the above theorem is essentially same as Construction 4.1 and Lemma 4.2 in [
13], its expression with the interplay of generator representation allows us to further devise a lookup table to pre-store the matrix representation with a smaller size.
In this table, we store representative vectors with table size and arrange them based on the power order of with . Note that the first column of matrix can be indexed by vector or th column in this table, and the remaining columns of can be obtained via subsequent column vectors based on Theorem 1. As a result, although this table only stores vectors, it contains the whole matrix representations of due to the inherent correlation among . The following Example 1 shows the explicit lookup table of as an example.
Example 1. Consider the field GF() and primitive polynomial over GF(2). The companion matrix is written as follows:Then, the lookup table to store matrix representation with is shown in Figure 1. In this figure, the solid “window” that currently represents the matrix can be slid to the right or left to generate with different i; meanwhile, the dashed box shows the cyclic property based on cyclic group . Recall that in the lookup table of the matrix representation adopted in the latest release of the ISA-L library [
12], the matrix representation of every element in
needs to be stored, so a total of
p-ary elements need to be pre-stored. Compared with that, only an
p-ary matrix needs to be stored in the new lookup table, so the table size is reduced by a factor of
. Moreover, Theorem 1 implies the following useful corollaries of the matrix representation
of
.
Corollary 1. Every vector in the vector space GF( exactly occurs L times as a column vector in matrices of .
Proof. As forms a polynomial basis of GF() over GF(p), the representative vectors of matrices in are distinct. Consider a function . It can be easily checked that f is bijective, and exactly corresponds to the jth column vector of with . The zero vector of length L simply occurs L times in matrix . □
Corollary 2. For every GF(), regardless of the choice of the primitive polynomial , the total number of zero entries in remains unchanged as .
The above two corollaries will be adopted to further demonstrate the advantages of binary matrix representation in vector LNC with .