1 Introduction

In order to meet channel capacity, as Shannon postulated, long error-correction codes with large minimum distances need to be found. A large effort in research has been dedicated to finding algebraic codes with good properties and efficient decoding algorithms. Reed–Solomon (RS) codes are a product of this research and have over the years found numerous applications, the most noteworthy being their implementation in satellite systems, compact discs, hard drives and modern, digitally based communications. These codes are defined with non-binary alphabets and have the maximum achievable minimum distance for codes of their lengths. A generalisation of RS codes was introduced by Goppa using a unique construction of codes from algebraic curves. This development led to active research in that area so that currently the complexity of encoding and decoding these codes has been reduced greatly from when they were first presented. These codes are algebraic geometry (AG) codes and have much greater lengths than RS codes with the same alphabets. Furthermore these codes can be improved if curves with desirable properties can be found. AG codes have good properties and some families of these codes have been shown to be asymptotically superior as they exceed the well-known Gilbert–Varshamov bound [16] when the defining finite field \(\mathbb {F}_q\) has size \(q \ge 49\) with q always a square.

2 Motivation for Studying AG Codes

Aside from their proven superior asymptotic performance when the field size \(q^2>49\), AG codes defined in much smaller fields have very good parameters. A closer look at tables of best-known codes in [8, 15] shows that algebraic geometry codes feature as the best-known linear codes for an appreciable range of code lengths for different field sizes q. To demonstrate a comparison the parameters of AG codes with shortened BCH codes in fields with small sizes and characteristic 2 is given. AG codes of length n, dimension k have minimum distance \(d=n-k-g+1\) where g is called the genus . Notice that \(n-k+1\) is the distance of a maximum distance (MDS) separable code. The genus g is then the Singleton defect s of an AG code. The Singleton defect is simply the difference between the distance of a code and the distance some hypothetical MDS code of the same length and dimension. Similarly a BCH code is a code with length n, dimension k, and distance \(d=n-k-s+1\) where s is the Singleton defect and number of non-consecutive roots of the BCH code.

Consider Table 8.1, which compares the parameters of AG codes from three curves with genera 3, 7, and 14 with shortened BCH codes with similar code rates. At high rates, BCH codes tend to have better minimum distances or smaller Singleton defects. This is because the roots of the BCH code with high rates are usually cyclically consecutive and thus contribute to the minimum distance. For rates close to half, AG codes are better than BCH codes since the number of non-consecutive roots of the BCH code is increased as a result of conjugacy classes. The AG codes benefit from the fact that their Singleton defect or genus remains fixed for all rates. As a consequence AG codes significantly outperform BCH codes at lower rates. However, the genera of curves with many points in small finite fields are usually large and as the length of the AG codes increases in \(\mathbb {F}_8\), the BCH codes beat AG codes in performance. Tables 8.2 and 8.3 show the comparison between AG and BCH codes in fields \(\mathbb {F}_{16}\) and \(\mathbb {F}_{32}\), respectively. With larger field sizes, curves with many points and small genera can be used, and AG codes do much better than BCH codes. It is worth noting that Tables 8.1, 8.2 and 8.3 show codes in fields with size less than 49.

Table 8.1 Comparison between BCH and AG codes in \(\mathbb {F}_8\)
Table 8.2 Comparison between BCH and AG codes in \(\mathbb {F}_{16}\)
Table 8.3 Comparison between BCH and AG codes in \(\mathbb {F}_{32}\)

2.1 Bounds Relevant to Algebraic Geometry Codes

Bounds on the performance of codes that are relevant to AG codes are presented in order to show the performance of these codes. Let \(A_{q}(n,d)\) represent the number of codewords in the code space of a code \(\mathscr {C}\) with length n, minimum distance d and defined over a field of size q. Let the information rate be \(R=k/n\) and the relative minimum distance be \(\delta =d/n\) for \(0 \le \delta \le 1\), then

$$\begin{aligned} \alpha _{q}(\delta )=\lim _{\begin{array}{c} n \rightarrow \infty \end{array}}\frac{1}{n}A_{q}(n,\delta n) \end{aligned}$$

which represents the k / n such that there exists a code over a field of size q that has d / n converging to \(\delta \) [18]. The q-ary entropy function is given by

$$\begin{aligned} H_{q}(x)= {\left\{ \begin{array}{ll} 0, &{}x=0 \\ x\log _{q}(q-1)-x\log _{q}x-(1-x)\log _q(1-x), &{}0<x\le \theta \\ \end{array}\right. } \end{aligned}$$

The asymptotic Gilbert–Varshamov lower bound on \(\alpha _{q}(\delta )\) is given by,

$$\begin{aligned} \alpha _{q}(\delta )\ge 1-H_{q}(\delta ) \quad \text {for}\, 0 \le \delta \le \theta \end{aligned}$$

The Tsfasman–Vladut–Zink bound is a lower bound on \(\alpha _{q}(\delta )\) and holds true for certain families of AG codes, it is given by

$$\begin{aligned} \alpha _{q}(\delta )\ge 1-\delta -\frac{1}{\sqrt{q}-1} \,\,\, \text {where}\,\sqrt{q} \in \mathbb {N}/0 \end{aligned}$$

The supremacy of AG codes lies in the fact that the TVZ bound ensures that these codes have better performance when q is a perfect square and \(q\ge 49\).

The Figs. 8.1, 8.2 and 8.3 show the R vs \(\delta \) plot of these bounds for some range of q.

Fig. 8.1
figure 1

Tsfasman–Vladut–Zink and Gilbert–Varshamov bound for \(q=32\)

Fig. 8.2
figure 2

Tsfasman–Vladut–Zink and Gilbert–Varshamov bound for \(q=64\)

Fig. 8.3
figure 3

Tsfasman–Vladut–Zink and Gilbert–Varshamov bound for \(q=256\)

3 Curves and Planes

In this section, the notion of curves and planes are introduced. Definitions and discussions are restricted to two-dimensional planes and all polynomials are assumed to be defined with coefficients in the finite field \(\mathbb {F}_q\). The section draws from the following sources [2, 12, 17, 18]. Let f(xy) be a polynomial in the bivariate ring \(\mathbb {F}_{q}[x,y]\).

Definition 8.1

(Curve) A curve is the set of points for which the polynomial f(xy) vanishes to zero. Mathematically, a curve \(\mathscr {X}\) is associated with a polynomial f(xy) so that \(f(P)=\lbrace 0 | P \in \mathscr {X} \rbrace \).

A curve is a subset of a plane. There are two main types of planes; the affine plane and the projective plane. These planes are multidimensional, however, we restrict our discussion to two-dimensional planes only.

Definition 8.2

(Affine Plane) A two-dimensional affine plane denoted by \(\mathbb {A}^2(\mathbb {F}_q)\) is a set of points,

$$\begin{aligned} \mathbb {A}^2(\mathbb {F}_q)=\{(\alpha ,\beta ): \alpha ,\beta \in \mathbb {F}_{q}\} \end{aligned}$$
(8.1)

which has cardinality \(q^2\).

A curve \(\mathscr {X}\) is called an affine curve if \(\mathscr {X}\subset \mathbb {A}^2(\mathbb {F}_q)\).

Definition 8.3

(Projective Plane) A two-dimensional projective plane \(\mathbb {P}^2(\mathbb {F}_q)\) is the algebraic closure of \(\mathbb {A}^2\) and is defined as the set of equivalence points,

$$\begin{aligned} \mathbb {P}^2(\mathbb {F}_q)=\{(\alpha :\beta :1): \alpha ,\beta \in \mathbb {F}_{q}\} \bigcup \{(\alpha :1:0): \alpha \in \mathbb {F}_{q}\} \bigcup \{(1:0:0)\}. \end{aligned}$$

A curve \(\mathscr {X}\) is said to lie in the projective plane if \(\mathscr {X}\subset \mathbb {P}^2(\mathbb {F}_q)\). The points in the projective plane are called equivalence points since for any point \(P\in \mathbb {P}^2(\mathbb {F}_q)\),

$$\begin{aligned} \text {if} ~f(x_0,y_0,z_0)=0,\quad \text {then} \,\, f(\alpha x_0,\alpha y_0,\alpha z_0)=0 \qquad \alpha \in \mathbb {F}_q^*, ~P=(x_0:y_0:z_0) \end{aligned}$$

because f(xyz) is homogeneous. The colons in the notation of a projective point (x : y : z) represents this equivalence property.

The affine polynomial f(xy) is in two variables, in order to define a projective polynomial in three variables, homogenisation is used,

$$\begin{aligned} f(x,y,z)=z^df\left( \frac{x}{z},\frac{y}{z}\right) \qquad d=\text {Degree of }~f(x,y) \end{aligned}$$

which turns f(xy) into a homogeneousFootnote 1 polynomial in three variables. An n-dimensional projective polynomial has \(n+1\) variables. The affine space \(\mathbb {A}^2(\mathbb {F}_q)\) is a subset of \(\mathbb {P}^2(\mathbb {F}_q)\) and is given by,

$$\begin{aligned} \mathbb {A}^2(\mathbb {F}_q)=\{(\alpha :\beta :1): \alpha ,\beta \in \mathbb {F}_q\} \subset \mathbb {P}^2(\mathbb {F}_q). \end{aligned}$$

A projective curve can then be defined as a set of points,

$$\begin{aligned} \mathscr {X}=\{P:f(P)=0,~P\in \mathbb {P}^2(\mathbb {F}_q)\}. \end{aligned}$$

Definition 8.4

(Point at Infinity) A point on a projective curve \(\mathscr {X}\) that coincides with any of the points of \(\mathbb {P}^2(\mathbb {F}_q)\) of the form,

$$\begin{aligned} \{ (\alpha :1:0): \alpha \in \mathbb {F}_{q}\} \cup \{(1:0:0)\} \end{aligned}$$

i.e. points \((x_0:y_0:z_0)\) for which \(z_0=0\) is called a point at infinity .

A third plane, called the bicyclic plane [1], is a subset of the \(\mathbb {A}^2(\mathbb {F}_q)\) and consists of points,

$$\begin{aligned} \{(\alpha ,\beta ):\alpha ,\beta \in \mathbb {F}_q\setminus \{0\}\}. \end{aligned}$$

This plane was defined so as to adapt the Fourier transform to AG codes since the inverse Fourier transform is undefined for zero coordinates.

Example 8.1

Consider the two-dimensional affine plane \(\mathbb {A}^2(\mathbb {F}_4)\). Following the definition of \(\mathbb {A}^2(\mathbb {F}_4)\) we have,

$$ \begin{array}{cccc} (0,0) &{} (0,1) &{} (1,0) &{} (1,1)\\ (1,\alpha ) &{} (\alpha ,1) &{} (1,\alpha ^2) &{} (\alpha ^2,1)\\ (\alpha ^2,\alpha ) &{} (\alpha ,\alpha ^2) &{} (0,\alpha ^2) &{} (0,\alpha )\\ (\alpha ^2,0) &{} (\alpha ,0) &{} (\alpha ^2,\alpha ^2) &{} (\alpha ,\alpha ) \end{array} $$

where \(\alpha \) is the primitive element of the finite field \(\mathbb {F}_4\). The two-dimensional projective plane \(\mathbb {P}^2(\mathbb {F}_4)\) is given by,

Affine Points

Points at Infinity

(0 : 0 : 1)

\((0:1:1)\)

\((1:0 :1)\)

\((1:1 :1)\)

\((0:1:0)\)

\((1:0 :0)\)

\((1:\alpha :1)\)

\((\alpha :1 :1)\)

\((1 :\alpha ^2 :1)\)

\((\alpha ^2 :1 :1)\)

\((\alpha :1 :0)\)

 

\((\alpha ^2 :\alpha :1)\)

\((\alpha :\alpha ^2 :1)\)

\((0 :\alpha ^2 :1)\)

\((0 :\alpha :1)\)

\((\alpha ^2 :1 :0)\)

 

\((\alpha ^2 :0 :1)\)

\((\alpha :0 :1)\)

\((\alpha ^2 :\alpha ^2 :1)\)

\((\alpha :\alpha :1)\)

\((1:1 :0)\)

 

Definition 8.5

(Irreducible Curve) A curve associated with a polynomial f(xyz) that cannot be reduced or factorised is called irreducible .

Definition 8.6

(Singular Point) A point on a curve is singular if its evaluation on all partial derivatives of the defining polynomial with respect to each indeterminate is zero.

Suppose \(f_x\), \(f_y\), and \(f_z\) denote partial derivatives of f(xyz) with respect to x, y, and z respectively. A point \(P\in \mathscr {X}\) is singular if ,

$$\begin{aligned} \frac{\partial f(x,y,z)}{\partial x}=f_x, \frac{\partial f(x,y,z)}{\partial y}=f_y, \frac{\partial f(x,y,z)}{\partial z}=f_z\\ f_x(P)=f_y(P)=f_z(P)=0. \end{aligned}$$

Definition 8.7

(Smooth Curve) A curve \(\mathscr {X}\) is nonsingular or smooth does not contain any singular points .

To obtain AG codes, it is required that the defining curve is both irreducible and smooth.

Definition 8.8

(Genus) The genus of a curve can be seen as a measure of how many bends a curve has on its plane. The genus of a smooth curve defined by f(xyz) is given by the Plücker formula,

$$\begin{aligned} g=\frac{(d-1)(d-2)}{2},\quad d= \text {Degree of}~f(x,y,z) \end{aligned}$$

The genus plays an important role in determining the quality of AG codes. It is desirable for curves that define AG codes to have small genera.

Example 8.2

Consider the Hermitian curve in \(\mathbb {F}_{4}\) defined as,

$$\begin{aligned} f(x,y)&=x^3+y^2+y\quad \text {affine}\\ f(x,y,z)&=x^3+y^2z+yz^2\quad \text {projective via homogenisation} \end{aligned}$$

It is straightforward to verify that the curve is irreducible. The curve has the following projective points,

$$ \begin{array}{ccccc} (0:0:1) &{} (0:1:1) &{} (\alpha :\alpha :1) &{} (\alpha :\alpha ^{2}:1)\\ (\alpha ^2:\alpha :1) &{} (\alpha ^2:\alpha ^2:1) &{} (1:\alpha :1) &{} (1:\alpha ^2:1)&{} (0:1:0) \end{array} $$

Notice the curve has a single point at infinity \(P_{\infty }=(0:1:0)\). One can easily check that the curve has no singular points and is thus smooth.

3.1 Important Theorems and Concepts

The length of an AG code is utmost the number of points on the defining curve. Since it is desirable to obtain codes that are as long as possible, it is desirable to know what the maximum number of points attainable from a curve, given a genus is.

Theorem 8.1

(Hasse–Weil with Serre’s Improvement [2]) The Hasse–Weil theorem with Serre’s improvement says that the number of rational pointsFootnote 2 of an irreducible curve, n, with genus g in \(\mathbb {F}_q\) is upper bounded by,

$$ n \le q+1+g \lfloor 2 \sqrt{q} \rfloor . $$

Curves that meet this bound are called maximal curves . The Hermitian curves are examples of maximal curves. Bezout’s theorem is an important theorem, and is used to determine the minimum distance of algebraic geometry codes. It describes the size of the set which is the intersection of two curves in the projective plane.

Theorem 8.2

(Bezout’s Theorem [2]) Any two curves \(\mathscr {X}_a\) and \(\mathscr {X}_b\) with degrees of their associated polynomials as m and n respectively, have utmost \(m\times n\) common roots in the projective plane counted with multiplicity.

Definition 8.9

(Divisor) A divisor on a curve \(\mathscr {X}\) is a formal sum associated with the points of the curve.

$$\begin{aligned} D=\sum _{P \in \mathscr {X}}n_pP \end{aligned}$$

where \(n_p\) are integers.

A zero divisor is one that has \(n_p=0\) for all \(P\in \mathscr {X}\). A divisor is called effective if it is not a zero divisor . The support of a divisor is a subset of \(\mathscr {X}\) for which \(n_p\ne 0\). The degree of a divisor is given as,

$$\begin{aligned} deg(D)=\sum _{P\in \mathscr {X}}n_p~deg(P) \end{aligned}$$

For simplicity, it is assumed that the degree of points \(P\in \mathscr {X}\), i.e. deg(P) is 1 (points of higher degree are discussed in Sect. 8.4). Addition of two divisors \(D_1=\sum _{P \in \mathscr {X}}n_pP\) and \(D_2=\sum _{P \in \mathscr {X}}\acute{n}_pP\) is so defined,

$$\begin{aligned} D_1+D_2=\sum _{P\in \mathscr {X}}(n_p+\acute{n}_p)P. \end{aligned}$$

Divisors are simply book-keeping structures that store information on points of a curve. Below is an example the intersection divisor of two curves.

Example 8.3

Consider the Hermitian curve in \(\mathbb {F}_{4}\) defined as,

$$\begin{aligned} f_1(x,y,z)&=x^3+y^2z+yz^2 \end{aligned}$$

with points given in Example 8.2 and the curve defined by

$$\begin{aligned} f_2(x,y,z)&=x \end{aligned}$$

with points

$$ \begin{array}{ccccc} (0:0:1) &{} (0:1:1) &{} (0:\alpha :1) &{} (0:\alpha ^{2}:1) &{} (0:1:0)\\ \end{array} $$

These two curves intersect at 3 points below all with multiplicity 1,

$$ \begin{array}{ccc} (0:0:1)&(0:1:0)&(0:1:1). \end{array} $$

Alternatively, this may be represented using a divisor D,

$$\begin{aligned} D=(0:0:1) + (0:1:0) + (0:1:1) \end{aligned}$$

with \(n_p\) the multiplicity, equal to 1 for all the points. Notice that the two curves meet at exactly \(deg(f_1)deg(f_2)=3\) points in agreement with Bezout’s theorem.

For rational functions with denominators, points in divisor with \(n_p < 0\) are poles. For example, \(D=P_1-2P_2\) will denote an intersection divisor of two curves that have one zero \(P_1\) and pole \(P_2\) with multiplicity two in common. Below is the formal definition of the field of fractions of a curve \(\mathscr {X}\).

Definition 8.10

(Field of fractions) The field of fractions \(\mathbb {F}_q(\mathscr {X})\) of a curve \(\mathscr {X}\) defined by a polynomial f(xyz) contains all rational functions of the form

$$\begin{aligned} \frac{g(x,y,z)}{h(x,y,z)} \end{aligned}$$

with the restriction that g(xyz) and h(xyz) are homogeneous polynomials that have the same degree and are not divisible by f(xyz).

A subset (Riemann–Roch space) of the field of fractions of \(\mathscr {X}\) meeting certain conditions are evaluated at points of the curve \(\mathscr {X}\) to form codewords of an AG code. Thus, there is a one-to-one mapping between rational functions in this subset and codewords of an AG code. The Riemann–Roch theorem defines this subset and gives a lower bound on the dimension of AG codes. The definition of a Riemann–Roch space is given.

Definition 8.11

(Riemann–Roch Space) The Riemann–Roch space associated with a divisor D is given by,

$$ L(D)=\lbrace t\in \mathbb {F}_q(\mathscr {X})|(t) +D \ge 0 \rbrace \cup {0} $$

where \(\mathbb {F}_q(\mathscr {X})\) is the field of fractions and (t) is the intersection divisorFootnote 3 of the rational function t and the curve \(\mathscr {X}\).

Essentially, the Riemann–Roch space associated with a divisor D is a set of functions of the form t from the field of fractions \(\mathbb {F}_q(\mathscr {X})\) such that the divisor sum \((t)+D\) has no poles, i.e. \((t)+D\ge 0\).

The rational functions in L(D) are functions from the field of fractions \(\mathbb {F}_q(\mathscr {X})\) that must have poles only in the zeros (positive terms) contained in the divisor D, each pole occurring with utmost the multiplicity defined in the divisor D and most have zeros only in the poles (negative terms) contained in the divisor D, each zero occurring with at least the multiplicity defined in the divisor D.

Example 8.4

Suppose a hypothetical curve \(\mathscr {X}\) has points of degree one,

$$ \mathscr {X}=\{P_1,P_2,P_3,P_4\} $$

We choose a divisor \(D=2P_1-5P_2\) with degree \(-3\), and define a Riemann–Roch space L(D). If we randomly select three functions \(t_1\), \(t_2\), and \(t_3\) from the field of fractions \(\mathbb {F}_q(\mathscr {X})\) such that they have divisors,

$$ \begin{array}{ccc} (t_1)=-3P_1+5P_2+4P_4&(t_2)=2P_1+4P_2&(t_3)=-P_1+8P_2+P_3. \end{array} $$

\(t_1\notin L(D)\) since \((t_1)+D=-P_1+4P_4\) contains negative terms or poles. Also, \(t_2\notin L(D)\) since \((t_2)+D=4P_1-P_2\) contains negative terms. However, \(t_3\in L(D)\) since \((t_3)+D=P_1+3P_2+P_3\) contains no negative terms. Any function \(t\in \mathbb {F}_q(\mathscr {X})\) is also in L(D) if it has a pole at \(P_1\) with multiplicity at most 2 (with no other poles in common with \(\mathscr {X}\)) and a zero at \(P_2\) with multiplicity at least 5.

The Riemann–Roch space is a vector space (with rational functions as elements) thus, a set of basis functions. The size of this set is the dimension of the space.

Theorem 8.3

(Riemann Roch Theorem [2]) Let \(\mathscr {X}\) be a curve with genus g and D any divisor with degree \((D)>2g-2\), then the dimension of the Riemann–Roch space associated with D, denoted by l(D) is,

$$ l(D)=\text {degree}(D)-g+1 $$

Algebraic geometry codes are the image of an evaluation map of a Riemann–Roch space associated with a divisor D so that

$$ L(D) \rightarrow \mathbb {F}_{q}^{n} $$
$$ t \rightarrow (t(P_1),t(P_2),\dots ,t(P_n)) $$

where \(\mathscr {X}=\lbrace P_1,P_2,\dots ,P_n,P_x \rbrace \) is a smooth irreducible projective curve of genus g defined over \(\mathbb {F}_q\). The divisor D must have no points in common with a divisor T associated with \(\mathscr {X}\), i.e. it has support disjoint from T. For example, if the divisor T is of the form

$$ T=P_1+P_2+\dots +P_n $$

then, \(D=mP_{x}\).

Codes defined by the divisors T and \(D=mP_x\) are called one-point AG codes (since the divisor D has a support containing only one point), and AG codes are predominantly defined as so since the parameters of such codes are easily determined [10].

3.2 Construction of AG Codes

The following steps are necessary in order to construct a generator matrix of an AG code,

  1. 1.

    Find the points of a smooth irreducible curve and its genus.

  2. 2.

    Choose divisors D and \(T=P_1+\cdots +P_n\). From the Riemann–Roch theorem determine the dimension of the Riemann–Roch space L(D) associated with divisor D. This dimension l(D) is the dimension of the AG code.

  3. 3.

    Find \(k=l(D)\) linearly independent rational functions from L(D). These form the basis functions of L(D).

  4. 4.

    Evaluate all k basis functions on the points in the support of T to form the k rows of a generator matrix of the AG code.

Example 8.5

Consider again the Hermitian curve defined in \(\mathbb {F}_{4}\) as,

$$\begin{aligned} f(x,y,z)&=x^3+y^2z+yz^2 \end{aligned}$$
  1. 1.

    In Example 8.2 this curve was shown to have 8 affine points and one point at infinity. The genus of this curve is given by the Plücker formula,

    $$\begin{aligned} g=\frac{(r-1)(r-2)}{2}=1 \end{aligned}$$

    where \(r=3\) is the degree of f(xyz).

  2. 2.

    Let \(D=5P_{\infty }\) where \(P_{\infty }=(0:1:0)\) and T be the sum of all 8 affine points. The dimension of the Riemann–Roch space is then given by,

    $$\begin{aligned} l(5P_{\infty })=5-1+1=5 \end{aligned}$$

    thus, the AG code has dimension \(k=5\).

  3. 3.

    The basis functions for the space \(L(5P_{\infty })\) are

    $$\begin{aligned} \{t_1,\dots ,t_k\}=\left\{ 1,\frac{x}{z},\frac{x^2}{z^2},\frac{y}{z},\frac{xy}{z^2}\right\} \end{aligned}$$

    By examining the basis, it is clear that \(t_1=1\) has no poles, thus, \((t_1)+D\) has no poles also. Basis functions with denominator z have \((t_i)=S-P_{\infty }\), where S is a divisor of the numerator. Thus, \((t_i)+D\) has no poles. Basis functions with denominator \(z^2\) have \((t_j)=S-2P_{\infty }\), where S is a divisor of the numerator. Thus, \((t_j)+D\) also has no poles.

  4. 4.

    The generator matrix of the Hermitian code defined with divisor \(D=5P_{\infty }\) is thus,

    $$\begin{aligned} G&=\begin{bmatrix} t_1(P_1)&\cdots&t_1(P_n)\\ \vdots&\ddots&\vdots \\ t_k(P_1)&\cdots&t_k(P_n)\\ \end{bmatrix}\\&=\begin{bmatrix} 1&0&0&0&0&\alpha ^2&\alpha ^2&1\\ 0&1&0&0&0&\alpha ^2&\alpha&0\\ 0&0&1&0&0&\alpha&1&\alpha \\ 0&0&0&1&0&\alpha&0&\alpha ^2\\ 0&0&0&0&1&1&1&1 \end{bmatrix} \end{aligned}$$

Example 8.6

Consider the curve defined in \(\mathbb {F}_{8}\) as,

$$\begin{aligned} f(x,y,z)&=x \end{aligned}$$
  1. 1.

    This curve is a straight line and has 8 affine points of the form \((0:\beta :1)\) and one point at infinity (0 : 1 : 0). The curve is both irreducible and smooth. The genus of this curve is given by the Plücker formula,

    $$\begin{aligned} g=\frac{(r-1)(r-2)}{2}=0 \end{aligned}$$

    where \(r=1\) is the degree of f(xyz). Clearly, the genus is zero since the curve is straight line and has no bends.

  2. 2.

    Let \(D=5P_{\infty }\), where \(P_{\infty }=(0:1:0)\) and T be the sum of all 8 affine points. The dimension of the Riemann–Roch space is then given by,

    $$\begin{aligned} l(5P_{\infty })=5-0+1=6 \end{aligned}$$

    thus, the AG code has dimension \(k=6\).

  3. 3.

    The basis functions for the space \(L(5P_{\infty })\) are

    $$\begin{aligned} \{t_1,\dots ,t_k\}=\left\{ 1,\frac{y}{z},\frac{y^2}{z^2},\frac{y^3}{z^3},\frac{y^4}{z^4},\frac{y^5}{z^5}\right\} \end{aligned}$$

    By examining the basis, it is clear that \(t_1=1\) has no poles, thus, \((t_1)+D\) has no poles also. Basis functions with denominator z have \((t_1)=S-P_{\infty }\) where \(S=(0:0:1)\) is a divisor of the numerator. The denominator polynomial z evaluates to zero at the point at infinity \(P_{\infty }\) of the divisor D, thus, \((t_1)+D\) has no poles. Basis functions with denominator \(z^2\) have \((t_2)=S-2P_{\infty }\) where \(S=2\times (0:0:1)\) is a divisor of the numerator. The denominator polynomial \(z^2\) evaluates to zero at the point at infinity \(P_{\infty }\) of the divisor D with multiplicity 2, thus, \((t_2)+D\) has no poles. Basis functions with denominator \(z^3\) have \((t_3)=S-3P_{\infty }\) where \(S=3\times (0:0:1)\) is a divisor of the numerator. Thus, \((t_3)+D\) also has no poles. And so on.

  4. 4.

    The generator matrix of the code defined with divisor \(D=5P_{\infty }\) is thus,

    $$\begin{aligned} G&=\begin{bmatrix} t_1(P_1)&\cdots&t_1(P_n)\\ \vdots&\ddots&\vdots \\ t_k(P_1)&\cdots&t_k(P_n)\\ \end{bmatrix}\\&=\begin{bmatrix} 1&1&1&1&1&1&1&1 \\ 0&\alpha&\alpha ^2&\alpha ^3&\alpha ^4&\alpha ^5&\alpha ^6&1 \\ 0&\alpha ^2&\alpha ^4&\alpha ^6&\alpha&\alpha ^3&\alpha ^5&1 \\ 0&\alpha ^3&\alpha ^6&\alpha ^2&\alpha ^5&\alpha&\alpha ^4&1 \\ 0&\alpha ^4&\alpha&\alpha ^5&\alpha ^2&\alpha ^6&\alpha ^3&1 \\ 0&\alpha ^5&\alpha ^3&\alpha&\alpha ^6&\alpha ^4&\alpha ^2&1 \\ \end{bmatrix} \end{aligned}$$

    Clearly, this is a generator matrix of an extended Reed–Solomon code with parameters \([3,6,8]_8\).

Theorem 8.4

(From [2]) The minimum distance of an AG code is given by,

$$\begin{aligned} d\ge n-degree(D) \end{aligned}$$

Thus, the Hermitian code defined by \(D=5P_{\infty }\) is a \([8,5,3]_4\) code. The dual of an AG code has parameters [17],

$$\begin{aligned} \text {Dimension}, k^{\bot }&=n-degree(D)+g-1\\ \text {Distance}, d^{\bot }&\ge degree(D)-2g+2 \end{aligned}$$

4 Generalised AG Codes

Algebraic geometry codes and codes obtained from them feature prominently in the databases of best-known codes [8, 15] for an appreciable range of code lengths for different field sizes q. Generalised algebraic geometry codes were first presented by Niederreiter et al. [21], Xing et al. [13]. A subsequent paper by Ozbudak and Stichtenoth [14] shed more light on the construction. AG codes as defined by Goppa utilised places of degree one or rational places. Generalised AG codes however were constructed by Xing et al. using places of higher degree (including places of degree one). In [20], the authors presented a method of constructing generalised AG codes which uses a concatenation concept. The paper showed that best-known codes were obtainable via this construction. In [4] it was shown that the method can be effective in constructing new codes and the authors presented 59 codes in finite fields \(\mathbb {F}_4\), \(\mathbb {F}_8\) and \(\mathbb {F}_9\) better than the codes in [8]. In [11], the authors presented a construction method based on [20] that uses a subfield image concept and obtained new binary codes as a result. In [19] the authors presented some new curves as well as 129 new codes in \(\mathbb {F}_8\) and \(\mathbb {F}_9\).

4.1 Concept of Places of Higher Degree

Recall from Chap. 8 that a two-dimensional affine space \(\mathbb {A}^2(\mathbb {F}_q)\) is given by the set of points

$$\begin{aligned} \lbrace (\alpha ,\beta ):\alpha ,\beta \in \mathbb {F}_q \rbrace \end{aligned}$$

while its projective closure \(\mathbb {P}^2(\mathbb {F}_q)\) is given by the set of equivalence points

$$\begin{aligned}\lbrace \lbrace (\alpha :\beta :1)\rbrace \cup \lbrace (\alpha :1:0)\rbrace \cup \lbrace (1:0:0) \rbrace : \alpha ,\beta \in \mathbb {F}_q \rbrace . \end{aligned}$$

Given a homogeneous polynomial F(xyz), a curve \(\mathscr {X}/\mathbb {F}_{q}\) defined in \(\mathbb {P}^2(\mathbb {F}_q)\) is a set of distinct points

$$\begin{aligned} \mathscr {X}/\mathbb {F}_{q}=\lbrace T \in \mathbb {P}^2(\mathbb {F}_q) : F(T)=0\rbrace \end{aligned}$$

Let \(\mathbb {F}_{q^\ell }\) be an extension of the field \(\mathbb {F}_q\), the Frobenius automorphism is given as

$$\begin{aligned} \phi _{q,\ell }&:\mathbb {F}_{{q}^\ell } \rightarrow \mathbb {F}_{q^\ell } \\ \phi _{q,\ell }&(\beta )=\beta ^{q}\qquad \beta \in \mathbb {F}_{q^\ell } \end{aligned}$$

and its action on a projective point (x : y : z) in \(\mathbb {F}_{q^\ell }\) is

$$\begin{aligned} \phi _{q,\ell }((x:y:z))=(x^q:y^q:z^q). \end{aligned}$$

Definition 8.12

(Place of Degree from [18]) A place of degree \(\ell \) is a set of \(\ell \) points of a curve defined in the extension field \(\mathbb {F}_{q^\ell }\) denoted by \(\lbrace T_0,T_1,\dots ,T_{\ell -1}\rbrace \) where each \(T_i=\phi _{q,l}^i(T_0)\). Places of degree one are called rational places.

Example 8.7

Consider the curve in \(\mathbb {F}_{4}\) defined as,

$$\begin{aligned} F(x,y,z)&=x \end{aligned}$$

The curve has the following projective rational points (points of degree 1),

$$ \begin{array}{ccccc} (0:0:1) &{} (0:1:1) &{} (0:\alpha :1) &{} (0 :\alpha ^{2}:1)\\ (0:1:0)&{} &{} &{} \end{array} $$

where \(\alpha \) is the primitive polynomial of \(\mathbb {F}_4\). The curve has the following places of degree 2,

$$ \begin{array}{cc} \{(0:\beta :1),(0:\beta ^4:1)\} &{} \{(0:\beta ^2:1),(0:\beta ^8:1)\}\\ \{(0:\beta ^3:1),(0:\beta ^{12}:1) \} &{} \{(0:\beta ^6:1),(0:\beta ^9:1) \}\\ \{(0:\beta ^7:1),(0:\beta ^{13}:1) \} &{} \{(0:\beta ^{11}:1),(0:\beta ^{14}:1) \} \\ \end{array} $$

where \(\beta \) is the primitive element of \(\mathbb {F}_{16}\).

4.2 Generalised Construction

This section gives details of the construction of generalised AG codes as described in [21]. Two maps that are useful in the construction of generalised AG codes are now described. Observe that \(\mathbb {F}_q\) is a subfield of \(\mathbb {F}_{q^\ell }\) for all \(\ell \ge 2\). It is then possible to map \(\mathbb {F}_{q^\ell }\) to an \(\ell \)-dimensional vector space with elements from \(\mathbb {F}_q\) using a suitable basis. The map \(\pi _{\ell }\) is defined as such,

$$\begin{aligned} \pi _{\ell }&:\mathbb {F}_{{q}^\ell } \rightarrow \mathbb {F}^\ell _{q}&\\ \pi _{\ell }&(\beta )=(c_1 \, c_2 \dots c_\ell ) \qquad \beta \in \mathbb {F}_{q^\ell },~c_i \in \mathbb {F}_q. \end{aligned}$$

Suppose \((\gamma _1,\gamma _2, \dots ,\gamma _\ell )\) forms a suitable basis of the vector space \(\mathbb {F}^\ell _{q}\), then \(\beta =c_1 \gamma _1 + c_2 \gamma _2 + \cdots + c_{\ell } \gamma _{\ell }\). Finally, the map \(\sigma _{\ell ,n}\) is used to represent an encoding map from an \(\ell \)-dimensional message space in \(\mathbb {F}_q\) to an n-dimensional code space,

$$\begin{aligned} \sigma _{\ell ,n}&:\mathbb {F}^{\ell }_{{q}} \rightarrow \mathbb {F}^n_{q}&\\ \end{aligned}$$

with \(\ell \le n\).

A description of generalised AG codes as presented in [4, 13, 21] is now presented. Let \( F =F(x,y,z)\) be a homogeneous polynomial defined in \(\mathbb {F}_q\). Let g be the genus of a smooth irreducible curve \(\mathscr {X}/\mathbb {F}_q\) corresponding to the polynomial \( F \). Also, let \(P_1,P_2,\dots ,P_r\) be r distinct places of \(\mathscr {X}/\mathbb {F}_q\) and \(k_i=deg(P_i)\) (deg is degree of). W is a divisor of the curve \(\mathscr {X}/\mathbb {F}_q\) such that

$$W=P_1+P_2+\cdots +P_r$$

and another divisor G such that the two do not intersect.Footnote 4 Specifically, the divisor \(G=m(Q-R)\) where \(deg(Q)=deg(R)+1\) for arbitraryFootnote 5 divisors Q and R. As mentioned earlier, associated with the divisor G is a Riemann–Roch space \(\mathscr {L}(G)\) with \(m=deg(G))\) an integer, \(m\ge 0\). From the Riemann–Roch theorem (Theorem 8.3) it is known that the dimension of \(\mathscr {L}(G)\) is given by l(G) and

$$ l(G)\ge m-g+1. $$

Also, associated with each \(P_i\) is a q-ary code \(C_i\) with parameters \([n_i,k_i=deg(P_i),d_i]_{q}\) with the restriction that \(d_i \le k_i\). Let

$$\lbrace f_1,f_2,..,f_k:f_l \in \mathscr {L}(G)\rbrace $$

denote a set of k linearly independent elements of \(\mathscr {L}(G)\) that form a basis. A generator matrix for a generalised AG code is given as such,

$$\begin{aligned} M= \begin{bmatrix} \sigma _{k_1,n_1}(\pi _{k_1}(f_1(P_1)))&\cdots \cdots&\sigma _{k_r,n_r}(\pi _{k_r}(f_1(P_r))) \\ \sigma _{k_1,n_1}(\pi _{k_1}(f_2(P_1)))&\cdots \cdots&\sigma _{k_r,n_r}(\pi _{k_r}(f_2(P_r)))\\ \vdots&\ddots&\vdots \\ \sigma _{k_1,n_1}(\pi _{k_1}(f_k(P_1)))&\cdots \cdots&\sigma _{k_r,n_r}(\pi _{k_r}(f_k(P_r))) \end{bmatrix} \end{aligned}$$

where \(f_l(P_i)\) is an evaluation of a polynomial and basis element \(f_l\) at a place \(P_i\), \(\pi _{k_i}\) is a mapping from \(\mathbb {F}_{q^{k_i}}\) to \(\mathbb {F}_q\) and \(\sigma _{k_i,n_i}\) is the encoding of a message vector in \(\mathbb {F}^{k_i}_{q}\) to a code vector in \(\mathbb {F}^{n_i}_{q}\). This is a 3 step process. The place \(P_i\) is first evaluated at \(f_l\) resulting in an element of \(\mathbb {F}_{q}^{k_i}\). The result is then mapped to a vector of length \(k_i\) in the subfield \(\mathbb {F}_{q}\). Finally, this vector is encoded with code with parameters \([n_i,k_i,d_i]_q\).

It is desirable to choose the maximum possible minimum distance for all codes \(C_i\) so that \(d_i=k_i\) [21]. The same code is used in the map \(\sigma _{k_i,n_i}\) for all points of the same degree \(k_i\), i.e. the code \(C_j\) has parameters \([n_j,j,d_j]_q\) for a place of degree j. Let \(A_j\) be an integer denoting the number of places of degree j and \(B_j\) be an integer such that \(0\le B_j \le A_j\).

If t is the maximum degree of any place \(P_i\) that is chosen in the construction, then the generalised AG code is represented as a

$$C_1(k;t;B_1,B_2,\dots ,B_t;d_1,d_2,\dots ,d_t).$$

Let \([n,k,d]_q\) represent a linear code in \(\mathbb {F}_q\) with length n, dimension k, and minimum distance d, then a generalised AG code is given by the parameters [21],

$$\begin{aligned} k&=l(G)\ge m-g+1\\ n&=\sum _{i=1}^{r} n_i=\sum _{j=1}^t B_jn_j \\ d&\ge \sum _{i=1}^{r} d_i-g-k+1=\sum _{j=1}^t B_jd_j-g-k+1. \end{aligned}$$

Below are two examples showing the construction of generalised AG codes.

Example 8.8

Let \(F(x,y,z)=x^3+xyz+xz^2+y^2z\) [21] be a polynomial in \(\mathbb {F}_2\). The curve \(\mathscr {X}/\mathbb {F}_2\) has genus \(g=1\) and \(A_1=4\) places of degree 1 and \(A_2=2\) places of degree 2.

Table 8.4 gives the places of \(\mathscr {X}/\mathbb {F}_2\) up degree 2. The field \(\mathbb {F}_{2^2}\) is defined by a primitive polynomial \(s^2+s+1\) with \(\alpha \) as its primitive element. Points

$$R=(1:a^3+a^2:1)$$

as a place of degree 4 and

$$Q=(1:b^4+b^3+b^2:1)$$

as a place of degree 5 are also chosen arbitrarily while a and b are primitive elements of \(\mathbb {F}_{2^4}\) (defined by the polynomial \(s^4+s^3+s^2+s+1\)) and \(\mathbb {F}_{2^5}\) (defined by the polynomial \(s^5+s^2+1\)),g respectively. The divisor W is

$$W=P_1+\cdots +P_6.$$

The basis of the Riemann–Roch space \(\mathscr {L}(2D)\) with \(D=Q-R\) and \(m=2\) is obtained with computer algebra software MAGMA [3] as,

$$\begin{aligned} \begin{aligned} f_1&=(x^7 + x^3 + x)/(x^{10} + x^4 + 1)y\\&\quad + (x^{10} + x^9 + x^7 + x^6 + x^5 + x + 1)/(x^{10} + x^4 + 1)\\ f_2&=(x^8 + x^7 + x^4 + x^3 + x + 1)/(x^{10} + x^4 + 1)y \\&\quad + (x^8 + x^4 + x^2)/(x^{10} + x^4 + 1) \end{aligned} \end{aligned}$$

For the map \(\sigma _{k_i,n_i}\) the codes; \(c_1\) a \([1,1,1]_2\) cyclic code for places of degree 1 and \(c_2\) a \([3,2,2]_2\) cyclic code places of degree 2 are used. For the map \(\pi _2\) which applies to places of degree 2, a polynomial basis \([\gamma _1,\gamma _2]=[1,\alpha ]\) is used. Only the first point in the place \(P_i\) for \(deg(P_i)=2\) in the evaluation of \(f_1\) and \(f_2\) at \(P_i\) is utilised. The generator matrix M of the resulting \([10,2,6]_2\) generalised AG code over \(\mathbb {F}_2\) is,

$$ M= \begin{bmatrix} 1&1&0&1&0&1&1&0&1&1\\ 0&0&1&1&1&1&0&1&0&1 \end{bmatrix} $$

 

Table 8.4 Places of \(\mathscr {X}/\mathbb {F}_2\)

Example 8.9

Consider again the polynomial

$$F(x,y,z)=x^3+xyz+xz^2+y^2z$$

with coefficients from \(\mathbb {F}_2\) whose curve (with genus equal to 1) has places up to degree 2 as in Table 8.4. An element f of the Riemann–Roch space defined by the divisor \(G= (R-Q)\) with

$$Q=(a:a^3+a^2:1)$$

and

$$R=(b:b^4+b^3+b^2+b+1:1)$$

where a and b primitive elements of \(\mathbb {F}_{2^4}\) and \(\mathbb {F}_{2^5}\) (since the curve has no place of degree 3) respectively, is given by,

$$\begin{aligned} \begin{aligned} f&=(x^3x + x^2z^2 + z^4)y/(x^{5} + x^3z^2+ z^5) \\&\quad + (x^5 + x^4z+ x^3z^2 + z^3x^2+ xz^4+z^5)/(x^{5} + x^3z^2 + z^5) \end{aligned} \end{aligned}$$

Evaluating f at all the 5 places \(P_i\) from the Table 8.4 and using the map \(\pi _{\deg (P_i)}\) that maps all evaluations to \(\mathbb {F}_2\) results in,

$$\begin{aligned}{}[\overbrace{~1~{\mid } ~1~{\mid } ~0 ~{\mid } ~1 {\mid }}^{f(P_i)\mid _{\deg (P_i)=1} }~\underbrace{1~{\mid } ~\alpha ^2}_{f(P_i)\mid _{\deg (P_i)=2}}] \end{aligned}$$

This forms the code \([6,1,5]_4\).Footnote 6 In \(\mathbb {F}_2\) this becomes,

$$\begin{aligned}{}[~1~{\mid } ~1~{\mid } ~0~ {\mid } ~1~{\mid } \underbrace{1~~0}_{ \text{1 }}~{\mid } ~\underbrace{1~~1}_{ \alpha ^2}] \end{aligned}$$

which forms the code \([8,1,5]_2\). Short auxiliary codes \([1,1,1]_2\) to encode \(f(P_i)\mid _{\deg (P_i)=1}\) and \([3,2,2]_2\) to encode \(f(P_i)\mid _{\deg (P_i)=2}\) are used. The resulting codeword of a generalised AG code is,

$$\begin{aligned}{}[~1~{\mid } ~1~{\mid } ~0~{\mid } ~1~{\mid } ~1~~0~~1~{\mid } ~1~~1~~0~]. \end{aligned}$$

This forms the code \([10,1,7]_2\).

Three polynomials and their associated curves are used to obtain codes in \(\mathbb {F}_{16}\) better than the best-known codes in [15]. The three polynomials are given in Table 8.5, while Table 8.6 gives a summary of the properties of their associated curves (with \(t=4\)). w is the primitive element of \(\mathbb {F}_{16}\). The number of places of degree j, \(A_j\), is determined by computer algebra system MAGMA [3]. The best-known linear codes from [15] over \(\mathbb {F}_{16}\) with \(j=d_j\) for \(1 \le j\le 4\) are

$$\begin{aligned}{}[1,1,1]_{16}~~~[3,2,2]_{16}~~~[5,3,3]_{16}~~~[7,4,4]_{16} \end{aligned}$$

which correspond to \(C_1\), \(C_2\), \(C_3\) and \(C_4\), respectively. Since \(t=4\) for all the codes in this paper and

$$ [d_1,d_2,d_3,d_4]=[1,2,3,4] $$

The representation \(C_1(k;t;B_1,B_2,\dots ,B_t;d_1,d_2,\dots ,d_t)\) is shortened as such,

$$ C_1(k;t;B_1,B_2,\dots ,B_t;d_1,d_2,\dots ,d_t) \equiv C_1(k;B_1,B_2,\dots ,B_t). $$

Tables 8.7 to 8.9 show improved codes from generalised AG codes with better minimum distance than codes in [15]. It is also worth noting that codes of the form \(C_1(k;N,0,0,0)\) are simply Goppa codes (defined with only rational points). The symbol # in the Tables 8.7 to 8.9 denotes the number of new codes from each generalised AG code \(C_1(k;B_1,B_2,\dots ,B_t)\). The tables in [7] contain curves known to have the most number of rational points for a given genus. The curve \(\mathscr {X}_{2}/\mathbb {F}_{16}\) is defined by the well-known Hermitian polynomial [5].

Table 8.5 Polynomials in \(\mathbb {F}_{16}\)
Table 8.6 Properties of \(\mathscr {X}_i/\mathbb {F}_{16}\)
Table 8.7 New codes from \(\mathscr {X}_1/\mathbb {F}_{16}\)
Table 8.8 New codes from \(\mathscr {X}_2/\mathbb {F}_{16}\)
Table 8.9 New codes from \(\mathscr {X}_3/\mathbb {F}_{16}\)

5 Summary

Algebraic geometry codes are codes obtained from curves. First, the motivation for studying these codes was given. From an asymptotic point of view, some families of AG codes have superior performance than the previous best known bound on the performance of linear codes, the Gilbert–Varshamov bound. For codes of moderate length, AG codes have better minimum distances than their main competitors, non-binary BCH codes with the same rate defined in the same finite fields. Theorems and definitions as a precursor to AG codes was given. Key theorems are Bezout’s and Riemann–Roch. Examples using the well-known Hermitian code in a finite field of cardinality 4 were then discussed. The concept of place of higher degrees of curves was presented. This notion was used in the construction of generalised AG codes.