1 Introduction

With the development of modern high density data storage systems, symbol-pair code was proposed by Cassuto and Blaum to combat against pair-errors over symbol-pair read channels in [1, 2]. They also showed that a code \({\mathcal {C}}\) with minimum symbol-pair distance \(d_{p}\) can correct up to \(\left\lfloor (d_{p}-1)/2\right\rfloor \) symbol-pair errors [1, 2]. Later, Cassuto and Litsyn [3] showed that codes for correcting pair-errors exist with strictly higher rates compared to codes for the Hamming metric with the same relative distance. In [6], Chee, Kiah and Wang established a Singleton-type bound on symbol-pair codes. Similar to classical codes, symbol-pair codes meeting the Singleton-type bound are called MDS symbol-pair codes and the error-correcting capability of MDS symbol-pair codes is optimal. Later, Ding, Zhang and Ge extended the Singleton-type bound to the b-symbol case in [9].

Many attempts have been made in the constructions of MDS symbol-pair codes. In [17], Kai, Zhu and Li provided MDS symbol-pair codes with length \(q^2+q+1\) through constacyclic codes over \({\mathbb {F}}_{q}\). Later, Li and Ge [19] generalized the results in [17] and they also constructed a number of MDS symbol-pair codes with minimum symbol-pair distance seven by analyzing certain linear fractional transformations. Shortly afterwards, Chen, Lin and Liu [7] constructed several MDS symbol-pair codes with length 3p from repeated-root cyclic codes over \({\mathbb {F}}_{p}\). In 2018, Ding et al. [8] obtained some MDS symbol-pair codes over \({\mathbb {F}}_{q}\) with larger minimum symbol-pair distance based on elliptic curves and the lengths of these codes are bounded by \(q+2\sqrt{q}\). In the same year, Kai et al. [18] constructed three classes of MDS symbol-pair codes using repeated-root constacyclic codes over \({\mathbb {F}}_{p}\), see Table 1. Recently, some new results on constructing symbol-pair codes were presented in [12, 14, 21]. Moreover, some decoding algorithms of symbol-pair codes were proposed by various researchers in [15, 20, 25, 27, 28] and the symbol-pair weight distributions of some linear codes over finite fields were studied in [10, 11, 13, 22, 26] and the references therein.

In Table 1, we summarize some known MDS symbol-pair codes from constacyclic codes.

Table 1 Some known MDS symbol-pair codes from constacyclic codes

Observe that there exists only one class of codes with length 5p and minimum symbol-pair distance five in Table 1. The constructions of symbol-pair codes with comparatively large minimum symbol-pair distance is an interesting topic. This paper focuses on further constructions of MDS symbol-pair codes with length 5p. Precisely, two new classes of MDS symbol-pair codes with minimum symbol-pair distance seven or eight are constructed by utilizing repeated-root cyclic codes over \({\mathbb {F}}_{p}\). In addition, for \(n=4p\), we derive a class of MDS symbol-pair codes with \(d_{p}=7\), which generalizes the result in [18].

The remainder of this paper is organized as follows. In Section 2, we introduce some basic notation and results on symbol-pair codes and constacyclic codes. By exploiting repeated-root cyclic codes, for length 5p, two new classes of MDS symbol-pair codes with minimum symbol-pair distance seven or eight are constructed in Section 3.1 and a class of MDS symbol-pair codes with length 4p is presented in Section 3.2. Section 4 concludes the paper.

2 Preliminaries

In this section, we introduce some notations and auxiliary tools on symbol-pair codes and constacyclic codes, which will be used to prove our main results in the sequel.

2.1 Symbol-pair codes

Let \({\mathbb {F}}_{q}\) be the finite field with q elements, where q is a prime power. Let n be a positive integer and \(\mathbf {x}=\left( x_{0}, x_{1}, \cdots , x_{n-1}\right) \) be a vector in \({\mathbb {F}}_{q}^{n}\). Then the symbol-pair read vector of \(\mathbf {x}\) is

$$\begin{aligned} \pi (\mathbf {x})=\left( \left( x_{0},\,x_{1}\right) , \,\left( x_{1},\,x_{2}\right) ,\cdots ,\left( x_{n-2},\,x_{n-1}\right) , \,\left( x_{n-1},\,x_{0}\right) \right) . \end{aligned}$$

Obviously, each vector \(\mathbf {x}\in {\mathbb {F}}_{q}^{n}\) has a unique pair representation \(\pi (\mathbf {x})\). Recall that the Hamming weight of \(\mathbf {x}\) is

$$\begin{aligned} w_{H}(\mathbf {x})=\left| \left\{ i\in {\mathbb {Z}}_{n}\,\big |\,x_{i}\ne 0\right\} \right| \end{aligned}$$

where \({\mathbb {Z}}_{n}\) denotes the residue class ring \({\mathbb {Z}}/n{\mathbb {Z}}\). Correspondingly, the symbol-pair weight of \(\mathbf {x}\) is

$$\begin{aligned} w_{p}(\mathbf {x})=\left| \left\{ i\in {\mathbb {Z}}_{n}\,\big |\,\left( x_{i},\,x_{i+1}\right) \ne \left( 0,\,0\right) \right\} \right| . \end{aligned}$$

For any two vectors \(\mathbf {x},\,\mathbf {y}\in {\mathbb {F}}_{q}^{n}\), the symbol-pair distance from \(\mathbf {x}\) to \(\mathbf {y}\) is defined as

$$\begin{aligned} d_{p}\left( \mathbf {x},\,\mathbf {y}\right) =\left| \left\{ i\in {\mathbb {Z}}_{n}\,\big |\,\left( x_{i},\,x_{i+1}\right) \ne \left( y_{i},\,y_{i+1}\right) \right\} \right| . \end{aligned}$$

A code \({\mathcal {C}}\) over \({\mathbb {F}}_{q}\) of length n is a nonempty subsets of \({\mathbb {F}}_{q}^{n}\). Elements of \({\mathcal {C}}\) are called codewords in \({\mathcal {C}}\). The minimum symbol-pair distance of \({\mathcal {C}}\) is

$$\begin{aligned} d_{p}({\mathcal {C}})=\mathrm{min}\left\{ d_{p}\left( \mathbf {x},\,\mathbf {y}\right) \,\big |\,\, \mathbf {x},\,\mathbf {y}\in {\mathcal {C}},\mathbf {x}\ne \mathbf {y}\right\} \end{aligned}$$

and we refer such a code as an \(\left( n,\,d_{p}({\mathcal {C}})\right) _{q}\) symbol-pair code. A well-known relationship between \(d_{H}({\mathcal {C}})\) and \(d_{p}({\mathcal {C}})\) in [1, 2] states that for any \(0<d_{H}({\mathcal {C}})<n\),

$$\begin{aligned} d_{H}({\mathcal {C}})+1\le d_{p}({\mathcal {C}})\le 2\cdot d_{H}({\mathcal {C}}). \end{aligned}$$

The following lemma reveals a connection between the symbol-pair distance and the Hamming distance of a code \({\mathcal {C}}\).

Lemma 1

[1, 2] For any \(\mathbf {x},\mathbf {y}\in {\mathcal {C}}\) with \(\mathbf {x}=(x_0,\cdots ,x_{n-1})\) and \(\mathbf {y}=(y_0,\cdots ,y_{n-1})\). Define \(S=\{i\in {\mathbb {Z}}_{n}\,|\,x_i\ne y_i\}\). Let \(S=\bigcup _{i=1}^{L}S_i\) be a partition of S, which satisfies:

  1. (1)

    the elements of each subset \(S_i\) are consecutive in the sense of modulo n;

  2. (2)

    for any different \(i,\,j\in [1,L]\) and \(a\in S_{i},\,b\in S_{j}\), a and b are not consecutive.

Then

$$\begin{aligned} d_{p}\left( \mathbf {x},\,\mathbf {y}\right) =d_{H}\left( \mathbf {x},\,\mathbf {y}\right) +L. \end{aligned}$$

In contrast to classical error-correcting codes, the size of symbol-pair codes satisfies the following Singleton bound.

Lemma 2

[5] Let \(q\ge 2\) and \(2\le d_{p}\le n\). If \({\mathcal {C}}\) is a symbol-pair code with length n and minimum symbol-pair distance \(d_{p}\), then \(\left| {\mathcal {C}}\right| \le q^{n-d_{p}+2}\).

The symbol-pair code achieving the Singleton bound is called a maximum distance separable ( MDS ) symbol-pair code.

2.2 Constacyclic codes

In this subsection, we introduce some notations of constacyclic codes. For a fixed nonzero element \(\eta \) in \({\mathbb {F}}_{q}\), the \(\eta \)-constacyclic shift \(\tau _{\eta }\) on \({\mathbb {F}}_{q}^{n}\) is

$$\begin{aligned} \tau _{\eta }\left( x_{0},\,x_{1},\cdots ,x_{n-1}\right) =\left( \eta \,x_{n-1},\,x_{0},\cdots ,x_{n-2}\right) . \end{aligned}$$

A linear code \({\mathcal {C}}\) is called an \(\eta \)-constacyclic code if \(\tau _{\eta }\left( \mathbf {c}\right) \in {\mathcal {C}}\) for any codeword \(\mathbf {c}\in {\mathcal {C}}\). An \(\eta \)-constacyclic code is a cyclic code if \(\eta =1\) and a negacyclic code if \(\eta =-1\). It should be noted that each codeword \(\mathbf {c}=\left( c_{0},\,c_{1},\cdots ,c_{n-1}\right) \in {\mathcal {C}}\) is identical to its polynomial representation

$$\begin{aligned} c(x)=c_{0}+c_{1}\,x+\cdots +c_{n-1}\,x^{n-1}. \end{aligned}$$

For convenience, we always regard the codeword \(\mathbf {c}\) in \({\mathcal {C}}\) as the corresponding polynomial c(x) in this paper. Notice that a linear code \({\mathcal {C}}\) is an \(\eta \)-constacyclic code if and only if it is an ideal of the principle ideal ring \({\mathbb {F}}_{q}[x]/\langle x^{n}-\eta \rangle \). As a consequence, there exists a unique monic divisor \(g(x)\in {\mathbb {F}}_{q}[x]\) of \(x^{n}-\eta \) such that

$$\begin{aligned} {\mathcal {C}}=\left\langle g(x)\right\rangle =\left\{ f(x)\,g(x)\left( \mathrm{mod}\left( x^n-\eta \right) \right) \big |\,f(x)\in {\mathbb {F}}_{q}\left[ x\right] \right\} . \end{aligned}$$

The polynomial g(x) is called the generator polynomial of \({\mathcal {C}}\) and the dimension of \({\mathcal {C}}\) is \(n-k\), where k is the degree of g(x).

Recall that a q-ary \(\eta \)-constacyclic code of length n is a simple-root constacyclic code if \(\mathrm{gcd}\left( n,\,q\right) =1\) and a repeated-root constacyclic code if \(p\,|\,n\), where p is the characteristic of \({\mathbb {F}}_{q}\). Simple-root constacyclic codes can be characterized by their defining sets [16, 23]. Compared to simple-root cyclic codes, repeated-root cyclic codes are no longer characterized by its set of zeros. Let \({\mathcal {C}}=\left\langle g(x)\right\rangle \) be a repeated-root cyclic code of length \(lp^{e}\) over \({\mathbb {F}}_{q}\), where l and e are positive integers with \(\mathrm{gcd}\left( l,\,p\right) =1\). It is shown in [4] that the minimum Hamming distance of \({\mathcal {C}}\) can be derived from \(d_{H}(\overline{{\mathcal {C}}}_{t})\). Here \(\overline{{\mathcal {C}}}_{t}\) is a simple-root cyclic code fully determined by \({\mathcal {C}}\) as follows.

More precisely, assume that

$$\begin{aligned} g(x)=\prod _{i=1}^{r}m_{i}(x)^{e_{i}} \end{aligned}$$

where each \(m_{i}(x)\) is a monic irreducible polynomial over \({\mathbb {F}}_{q}\) and \(e_{i}\) are positive integers. For a fixed t with \(0\le t\le p^{e}-1\), \(\overline{{\mathcal {C}}}_{t}\) is defined to be a simple-root cyclic code of length l over \({\mathbb {F}}_{q}\) with the generator polynomial

$$\begin{aligned} \overline{g}_{t}(x)=\prod _{1\le i\le r,\,e_{i}>t}m_{i}(x). \end{aligned}$$

If \(\overline{g}_{t}(x)=x^{l}-1\), then \(\overline{{\mathcal {C}}}_{t}\) contains only the all-zero codeword and we set \(d_{H}(\overline{{\mathcal {C}}}_{t})=\infty \). If each \(e_{i}\le t\), then \(\overline{g}_{t}(x)=1\) and \(d_{H}(\overline{{\mathcal {C}}}_{t})=1\).

The following lemma reveals that the minimum Hamming distance of repeated-root cyclic codes can be determined by the polynomial algebra, which will be applied to derive the minimum Hamming distance of codes in this paper.

Lemma 3

[4] Let \({\mathcal {C}}\) be a repeated-root cyclic code of length \(lp^{e}\) over \({\mathbb {F}}_{q}\), where l and e are positive integers with \(\mathrm{gcd}\left( l,\,p\right) =1\). Then

$$\begin{aligned} d_{H}({\mathcal {C}})=\mathrm{min}\left\{ P_{t}\cdot d_{H}\left( \overline{{\mathcal {C}}}_{t}\right) \,\big |\,0\le t\le p^{e}-1\right\} \end{aligned}$$
(1)

where

$$\begin{aligned} P_{t}=w_{H}\left( \left( x-1\right) ^{t}\right) =\prod _{i}\left( t_{i}+1\right) \end{aligned}$$
(2)

with \(t_{i}\)’s being the coefficients of the p-adic expansion of t.

In this paper, we will employ repeated-root cyclic codes to construct new MDS symbol-pair codes. The following lemmas are very useful.

Lemma 4

[7] Let \({\mathcal {C}}\) be an \([n,\,k,\,d_{H}({\mathcal {C}})]\) constacyclic code over \({\mathbb {F}}_{q}\) with \(2\le d_{H}({\mathcal {C}})<n\). Then we have \(d_{p}({\mathcal {C}})\ge d_{H}({\mathcal {C}})+2\) if and only if \({\mathcal {C}}\) is not an MDS code, i.e., \(k<n-d_{H}({\mathcal {C}})+1\).

Lemma 5

Let \({\mathcal {C}}=\left\langle g(x)\right\rangle \) be a repeated-root cyclic code of length \(lp^{e}\) over \({\mathbb {F}}_{q}\) and \(c(x)=\left( x^{l}-1\right) ^{t}v(x)\) a codeword in \({\mathcal {C}}\) with Hamming weight \(d_{H}({\mathcal {C}})\), where l and e are positive integers with \(\mathrm{gcd}\left( l,\,p\right) =1\), \(0\le t\le p^{e}-1\) and \(\left( x^{l}-1\right) \not \mid v(x)\). Then

$$\begin{aligned} w_{H}\left( c(x)\right) =P_{t}\cdot N_{v} \end{aligned}$$

where \(P_{t}\) is defined as (2) in Lemma 3 and \(N_{v}=w_{H}\left( v(x)\,\mathrm{mod}\left( x^{l}-1\right) \right) \).

Proof

Denote \(\overline{v}\left( x\right) =\left( v(x)\,\mathrm{mod}\left( x^{l}-1\right) \right) \) and

$$\begin{aligned} \overline{c}_{t}\left( x\right) =\left( \left( x^{l}-1\right) ^{t}\cdot \overline{v}\left( x\right) ^{p^e} \mathrm{mod}\left( x^{lp^{e}}-1\right) \right) . \end{aligned}$$

Assume that

$$\begin{aligned} g(x)=\prod _{i=1}^{r}m_{i}(x)^{e_{i}} \end{aligned}$$

and

$$\begin{aligned} \overline{g}_{t}(x)=\prod _{1\le i\le r,\,e_{i}>t}m_{i}(x). \end{aligned}$$

It follows from \(x^{lp^e}-1=(x^l-1)^{p^e}\), \(\left( x^{l}-1\right) \not \mid v(x)\) and \(g(x)\,|\,c(x)\) that \(\overline{g}_{t}(x)\,|\,\overline{v}\left( x\right) \). Combining with \(t<p^e\), one can obtain that for any \(1\le i\le r\),

i) if \(e_{i}>t\), then \(m_{i}(x)\,|\,\overline{v}\left( x\right) \) and \(m_{i}(x)\) is a factor of \(\overline{c}_{t}\left( x\right) \) with multiplicity at least \(p^e\);

ii) if \(e_{i}\le t\), then \(m_{i}(x)\) is a factor of \(\overline{c}_{t}\left( x\right) \) with multiplicity at least t.

Hence \(g(x)\,|\,\overline{c}_{t}(x)\).

Meanwhile, due to \(\mathrm{deg}(\overline{v}\left( x\right) )<l\), there must exist a root of \(x^{l}-1\) whose multiplicity in \(\overline{c}_{t}\left( x\right) \) is exactly t. This leads to \((x^{lp^e}-1)\,\not \mid \,\overline{c}_{t}\left( x\right) \) and then \(\overline{c}_{t}(x)\) is a nonzero codeword in \({\mathcal {C}}\). It can be verified that

$$\begin{aligned} \begin{aligned} w_{H}\left( \overline{c}_{t}(x)\right)&=w_{H}\left( \left( x^{l}-1\right) ^t\cdot \overline{v}\left( x\right) ^{p^{e}}\mathrm{mod}\left( x^{lp^{e}}-1\right) \right) \\&\le w_{H}\left( \left( x^{l}-1\right) ^t\cdot \overline{v}\left( x\right) ^{p^{e}}\right) \le w_{H}\left( \left( x^{l}-1\right) ^{t}\right) \cdot w_{H}\left( \overline{v}\left( x\right) ^{p^{e}}\right) =P_{t}\cdot N_{v}. \end{aligned} \end{aligned}$$

On the other hand, according to Theorem 6.3 in [24], we have

$$\begin{aligned} w_{H}\left( c(x)\right) \ge w_{H}\left( (x^{l}-1)^{t}\right) \cdot w_{H}\left( v(x)\,\mathrm{mod}\,(x^{l}-1)\right) =P_{t}\cdot N_{v}\ge w_{H}\left( \overline{c}_{t}(x)\right) . \end{aligned}$$

Since \(w_{H}(c(x))=d_{H}({\mathcal {C}})\), one can immediately conclude that

$$\begin{aligned} w_{H}\left( c(x)\right) =w_{H}\left( \overline{c}_{t}(x)\right) =P_{t}\cdot N_{v}. \end{aligned}$$

This completes the proof. \(\square \)

The following lemma will be frequently used to prove our results.

Lemma 6

Let p be a prime power with \(5\,|\,(p-1)\), \(\beta \) be a primitive 5-th root of unity in \({\mathbb {F}}_{p}\) and \(a_i\in {\mathbb {F}}_{p}^*\) for \(1\le i\le 3\). Then

$$\begin{aligned} \beta ^2+3\beta +1\ne 0 \end{aligned}$$
(3)

and for \((i,\,j)=(2,\,3)\), \((2,\,4)\) or \((3,\,4)\), the solution of the \({\mathbb {F}}_{p}\)-linear system of equations

$$\begin{aligned} \left\{ \begin{array}{l} 1+a_{1}+a_{2}+a_{3}=0,\\ 1+a_{1}\,\beta +a_{2}\,\beta ^i+a_{3}\,\beta ^j=0,\\ 1+a_{1}\,\beta ^2+a_{2}\,\beta ^{2i}+a_{3}\,\beta ^{2j}=0\\ \end{array} \right. \end{aligned}$$
(4)

is given as

Value of (ij)

Corresponding solution \(\left( a_{1},\,a_{2},\,a_{3}\right) \)

\(\left( 2,\,3\right) \)

\(\left( -\frac{\beta ^2+\beta +1}{\beta ^2},\,\frac{\beta ^2+\beta +1}{\beta ^3},\,-\frac{1}{\beta ^3}\right) \)

\(\left( 2,\,4\right) \)

\(\left( -\frac{1}{\beta },\,-\frac{\beta }{\beta +1},\,\frac{1}{\beta \left( \beta +1\right) }\right) \)

\(\left( 3,\,4\right) \)

\(\left( \frac{\beta ^2}{\beta +1},\,-\frac{1}{\beta +1},\,-\beta \right) \).

Proof

Assume that \(\beta ^2+3\beta +1=0\). The fact \(\beta \) is a primitive 5-th root of unity indicates

$$\begin{aligned} 0=\beta ^4+\beta ^3+\beta ^2+\beta +1=-5\left( 3\beta +1\right) \end{aligned}$$

which yields \(\beta ^2=-3\beta -1=0\), a contradiction.

If \((i,\,j)=(2,\,3)\), then (4) can be transformed into

$$\begin{aligned} \left\{ \begin{array}{l} 1+a_{1}+a_{2}+a_{3}=0,\\ 1+a_{1}\,\beta +a_{2}\,\beta ^2+a_{3}\,\beta ^3=0,\\ 1+a_{1}\,\beta ^2+a_{2}\,\beta ^4+a_{3}\,\beta =0.\\ \end{array} \right. \end{aligned}$$

This leads to

$$\begin{aligned} a_{1}=-\frac{\beta ^2+\beta +1}{\beta ^2},\quad a_{2}=\frac{\beta ^2+\beta +1}{\beta ^3},\quad a_{3}=-\frac{1}{\beta ^3}. \end{aligned}$$

Similarly, we can derive the solutions of (4) for \((i,\,j)=(2,\,4)\) and (3, 4). This completes the proof. \(\square \)

3 Constructions of MDS symbol-pair codes

In this section, we propose three new classes of MDS symbol-pair codes from repeated-root cyclic codes by analyzing the solutions of certain equations over \({\mathbb {F}}_{p}\). Firstly, for length 5p, two classes of MDS symbol-pair codes with minimum symbol-pair distance 7 or 8 are constructed respectively. In addition, for \(n=4p\), we derive a class of MDS symbol-pair codes with \(d_{p}=7\).

From now on, we denote by \(c^{(k)}(x)\) the k-th formal derivative of c(x), where k is a positive integer and \(c(x)\in {\mathbb {F}}_{p}[x]\). Let \(\star \) denote an element in \({\mathbb {F}}_p^{*}\) and \(\mathbf {0}\) is the zero vector. Due to the linearity and the cyclic shift property of cyclic codes, we assume that the constant term of c(x) occurred in this paper is always 1.

3.1 MDS symbol-pair codes for \(n=5p\)

In this subsection, two classes of MDS symbol-pair codes with length 5p are constructed.

Now we present a class of MDS symbol-pair codes with minimum symbol-pair distance 7 for any prime p with \(5\,|\left( p-1\right) \) and \(p\ne 41\).

Theorem 1

Let p be a prime with \(5\,|\left( p-1\right) \) and \(p\ne 41\). Then there exists an MDS \(\left( 5p,\,7\right) _{p}\) symbol-pair code.

Proof

Let \({\mathcal {C}}\) be a repeated-root cyclic code of length 5p over \({\mathbb {F}}_{p}\) with the generator polynomial

$$\begin{aligned} g(x)=\left( x-1\right) ^{3}\left( x-\beta \right) \left( x-\beta ^{2}\right) \end{aligned}$$

where \(\beta \) is a primitive 5-th root of unity in \({\mathbb {F}}_{p}\).

Note that \({\mathcal {C}}\) is a \(\left[ 5p,\,5p-5,\,4\right] \) cyclic code due to Lemma 3. Indeed, recall that \(\overline{g}_{t}(x)\) is the generator polynomial of \(\overline{{\mathcal {C}}}_{t}\). If \(t=0\), then

$$\begin{aligned} \overline{g}_{0}(x)=\left( x-1\right) \left( x-\beta \right) \left( x-\beta ^2\right) \end{aligned}$$

and

$$\begin{aligned} P_{0}\cdot d_{H}\left( \overline{{\mathcal {C}}}_{0}\right) =1\cdot 4=4. \end{aligned}$$

If \(t=1\), then \(\overline{g}_{1}(x)=x-1\) and

$$\begin{aligned} P_{1}\cdot d_{H}\left( \overline{{\mathcal {C}}}_{1}\right) =2\cdot 2=4. \end{aligned}$$

If \(t=2\), then \(\overline{g}_{2}(x)=x-1\) and

$$\begin{aligned} P_{2}\cdot d_{H}\left( \overline{{\mathcal {C}}}_{2}\right) =3\cdot 2=6. \end{aligned}$$

If \(3\le t\le p-1\), then \(\overline{g}_{t}(x)=1\) and

$$\begin{aligned} P_{t}\cdot d_{H}\left( \overline{{\mathcal {C}}}_{t}\right) =(t+1)\cdot 1=t+1\ge 4. \end{aligned}$$

With the aid of the equality (1) in Lemma 3, one can immediately get \(d_{H}({\mathcal {C}})=4\).

Since \({\mathcal {C}}\) is not MDS, by Lemma 4, one can obtain that \(d_{p}({\mathcal {C}})\ge 6\). Now we claim that there does not exist a codeword in \({\mathcal {C}}\) with \((w_H(c(x)), \,w_p(c(x)))=(5,\,6)\). On the contrary, without loss of generality, we assume

$$\begin{aligned} c(x)=c_{0}+c_{1}\,x+c_{2}\,x^{2}+c_{3}\,x^{3}+c_{4}\,x^{4} \end{aligned}$$

where \(c_{i}\in {\mathbb {F}}_{p}^{*}\) for any \(0\le i\le 4\). This is contradictory with

$$\begin{aligned} \mathrm{deg}(g(x))=5,\quad \mathrm{deg}(c(x))\ge \mathrm{deg}(g(x)). \end{aligned}$$

Thus, there does not exist a codeword in \({\mathcal {C}}\) with \((w_H(c(x)), \,w_p(c(x)))=(5,\,6)\). To show that \({\mathcal {C}}\) is an MDS \(\left( 5p,\,7\right) _{p}\) symbol-pair code, it is sufficient to verify that there does not exist a codeword in \({\mathcal {C}}\) with \((w_H(c(x)), \,w_p(c(x)))=(4,\,6)\).

Let c(x) be a codeword in \({\mathcal {C}}\) with Hamming weight 4. Suppose that c(x) has the factorization \(c(x)=\left( x^{5}-1\right) ^{t}v(x)\), where \(0\le t\le p-1\), \(\left( x^{5}-1\right) \not \mid v(x)\) and

$$\begin{aligned} v(x)=v_{0}(x^{5})+x\,v_{1}(x^{5})+x^{2}\,v_{2}(x^{5})+x^{3}\,v_{3}(x^{5}) +x^{4}\,v_{4}(x^{5}). \end{aligned}$$

It follows from Lemma 5 that

$$\begin{aligned} 4=w_{H}\left( \left( x^{5}-1\right) ^{t}\right) \cdot w_{H}\left( v(x)\,\mathrm{mod}\left( x^{5}-1\right) \right) =\left( 1+t\right) N_{v} \end{aligned}$$

where \(N_{v}=w_{H}\left( v(x)\,\mathrm{mod}\left( x^{5}-1\right) \right) \). Then one can deduce that \(\left( N_{v},\,t\right) =\left( 1,\,3\right) \), \(\left( 2,\,1\right) \) or \(\left( 4,\,0\right) \).

If \(\left( N_{v},\,t\right) =\left( 1,\,3\right) \), then it is obvious that the symbol-pair weight of c(x) is greater than 6.

If \(\left( N_{v},\,t\right) =\left( 2,\,1\right) \) and c(x) has symbol-pair weight 6, then Lemma 1 indicates that its certain cyclic shift must have the form

$$\begin{aligned} \left( \star ,\,\star ,\,\mathbf {0},\,\star ,\,\star ,\,\mathbf {0}\right) . \end{aligned}$$

Let

$$\begin{aligned} c(x)=1+a_{1}\,x+a_{2}\,x^{5i}+a_{3}\,x^{5i+1} \end{aligned}$$

for some positive integer i with \(1\le i\le p-1\) and \(a_{1},\,a_{2},\,a_{3}\in {\mathbb {F}}_{p}^{*}\). It follows from \(5\,|\left( p-1\right) \) and \(\mathrm{gcd}\left( i,p\right) =1\) that \(p\not \mid 5i\). The fact \(c\left( 1\right) =c\left( \beta \right) =0\) induces that

$$\begin{aligned} \left\{ \begin{array}{l} 1+a_{1}+a_{2}+a_{3}=0,\\ 1+a_{1}\,\beta +a_{2}+a_{3}\,\beta =0\\ \end{array} \right. \end{aligned}$$

which implies \(a_{1}=-a_{3}\) and \(a_{2}=-1\). Then \(c^{\left( 1\right) }\left( 1\right) =c^{\left( 2\right) }\left( 1\right) =0\) yields

$$\begin{aligned} \left\{ \begin{array}{l} a_{1}-5i-\left( 5i+1\right) a_{1}=0,\\[2mm] -5i\left( 5i-1\right) -5i\left( 5i+1\right) a_{1}=0.\\ \end{array} \right. \end{aligned}$$

This indicates \(a_1=-1\) and then \(2=0\), a contradiction.

If \(\left( N_{v},\,t\right) =\left( 4,\,0\right) \) and c(x) has symbol-pair weight 6, then its corresponding cyclic shift must have the form

$$\begin{aligned} \left( \star ,\,\star ,\,\mathbf {0},\,\star ,\,\star ,\,\mathbf {0}\right) \end{aligned}$$

or

$$\begin{aligned} \left( \star ,\,\star ,\,\star ,\,\mathbf {0},\,\star ,\,\mathbf {0}\right) . \end{aligned}$$

In what follows, we discuss the above two cases one by one.

Case I   For the case \(\left( \star ,\,\star ,\,\mathbf {0},\,\star ,\,\star ,\,\mathbf {0}\right) \), there are two subcases to be considered:

  • For the subcase \(c(x)=1+a_1\,x+a_2\,x^{5i+2}+a_3\,x^{5i+3}\) with \(1\le i\le p-1\) and \(a_1,\,a_2,\,a_3\in {\mathbb {F}}_p^*\), it follows from \(c\left( 1\right) =c^{\left( 1\right) }\left( 1\right) =c^{\left( 2\right) }\left( 1\right) =0\) that

    $$\begin{aligned} \left\{ \begin{array}{l} 1+a_{1}+a_{2}+a_{3}=0,\\ a_{1}+\left( 5i+2\right) a_{2}+\left( 5i+3\right) a_{3}=0,\\ \left( 5i+2\right) \left( 5i+1\right) a_{2} +\left( 5i+3\right) \left( 5i+2\right) a_{3}=0.\\ \end{array} \right. \end{aligned}$$
    (5)

    If \(p\,|\left( 5i+2\right) \), then (5) implies that \(a_1=-a_3\) and \(a_2=-1\). Then \(c\left( \beta \right) =c\left( \beta ^2\right) =0\) yields

    $$\begin{aligned} \left\{ \begin{array}{l} 1+a_{1}\,\beta -\beta ^2-a_{1}\,\beta ^3=0,\\ 1+a_{1}\,\beta ^2-\beta ^4-a_{1}\,\beta ^6=0.\\ \end{array} \right. \end{aligned}$$

    One can immediately obtain that

    $$\begin{aligned} a_1=\frac{\beta ^2-1}{\beta -\beta ^3}=\frac{\beta ^4-1}{\beta ^2-\beta ^6}. \end{aligned}$$

    This leads to \(\beta =1\), a contradiction.

    If \(p\not \mid \left( 5i+2\right) \), then (5) yields that \(a_1=-a_2\) and \(a_3=-1\). It follows from \(c\left( \beta \right) =c\left( \beta ^2\right) =0\) that

    $$\begin{aligned} \left\{ \begin{array}{l} 1+a_{1}\,\beta -a_{1}\,\beta ^2-\beta ^3=0,\\ 1+a_{1}\,\beta ^2-a_{1}\,\beta ^4-\beta ^6=0.\\ \end{array} \right. \end{aligned}$$

    Then one gets that

    $$\begin{aligned} a_1=\frac{\beta ^3-1}{\beta -\beta ^2}=\frac{\beta ^6-1}{\beta ^2-\beta ^4} \end{aligned}$$

    which induces

    $$\begin{aligned} \beta ^3+1=\beta \left( \beta +1\right) . \end{aligned}$$

    This implies \(\left( \beta -1\right) \left( \beta ^2-1\right) =0\), a contradiction.

  • Consider the subcase \(c(x)=1+a_1\,x+a_2\,x^{5i+3}+a_3\,x^{5i+4}\) with \(0\le i\le p-2\) and \(a_1,\,a_2,\,a_3\in {\mathbb {F}}_p^*\). By arguments similar to the previous subcase of \(c(x)=1+a_1\,x+a_2\,x^{5i+2}+a_3\,x^{5i+3}\), one can also derive a contradiction and we omit the proof here.

Case II   For the remaining case \(\left( \star ,\,\star ,\,\star ,\,\mathbf {0},\,\star ,\,\mathbf {0}\right) \), there are also two subcases to be discussed:

  • Consider the subcase \(c(x)=1+a_{1}\,x+a_{2}\,x^{2}+a_{3}\,x^{5i+3}\) with \(1\le i\le p-1\) and \(a_{1},\,a_{2},\,a_{3}\in {\mathbb {F}}_p^{*}\). Notice that \(c\left( 1\right) =c\left( \beta \right) =c\left( \beta ^2\right) =0\) and Lemma 6 indicates

    $$\begin{aligned} a_{1}=-\frac{\beta ^2+\beta +1}{\beta ^2},\quad a_{2}=\frac{\beta ^2+\beta +1}{\beta ^3},\quad a_{3}=-\frac{1}{\beta ^3}. \end{aligned}$$
    (6)

    It follows from \(c^{\left( 1\right) }\left( 1\right) =c^{\left( 2\right) }\left( 1\right) =0\) that

    $$\begin{aligned} \left\{ \begin{array}{l} a_{1}+2\,a_{2}+\left( 5i+3\right) a_{3}=0,\\ 2\,a_{2}+\left( 5i+3\right) \left( 5i+2\right) a_{3}=0.\\ \end{array} \right. \end{aligned}$$
    (7)

    Observe that (7) yields

    $$\begin{aligned} \left\{ \begin{array}{l} a_{1}=\left( 5i+3\right) \left( 5i+1\right) a_{3},\\ \left( 5i+2\right) a_{1}+2\left( 5i+1\right) a_{2}=0\\ \end{array} \right. \end{aligned}$$
    (8)

    and the second equality in (7) indicates \(p\not \mid (5i+2)\). Let \(t=5i+2\). By (6) and (8), one can immediately have

    $$\begin{aligned} \left\{ \begin{array}{l} t^2=\beta ^3+\beta ^2+\beta +1,\\ t(\beta -2)=2.\\ \end{array} \right. \end{aligned}$$
    (9)

    The second equality in (9) indicates \(\beta \ne 2\) and \(t=-\frac{2}{\beta -2}\). By substituting the value of t into the first equality in (9), one can obtain

    $$\begin{aligned} \frac{4\beta }{(\beta -2)^2}=(\beta ^3+\beta ^2+\beta +1)\beta . \end{aligned}$$

    It follows from \(\beta ^4+\beta ^3+\beta ^2+\beta +1=0\) that \(\beta ^2=-4\) and

    $$\begin{aligned} \beta ^4+\beta ^3+\beta ^2+\beta +1=13-3\beta =0. \end{aligned}$$

    This leads to \(\beta =\frac{13}{3}\) and then

    $$\begin{aligned} \beta ^2=\frac{169}{9}=-4 \end{aligned}$$

    implies \(5\cdot 41=0\), which is contradictory with \(5\,|\,(p-1)\) and \(p\ne 41\).

  • For the subcase \(c(x)=1+a_{1}\,x+a_{2}\,x^{2}+a_{3}\,x^{5i+4}\) with \(0\le i\le p-2\) and \(a_{1},\,a_{2},\,a_{3}\in {\mathbb {F}}_p^{*}\), it follows from \(c\left( 1\right) =c\left( \beta \right) =c\left( \beta ^2\right) =0\) and Lemma 6 that

    $$\begin{aligned} a_{1}=-\frac{1}{\beta },\quad a_{2}=-\frac{\beta }{\beta +1},\quad a_{3}=\frac{1}{\beta \left( \beta +1\right) }. \end{aligned}$$
    (10)

    On the other hand, \(c^{\left( 1\right) }\left( 1\right) =c^{\left( 2\right) }\left( 1\right) =0\) yields that

    $$\begin{aligned} \left\{ \begin{array}{l} a_{1}+2\,a_{2}+\left( 5i+4\right) a_{3}=0,\\ 2\,a_{2}+\left( 5i+4\right) \left( 5i+3\right) a_{3}=0\\ \end{array}\right. \end{aligned}$$

    which is equivalent to

    $$\begin{aligned} \left\{ \begin{array}{l} a_{1}+2\,a_{2}+\left( 5i+4\right) a_{3}=0,\\ a_{1}=\left( 5i+4\right) \left( 5i+2\right) a_{3}.\\ \end{array} \right. \end{aligned}$$

    Let \(t=5i+3\). Together with (10), one can immediately obtain that

    $$\begin{aligned} \left\{ \begin{array}{l} t=2\,\beta ^2+\beta ,\\ t^2+\beta =0.\\ \end{array} \right. \end{aligned}$$

    Then by substituting the value of t, one has

    $$\begin{aligned} \beta ^2=3\,\beta +3 \end{aligned}$$
    (11)

    and

    $$\begin{aligned} 0=\beta ^4+\beta ^3+\beta ^2+\beta +1=61\,\beta +49. \end{aligned}$$

    If \(p=61\), then \(49=0\), which is impossible. If \(p\ne 61\), then \(\beta =-\frac{49}{61}\). It follows from (11) that

    $$\begin{aligned} \left( \frac{49}{61}\right) ^2=3\left( -\frac{49}{61}+1\right) . \end{aligned}$$

    This implies \(5\cdot 41=0\), a contradiction similar as the previous subcase.

Therefore, \({\mathcal {C}}\) is an MDS \(\left( 5p,\,7\right) _{p}\) symbol-pair code. This completes the proof. \(\square \)

Another class of MDS symbol-pair codes with \(n=5p\) and \(d_{p}=8\) is proposed as follows.

Theorem 2

Let p be a prime with \(5\,|\left( p-1\right) \). Then there exists an MDS \(\left( 5p,\,8\right) _{p}\) symbol-pair code.

Proof

Let \({\mathcal {C}}\) be a repeated-root cyclic code of length 5p over \({\mathbb {F}}_{p}\) with the generator polynomial

$$\begin{aligned} g(x)=\left( x-1\right) ^{3}\left( x-\beta \right) \left( x-\beta ^{2}\right) ^2 \end{aligned}$$

where \(\beta \) is a primitive 5-th root of unity in \({\mathbb {F}}_{p}\). It can be verified that \({\mathcal {C}}\) is an MDS \(\left( 5p,\,8\right) _{p}\) symbol-pair code by similar techniques used in the proof of Theorem 1. Since the proof is lengthy and some cases seem a bit cumbersome, we present it in the Appendix. \(\square \)

Now we provide two examples to illustrate the constructions in Theorems 1 and 2.

Example 1

(1) Let \({\mathcal {C}}\) be a repeated-root cyclic code of length 55 over \({\mathbb {F}}_{11}\) with the generator polynomial

$$\begin{aligned} g(x)=\left( x-1\right) ^{3}\left( x-3\right) \left( x-3^2\right) . \end{aligned}$$

MAGMA experiments show that \({\mathcal {C}}\) is a \([55,\,50,\,4]\) code and the minimum symbol-pair distance of \({\mathcal {C}}\) is 7, which satisfies our result in Theorem 1.

(2) Let \({\mathcal {C}}\) be a repeated-root cyclic code of length 55 over \({\mathbb {F}}_{11}\) with the generator polynomial

$$\begin{aligned} g(x)=\left( x-1\right) ^{3}\left( x-3\right) \left( x-3^2\right) ^2. \end{aligned}$$

By a MAGMA program, it can be checked that \({\mathcal {C}}\) is a \([55,\,49,\,4]\) code and the minimum symbol-pair distance of \({\mathcal {C}}\) is 8, which is consistent with our result in Theorem 2.

3.2 MDS symbol-pair codes for \(n=4p\)

In this subsection, we shall construct a class of MDS symbol-pair codes with \(d_{p}=7\), which generalizes Theorem 3.8 in [18].

Theorem 3

Let p be an odd prime. Then there exists an MDS \(\left( 4p,\,7\right) _{p}\) symbol-pair code.

Proof

The case \(p\equiv 3\left( \mathrm{mod}\,4\right) \) has been settled, see the result of Theorem 3.8 in [18]. For the case \(p\equiv 1\left( \mathrm{mod}\,4\right) \), let \({\mathcal {C}}\) be a repeated-root cyclic code of length 4p over \({\mathbb {F}}_p\) with the generator polynomial

$$\begin{aligned} g(x)=\left( x-1\right) ^{3}\left( x-\omega \right) \left( x+\omega \right) \end{aligned}$$

where \(\omega \) is a primitive 4-th root of unity in \({\mathbb {F}}_{p}\). In the following, we will claim that for \(p\equiv 1\left( \mathrm{mod}\,4\right) \), the code \({\mathcal {C}}\) is also an MDS \(\left( 4p,\,7\right) _{p}\) symbol-pair code.

By Lemma 3, one can derive that the parameter of \({\mathcal {C}}\) is \(\left[ 4p,\,4p-5,\,4\right] \). Since \({\mathcal {C}}\) is not MDS, by Lemma 4, we get \(d_{p}({\mathcal {C}})\ge 6\). With a similar argument as Theorem 1, one can obtain that there does not exist a codeword c(x) in \({\mathcal {C}}\) with \((w_H(c(x)), \,w_p(c(x)))=(5,\,6)\). In order to show that \({\mathcal {C}}\) is an MDS \(\left( 4p,\,7\right) _{p}\) symbol-pair code, we need to prove that there does not exist a codeword in \({\mathcal {C}}\) with \((w_H(c(x)),\,w_p(c(x)))=(4,\,6)\).

Let c(x) be a codeword in \({\mathcal {C}}\) with \((w_H(c(x)),\,w_p(c(x)))=(4,\,6)\). Then Lemma 1 indicates that its certain cyclic shift must have the form

$$\begin{aligned} \left( \star ,\,\star ,\,\star ,\,\mathbf {0},\,\star ,\,\mathbf {0}\right) \end{aligned}$$

or

$$\begin{aligned} \left( \star ,\,\star ,\,\mathbf {0},\,\star ,\,\star ,\,\mathbf {0}\right) . \end{aligned}$$

For the case \(\left( \star ,\,\star ,\,\star ,\,\mathbf {0},\,\star ,\,\mathbf {0}\right) \), we assume that

$$\begin{aligned} c(x)=1+a_{1}\,x+a_{2}\,x^{2}+a_{3}\,x^{l} \end{aligned}$$

for some positive integer l with \(4\le l\le 4p-2\) and \(a_{1},\,a_{2},\,a_{3}\in {\mathbb {F}}_{p}^{*}\). It follows from \(c\left( 1\right) =c^{\left( 1\right) }\left( 1\right) =c^{(2)}\left( 1\right) =0\) that

$$\begin{aligned} \left\{ \begin{array}{l} 1+a_{1}+a_{2}+a_{3}=0,\\ a_{1}+2\,a_{2}+l\,a_{3}=0,\\ 2\,a_{2}+l\left( l-1\right) a_{3}=0.\\ \end{array} \right. \end{aligned}$$

This yields

$$\begin{aligned} a_{1}=-\frac{2l}{l-1},\quad a_{2}=\frac{l}{l-2}, \quad a_{3}=-\frac{2}{\left( l-1\right) \left( l-2\right) }. \end{aligned}$$
(12)
  • If l is even, then we have

    $$\begin{aligned} \left\{ \begin{array}{l} 1+a_{1}\,\omega -a_{2}+a_{3}\,\omega ^{l}=0,\\ 1-a_{1}\,\omega -a_{2}+a_{3}\,\omega ^{l}=0\\ \end{array} \right. \end{aligned}$$

    since \(c\left( \omega \right) =c\left( -\omega \right) =0\) and \(\omega ^{2}=-1\). It follows that \(a_{1}=0\), which is impossible.

  • If l is odd, then \(c\left( \omega \right) =c\left( -\omega \right) =0\) induces that

    $$\begin{aligned} \left\{ \begin{array}{l} 1+a_{1}\,\omega -a_{2}+a_{3}\,\omega ^{l}=0,\\ 1-a_{1}\,\omega -a_{2}-a_{3}\,\omega ^{l}=0.\\ \end{array} \right. \end{aligned}$$

    This implies that \(a_{2}=1\), which contradicts with the result in (12).

For the remaining case \(\left( \star ,\,\star ,\,\mathbf {0},\,\star ,\,\star ,\,\mathbf {0}\right) \), we suppose that

$$\begin{aligned} c(x)=1+a_{1}\,x+a_{2}\,x^{l}+a_{3}\,x^{l+1} \end{aligned}$$

for some positive integer l with \(3\le l\le 4p-3\) and \(a_{1},\,a_{2},\,a_{3}\in {\mathbb {F}}_{p}^{*}\). Then \(c\left( 1\right) =c^{\left( 1\right) }\left( 1\right) =c^{\left( 2\right) }\left( 1\right) =0\) indicates that

$$\begin{aligned} \left\{ \begin{array}{l} 1+a_{1}+a_{2}+a_{3}=0,\\ a_{1}+l\,a_{2}+\left( l+1\right) a_{3}=0,\\ l\left( l-1\right) a_{2}+l\left( l+1\right) a_{3}=0.\\ \end{array} \right. \end{aligned}$$
(13)

It follows from \(c\left( \omega \right) =c\left( -\omega \right) =0\) that

$$\begin{aligned} \left\{ \begin{array}{l} 1+a_{1}\,\omega +a_{2}\,\omega ^{l}+a_{3}\,\omega ^{l+1}=0,\\ 1-a_{1}\,\omega +a_{2}\left( -\omega \right) ^{l}+a_{3}\left( -\omega \right) ^{l+1}=0.\\ \end{array} \right. \end{aligned}$$
(14)

Now we divide the proof into the following two subcases:

  • For the subcase \(p\,|\,l\), (13) yields that

    $$\begin{aligned} a_{1}+a_{3}=0,\quad a_{2}=-1. \end{aligned}$$
    (15)

    If l is even, then we have \(l=2p\) due to \(3\le l\le 4p-3\). It follows from (14) and (15) that

    $$\begin{aligned} 1=\omega ^{l}=\omega ^{2p}=\left( -1\right) ^p \end{aligned}$$

    which is impossible. Similarly, if l is odd, one can obtain that \(\omega ^{2l}=1\), a contradiction.

  • For the subcase \(p\not \mid l\), it follows from (13) that

    $$\begin{aligned} a_{1}=-\frac{l+1}{l-1},\quad a_{2}=\frac{l+1}{l-1},\quad a_{3}=-1. \end{aligned}$$
    (16)

    If l is even, then by (14) and (16), one can deduce that

    $$\begin{aligned} a_1=\omega ^l, \quad 1+a_2\,\omega ^l=0. \end{aligned}$$

    Then one can obtain that

    $$\begin{aligned} 1=a_{1}^2=\left( -\frac{l+1}{l-1}\right) ^{2}. \end{aligned}$$

    This implies \(4l=0\), a contradiction. By a similar manner, for odd l, one can derive that \(\omega ^{l+1}=\omega ^{l-1}=1\), which is impossible.

Consequently, \({\mathcal {C}}\) is an MDS \(\left( 4p,\,7\right) _{p}\) symbol-pair code. This proves the desired conclusion. \(\square \)

Now we give an example to illustrate the construction in Theorem 3.

Example 2

Let \({\mathcal {C}}\) be a repeated-root cyclic code of length 20 over \({\mathbb {F}}_{5}\) with the generator polynomial

$$\begin{aligned} g(x)=\left( x-1\right) ^{3}\left( x-2\right) \left( x+2\right) . \end{aligned}$$

It can be checked by MAGMA that \({\mathcal {C}}\) is a \([20,\,15,\,4]\) code and the minimum symbol-pair distance of \({\mathcal {C}}\) is 7, which coincides with our result in Theorem 3.

4 Conclusions and future work

In this paper, three new classes of MDS symbol-pair codes over \({\mathbb {F}}_{p}\) with p an odd prime were constructed from repeated-root cyclic codes. Firstly, for \(n=5p\), two classes of MDS symbol-pair codes with minimum symbol-pair distance seven or eight were presented. In addition, for length \(n=4p\), we derived a class of MDS symbol-pair codes with \(d_{p}=7\) and our construction extends the result in [18]. Note that by utilizing repeated-root cyclic codes, one can construct MDS symbol-pair codes by transforming the problem into analyzing the solutions of certain equations over finite fields.

However, it seems impracticable to construct \((5q,\,7)_p\), \((5q,\,8)_p\) and \((4q,\,7)_p\) MDS symbol-pair codes with q being a power of p using the techniques in Theorems 1-3. For instance, for the case \(q=p^2\), \(5\,|\,(q-1)\), let \({\mathcal {C}}\) be a repeated-root cyclic code of length 5q over \({\mathbb {F}}_q\) with the generator polynomial of the form

$$\begin{aligned} g(x)=\left( x-1\right) ^{e_1}\left( x-\omega \right) ^{e_2}\left( x-\omega ^{2}\right) ^{e_3} \left( x-\omega ^{3}\right) ^{e_4}\left( x-\omega ^{4}\right) ^{e_5} \end{aligned}$$

where \(\omega \) is a primitive 5-th root of unity in \({\mathbb {F}}_{q}\). It can be checked that \({\mathcal {C}}\) is not an MDS symbol-pair code. It needs further study to construct MDS symbol-pair codes with larger minimum symbol-pair distance and length lq, where \(q=p^m\) with \(m>1\).