# A new class of MDS symbol-pair codes

Canze Zhu Qunying Liao  Corresponding author.
E-mail<EMAIL_ADDRESS>(Q. Liao<EMAIL_ADDRESS>(C. Zhu).
Supported by National Natural Science Foundation of China (Grant No.
12071321).

Abstract.  The symbol-pair code is a new coding framework proposed to guard
against pair-errors in symbol-pair read channels. Especially, a symbol-pair
code with the parameters achieving the Singleton-type bound is called an MDS
symbol-pair code. In this paper, inspiring by the classical construction for
Reed-Solomon codes, for any $3\leq k<m\leq q-2$ and
$m_{1}=\Big{\lfloor}{\tiny\frac{m}{\lfloor\frac{k-1}{2}\rfloor}}\Big{\rfloor}$,
we construct a class of $q$-ary MDS symbol-pair codes with dimension $k$ and
length $n$ $(n=m+m_{1},m+m_{1}-1)$, where $q$ is a prime power. Furthermore,
for $k\in\\{3,4\\}$, the symbol-pair weight distributions for these codes are
determined by enumerating the number of polynomials with given roots.

Keywords. Symbol-pair codes; MDS symbol-pair codes; Symbol-pair weight
distributions

##  1 Introduction

In 2011, Cassuto and Blaum [1] first proposed a new coding framework named the
symbol-pair code to combat pair-errors in symbol-pair channels. In addition,
they proved that a code $\mathcal{C}$ with minimum symbol-pair distance
$d_{p}(\mathcal{C})$ can correct up to
$\lfloor\frac{d_{p}(\mathcal{C})-1}{2}\rfloor$ symbol-pair errors. Then,
basing on cyclic codes, Cassuto and Litsyn [2] gave a construction for symbol-
pair codes, and then established asymptotic bounds on code rates. In 2012,
Yaakobi et al. [25] proposed an efficient decoding algorithm for cyclic
symbol-pair codes. Later, there are further reasearch for symbol-pair codes
including constructions for symbol-pair codes [3, 4, 5, 6, 7, 10, 12, 15, 16,
17, 20, 21], some decoding algorithms for symbol-pair codes[13, 18, 23, 24,
25], and symbol-pair weight distributions for some linear codes [8, 9, 11, 22,
26], and so on.

In 2013, Chee et al. [3, 4] established the Singleton-type bound for symbol-
pair codes, and then considered the constructions for symbol-pair codes
meeting the above bound. A symbol-pair code with parameters achieving the
Singleton-type bound is called an MDS symbol-pair code. It is easy to see that
an MDS code $[n,k]$ with $2\leq k\leq n-1$ is an MDS symbol-pair code.
Recently, to construct MDS symbol-pair codes is very interesting. Till now,
there are two constructions for MDS symbol-pair codes. The one is based on
linear codes with certain properties, especially, MDS codes [3, 4] or
constacyclic (cyclic) codes [5, 10, 15, 16, 17, 20, 21]. The other is based on
interleaving techniques [3, 4], Eulerian graphs [3, 4], projective geometry
[6] and algebraic geometry codes over elliptic curves [6]. On the other hand,
it is also a hot topic to calculate the weight distribution for a linear code.
Especially, it is well-known that the Hamming weight distribution for an MDS
code can be calculated by its parameters directly [14]. Recently, Ma and Luo
gave the symbol-pair weight distribution for an MDS code by employing its some
shortened codes [22]. However, there are few works on the weight distributions
for MDS symbol-pair codes.

Inspiring by the classical construction for Reed-Solomon codes, in the similar
idea, we construct a class of $q$-ary MDS symbol-pair codes. Furthermore, by
enumerating the number of polynomials with given roots, we determine the
symbol-pair weight distributions for these codes when the code dimension
$k\in\\{3,4\\}$.

This paper is organized as follows. In section 2, some necessary lemmas are
given. In section 3, a class of $q$-ary MDS symbol-pair codes are constructed.
In section 4, the symbol-pair wight distributions for these codes with the
code dimension $k\in\\{3,4\\}$ are determined. Finally, we conclude the whole
paper.

##  2 Preliminaries

Throughout the whole paper, let $n\geq 2$ be an integer and $\mathbb{F}_{q}$
be the finite field with $q$ elements, where $q$ is a prime power. An element
in $\mathbb{F}_{q}$ is also called a symbol. For a vector
$\mathbf{x}=(x_{1},x_{2},\cdots,x_{n})\in\mathbb{F}_{q}^{n}$, we define the
symbol-pair read vector of $\mathbf{x}$ as

$\displaystyle\pi(\mathbf{x})=\big{(}(x_{1},x_{2}),(x_{2},x_{3}),\ldots,(x_{n-1},x_{n}),(x_{n},x_{1})\big{)}.$

For any two vectors $\mathbf{x}$ and $\mathbf{y}$ in $\mathbb{F}_{q}^{n}$, it
is easy to see that

$\displaystyle\pi(\mathbf{x}+\mathbf{y})=\pi(\mathbf{x})+\pi(\mathbf{y}).$

The Hamming distance and symbol-pair distance between $\mathbf{x}$ and
$\mathbf{y}$ is defined as

$\displaystyle D_{H}(\mathbf{x},\mathbf{y}):=\\#\\{1\leq i\leq
n\leavevmode\nobreak\ |\leavevmode\nobreak\ x_{i}\neq y_{i}\\},$

and

$\displaystyle D_{p}(\mathbf{x},\mathbf{y}):=\\#\\{1\leq i\leq
n\leavevmode\nobreak\ |\leavevmode\nobreak\
(x_{i},x_{i+1})\neq(y_{i},y_{i+1})\\},$

respectively. Accordingly, the Hamming weight and the symbol-pair weight of
$\mathbf{x}$ is defined as

$\displaystyle w_{H}(\mathbf{x}):=\\#\\{1\leq i\leq n\leavevmode\nobreak\
|\leavevmode\nobreak\ x_{i}\neq 0\\},$

and

$\displaystyle w_{p}(\mathbf{x}):=\\#\\{1\leq i\leq n\leavevmode\nobreak\
|\leavevmode\nobreak\ (x_{i},x_{i+1})\neq(0,0)\\},$

respectively. Above the subscripts are reduced modulo $n$.

An $[n,k,d]$ linear code $\mathcal{C}$ over $\mathbb{F}_{q}$ is a
$k$-dimensional subspace of $\mathbb{F}_{q}^{n}$ with minimum distance $d$ and
length $n$. The minimum symbol-pair distance $d_{p}(\mathcal{C})$ for a code
$\mathcal{C}$ is defined as

$\displaystyle
d_{p}(\mathcal{C}):=\min\\#\\{D_{p}(\mathbf{x},\mathbf{y})\leavevmode\nobreak\
|\leavevmode\nobreak\ \mathbf{x},\leavevmode\nobreak\
\mathbf{y}\in\mathcal{C},\leavevmode\nobreak\ \mathbf{x}\neq\mathbf{y}\\}.$

The size of a symbol-pair code satisfies the following Singleton bound.

###### Lemma 2.1

[3] For a symbol-pair code $\mathcal{C}$ over $\mathbb{F}_{q}$ with length $n$
and minimum symbol-pair distance $d_{p}(\mathcal{C})\geq 2$, then one has

$\displaystyle\big{|}\mathcal{C}\big{|}\leq q^{n-d_{p}(\mathcal{C})+2}.$

A symbol-pair code with parameters achieving the Singleton bound is called a
maximum distance separable (in short, MDS) symbol-pair code.

The following nonations and Lemma 2.2 are given to estimate the symbol-pair
weight for any vector $\mathbf{c}\in\mathbb{F}_{q}^{n}$.

We decompose the $n$ coordinates of $\mathbf{c}\neq 0$ into $l$ blocks, let

$\displaystyle[1,n]=N_{1}\cup N_{2}\cup\cdots\cup N_{l}$

with

$\displaystyle N_{i}=[n_{1}+\cdots+n_{i-1}+1,n_{1}+\cdots+n_{i}],$

where $n_{0}=0$ and $n_{i}$ is a positive integer for $1\leq i\leq l$. It is
easy to see that $|N_{i}|=n_{i}$ $(1\leq i\leq l)$, and
$n=\sum_{i=1}^{l}n_{i}$.

A vector $\mathbf{c}=(c_{1},\ldots,c_{n})\neq\mathbf{0}$ is said to be with
the shape $(N_{1},\ldots,N_{l})$ if the following conditions are satisfied
simultaneously.
$\bullet$ For $1\leq i\leq l$,
$(c_{n_{1}+\cdots+n_{i-1}+1},\ldots,c_{n_{1}+\cdots+n_{i}})={\bf 0}$ or
$(c_{n_{1}+\cdots+n_{i-1}+1},\ldots,c_{n_{1}+\cdots+n_{i}})\in(\mathbb{F}_{q}^{*})^{n_{i}}$.

$\bullet$ For $1\leq i\leq l-1$, either all the corresponding coordinates of
$N_{i}$ are zero and all the corresponding coordinates of $N_{i+1}$ are
nonzero, or vice versa.

###### Lemma 2.2

For $\mathbf{c}=(c_{1},\ldots,c_{n})\in\mathbb{F}_{q}^{n}$ with the shape
$(N_{1},\ldots,N_{l})$, we have

$\displaystyle w_{p}(\mathbf{c})\geq
w_{H}(\mathbf{c})+\Big{\lceil}\frac{l-1}{2}\Big{\rceil},$

where $\lceil\cdot\rceil$ is the Ceiling function.

Proof. Depending on $c_{l}=0$ $(l=1,n)$ or not, we have the following $4$
cases.

Case $1$. If $c_{1}=c_{n}=0$, then $l$ is odd, thus

$\displaystyle
w_{p}(\mathbf{c})=(n_{2}+1)+\cdots+(n_{l-1}+1)=w_{H}(\mathbf{c})+\frac{l-1}{2}.$

Case $2$. If $c_{1}=0$ and $c_{n}\neq 0$, then $l$ is even, thus

$\displaystyle
w_{p}(\mathbf{c})=(n_{2}+1)+\cdots+(n_{l}+1)=w_{H}(\mathbf{c})+\frac{l}{2}.$

Case $3$. If $c_{1}\neq 0$ and $c_{n}=0$, then $l$ is even, thus

$\displaystyle
w_{p}(\mathbf{c})=(n_{1}+1)+\cdots+(n_{l-1}+1)=w_{H}(\mathbf{c})+\frac{l}{2}.$

Case $4$. If $c_{1}\neq 0$ and $c_{n}\neq 0$, then $l$ is odd, thus

$\displaystyle
w_{p}(\mathbf{c})=(n_{1}+1)+\cdots+(n_{l}+1)=w_{H}(\mathbf{c})+\frac{l+1}{2}.$

$\hfill\Box$

To calculate the symbol-pair weight distributions for those codes constructed
in this paper, for two distinct elements
$\beta_{1},\beta_{2}\in\mathbb{F}_{q}$ and any
$\alpha_{l}\in\mathbb{F}_{q}\backslash\\{\beta_{1},\beta_{2}\\}$
$(l=1,\ldots,m)$, we denote the following nonations.

$\bullet$ $\dot{\cup}$ is the disjoint union.
$\bullet$ $A=\\{\alpha_{1},\ldots,\alpha_{m}\\}$,
$A_{1}=\\{\alpha_{1},\ldots,\alpha_{m-1}\\}$,
$A_{2}=\\{\alpha_{2},\ldots,\alpha_{m}\\}$.
$\bullet$ $T_{1}=\mathbb{F}_{q}\backslash(\\{\beta_{1}\\}\cup A)$,
$T_{2}=\mathbb{F}_{q}\backslash(\\{\beta_{2}\\}\cup A)$,
$L_{1}=\mathbb{F}_{q}\backslash(\\{\beta_{2}\\}\cup A_{1})$,
$L_{2}=\mathbb{F}_{q}\backslash(\\{\beta_{1}\\}\cup A_{2})$.
$\bullet$ $S_{1}=\\{a(x-\beta_{1})(x-\beta_{2})\leavevmode\nobreak\
|\leavevmode\nobreak\ a\in\mathbb{F}_{q}^{*}\\}$.
$\bullet$ $S_{2}=\\{a(x-\beta_{1})(x-\beta_{2})(x-b)\leavevmode\nobreak\
|\leavevmode\nobreak\ a\in\mathbb{F}_{q}^{*},\leavevmode\nobreak\
b\in\mathbb{F}_{q}\backslash A\\}$.
$\bullet$ $S_{3}=\\{a(x-\beta_{1})(x-\beta_{2})(x-b)\leavevmode\nobreak\
|\leavevmode\nobreak\ a\in\mathbb{F}_{q}^{*},\leavevmode\nobreak\ b\in A\\}$.
$\bullet$ $D_{1}(i)=\\{a(x-\beta_{i})\leavevmode\nobreak\
|\leavevmode\nobreak\ a\in\mathbb{F}_{q}^{*}\\}$.
$\bullet$
$D_{2}(i)=\\{a(x-\beta_{i})g(x)|a\in\mathbb{F}_{q}^{*},g(x)\in\mathbb{F}_{q}[x],\text{monic,
irreducible and}\leavevmode\nobreak\ \deg g(x)=2\\}$.
$\bullet$ $D_{3}(m,i)=\begin{cases}\\{a(x-\beta_{i})(x-b)\leavevmode\nobreak\
|\leavevmode\nobreak\ a\in\mathbb{F}_{q}^{*},\leavevmode\nobreak\ b\in
A\\},&2\mid m;\\\ \\{a(x-\beta_{i})(x-b)\leavevmode\nobreak\
|\leavevmode\nobreak\ a\in\mathbb{F}_{q}^{*},\leavevmode\nobreak\ b\in
A_{i}\\},&2\nmid m.\\\ \end{cases}$
$\bullet$ $D_{4}(m,i)=\begin{cases}\\{a(x-\beta_{i})(x-b)\leavevmode\nobreak\
|\leavevmode\nobreak\ a\in\mathbb{F}_{q}^{*},\leavevmode\nobreak\ b\in
T_{i}\\},&2\mid m;\\\ \\{a(x-\beta_{i})(x-b)\leavevmode\nobreak\
|\leavevmode\nobreak\ a\in\mathbb{F}_{q}^{*},\leavevmode\nobreak\ b\in
L_{i}\\},&2\nmid m.\\\ \end{cases}$
$\bullet$
$D_{5}(m,i)=\begin{cases}\\{a(x-\beta_{i})(x-b)^{2}\leavevmode\nobreak\
|\leavevmode\nobreak\ a\in\mathbb{F}_{q}^{*},\leavevmode\nobreak\ b\in
A\\},&2\mid m;\\\ \\{a(x-\beta_{i})(x-b)^{2}\leavevmode\nobreak\
|\leavevmode\nobreak\ a\in\mathbb{F}_{q}^{*},\leavevmode\nobreak\ b\in
A_{i}\\},&2\nmid m.\end{cases}$
$\bullet$
$D_{6}(m,i)=\begin{cases}\\{a(x-\beta_{i})(x-b)^{2}\leavevmode\nobreak\
|\leavevmode\nobreak\ a\in\mathbb{F}_{q}^{*},\leavevmode\nobreak\ b\in
T_{i}\\},&2\mid m;\\\ \\{a(x-\beta_{i})(x-b)^{2}\leavevmode\nobreak\
|\leavevmode\nobreak\ a\in\mathbb{F}_{q}^{*},\leavevmode\nobreak\ b\in
L_{i}\\},&2\nmid m.\end{cases}$
$\bullet$
$D_{7}(m,i)=\begin{cases}\\{a(x-\beta_{i})(x-b_{1})(x-b_{2})|a\in\mathbb{F}_{q}^{*},b_{1}\in
A,b_{2}\in A\leavevmode\nobreak\ \text{and}\leavevmode\nobreak\ b_{1}\neq
b_{2}\\},&\\!\\!\\!\\!2\mid m;\\\
\\{a(x-\beta_{i})(x-b_{1})(x-b_{2})|a\in\mathbb{F}_{q}^{*},b_{1}\in
A_{i},b_{2}\in A_{i}\leavevmode\nobreak\ \text{and}\leavevmode\nobreak\
b_{1}\neq b_{2}\\},&\\!\\!\\!\\!2\nmid m.\end{cases}$
$\bullet$
$D_{8}(m,i)=\begin{cases}\\{a(x-\beta_{i})(x-b_{1})(x-b_{2})|a\in\mathbb{F}_{q}^{*},\leavevmode\nobreak\
b_{1}\in A,\leavevmode\nobreak\ b_{2}\in T_{i}\\},&2\mid m;\\\
\\{a(x-\beta_{i})(x-b_{1})(x-b_{2})|a\in\mathbb{F}_{q}^{*},\leavevmode\nobreak\
b_{1}\in A_{i},\leavevmode\nobreak\ b_{2}\in L_{i}\\},&2\nmid m.\end{cases}$
$\bullet$
$D_{9}(m,i)=\begin{cases}\\{a(x-\beta_{i})(x-b_{1})(x-b_{2})|a\in\mathbb{F}_{q}^{*},b_{1}\in
T_{i},b_{2}\in T_{i}\leavevmode\nobreak\ \text{and}\leavevmode\nobreak\
b_{1}\neq b_{2}\\},&\\!\\!\\!\\!2\mid m;\\\
\\{a(x-\beta_{i})(x-b_{1})(x-b_{2})|a\in\mathbb{F}_{q}^{*},b_{1}\in
L_{i},b_{2}\in L_{i}\leavevmode\nobreak\ \text{and}\leavevmode\nobreak\
b_{1}\neq b_{2}\\},&\\!\\!\\!\\!2\nmid m.\end{cases}$
$\bullet$ $M_{1}=\\{f(x)\in\mathbb{F}_{q}[x]\leavevmode\nobreak\ |\deg
f(x)\leq 2,\leavevmode\nobreak\ f(\beta_{1})\neq 0\leavevmode\nobreak\
\text{and}\leavevmode\nobreak\ f(\beta_{2})\neq 0\\}$.
$\bullet$ $M_{2}=\\{f(x)\in\mathbb{F}_{q}[x]\leavevmode\nobreak\ |\deg
f(x)\leq 3,\leavevmode\nobreak\ f(\beta_{1})\neq 0\leavevmode\nobreak\
\text{and}\leavevmode\nobreak\ f(\beta_{2})\neq 0\\}$.
$\bullet$ $M_{3}=\\{a(x-\alpha_{1})(x-\alpha_{m})\leavevmode\nobreak\
|\leavevmode\nobreak\ a\in\mathbb{F}_{q}^{*}\\}$.
$\bullet$ $M_{4}=\\{a(x-\alpha_{1})(x-\alpha_{m})(x-b)\leavevmode\nobreak\
|\leavevmode\nobreak\ a\in\mathbb{F}_{q}^{*}\leavevmode\nobreak\
\text{and}\leavevmode\nobreak\
b\in\mathbb{F}_{q}\backslash\\{\beta_{1},\beta_{2}\\}\\}$.

The following Lemma 2.3 is needed to calculate both $|M_{1}|$ and $|M_{2}|$.

###### Lemma 2.3

(Theorem 3.25, [19]) Denote

$\displaystyle N_{q}(n)=\\{f(x)\leavevmode\nobreak\ |\leavevmode\nobreak\
f(x)\text{ is a monic irreducible polynomial in
}\mathbb{F}_{q}[x]\leavevmode\nobreak\ \text{with degree }n\\},$

then

$\displaystyle N_{q}(n)=\frac{1}{n}\sum_{d|n}\mu(d)q^{\frac{n}{d}},$

where $\mu(\cdot)$ is the $M\ddot{o}bius$ function. Especially,

$\displaystyle N_{q}(2)=\frac{1}{2}q(q-1),\quad
N_{q}(3)=\frac{1}{3}(q+1)q(q-1).$

###### Lemma 2.4

$|S_{1}|=q-1,\leavevmode\nobreak\ |S_{2}|=(q-m)(q-1),\leavevmode\nobreak\
|S_{3}|=m(q-1)$ and

$\displaystyle|D_{1}(i)|=q-1,\leavevmode\nobreak\
|D_{2}(i)|=\frac{1}{2}q(q-1)^{2},\leavevmode\nobreak\ $
$\displaystyle|D_{3}(m,i)|=|D_{5}(m,i)|=\begin{cases}m(q-1),&2\mid m;\\\
(m-1)(q-1),&2\nmid m,\\\ \end{cases}$
$\displaystyle|D_{4}(m,i)|=|D_{6}(m,i)|=\begin{cases}(q-1-m)(q-1),&2\mid m;\\\
(q-m)(q-1),&2\nmid m,\\\ \end{cases}$
$\displaystyle|D_{7}(m,i)|=\begin{cases}\frac{1}{2}(m-1)m(q-1),&2\mid m;\\\
\frac{1}{2}(m-2)(m-1)(q-1),&2\nmid m,\\\ \end{cases}$
$\displaystyle|D_{8}(m,i)|=\begin{cases}m(q-1-m)(q-1),&2\mid m;\\\
(m-1)(q-m)(q-1),&2\nmid m,\\\ \end{cases}$
$\displaystyle|D_{9}(m,i)|=\begin{cases}\frac{1}{2}(q-2-m)(q-1-m)(q-1),&2\mid
m;\\\ \frac{1}{2}(q-1-m)(q-m)(q-1),&2\nmid m,\\\ \end{cases}$
$\displaystyle|M_{1}|=q(q-1)^{2},\quad|M_{2}|=q^{2}(q-1)^{2},\quad|M_{3}|=(q-1),\quad|M_{4}|=(q-2)(q-1).$

Proof By the definitions, one can get $|S_{1}|$, $|S_{2}|$, $|S_{3}|$,
$|D_{1}(i)|$, $|D_{2}(i)|$, $|D_{t}(m,i)|$ $(t=1,\ldots,9)$, $|M_{3}|$ and
$|M_{4}|$ directly. Now by Lemma 2.3, we have

$\displaystyle|M_{1}|=$
$\displaystyle(q-1)\big{(}1+|N_{q}(2)|\big{)}+\big{|}\\{a(x-b)|a\in\mathbb{F}_{q}^{*},b\in\mathbb{F}_{q}\backslash\\{\beta_{1},\beta_{2}\\}\\}\big{|}$
$\displaystyle+\big{|}\\{a(x-b_{1})(x-b_{2})|a\in\mathbb{F}_{q}^{*},\leavevmode\nobreak\
b_{1},\leavevmode\nobreak\
b_{2}\in\mathbb{F}_{q}\backslash\\{\beta_{1},\beta_{2}\\}\\}\big{|}$
$\displaystyle=$
$\displaystyle\frac{1}{2}q(q-1)^{2}+(q-2)(q-1)+\big{(}(q-2)+\frac{1}{2}(q-2)(q-3)\big{)}(q-1)$
$\displaystyle=$ $\displaystyle q(q-1)^{2},$

and

$\displaystyle|M_{2}|=$
$\displaystyle(q-1)\big{(}1+|N_{q}(2)|+|N_{q}(3)|\big{)}+\big{|}\\{a(x-b)|a\in\mathbb{F}_{q}^{*},b\in\mathbb{F}_{q}\backslash\\{\beta_{1},\beta_{2}\\}\\}\big{|}$
$\displaystyle+\big{|}\\{a(x-b)g(x)|a\in\mathbb{F}_{q}^{*},b\in\mathbb{F}_{q}\backslash\\{\beta_{1},\beta_{2}\\},g(x)\in
N_{q}(2)\\}\big{|}$
$\displaystyle+\big{|}\\{a(x-b_{1})(x-b_{2})|a\in\mathbb{F}_{q}^{*},b_{1},b_{2}\in\mathbb{F}_{q}\backslash\\{\beta_{1},\beta_{2}\\}\\}\big{|}$
$\displaystyle+\big{|}\\{a(x-b_{1})(x-b_{2})(x-b_{3})|a\in\mathbb{F}_{q}^{*},\leavevmode\nobreak\
b_{1},b_{2},b_{3}\in\mathbb{F}_{q}\backslash\\{\beta_{1},\beta_{2}\\}\\}\big{|}$
$\displaystyle=$
$\displaystyle\big{(}1+\frac{1}{2}q(q-1)+\frac{1}{3}(q+1)q(q-1)\big{)}(q-1)+\frac{1}{2}q(q-2)(q-1)^{2}$
$\displaystyle+(q-2)(q-1)+\big{(}(q-2)+\frac{1}{2}(q-2)(q-3)\big{)}(q-1)$
$\displaystyle+\big{(}(q-2)+(q-2)(q-3)+\frac{1}{6}(q-2)(q-3)(q-4)\big{)}(q-1)$
$\displaystyle=$ $\displaystyle q^{2}(q-1)^{2}.$

$\hfill\Box$

##  3 The Construction for MDS Symbol-pair Codes

The construction is given by the following $3$ steps.

Step $1$. Choosing any two distinct elements
$\beta_{1},\beta_{2}\in\mathbb{F}_{q}$, and

$\bm{\alpha}=\\{\alpha_{1},\alpha_{2},\ldots,\alpha_{m}\\}\subseteq\mathbb{F}_{q}\backslash\\{\beta_{1},\beta_{2}\\}.$

Step $2$. Let $k$ and $m$ be integers with $3\leq k<m\leq q-2$ and
$m_{1}=\Big{\lfloor}\frac{m}{\small\lfloor\frac{k-1}{2}\rfloor}\Big{\rfloor}$.
For $f(x)\in\mathbb{F}_{q}[x]$ and any $i=1,2,\ldots,m_{1}$, to calculate

$\displaystyle{\bf
c}_{f}(i)=\begin{cases}\big{(}\underbrace{f(\alpha_{(i-1)\lfloor\frac{k-1}{2}\rfloor+1}),\ldots,f(\alpha_{i\lfloor\frac{k-1}{2}\rfloor}),f(\beta_{1})}_{\lfloor\frac{k-1}{2}\rfloor+1}\big{)},\quad\leavevmode\nobreak\
2\nmid i;\\\
\big{(}\underbrace{f(\alpha_{i\lfloor\frac{k-1}{2}\rfloor+1}),\ldots,f(\alpha_{(i+1)\lfloor\frac{k-1}{2}\rfloor}),f(\beta_{2})}_{\lfloor\frac{k-1}{2}\rfloor+1}\big{)},\quad\leavevmode\nobreak\
2\mid i\leavevmode\nobreak\ ,\end{cases}$

where $\lfloor\cdot\rfloor$ is the Floor function.
Step $3$. For any even $m_{1}>0$, denote

$\displaystyle\mathcal{C}_{k}({\beta_{1},\beta_{2}},\bm{\alpha})$
$\displaystyle=$
$\displaystyle\big{\\{}\mathbf{c}_{f}=\big{(}\mathbf{c}_{f}(1),\ldots,\mathbf{c}_{f}(m_{1}),\leavevmode\nobreak\
f(\alpha_{\lfloor\frac{k-1}{2}\rfloor
m_{1}+1}),\ldots,f(\alpha_{m})\big{)}|f(x)\in\mathbb{F}_{q}[x]\leavevmode\nobreak\
\text{with }\mathrm{deg}f(x)\leq k-1\big{\\}}.$

For any odd $m_{1}>0$, denote

$\displaystyle\mathcal{C}_{k}({\beta_{1},\beta_{2}},\bm{\alpha})$
$\displaystyle=$
$\displaystyle\big{\\{}\mathbf{c}_{f}\\!=\\!\big{(}\mathbf{c}_{f}(1),\ldots,\mathbf{c}_{f}(m_{1}\\!-\\!\\!1),f(\alpha_{\lfloor\frac{k-1}{2}\rfloor(m_{1}-1)+1}),\ldots,f(\alpha_{m})\big{)}|f(x)\in\mathbb{F}_{q}[x]\leavevmode\nobreak\
\text{with }\mathrm{deg}f(x)\leq k-1\big{\\}}.$

###### Remark 3.1

It is easy to see that $\mathcal{C}_{k}({\beta_{1},\beta_{2}},\bm{\alpha})$ is
a linear code with dimension $k$ and length $m+m_{1}$ ($m+m_{1}-1$) if $m_{1}$
is even (odd). Furthermore,
$\mathcal{C}_{k}({\beta_{1},\beta_{2}},\bm{\alpha})$ has the longest code
length
$(q-2)+\Big{\lfloor}\frac{q-2}{\small\lfloor\frac{k-1}{2}\rfloor}\Big{\rfloor}$
when $\bm{\alpha}=\mathbb{F}_{q}\backslash\\{\beta_{1},\beta_{2}\\}$.

Based on the above construction and Lemma 2.2, we have the following

###### Theorem 3.1

$\mathcal{C}_{k}({\beta_{1},\beta_{2}},\bm{\alpha})$ is an MDS symbol-pair
code with

$\displaystyle
d_{p}\big{(}\mathcal{C}_{k}({\beta_{1},\beta_{2}},\bm{\alpha})\big{)}=\begin{cases}m+m_{1}-k+2,\quad&2\mid
m_{1};\\\ m+m_{1}-k+1,\quad&2\nmid m_{1}.\end{cases}$ (3.1)

Proof. For even $m_{1}$, then the code length of
$\mathcal{C}_{k}({\beta_{1},\beta_{2}},\bm{\alpha})$ is $m+m_{1}$. For any
given $f(x)\in\mathbb{F}_{q}[x]\backslash\\{0\\}$ with $\mathrm{deg}f(x)\leq
k-1$, suppose $\mathbf{c}_{f}$ is with the shape $(N_{1},\ldots,N_{l})$, then
we can estimate
$d_{p}\big{(}\mathcal{C}_{k}({\beta_{1},\beta_{2}},\bm{\alpha})\big{)}$ as the
following $3$ cases depending on $f(\beta_{i})=0$ $(i=1,2)$ or not.

$(1)$ If $f(\beta_{1})\neq 0$ and $f(\beta_{2})\neq 0$, then

$\displaystyle w_{H}(\mathbf{c}_{f})\geq m+m_{1}-k+1.$

If there exists some $\alpha_{l}\in A$ such that $f(\alpha_{l})=0$, then
$l\geq 2$. Now by Lemma 2.2, one has

$\displaystyle w_{p}(\mathbf{c}_{f})\geq
w_{H}(\mathbf{c}_{f})+\bigg{\lceil}\frac{l-1}{2}\bigg{\rceil}\geq
m+m_{1}-k+2.$ (3.2)

Otherwise,

$\displaystyle w_{p}(\mathbf{c}_{f})=m+m_{1}.$ (3.3)

$(2)$ If $f(\beta_{1})\neq 0$ and $f(\beta_{2})=0$, or $f(\beta_{1})=0$ and
$f(\beta_{2})\neq 0$, then the number of $\alpha_{l}\in A$ such that
$f(\alpha_{l})=0$ is not more than $k-2$, thus

$\displaystyle w_{H}(\mathbf{c})\geq
m+m_{1}-(k-2)-\frac{m_{1}}{2}=m+\frac{m_{1}}{2}-k+2.$

Furthermore, by $\lfloor\frac{k-1}{2}\rfloor+\lfloor\frac{k-1}{2}\rfloor>k-3$,
we have $l\geq m_{1}$. Now from Lemma 2.2, one has

$\displaystyle w_{p}(\mathbf{c}_{f})\geq
m+\frac{m_{1}}{2}-k+2+\bigg{\lceil}\frac{m_{1}-1}{2}\bigg{\rceil}=m+m_{1}-k+\frac{3}{2}.$
(3.4)

$(3)$ If $f(\beta_{1})=f(\beta_{2})=0$, then the number of $l$ such that
$f(\alpha_{l})=0$ is not more than $k-3$, thus

$\displaystyle w_{H}(\mathbf{c})\geq m+m_{1}-(k-3)-m_{1}=m-k+3.$

Furthermore, by $\lfloor\frac{k-1}{2}\rfloor+\lfloor\frac{k-1}{2}\rfloor>k-3$,
we have $l\geq 2m_{1}-1$. And so by Lemma 2.2, one has

$\displaystyle w_{p}(\mathbf{c}_{f})\geq
m-k+3+\frac{2m_{1}-2}{2}=m+m_{1}-k+2.$ (3.5)

Now by $(\ref{c0})$-$(\ref{c3})$ and Lemma 2.1, we know that

$\displaystyle
d_{p}\big{(}\mathcal{C}_{k}({\beta_{1},\beta_{2}},\bm{\alpha})\big{)}=m+m_{1}-k+2,$

which means that $\mathcal{C}_{k}({\beta_{1},\beta_{2}},\bm{\alpha})$ is an
MDS symbol-pair code.

For odd $m_{1}$, in the similar proof for the case that $m_{1}$ is even, one
can get

$\displaystyle
d_{p}\big{(}\mathcal{C}_{k}({\beta_{1},\beta_{2}},\bm{\alpha})\big{)}=m+m_{1}-k+1,$

and then $\mathcal{C}_{k}({\beta_{1},\beta_{2}},\bm{\alpha})$ is also an MDS
symbol-pair code. $\hfill\Box$

##  4 The Weight Distributions for
$\mathcal{C}_{k}({\beta_{1}},{\beta_{2}},\bm{\alpha})$ $({k}\in\\{{3},{4}\\})$

In this section, we give the weight distribution for
$\mathcal{C}_{k}({\beta_{1},\beta_{2}},\bm{\alpha})$ $(k\in\\{3,4\\})$. For
the convenience, we denote $A_{k}(w)$ to be the number of codewords in
$\mathcal{C}_{k}({\beta_{1},\beta_{2}},\bm{\alpha})$ with symbol-pair weight
$w$.

###### Theorem 4.1

$(1)$ For even $m_{1}>0$, one has $A_{3}(0)=1$,
$A_{3}(w)=0\leavevmode\nobreak\ (w=1,\ldots,2m-2)$,

$\displaystyle A_{3}(2m-1)=2m(q-1)\leavevmode\nobreak\ \leavevmode\nobreak\
\text{and}\leavevmode\nobreak\ \leavevmode\nobreak\
A_{3}(2m)=(q^{2}+q-2m+1)(q-1).$

$(2)$ For odd $m_{1}>0$, one has $A_{3}(0)=1$, $A_{3}(w)=0\leavevmode\nobreak\
(w=1,\ldots,2m-3)$,

$\displaystyle A_{3}(2m-2)=(2m-1)(q-1)\leavevmode\nobreak\
\leavevmode\nobreak\ \text{and}\leavevmode\nobreak\ \leavevmode\nobreak\
A_{3}(2m-1)=(q^{2}+q-2m+2)(q-1).$

Proof. For even $m_{1}$ and $k=3$, one has $m_{1}=m$, and then the code length
of $\mathcal{C}_{3}({\beta_{1},\beta_{2}},\bm{\alpha})$ is $2m$. By Theorem
3.1, $d_{p}(\mathcal{C}_{3}({\beta_{1},\beta_{2}},\bm{\alpha}))=2m-1$. Now for
any given $f(x)\in\mathbb{F}_{q}[x]\backslash\\{0\\}$ with $\deg f(x)\leq 2$,
the corresponding codeword in
$\mathcal{C}_{3}({\beta_{1},\beta_{2}},\bm{\alpha})$ is in the form

$\displaystyle\mathbf{c}_{f}=\big{(}f(\alpha_{1}),f(\beta_{1}),f(\alpha_{2}),f(\beta_{2}),\ldots,f(\alpha_{m-1}),f(\beta_{1}),f(\alpha_{m}),f(\beta_{2})\big{)}.$

We have the following $3$ cases depending on $f(\beta_{i})=0$ $(i=1,2)$ or
not.

Case $1$. If $f(\beta_{1})=f(\beta_{2})=0$, then $f(x)\in S_{1}$. Thus
$f(\alpha_{l})\neq 0$ for any $\alpha_{l}\in A$, and then

$\displaystyle w_{p}(\mathbf{c}_{f})=2m.$ (4.1)

Case $2$. If $f(\beta_{i})=0$ and $f(\beta_{j})\neq 0$
$\big{(}(i,j)=(1,2)\leavevmode\nobreak\ \text{or}\leavevmode\nobreak\
(2,1)\big{)}$, then

$\displaystyle f(x)\in D_{1}(i)\dot{\cup}D_{3}(m,i)\dot{\cup}D_{4}(m,i).$

For $f(x)\in D_{3}(m,i)$, there exists only one $\alpha_{l}\in A$ such that
$f(\alpha_{l})=0$, thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m-1.$ (4.2)

And for $f(x)\in D_{1}(i)\dot{\cup}D_{4}(m,i)$, we have $f(\alpha_{l})\neq 0$
for any $\alpha_{l}\in A$, thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m.$ (4.3)

Case $3$. If $f(\beta_{1})\neq 0$ and $f(\beta_{2})\neq 0$, then one has
$f(x)\in M_{1}$ and

$\displaystyle w_{p}(\mathbf{c}_{f})=2m.$ (4.4)

Now by $(\ref{w2})$ and Lemma 2.4, one can get

$\displaystyle A_{3}(2m-1)=|D_{3}(m,1)|+|D_{3}(m,2)|=2m(q-1).$

And by $(\ref{w1})$, $(\ref{w3})$-$(\ref{w6})$ and Lemma 2.4, we have

$\displaystyle A_{3}(2m)$
$\displaystyle=|S_{1}|+|D_{1}(1)|+|D_{4}(m,1)|+|D_{1}(2)|+|D_{4}(m,2)|+|M_{1}|$
$\displaystyle=(q^{2}+q+1-2m)(q-1).$

For odd $m_{1}$ and $k=3$, one has $m_{1}=m$, and then the code length of
$\mathcal{C}_{3}({\beta_{1},\beta_{2}},\bm{\alpha})$ is $2m-1$. By Theorem
3.1, $d_{p}=(\mathcal{C}_{3}({\beta_{1},\beta_{2}},\bm{\alpha}))=2m-2$. Now
for any given $f(x)\in\mathbb{F}_{q}[x]\backslash\\{0\\}$ with $\deg f(x)\leq
2$, the corresponding codeword in
$\mathcal{C}_{3}({\beta_{1},\beta_{2}},\bm{\alpha})$ is in the form

$\displaystyle\mathbf{c}_{f}=\big{(}f(\alpha_{1}),f(\beta_{1}),f(\alpha_{2}),f(\beta_{2}),\ldots,f(\alpha_{m-2}),f(\beta_{1}),f(\alpha_{m-1}),f(\beta_{2}),f(\alpha_{m})\big{)}.$

In the similar proof for the case that $m_{1}$ is even, we have the following
$3$ cases.

Case $1$. If $f(\beta_{1})=f(\beta_{2})=0$, then $f(x)\in S_{1}$. Thus
$f(\alpha_{l})\neq 0$ for any $\alpha_{l}\in A$, and then

$\displaystyle w_{p}(\mathbf{c}_{f})=2m-1.$ (4.5)

Case $2$. If $f(\beta_{i})=0$ and $f(\beta_{j})\neq 0$
$\big{(}(i,j)=(1,2)\leavevmode\nobreak\ \text{or}\leavevmode\nobreak\
(2,1)\big{)}$, then

$\displaystyle f(x)\in D_{1}(i)\dot{\cup}D_{3}(m,i)\dot{\cup}D_{4}(m,i).$

For $f(x)\in D_{3}(m,i)$, there exists unique $\alpha_{l}\in A_{l}$ such that
$f(\alpha_{l})=0$, thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m-2.$ (4.6)

And for $f(x)\in D_{1}(i)\dot{\cup}D_{4}(m,i)$, one has $f(\alpha_{l})\neq 0$
for any $\alpha_{l}\in A_{i}$, thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m-1.$ (4.7)

Case $3$. If $f(\beta_{1})\neq 0$ and $f(\beta_{2})\neq 0$, then $f(x)\in
M_{1}$.

For $f(x)\in M_{3}$, we have $f(\alpha_{1})=f(\alpha_{m})=0$, thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m-2.$ (4.8)

And for $f(x)\in M_{1}\backslash M_{3}$, one can get

$\displaystyle w_{p}(\mathbf{c}_{f})=2m-1.$ (4.9)

Now by $(\ref{w12})$, $(\ref{w16})$ and Lemma 2.4,

$\displaystyle A_{3}(2m-2)=|D_{3}(m,1)|+|D_{3}(m,2)|+|M_{3}|=(2m-1)(q-1).$

And by $(\ref{w11})$, $(\ref{w13})$, $(\ref{w17})$ and Lemma 2.4,

$\displaystyle A_{3}(2m-1)$
$\displaystyle=|S_{1}|+|D_{1}(1)|+|D_{4}(m,1)|+|D_{1}(2)|+|D_{4}(m,2)|+|M_{1}|-|M_{3}|$
$\displaystyle=(q^{2}+q-2m+2)(q-1).$

$\hfill\Box$

###### Theorem 4.2

$(1)$ For even $m_{1}>0$, one has $A_{4}(0)=1,\leavevmode\nobreak\
A_{4}(w)=0\leavevmode\nobreak\ (w=1,\ldots,2m-3)$, and

$\displaystyle A_{4}(2m-2)=m^{2}(q-1),\leavevmode\nobreak\
\leavevmode\nobreak\ A_{4}(2m-1)=2m(q+1-m)(q-1),\leavevmode\nobreak\ $
$\displaystyle A_{4}(2m)=\big{(}q^{3}+q^{2}+q+1+m^{2}-2m(q+1)\big{)}(q-1).$

$(2)$ For odd $m_{1}>0$, one has $A_{4}(0)=1,\leavevmode\nobreak\
\leavevmode\nobreak\ A_{4}(w)=0\leavevmode\nobreak\ (w=1,\ldots,2m-4)$, and

$\displaystyle A_{4}(2m-3)=(m-2)(m-1)(q-1),\leavevmode\nobreak\
\leavevmode\nobreak\
A_{4}(2m-2)=\big{(}(2m-1)q-2m^{2}+7m-2\big{)}(q-1),\leavevmode\nobreak\
\leavevmode\nobreak\ $ $\displaystyle
A_{4}(2m-1)=\big{(}q^{3}+q^{2}+(2-2m)q+m^{2}-4m+1\big{)}(q-1).$

Proof. For even $m_{1}$ and $k=4$, one has $m_{1}=m$, and then the code length
of $\mathcal{C}_{4}({\beta_{1},\beta_{2}},\bm{\alpha})$ is $2m$. By Theorem
3.1, $d_{p}(\mathcal{C}_{4}({\beta_{1},\beta_{2}},\bm{\alpha}))=2m-2$. Now for
any given $f(x)\in\mathbb{F}_{q}[x]\backslash\\{0\\}$ with $\deg f(x)\leq 3$,
the corresponding codeword in
$\mathcal{C}_{4}({\beta_{1},\beta_{2}},\bm{\alpha})$ is in the form

$\displaystyle\mathbf{c}_{f}=\big{(}f(\alpha_{1}),f(\beta_{1}),f(\alpha_{2}),f(\beta_{2}),\ldots,f(\alpha_{m-2}),f(\beta_{1}),f(\alpha_{m-1}),f(\beta_{2}),f(\alpha_{m})\big{)}.$

We have the following $3$ cases depending on $f(\beta_{i})=0$ $(i=1,2)$ or
not.

Case $1$. If $f(\beta_{1})=f(\beta_{2})=0$, then $f(x)\in
S_{1}\dot{\cup}S_{2}\dot{\cup}S_{3}.$

For $f(x)\in S_{1}\dot{\cup}S_{2}$, we have $f(\alpha_{l})\neq 0$ for any
$\alpha_{l}\in A$, thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m.$ (4.10)

And for $f(x)\in S_{3}$, there exists only one $\alpha_{l}\in A$ such that
$f(\alpha_{l})=0$, thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m-2.$ (4.11)

Case $2$. If $f(\beta_{i})=0$ and $f(\beta_{j})\neq 0$
$\big{(}(i,j)=(1,2)\leavevmode\nobreak\ \text{or}\leavevmode\nobreak\
(2,1)\big{)}$, then

$\displaystyle f(x)\in
D_{1}(i)\dot{\cup}D_{2}(i)\dot{\cup}D_{3}(m,i)\dot{\cup}\cdots\dot{\cup}D_{9}(m,i).$

For $f(x)\in
D_{1}(i)\dot{\cup}D_{2}(i)\dot{\cup}D_{4}(m,i)\dot{\cup}D_{6}(m,i)\dot{\cup}D_{9}(m,i)$,
one has $f(\alpha_{l})\neq 0$ for any $\alpha_{l}\in A$, thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m.$ (4.12)

And for $f(x)\in D_{3}(m,i)\dot{\cup}D_{5}(m,i)\dot{\cup}D_{8}(m,i)$, there
exists only one $\alpha_{l}\in A$ such that $f(\alpha_{l})=0$, thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m-1.$ (4.13)

Now for $f(x)\in D_{7}(m,i)$, there are only two distinct elements
$\alpha_{l},\alpha_{t}\in A_{i}$ such that $f(\alpha_{l})=f(\alpha_{t})=0$,
thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m-2.$ (4.14)

Case $3$. If $f(\beta_{1})\neq 0$ and $f(\beta_{2})\neq 0$, then $f\in M_{2}$,
and so

$\displaystyle w_{p}(\mathbf{c}_{f})=2m.$ (4.15)

Now by $(\ref{w42})$, $(\ref{w45})$ and Lemma 2.4,

$\displaystyle A_{4}(2m-2)=|S_{3}|+|D_{7}(m,1)|+|D_{7}(m,2)|=(q-1)m^{2}.$

By $(\ref{w44})$ and Lemma 2.4,

$\displaystyle A_{4}(2m-1)=$
$\displaystyle|D_{3}(m,1)|+|D_{5}(m,1)|+|D_{8}(m,1)|+|D_{3}(m,2)|+|D_{5}(m,2)|+|D_{8}(m,2)|$
$\displaystyle=$ $\displaystyle 2m(q+1-m)(q-1).$

And by $(\ref{w41})$, $(\ref{w43})$, $(\ref{w46})$ and Lemma 2.4,

$\displaystyle A_{4}(2m)=$
$\displaystyle|S_{1}|+|S_{2}|+|D_{1}(1)|+|D_{2}(1)|+|D_{4}(m,1)|+|D_{6}(m,1)|+|D_{9}(m,1)|$
$\displaystyle+|D_{1}(2)|+|D_{2}(2)|+|D_{4}(m,2)|+|D_{6}(m,2)|+|D_{9}(m,2)|+|M_{2}|$
$\displaystyle=$
$\displaystyle\big{(}q^{3}+q^{2}+q+1+m^{2}-2m(q+1)\big{)}(q-1).$

For odd $m_{1}$ and $k=4$, one has $m_{1}=m$, and then the code length of
$\mathcal{C}_{4}({\beta_{1},\beta_{2}},\bm{\alpha})$ is $2m-1$. By Theorem
3.1, $d_{p}(\mathcal{C}_{4}({\beta_{1},\beta_{2}},\bm{\alpha}))=2m-3$. Now for
any given $f(x)\in\mathbb{F}_{q}[x]\backslash\\{0\\}$ with $\deg f(x)\leq 3$,
the corresponding codeword in
$\mathcal{C}_{4}({\beta_{1},\beta_{2}},\bm{\alpha})$ is in form

$\displaystyle\mathbf{c}_{f}=\big{(}f(\alpha_{1}),f(\beta_{1}),f(\alpha_{2}),f(\beta_{2}),\ldots,f(\alpha_{m-2}),f(\beta_{1}),f(\alpha_{m-1}),f(\alpha_{m})\big{)}.$

In the similar proof for the case even $m_{1}$, we have the following $3$
cases.

Case $1$. If $f(\beta_{1})=f(\beta_{2})=0$, then $f(x)\in
S_{1}\dot{\cup}S_{2}\dot{\cup}S_{3}$.

For $f(x)\in S_{1}\dot{\cup}S_{2}$, then $f(\alpha_{l})\neq 0$ for any
$\alpha_{l}\in A$, thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m-1.$ (4.16)

And for $f(x)\in S_{3}$, there exists only one $\alpha_{l}\in A$ such that
$f(\alpha_{l})=0$, thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m-2.$ (4.17)

Case $2$. If $f(\beta_{i})=0$ and $f(\beta_{j})\neq 0$
$\big{(}(i,j)=(1,2)\leavevmode\nobreak\ \text{or}\leavevmode\nobreak\
(2,1)\big{)}$, then

$\displaystyle f(x)\in
D_{1}(i)\dot{\cup}D_{2}(i)\dot{\cup}D_{3}(m,i)\dot{\cup}\cdots\dot{\cup}D_{9}(m,i).$

For $f(x)\in
D_{1}(i)\dot{\cup}D_{2}(i)\dot{\cup}D_{4}(m,i)\dot{\cup}D_{6}(m,i)\dot{\cup}D_{9}(m,i)$,
then $f(\alpha_{l})\neq 0$ for any $\alpha_{l}\in A_{i}$, thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m-1.$ (4.18)

And for $f(x)\in D_{3}(m,i)\dot{\cup}D_{5}(m,i)\dot{\cup}D_{8}(m,i)$, then
there exists only an $\alpha_{l}\in A_{i}$ such that $f(\alpha_{l})=0$, thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m-2.$ (4.19)

Now for $f(x)\in D_{7}(m,i)$, there are only two distinct elements
$\alpha_{l},\alpha_{t}\in A_{i}$ such that $f(\alpha_{l})=f(\alpha_{t})=0$,
thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m-3.$ (4.20)

Case $3$. If $f(\beta_{1})\neq 0$ and $f(\beta_{2})\neq 0$, then $f(x)\in
M_{2}$.

For $f(x)\in M_{4}$, then $f(\alpha_{1})=f(\alpha_{m})=0$, thus

$\displaystyle w_{p}(\mathbf{c}_{f})=2m-2.$ (4.21) $\displaystyle
w_{p}(\mathbf{c}_{f})=2m-1.$ (4.22)

Now by $(\ref{w51})$ and Lemma 2.4, we have

$\displaystyle A_{4}(2m-3)=|D_{7}(m,1)|+|D_{7}(m,2)|=(m-2)(m-1)(q-1).$

By $(\ref{w48})$, $(\ref{w50})$, $(\ref{w52})$ and Lemma 2.4, one has

$\displaystyle A_{4}(2m-2)=$
$\displaystyle|S_{3}|+|D_{3}(m,1)|+|D_{5}(m,1)|+|D_{8}(m,1)|$
$\displaystyle+|D_{3}(m,2)|+|D_{5}(m,2)|+|D_{8}(m,2)|+|M_{4}|$
$\displaystyle=$ $\displaystyle\big{(}(2m-1)q-2m^{2}+7m-2\big{)}(q-1).$

And by $(\ref{w47})$, $(\ref{w49})$, $(\ref{w53})$ and Lemma 2.4,

$\displaystyle A_{4}(2m-1)=$
$\displaystyle|S_{1}|+|S_{2}|+|D_{1}(1)|+|D_{2}(1)|+|D_{4}(m,1)|+|D_{6}(m,1)|+|D_{9}(m,1)|$
$\displaystyle+|D_{1}(2)|+|D_{2}(2)|+|D_{4}(m,2)|+|D_{6}(m,2)|+|D_{9}(m,2)|+|M_{2}|-|M_{4}|$
$\displaystyle=$
$\displaystyle\big{(}q^{3}+q^{2}+(2-2m)q+m^{2}-4m+1\big{)}(q-1).$

$\hfill\Box$

##  5 Conclusions

In this paper, we construct a class of MDS symbol-pair codes over finite
fields. Furthermore, for the case code dimension $k\in\\{3,4\\}$, the symbol-
pair weight distributions for these codes are determined by enumerating the
number of polynomials with given roots.

Denote $A_{j}=\\{\beta_{1},\beta_{2},\alpha_{j},\alpha_{j+1}\\}$
$(j=1,\dots,m)$ and $B_{f}=\\{x\in\mathbb{F}_{q}|f(x)=0\\}$, for the case
$k\geq 5$, $\mathbf{c}_{f}$ is in the form
$\big{(}\mathbf{c}_{f}(1),\ldots,\mathbf{c}_{f}(m_{1}),f(\alpha_{\lfloor\frac{k-1}{2}\rfloor
m_{1}+1}),\ldots\big{)}$ with

$\displaystyle{\bf
c}_{f}(i)=\begin{cases}\big{(}\underbrace{f(\alpha_{(i-1)\lfloor\frac{k-1}{2}\rfloor+1}),\ldots,f(\alpha_{i\lfloor\frac{k-1}{2}\rfloor}),f(\beta_{1})}_{\lfloor\frac{k-1}{2}\rfloor+1}\big{)},\quad\leavevmode\nobreak\
2\nmid i;\\\
\big{(}\underbrace{f(\alpha_{i\lfloor\frac{k-1}{2}\rfloor+1}),\ldots,f(\alpha_{(i+1)\lfloor\frac{k-1}{2}\rfloor}),f(\beta_{2})}_{\lfloor\frac{k-1}{2}\rfloor+1}\big{)},\quad\leavevmode\nobreak\
2\mid i.\end{cases}$

In this case, $\lfloor\frac{k-1}{2}\rfloor+1\geq 2$, and so the symbol-pair
weight for $\mathbf{c}_{f}$ depends on the value $|A_{j}\cap B_{f}|$
$(j=1,\dots,m)$ , which means it is complex to calculate the symbol-pair
weight distribution for the code
$\mathcal{C}_{k}(\beta_{1},\beta_{2},\bm{\alpha})$ $(k\geq 5)$. Therefore, for
any $k\geq 3$, it is interesting to give a precise formula for the symbol-pair
weight distribution of $\mathcal{C}_{k}(\beta_{1},\beta_{2},\bm{\alpha})$.

## References

  * [1] Cassuto, Y., Blaum, M., Codes for symbol-pair read channels, IEEE Trans. Inf. Theory, 57(12), 8011-8020 (2011)
  * [2] Cassuto, Y., Litsyn, S., Symbol-pair codes: algebraic constructions and asymptotic bounds, In: Proc. IEEE Int. Symp. Inf. Theory, 2348-2352 (2011)
  * [3] Chee, Y.M., Ji, L., Kiah, H.M., Wang, C., Yin, J., Maximum distance separable codes for symbol-pair read channels, IEEE Trans. Inf. Theory, 59(11), 7259-7267 (2013)
  * [4] Chee, Y.M., Kiah, H.M., Wang, C., Maximum distance separable symbol-pair codes, In: Proc. IEEE Int. Symp. Inf. Theory, 2886-2890 (2012)
  * [5] Chen, B., Lin, L., Liu, H., Constacyclic symbol-pair codes: lower bounds and optimal constructions, IEEE Trans. Inf. Theory, 63(12), 7661-7666 (2017)
  * [6] Ding, B., Ge, G., Zhang, J., Zhang, T., Zhang, Y., New constructions of MDS symbol-pair codes, Des. Codes. Cryptogr., 86(4), 841-859 (2018)
  * [7] Dinh, H.Q., Kumam, P., Kumar, P., Satpati, S., Singh, A.K., Yamaka, W., MDS symbol-pair repeated-root constacylic codes of prime power lengths over $\mathbb{F}_{p^{m}}+u\mathbb{F}_{p^{m}}$, IEEE Access 7, 145039-145048 (2019)
  * [8] Dinh, H.Q., Nguyen, B.T., Singh, A.K., Sriboonchitta, S., Hamming and symbol-pair distance of repeated-root constacyclic codes of prime power lengths over $\mathbb{F}_{p^{m}}+u\mathbb{F}_{p^{m}}$, IEEE Commun. Letters, 22(12), 2400-2403 (2018)
  * [9] Dinh, H.Q., Nguyen, B.T., Singh, A.K., Sriboonchitta, S., On the symbol-pair distance of repeated-root constacyclic codes of prime power lengths, IEEE Trans. Inf. Theory, 64(4), 2417-2430 (2018)
  * [10] Dinh, H.Q., Nguyen, B.T., Sriboonchitta, S., MDS symbol-pair cyclic codes of length $2p^{s}$ over $p^{m}$, IEEE Trans. Inf. Theory, 66(1), 240-262 (2020)
  * [11] Dinh, H.Q., Wang, X., Liu, H., Sriboonchitta, S., On the symbol-pair distances of repeated-root constacyclic codes of length $2p^{s}$, Discrete Math., 342(11), 3062-3078 (2019)
  * [12] Elishco, O., Gabrys, R., Yaakobi, E., Bounds and constructions of codes over symbol-pair read channels, IEEE Trans. Inf. Theory, 66(3), 1385-1395 (2020)
  * [13] Horii, S., Matsushima, T., Hirasawa, S., Linear programming decoding of binary linear codes for symbol-pair read channels, In: Proc. IEEE Int. Symp. Inf. Theory, 1944-1948 (2016)
  * [14] Huffman, W.C., Pless, V., Fundamentals of Error-Correcting Codes, Cambridge Univ., Press, Cambridge (2003)
  * [15] Kai, X., Zhu, S., Li, P., A construction of new MDS symbol-pair codes, IEEE Trans. Inf. Theory, 61(11), 5828-5834 (2015)
  * [16] Kai, X., Zhu, S., Zhao, Y., Luo, H., Chen, Z., New MDS symbol-pair codes from repeated-root codes, IEEE Commun. Letters, 22(3), 462-465 (2018)
  * [17] Li, S., Ge, G., Constructions of maximum distance separable symbol-pair codes using cyclic and constacyclic codes, Des. Codes. Cryptogr., 84(3), 359-372 (2017)
  * [18] Liu, S., Xing, C., Yuan, C., List decodability of symbol-pair codes, IEEE Trans. Inf. Theory, 65(8), 4815-4821 (2019)
  * [19] R. Lidl, H. Niederreiter, F.M. Cohn, Finite Fields, Cambridge University Press, Cambridge, (1997)
  * [20] Ma, J., Luo, J., New MDS symbol-pair codes from repeated-root cyclic codes over finite fields, arXiv: 2010.04329 (2020)
  * [21] Ma, J., Luo, J., MDS symbol-pair codes from repeated-root cyclic codes, arXiv: 2012.05050 (2020)
  * [22] Ma, J., Luo, J., On symbol-pair weight distribution for MDS codes and simplex codes over finite fields, Cryptogr. Commun., 13, 643-653 (2021)
  * [23] Morii, M., Hirotomo, M., Takita, M., Error-trapping decoding for cyclic codes over symbol-pair read channels, In: Proc. IEEE Int. Symp. Inf. Theory, 681-685 (2016)
  * [24] Takita, M., Hirotomo, M., Morii, M., Syndrome decoding proof for codes, IEICE Transactions, A98(12), 2423-2428 (2015)
  * [25] Yaakobi, E., Bruck, J., Siegel, P.H., Decoding of cyclic codes over symbol-pair read channels, In: Proc. IEEE Int. Symp. Inf. Theory, 2891-2895 (2012)
  * [26] Sun, Z., Zhu, S., Wang, L., The symbol-pair distance distribution for a class of repeated-root cyclic codes over $\mathbb{F}_{p^{m}}$, Cryptogr. Commun., 10(4), 643-653 (2018)