# The $b$-weight distribution for MDS 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. For a positive integer $b\geq 2$, the $b$-symbol code is a new
coding framework proposed to combat $b$-errors in $b$-symbol read channels.
Especially, the $2$-symbol code is called a symbol-pair code. Remarkably, a
classical maximum distance separable (MDS) code is also an MDS $b$-symbol
code. Recently, for any MDS code $\mathcal{C}$, Ma and Luo determined the
symbol-pair weight distribution of $\mathcal{C}$. In this paper, by
calculating the number of solutions for some equations and utilizing some
shortened codes of $\mathcal{C}$, we give the connection between the
$b$-weight distribution and the number of codewords in shortened codes of
$\mathcal{C}$ with special shape. Furthermore, note that shortened codes of
$\mathcal{C}$ are also MDS codes, the number of these codewords with special
shape are also determined by the shorten method. From the above calculation,
the $b$-weight distribution of $\mathcal{C}$ is determined. Our result
generalies the corresonding result of Ma and Luo [15].

Keywords. MDS code; MDS $b$-symbol code; $b$-weight distribution

Mathematics Subject Classification (2010). 94A24, 94B05

##  1 Introduction

In 2011, Cassuto and Blaum [2] first proposed a new coding framework for
symbol-pair read channels. The outputs of the read process in the channels are
overlapping pairs of symbols. After that, Chee et al. [3, 4] established a
Singleton-type bound for symbol-pair codes and considered the constructions
for symbol-pair codes meeting the bound.

In 2016, Yaakobi et al. [18] generalized the coding framework for symbol-pair
read channels to that for $b$-symbol read channels, where the read operation
is performed as a consecutive sequence of $b$-symbols $(b>2)$. They also
generalized some known results for symbol-pair read channels to those for
$b$-symbol read channels, and showed that a code $\mathcal{C}$ with minimum
$b$-distance $d_{b}$ can correct at most $\lfloor\frac{d_{b}-2}{2}\rfloor$
$b$-symbol errors. Furthermore, they gave a decoding algorithm based on a
bounded distance decoder for the cyclic code. Later, Ding et al. [7] extended
the Singleton-type bound to be the $b$-symbol case and constructed MDS
$b$-symbol codes basing on projective geometry, and then, they showed that an
MDS $b$-symbol code with $b$-distance $d_{b}<n$ is also an MDS $(b+1)$-symbol
code. Moreover, relative results about constructions for MDS symbol-pair codes
can be seen in [5, 6, 8, 9, 10, 12, 13, 14].

It is well-known that the Hamming weight distribution for an MDS code can be
uniquely determined [11]. However, there are few works on the $b$-weight
distribution for MDS $b$-symbol codes. In 2021, Ma and Luo gave the symbol-
pair weight distribution of MDS codes by employing some shortened MDS codes
[15]. Furthermore, there are some results about the $b$-weight distribution
for cyclic code. In 2018, Sun et al. gave the symbol-pair weight distribution
of a class of repeated-root cyclic codes [17]. In 2021, Shi et al. presented
the geometric approach to $b$-weights of cyclic codes, and constructed a class
of irreducible cyclic codes with constant $b$-weight [16]. Recently, Zhu et
al. gave a complete $b$-weight distribution of a class of irreducible cyclic
codes with two nonzero $b$-weight [19].

In this paper, for any MDS code $\mathcal{C}$, the connection between the
$b$-weight distribution and the number of codewords in shortened codes of
$\mathcal{C}$ with special shape is presented by calculating the number of
solutions for some equations and utilizing some shortened codes of
$\mathcal{C}$. Furthermore, by the shorten method, the number of these
codewords with special shape is given. And then the $b$-weight distribution is
completely determined. Especially, for $b=2$, we obtain Theorem $1$ in [15].

The paper is organized as follows. In section 2, some related basic notations
and results are given. In section 3, the main results are presented. In
section 4, the proofs for the main results are given. In section 5, we
conclude the whole paper.

##  2 Preliminaries

Throughout this paper, let $\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. Let $b$ be a positive integer. For a vector
$\mathbf{x}=(x_{1},x_{2},\ldots,x_{n})\in\mathbb{F}_{q}^{n}$, we define the
$b$-symbol read vector of $\mathbf{x}$ as

$\displaystyle\pi_{b}(\mathbf{x})=((x_{1},x_{2},\ldots,x_{b}),(x_{2},x_{3},\ldots,x_{b+1}),\ldots,(x_{n-1},x_{n},\ldots,x_{b-2}),(x_{n},x_{1},\ldots,x_{b-1})).$

For any two vectors $\mathbf{x}$ and $\mathbf{y}$ in $\mathbb{F}_{q}^{n}$, one
has

$\displaystyle\pi_{b}(\mathbf{x}+\mathbf{y})=\pi_{b}(\mathbf{x})+\pi_{b}(\mathbf{y}),$

and the $b$-distance between $\mathbf{x}$ and $\mathbf{y}$ is defined as

$\displaystyle D_{b}(\mathbf{x},\mathbf{y}):=\\#\\{1\leq i\leq
n~{}|~{}(x_{i},\ldots,x_{i+b-1})\neq(y_{i},\ldots,y_{i+b-1})\\},$

where $x_{m}=x_{m-n}$ if $m>n$. Accordingly, the $b$-weight of $\mathbf{x}$ is
defined as

$\displaystyle wt_{b}(\mathbf{x}):=\\#\\{1\leq i\leq
n~{}|~{}(x_{i},\ldots,x_{i+b-1})\neq\mathbf{0}\\},$

where $\mathbf{0}$ denotes the all-zeros vector in $\mathbb{F}_{q}^{n}$, and
$x_{m}=x_{m-n}$ if $m>n$. Especially, for $b=1$,
$D_{b}(\mathbf{x},\mathbf{y})$ and $wt_{b}(\mathbf{x})$ are called Hamming
distance and Hamming weight, respectively.

An linear $b$-symbol code $\mathcal{C}$ over $\mathbb{F}_{q}$ is a
$k$-dimensional subspace of $\mathbb{F}_{q}^{n}$ with minimum $b$-distance

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

Especially, if $b=1$, let $d=d_{1}$, then $\mathcal{C}$ is called an $[n,k,d]$
linear code.

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

###### Lemma 2.1

[7] Let $b\leq d_{b}\leq n$. If $\mathcal{C}$ is a $b$-symbol code over
$\mathbb{F}_{q}$ with length $n$ and minimum $b$-distance $d_{b}$, then

$\displaystyle\big{|}\mathcal{C}\big{|}\leq q^{n-d_{b}+b}.$

An $b$-symbol code with parameters achieving the Singleton bound is called a
maximum distance separable (in short, MDS) $b$-symbol code. For $b=1$, the MDS
$b$-symbol code is also called the MDS code. It is easy to see that an MDS
code is also an MDS $b$-symbol code by the following lemma.

###### Lemma 2.2

[7] An MDS $b$-symbol code with $d_{b}<n$ is an MDS $(b+1)$-symbol code.

Next, we give some notations on shortened codes and the Hamming weight
distribution for MDS codes.

Suppose $\mathcal{C}$ is a code of length $n$ over $\mathbb{F}_{q}$, we denote
$[1,n]=\\{1,2,\ldots,n\\}$, and for $S\subseteq[1,n]$, denote
$\overline{S}=[1,n]\backslash S$. Then the code $\mathcal{C}_{S}$ shortened on
$S$ from $\mathcal{C}$ is defined by

$\displaystyle\mathcal{C}_{S}=\bigg{\\{}(c_{j})_{j\in\overline{S}}~{}\bigg{|}~{}\text{there
exists some ~{}}(c_{1},c_{1},\ldots,c_{n})\in\mathcal{C},\text{such
that}~{}c_{i}=0~{}\text{for all}~{}i\in S\bigg{\\}}.$

For more details, see Section 1.5 in [11].

The Hamming weight distribution for the MDS code is determined by the
following lemma.

###### Lemma 2.3

[11] Let $\mathcal{C}$ be an $[n,k,d]$ MDS code and $A_{i}$ $(i=0,1,\ldots,n)$
the number of codewords in $\mathcal{C}$ with weight $i$. Then the weight
distribution for $\mathcal{C}$ is given by $A_{0}=1$, $A_{i}=0~{}(1\leq i\leq
d-1)$ and

$\displaystyle
A_{i}=\binom{n}{i}\sum\limits_{j=0}^{i-d}(-1)^{j}\binom{i}{j}\big{(}q^{i+1-d-j}-1\big{)}\quad(d\leq
i\leq n).$

The following lemma characterizes that a code shortened on $S$ from an MDS
code is also an MDS code.

###### Lemma 2.4

[11] Let $\mathcal{C}$ be an $[n,k,n-k+1]_{q}$ MDS code and $\mathcal{C}_{S}$
be the code shortened on $S$ from $\mathcal{C}$, where $S$ is a set with
$|S|=s<k$. Then $\mathcal{C}_{S}$ is an $[n-s,k-s,n-k+1]_{q}$ MDS code.

The following notations $N_{\infty}(r,L)$ and $N_{b}(r,L)$ are useful to
calculate the number of codewords in an MDS code with special shape. For $b$,
$r$, $L$ $\in\mathbb{N}^{*}$ with $b\geq 3$ and $r\leq L$, let
$N_{\infty}(r,L)$ be the number of solutions for the equation

$\displaystyle\begin{cases}x_{1}+x_{2}+\cdots+x_{r}=L;\\\
x_{i}\in\mathbb{N}^{*}.\end{cases}$

Let $N_{b}(e,L)$ be the number of solutions for equation

$\displaystyle\begin{cases}x_{1}+x_{2}+\cdots+x_{r}=L;\\\
x_{i}\in\mathbb{N}^{*},~{}1\leq x_{i}\leq b-2~{}(i=1,\ldots,r),\end{cases}$

furthermore, we set $N_{b}(0,0)=1$ for convience. In fact, $N_{\infty}(e,L)$
and $N_{b}(e,L)$ are correspond to the number of $r$-combinations of a
multiset problem. $N_{\infty}(e,L)$ is given in the following

######  Lemma 2.5 (Chapter $6.2$ [1])

$N_{\infty}(e,L)=\binom{L-1}{e-1}$.

In addition, $N_{b}(e,L)$ can be calculated by $N_{\infty}(e,L)$ and the
inclusion-exclusion principle, for more details, see Chapter $2.5$ and Chapter
$6.2$ [1].

##  3 The $b$-weight distribution for MDS codes

In this section, the $b$-weight distribution for MDS codes is determined. We
begin with the following notation.

Notation: For any positive integers $d,I,L$ and $L_{i}~{}(i=1,\ldots,I)$ with
$\sum\limits_{i=1}^{I}L_{i}=L>d$, let $\mathcal{C}$ be an MDS code
$[L,L-d+1,d]$. Let $F_{b,d}(L_{1},\ldots,L_{I})$ be the number of codewords
$\mathbf{c}\in\mathcal{C}$ satisfying the following two conditions.

$(\mathrm{F}1)$
$\mathbf{c}=(\underbrace{c_{1},\ldots,c_{L_{1}}}_{1},\underbrace{c_{L_{1}+1},\ldots,c_{L_{1}+L_{2}}}_{2},\ldots,\underbrace{c_{L_{1}+\cdots+L_{I-1}+1},\ldots,c_{L_{1}+\cdots+L_{I}}}_{I})$
with

$\displaystyle c_{L_{1}+\cdots+L_{i-1}+1}\neq 0\quad\text{and}\quad
c_{{L_{1}+\cdots+L_{i}}}\neq 0~{}~{}(1\leq i\leq I);$

$(\mathrm{F}2)$ $wt_{b-1}(\mathbf{c})=L$.

For completeness, if $I=1$, we set $L_{1}+\cdots+L_{I-1}=0$ in
$(\mathrm{F}1)$.

In the following theorems, we set $\binom{m_{1}}{0}=1$ $(m_{1}\in\mathbb{N})$
and $\binom{0}{m_{2}}=0$ $(m_{2}\in\mathbb{N}^{*})$ for completeness. Now the
connnection between the $b$-weight distribution for an MDS code and
$F_{b,d}(L_{1},\ldots,L_{I})$ is presented.

###### Theorem 3.1

For $b\geq 2$ and an $[n,k,d]$ MDS code $\mathcal{C}$, let $A^{b}(w)$ be the
number of codewords in $\mathcal{C}$ with $b$-weight $w$. If $d+b-1<n$, then

$\displaystyle A^{b}(w)=\begin{cases}1,\quad&w=0;\\\ 0,\quad&1\leq w\leq
d+b-2;\end{cases}$

and for $d+b-1\leq w\leq n$,

$\displaystyle A^{b}(w)=$
$\displaystyle\delta_{n}(w)\sum\limits_{t=0}^{b-2}(t+1)F_{b,d}(n-t)+(n-w+b)F_{b,d}(w-b+1)$
$\displaystyle+\sum\limits_{t=0}^{b-2}(t+1)\sum\limits_{i=1}^{\lfloor
M_{1}(w,b,t)\rfloor}\binom{n-w+i-1}{i-1}\sum\limits_{\begin{subarray}{c}a_{1},\ldots,a_{i+1}\in\mathbb{N}^{*}\\\
a_{1}+\cdots+a_{i+1}=w-t-i(b-1)\end{subarray}}F_{b,d}(a_{1},\ldots,a_{i+1})$
$\displaystyle+\sum\limits_{t=b-1}^{n-w+b-1}(t+1)\sum\limits_{i=1}^{\lfloor
M_{2}(w,b)\rfloor}\binom{n-w-t+b+i-2}{i-1}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\sum\limits_{\begin{subarray}{c}a_{1},\ldots,a_{i+1}\in\mathbb{N}^{*}\\\
a_{1}+\cdots+a_{i+1}=w-(i+1)(b-1)\end{subarray}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!F_{b,d}(a_{1},\ldots,a_{i+1}),$

where

$~{}~{}~{}\delta_{n}(w)=\begin{cases}1,\\!&w=n;\\\
0,\\!&\text{otherwise},\end{cases}$
$M_{1}(w,b,t)=\min\big{\\{}\frac{w-t-1}{b},\frac{w-t-d}{b-1}\big{\\}},$
$M_{2}(w,b)=\min\big{\\{}\frac{w-b}{b},\frac{w-d}{b-1}-1\big{\\}}.$

In the following theorem, we show that the value of
$F_{b,d}(L_{1},\ldots,L_{I})$ can be determined by $N_{b}(r,L)$.

###### Theorem 3.2

$\displaystyle
F_{b,d}(L_{1},\ldots,L_{I})=\begin{cases}A\Big{(}\sum\limits_{i=1}^{I}L_{i},d\Big{)},\quad&\text{if}~{}b=2;\\\
f_{b}(L_{1},m_{1})\cdots
f_{b}(L_{I},m_{I})A\Big{(}\sum\limits_{i=1}^{I}m_{i},d\Big{)},\quad&\text{if}~{}b\geq
3.\\\ \end{cases}$

where

$\displaystyle
f_{b}(L_{i},m_{i})=\sum\limits_{m_{i}=\big{\lceil}\frac{L_{i}+(b-2)}{b-1}\big{\rceil}}^{L_{i}}\sum\limits_{e_{i}=\big{\lceil}\frac{L_{i}-m_{i}}{b-2}\big{\rceil}}^{\min\\{m_{i}-1,L_{i}-m_{i}\\}}\binom{m_{i}-1}{e_{i}}N_{b}(e_{i},L_{i}-m_{i}),$

and

$\displaystyle\begin{aligned}
A\Big{(}\sum\limits_{i=1}^{I}m_{i},d\Big{)}=\begin{cases}0,&\sum\limits_{i=1}^{I}m_{i}<d;\\\
\sum\limits_{j=0}^{\sum\limits_{i=1}^{I}m_{i}-d}(-1)^{j}\binom{\sum\limits_{i=1}^{I}m_{i}}{j}\bigg{(}q^{\sum\limits_{i=1}^{I}m_{i}+1-d-j}-1\bigg{)},&\text{otherwise}.\end{cases}\end{aligned}$

###### Remark 3.1

By Theorems 3.1-3.2, the $b$-weight distribution for an MDS code can be
determined.

###### Remark 3.2

In general, the expression of $A^{b}(w)$ $(d+b-1\leq w\leq n)$ is long and
complex, the main reason is that the value of the term
$\sum\limits_{\begin{subarray}{c}a_{1},\ldots,a_{i+1}\in\mathbb{N}^{*}\\\
a_{1}+\cdots+a_{i+1}=w-t-i(b-1)\end{subarray}}F_{b,d}(a_{1},\ldots,a_{i+1})$
is associated with $N_{b}(e,L)$, the value of which is not explicted. However,
not only for $b=2~{}\text{or}~{}3$, but also for some special cases of general
$b$, $N_{b}(e,L)$ can be given explictly, thus $A^{b}(w)$ $(d+b-1\leq w\leq
n)$ can be given conciesly, see corollaries 3.1-3.4.

######  Corollary 3.1 (Theorem $1$, [15])

Let $\mathcal{C}$ be an $[n,k,d]$ MDS code, then

$\displaystyle A^{2}(w)=\begin{cases}1,\quad&w=0;\\\ 0,\quad&1\leq w\leq
d;\end{cases}$

and for $d+1\leq w\leq n$,

$\displaystyle A^{2}(w)=$
$\displaystyle\delta_{n}(w)A(n,d)+\sum\limits_{i=1}^{\lfloor
M_{1}(w,0,2)\rfloor}\binom{n-w+i-1}{i-1}\binom{w-i-1}{i}A(w-i,d)$
$\displaystyle+\sum\limits_{i=1}^{\lfloor
M_{2}(w,2)\rfloor+1}\bigg{(}2\binom{n-w+i-1}{i-1}+\binom{n-w+i}{i}\bigg{)}\binom{w-i-1}{i-1}A(w-i,d).$

Proof. By

$\sum\limits_{\begin{subarray}{c}a_{1},\ldots,a_{i+1}\in\mathbb{N}^{*}\\\
a_{1}+\cdots+a_{i+1}=N\end{subarray}}1=\binom{N-1}{i}~{}~{}\big{(}N=w-i~{}\text{or}~{}w-(i+1)\big{)}$

and

$\sum\limits_{t=1}^{n-w+1}(t+1)\binom{n-w-t+i}{i-1}=2\binom{n-w+i}{i}+\binom{n-w+i}{i+1},$

let $b=2$ in Theorems 3.1-3.2, then we get the corollary.$\hfill\Box$

###### Corollary 3.2

For an $[n,k,d]$ MDS code $\mathcal{C}$ with $d+2=n$, we have
$A^{3}(w)=\begin{cases}1,\quad&w=0;\\\ 0,\quad&1\leq w\leq d+1,\end{cases}$

and for $d+2\leq w\leq n$,

$\displaystyle A^{3}(w)=$
$\displaystyle\delta_{n}(w)\sum\limits_{t=0}^{1}(t+1)F_{b,d}(n-t)+(n+3-w)F_{3,d}(w-2)$
$\displaystyle+\sum\limits_{t=0}^{1}(t+1)\sum\limits_{i=1}^{\lfloor
M_{1}(w,3,t)\rfloor}\binom{n-w+i-1}{i-1}\sum\limits_{\begin{subarray}{c}a_{1},\ldots,a_{i+1}\in\mathbb{N}^{*}\\\
a_{1}+\cdots+a_{i+1}=w-t-2i\end{subarray}}F_{3,d}(a_{1},\ldots,a_{i+1})$
$\displaystyle+\sum\limits_{t=2}^{n-w+2}(t+1)\sum\limits_{i=1}^{\lfloor
M_{2}(w,3)\rfloor}\binom{n-w-t+i-1}{i-1}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\sum\limits_{\begin{subarray}{c}a_{1},\ldots,a_{i+1}\in\mathbb{N}^{*}\\\
a_{1}+\cdots+a_{i+1}=w-2(i+1)\end{subarray}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!F_{3,d}(a_{1},\ldots,a_{i+1}),$

where

$\displaystyle
F_{b,d}(L_{1},\ldots,L_{I})=\sum\limits_{m_{1}=\big{\lceil}\frac{L_{1}+1}{2}\big{\rceil}}^{L_{1}}\binom{m_{1}-1}{L_{1}-m_{1}}\cdots\sum\limits_{m_{I}=\big{\lceil}\frac{L_{I}+1}{2}\big{\rceil}}^{L_{I}}\binom{m_{I}-1}{L_{I}-m_{I}}A\Big{(}\sum\limits_{i=1}^{I}m_{i},d\Big{)}$

Proof. Let $b=3$ in Theorems 3.1-3.2, by the definition of
$N_{3}(e_{i},L_{i}-m_{i})$, we have

$N_{3}(e_{i},L_{i}-m_{i})=\begin{cases}1,&\text{~{}if~{}}e_{i}=L_{i}-m_{i};\\\
0,&\text{~{}if~{}}e_{i}\neq L_{i}-m_{i},\end{cases}$

and then the $3$-weight distribution for the MDS code is given. $\hfill\Box$

###### Corollary 3.3

Let $\mathcal{C}$ be an $[n,k,d]$ MDS code, if $w=d+b-1<n$, then

$A^{b}(w)=n(q-1).$

Proof. For $w=d+b-1<n$, note that

$\displaystyle\delta_{n}(w)=0,~{}~{}\lfloor
M_{1}(w,b,0)\rfloor=1,~{}~{}\lfloor M_{1}(w,b,t)\rfloor\leq 0~{}(t\geq
1),~{}~{}M_{2}(w,b)=0，$

By Theorem 3.1, we have

$\displaystyle
A^{b}(d+b-1)=(n-d+1)F_{b,d}(d)+\sum\limits_{\begin{subarray}{c}a_{1},a_{2}\in\mathbb{N}^{*}\\\
a_{1}+a_{2}=d\end{subarray}}F_{b,d}(a_{1},a_{2})$

Now by Theorem 3.2, one has

$\displaystyle~{}~{}~{}~{}F_{b,d}(d)=A(d,d)=q-1\text{~{}~{}~{}and~{}~{}~{}}F_{b,d}(a_{1},a_{2})=A(d,d)=q-1~{}(a_{1}+a_{2}=d).$

Thus

$\displaystyle A^{b}(d+b-1)=(n-d+1)(q-1)+(d-1)(q-1)=n(q-1).$

$\hfill\Box$

###### Corollary 3.4

For $b\geq 3$ and $d\geq 3$, let $\mathcal{C}$ be an $[d+b,b+1,d]$ MDS code,
then

$\displaystyle
A^{b}(d+b)=\sum\limits_{t=0}^{b-1}(t+1)F_{b,d}(n-t)+dA(d+1,d)+(d-1)dA(d,d).$
(3.1)

Furthermore, for $b=3$, we have

$\displaystyle A^{b}(d+b)=q^{4}-(d+3)q+d+2.$ (3.2)

Proof. Note that

$\displaystyle\delta_{n}(n)=1,~{}~{}\lfloor
M_{1}(w,b,0)\rfloor=1,(t=0,1)~{}~{}\lfloor M_{1}(w,b,t)\rfloor\leq 0~{}(t\geq
2),~{}~{}M_{2}(w,b)=0,$

By Theorem 3.1, we have

$\displaystyle
A^{b}(d+b)=\sum\limits_{t=0}^{b-1}(t+1)F_{b,d}(d+b-t)+\sum\limits_{\begin{subarray}{c}a_{1},a_{2}\in\mathbb{N}^{*}\\\
a_{1}+a_{2}=d+1\end{subarray}}F_{b,d}(a_{1},a_{2})+2\sum\limits_{\begin{subarray}{c}a_{1},a_{2}\in\mathbb{N}^{*}\\\
a_{1}+a_{2}=d\end{subarray}}F_{b,d}(a_{1},a_{2}).$ (3.3)

Now by Theorem 3.2, one has

$\displaystyle
2\sum\limits_{\begin{subarray}{c}a_{1},a_{2}\in\mathbb{N}^{*}\\\
a_{1}+a_{2}=d\end{subarray}}F_{b,d}(a_{1},a_{2})=2(d-1)A(d,d).$ (3.4)

and

$\displaystyle\begin{aligned}
&\sum\limits_{\begin{subarray}{c}a_{1},a_{2}\in\mathbb{N}^{*}\\\
a_{1}+a_{2}=d+1\end{subarray}}F_{b,d}(a_{1},a_{2})\\\
=&F_{b,d}(1,d)+F_{b,d}(d,1)+F_{b,d}(2,d-1)+F_{b,d}(d-1,2)+\sum\limits_{\begin{subarray}{c}a_{1},a_{2}\in\mathbb{N}^{*}\backslash\\{1,2\\}\\\
a_{1}+a_{2}=d+1\end{subarray}}F_{b,d}(a_{1},a_{2})\big{)}\\\
=&2A(d+1,d)+2(d-2)A(d,d)+2A(d+1,d)+2(d-3)A(d,d)\\\
&+(d-4)A(d+1,d)\sum\limits_{\begin{subarray}{c}a_{1},a_{2}\in\mathbb{N}^{*}\backslash\\{1,2\\}\\\
a_{1}+a_{2}=d+1\end{subarray}}\bigg{(}\binom{a_{1}-2}{1}+\binom{a_{2}-2}{1}\bigg{)}A(d,d)\\\
=&dA(d+1,d)+\big{(}2(d-2)+2(d-3)+(d-3)(d-4)\big{)}A(d,d)\\\
=&dA(d+1,d)+(d-1)(d-2)A(d,d)\end{aligned}$ (3.5)

Now by $(\ref{S1})$-$(\ref{S3})$, we obtain $(\ref{C5})$. Furthermore, for
$b=3$, we have

$\displaystyle F_{3,d}(d+1)=A(d+1,d)+(d-1)A(d,d),$ $\displaystyle
F_{3,d}(d+2)=A(d+2,d)+dA(d+1,d)+\frac{(d-1)(d-2)}{2}A(d,d),$ $\displaystyle
F_{3,d}(d+3)=A(d+3,d)+(d+1)A(d+2,d)+\frac{d(d-1)}{2}A(d+1,d)+\frac{(d-1)(d-2)(d-3)}{6}A(d,d),$

and then

$\displaystyle\begin{aligned} &\sum\limits_{t=0}^{b-1}(t+1)F_{b,d}(d+3-t)\\\
=&F_{3,d}(d+3)+2F_{3,d}(d+2)+3F_{3,d}(d+1)\\\
=&A(d+3,d)+(d+3)A(d+2,d)+\frac{d^{2}+3d+6}{2}A(d+1,d)+\frac{(d-1)(d^{2}+d+12)}{6}A(d,d).\end{aligned}$
(3.6)

By calculating directly,

$\displaystyle\begin{aligned} &A(d,d)=q-1,\\\ &A(d+1,d)=q^{2}-(d+1)q+d,\\\
&A(d+2,d)=q^{3}-(d+2)q^{2}+\frac{(d+2)(d+1)}{2}q-\frac{d(d+1)}{2},\\\
&A(d+3,d)=q^{4}-(d+3)q^{3}+\frac{(d+3)(d+2)}{2}q^{2}-\frac{(d+3)(d+2)(d+1)}{6}q+\frac{d(d+1)(d+2)}{6}.\end{aligned}$
(3.7)

Now, by $(\ref{C5})$ and $(\ref{S4})$-$(\ref{S5})$, we have

$\displaystyle A^{3}(d+3)$ $\displaystyle=$ $\displaystyle
A(d+3,d)+(d+3)A(d+2,d)+\frac{(d+2)(d+3)}{2}A(d+1,d)+\frac{(d-1)(d^{2}+7d+12)}{6}A(d,d)$
$\displaystyle=$ $\displaystyle q^{4}-(d+3)q+d+2.$

$\hfill\Box$

###### Remark 3.3

For $b=3$ and $d\geq 3$, let $\mathcal{C}$ be an $[d+3,4,3]_{q}$ MDS code, we
know that $A^{3}(0)=1$ and $A^{3}(w)=0$ $(i=1,\ldots,d+1)$. Furthermore, By
Corollary 3.3, we have $A^{3}(d+2)=(d+3)(q-1)$. By Corollary 3.4, we have
$A^{3}(d+3)=q^{4}-(d+3)q+d+2.$ Obviously, $A^{3}(0),\ldots,A^{3}({d+3})$ are
accordant with $\sum\limits_{w=0}^{d+3}A^{3}(w)=q^{4}.$

###### Example 3.1

By using Matlab program, we can obtain the $3$-weight distribution for Reed-
Solomon code $[6,4,3]_{11}$ as follows

$\displaystyle
A^{3}(0)=1,~{}A^{3}(1)=A^{3}(2)=A^{3}(3)=A^{3}(4)=0,~{}A^{3}(5)=60,~{}A^{3}(6)=14580,$

which is accordant with Remark 3.3.

##  4 The proof for Theorem 3.1

In order to make the proof easier to understand ,we give the necessary
notation, and then present the framework of the proof for Theorem 3.1 as
follows.

Notation: For a vector
$\mathbf{c}\in\mathbb{F}_{q}^{n}\backslash\\{\mathbf{0}\\}$, we decompose the
$n$ coordinates of $\mathbf{c}$ into $l+2$ blocks, let

$\displaystyle[1,n]=N_{0}\cup N_{1}\cup N_{2}\cup\cdots\cup N_{l}\cup
N_{l+1}~{}~{}(l\geq 0),$

where

$\displaystyle N_{0}=[1,n_{0}],$ $\displaystyle
N_{i}=[n_{0}+\cdots+n_{i-1}+1,n_{0}+\cdots+n_{i}]~{}(1\leq i\leq l),$
$\displaystyle N_{l+1}=[n_{1}+\cdots+n_{l}+1,n_{1}+\cdots+n_{l}+n_{l+1}],$

with $|N_{0}|=n_{0}\geq 0$, $|N_{l+1}|\geq 0$ and $|N_{l}|=n_{i}\geq 1$
$(1\leq i\leq l)$. It is easy to see $n=\sum\limits_{i=0}^{l+1}n_{i}$.
Furthermore, for completeness, if $n_{0}=0$ $(n_{l+1}=0)$, we set
$N_{0}=\emptyset$ $(N_{l+1}=\emptyset)$. Now we call a vector
$\mathbf{c}=(c_{1},\ldots,c_{n})\in\mathbb{F}_{q}^{n}\backslash\\{\mathbf{0}\\}$
with $b$-shape $(N_{0},N_{1},\ldots,N_{l+1})$ if it satisfies the following
conditions.

$(\mathrm{C}1)$ $n_{0}=\min\\{i~{}|~{}c_{i}\neq 0,~{}1\leq i\leq n\\}-1$;

$(\mathrm{C}2)$ $n_{l+1}=n-\max\\{i~{}|~{}c_{i}\neq 0,~{}1\leq i\leq n\\}$;

$(\mathrm{C}3)$ For any odd $i$ $(1\leq i\leq l)$,
$c_{n_{0}+\cdots+n_{i-1}+1}$ and $c_{n_{0}+\cdots+n_{i}}$ are both nonzero,
and

$\displaystyle
wt_{b-1}\big{(}(c_{n_{0}+\cdots+n_{i-1}+1},c_{n_{0}+\cdots+n_{i-1}+2},\ldots,c_{n_{0}+\cdots+n_{i}})\big{)}=n_{i};$

$(\mathrm{C}4)$ For any even $i$ $(1\leq i\leq l)$, $n_{i}\geq b-1$ and
$(c_{n_{0}+\cdots+n_{i-1}+1},\ldots,c_{n_{0}+\cdots+n_{i}})=\mathbf{0}$.

In the following statement, we alway assume $\mathcal{C}$ is an $[n,n+1-d,d]$
MDS code and $|N_{i}|=n_{i}$ $(i=0,\ldots,l+1)$. Now we give the framework of
the proof for Theorem 3.1.

$\bullet$ For any vector $\mathbf{c}\neq 0$ with $b$-shape
$(N_{0},N_{1},\ldots,N_{l+1})$, it is ovbious that $l$ must be odd. Let
$t=n_{0}+n_{l+1}$, by $(\mathrm{C}1)$-$(\mathrm{C}4)$, we can get

$\displaystyle\begin{aligned} wt_{b}(\mathbf{c})=\begin{cases}n,\quad&t\leq
b-2\text{~{}and~{}}l=1;\\\
t+\sum\limits_{i=1}^{\frac{l+1}{2}}n_{2i-1}+\frac{(l-1)(b-1)}{2},\quad&t\leq
b-2\text{~{}and~{}}l\geq 3;\\\ n-(t+1-b),\quad&t\geq
b-1\text{~{}and~{}}l=1;\\\
\sum\limits_{i=1}^{\frac{l+1}{2}}n_{2i-1}+\frac{(l+1)(b-1)}{2},\quad&t\geq
b-1\text{~{}and~{}}l\geq 3.\end{cases}\end{aligned}$ (4.1)

$\bullet$ Basing on (4.1), we know that the $b$-weight of a vector can be
uniquely determined by the $b$-shape. Thus for $t\in\mathbb{N}$,
$w,l\in\mathbb{N}^{*}$, the set

$\displaystyle\mathrm{B}(w,t,l)=\big{\\{}(N_{0},\ldots,N_{l+1})\\!~{}\big{|}\\!~{}|N_{0}|+|N_{l+1}|=t,~{}\text{if}~{}\mathbf{c}\text{~{}has~{}$b$-shape
$(N_{0},\ldots,N_{l+1})$,~{}then $wt_{b}(\mathbf{c})=w$}\big{\\}}$

is well defined. Let

$\displaystyle\tilde{A}\big{(}N_{0},\ldots,N_{l+1}\big{)}=\Big{\\{}\mathbf{c}\in\mathcal{C}~{}|~{}\text{$\mathbf{c}$~{}has
$b$-shape $(N_{0},\ldots,N_{l+1})$~{}and~{}$wt_{b}(\mathbf{c})=w$}\Big{\\}}.$

Then the number of codewords in $\mathcal{C}$ with $b$-weight $w$ is

$\displaystyle
A^{b}(w)=\sum\limits_{t}\sum\limits_{l}\sum\limits_{(N_{0},\ldots,N_{l+1})\in\mathrm{B}(w,t,l)}\tilde{A}\big{(}N_{0},\ldots,N_{l+1}\big{)}.$

$\bullet$ By shortening $\mathcal{C}$ on $N_{0}\cup N_{2}\cup\cdots\cup
N_{l+1}$, we prove that
$\tilde{A}(N_{0},\ldots,N_{l+1})=F_{b,d}(n_{1},n_{3},\ldots,n_{l})$.

$\bullet$ Basing on $(\ref{www1})$, the calculation of
$\sum\limits_{(N_{0},\ldots,N_{2})\in\mathrm{B}(w,t,1)}F_{b,d}(n_{1},n_{3},\ldots,n_{l})$
is divided into four cases, and then it converts to calculate the number of
solutions for the corresponding equations.

Before giving the proof of Theorem 3.1, we prove $(\ref{www1})$ at first.

###### Lemma 4.1

For any $\mathbf{c}\in\mathbb{F}_{q}^{n}\backslash\\{\mathbf{0}\\}$ with
$b$-shape $(N_{0},N_{1},\ldots,N_{l+1})$, let $n_{i}=|N_{i}|$ and
$t=n_{0}+n_{l+1}$, then

$\displaystyle\begin{aligned} wt_{b}(\mathbf{c})=\begin{cases}n,\quad&t\leq
b-2\text{~{}and~{}}l=1;\\\
t+\sum\limits_{i=1}^{\frac{l+1}{2}}n_{2i-1}+\frac{(l-1)(b-1)}{2},\quad&t\leq
b-2\text{~{}and~{}}l\geq 3;\\\ n-(t+1-b),\quad&t\geq
b-1\text{~{}and~{}}l=1;\\\
\sum\limits_{i=1}^{\frac{l+1}{2}}n_{2i-1}+\frac{(l+1)(b-1)}{2},\quad&t\geq
b-1\text{~{}and~{}}l\geq 3.\end{cases}\end{aligned}$ (4.2)

Proof. For any $\mathbf{c}\in\mathbb{F}_{q}^{n}\backslash\\{\mathbf{0}\\}$
with $b$-shape $(N_{0},N_{1},\ldots,N_{l+1})$, obviously, $l$ is odd. Now
$wt_{b}(\mathbf{c})$ is derived by $t$ and $n_{i}$ $(i=1,\ldots,l)$ in the
following four cases.

If $t\leq b-2$ and $l=1$, then $\mathbf{c}$ has $b$-shape
$(N_{0},N_{1},N_{2})$ with $|N_{0}|+|N_{2}|=t\leq b-2$, by condition
$(\mathrm{C}{3})$, we have

$wt_{b}(\mathbf{c})=n.$

If $t\leq b-2$ and $l\geq 3$, by conditions $(\mathrm{C}3)$-$(\mathrm{C}4)$
and $\sum\limits_{i=0}^{l+1}n_{i}=n$, one has

$\displaystyle\begin{aligned}
wt_{b}(\mathbf{c})=&n-\big{(}n_{2}-(b-1)\big{)}-\cdots-\big{(}n_{l-1}-(b-1)\big{)}\\\
=&n-\sum\limits_{i=1}^{\frac{l-1}{2}}n_{2i}+{\frac{(l-1)(b-1)}{2}}\\\
=&t+\sum\limits_{i=1}^{\frac{l+1}{2}}n_{2i-1}+{\frac{(l-1)(b-1)}{2}}.\end{aligned}$

If $t\geq b-1$ and $l=1$, then $\mathbf{c}$ has $b$-shape
$(N_{0},N_{1},N_{2})$ with $|N_{0}|+|N_{2}|=t\geq b-1$, now by condition
$(\mathrm{C}3)$, we get

$\displaystyle wt_{b}(\mathbf{c})=n-(t+1-b).$

If $t\geq b-1$ and $l\geq 3$, by conditions $(\mathrm{C}3)$-$(\mathrm{C}4)$
and $\sum\limits_{i=0}^{l+1}n_{i}=n$, one has

$\displaystyle\begin{aligned}
wt_{b}(\mathbf{c})=&n-\big{(}t-(b-1)\big{)}-\big{(}n_{2}-(b-1)\big{)}-\cdots-\big{(}n_{l-1}-(b-1)\big{)}\\\
=&n-t-\sum\limits_{i=1}^{\frac{l-1}{2}}n_{2i}+{\frac{(l+1)(b-1)}{2}}\\\
=&\sum\limits_{i=1}^{\frac{l+1}{2}}n_{2i-1}+{\frac{(l+1)(b-1)}{2}}.\end{aligned}$

$\hfill\Box$

The proof of Theorem 3.1. We prove Theorem 3.1 by the following two Steps.

${\bf Step}$ 1\. If $n_{1}+\cdots+n_{l}<d$, it is obviously that
$\tilde{A}(N_{0},\ldots,N_{l+1})=0$; otherwise, we show that

$\displaystyle\tilde{A}(N_{0},\ldots,N_{l+1})=F_{b,d}(n_{1},n_{3},\ldots,n_{l}).$
(4.3)

Let $\mathcal{C}_{N_{0}\cup N_{2}\cup\cdots\cup N_{l+1}}$ be an shorten code
of $\mathcal{C}$ on $N_{0}\cup N_{2}\cup\cdots\cup N_{l+1}$, by Lemma 2.4,
$\mathcal{C}_{N_{0}\cup N_{2}\cup\cdots\cup N_{l+1}}$ is an
$\Big{[}~{}n_{1}+n_{3}+\cdots+n_{l},~{}n_{1}+n_{3}+\cdots+n_{l}-d+1,~{}d~{}\Big{]}$
MDS code. Thus $\tilde{A}\big{(}N_{0},\ldots,N_{l+1}\big{)}$ is equal to the
number of $\mathbf{c}\in\mathcal{C}_{N_{0}\cup N_{2}\cup\cdots\cup N_{l+1}}$,
which satisfies

$\bullet$
$\mathbf{c}=(\underbrace{c_{1},\ldots,c_{n_{1}}}_{1},\underbrace{c_{n_{1}+1},\ldots,c_{n_{1}+n_{3}}}_{2},\ldots,\underbrace{c_{n_{1}+n_{3}+\cdots+n_{l-2}+1},\ldots,c_{n_{1}+n_{3}+\cdots+n_{l-2}+n_{l}}}_{\frac{l+1}{2}})$
with
$~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}c_{n_{1}+n_{3}+\cdots+n_{2i-1}+1}\neq
0~{}~{}~{}~{}~{}~{}\text{and}~{}~{}~{}~{}~{}~{}c_{n_{1}+n_{3}+\cdots+n_{2i-1}+n_{2i+1}}\neq
0\quad\big{(}i=0,1,\ldots,\frac{l-1}{2}\big{)}.$

$\bullet$ $wt_{b-1}(\mathbf{c})=n_{1}+n_{3}+\cdots+n_{l}$.
Now by conditions $(\mathrm{F}1)$-$(\mathrm{F}2)$, $(\ref{AEF})$ holds.

${\bf Step}$ 2\. We give the value of
$\sum\limits_{(N_{0},\ldots,N_{l+1})\in\mathrm{B}(w,t,1)}F_{b,d}(n_{1},n_{3},\ldots,n_{l})$
by the following $4$ cases.

Case $1$. For $t\leq b-2$ and $l=1$, by the definition of $B(w,t,1)$,
$(\mathrm{C}1)$-$(\mathrm{C}3)$ and Lemma 4.1, we know that
$(N_{0},\ldots,N_{2})\in B(w,t,1)$ if and only if

$\displaystyle\begin{cases}&\\!\\!\\!n_{0}+n_{2}=t;\\\ &\\!\\!\\!n_{1}=n-t;\\\
&\\!\\!\\!n_{1}\geq d,n_{2}\geq 0;\\\ &\\!\\!\\!w=n.\end{cases}$

Thus

$\displaystyle\begin{aligned}
\sum\limits_{(N_{0},N_{1},N_{2})\in\mathrm{B}(w,t,1)}F_{b,d}(n_{1})=\delta_{n}(w)(t+1)F_{b,d}(n-t),\quad&\text{~{}if~{}}t\leq
n-d,\end{aligned}$ (4.4)

where

$\displaystyle\delta_{n}(w)=\begin{cases}1,\quad&w=n;\\\
0,\quad&\text{otherwise}.\end{cases}$

Case $2$. For $t\leq b-2$ and $l\geq 3$, by the definition of $B(w,t,l)$,
$(\mathrm{C}1)$-$(\mathrm{C}4)$ and Lemma 4.1, we know that
$(N_{0},\ldots,N_{l+1})\in B(w,t,1)$ if and only if

$\displaystyle\begin{aligned} \begin{cases}n_{0}+n_{l+1}=t,\\\
n_{0}+n_{1}+n_{2}+\cdots+n_{l}+n_{l+1}=n,\\\
n_{1}+n_{3}+\cdots+n_{l}=w-t-{\frac{(l-1)(b-1)}{2}},\\\
n_{1}+n_{3}+\cdots+n_{l}\geq d,\\\ n_{0}\geq 0,~{}n_{l+1}\geq 0,~{}n_{i}\geq
1~{}(i=1,3,\ldots,l),~{}n_{j}\geq
b-1~{}(j=2,4,\ldots,l-1),\end{cases}\end{aligned}$ (4.5)

which is equavient to

$\displaystyle\begin{aligned} \begin{cases}n_{0}+n_{l+1}=t,\\\
(n_{2}-b+2)+(n_{4}-b+2)+\cdots+(n_{l-1}-b+2)=n-w+\frac{l-1}{2},\\\
n_{1}+n_{3}+\cdots+n_{l}=w-t-\frac{(l-1)(b-1)}{2},\\\
n_{1}+n_{3}+\cdots+n_{l}\geq d,\\\ n_{0}\geq 0,~{}n_{l+1}\geq 0,~{}n_{i}\geq
1~{}(i=1,3,\ldots,l),~{}n_{j}-b+2\geq
1~{}(j=2,4,\ldots,l-1).\end{cases}\end{aligned}$ (4.6)

Thus

$\displaystyle\begin{aligned}
\begin{cases}w-t-\frac{(l-1)(b-1)}{2}\geq\frac{l-1}{2}+1,\\\
w-t-\frac{(l-1)(b-1)}{2}\geq d,\end{cases}\end{aligned}$

and then the upper bound of $\frac{l-1}{2}$ is given as

$\displaystyle\frac{l-1}{2}\leq\min\bigg{\\{}\frac{w-t-1}{b},~{}\frac{w-t-d}{b-1}\bigg{\\}}=M_{1}(w,b,t).$
(4.7)

Now by (4.6)-(4.7) and Lemma 2.5, we have

$\displaystyle\begin{aligned}
&\sum\limits_{(N_{0},\ldots,N_{l+1})\in\mathrm{B}(w,t,l)}F_{b,d}(n_{1},n_{3},\ldots,n_{l})\\\
=&\begin{cases}(t+1)\binom{n-w+\frac{l-1}{2}-1}{\frac{l-1}{2}-1}\\!\\!\\!\\!\\!\\!\\!\\!\sum\limits_{\begin{subarray}{c}n_{1},n_{3},\ldots,n_{l}\in\mathbb{N}^{*}\\\
n_{1}+n_{3}+\cdots+n_{l}=w-t-\frac{(l-1)(b-1)}{2}\end{subarray}}\\!\\!\\!\\!\\!\\!\\!\\!F_{b,d}(n_{1},n_{3},\ldots,n_{l}),&\text{~{}if~{}}\frac{l-1}{2}\leq
M_{1}(w,b,t);\\\
0,&\text{~{}if~{}}\frac{l-1}{2}>M_{1}(w,b,t).\end{cases}\end{aligned}$ (4.8)

Case $3$. For $t\geq b-1$ and $l=1$, by the definition of $B(w,t,l)$,
$(\mathrm{C}1)$-$(\mathrm{C}4)$ and Lemma 4.1, $(N_{0},\ldots,N_{2})\in
B(w,t,1)$ if and only if

$\displaystyle\begin{cases}&\\!\\!\\!n_{0}+n_{2}=t;\\\ &\\!\\!\\!n_{1}=n-t;\\\
&\\!\\!\\!w=n-(t+1-b);\\\ &\\!\\!\\!n_{1}\geq d,n_{0}\geq 0,n_{2}\geq
0.\end{cases}$

Thus

$\displaystyle t=n-w+b-1,$

and then

$\displaystyle\sum\limits_{(N_{0},N_{1},N_{2})\in\mathrm{B}(w,t,1)}F_{b,d}(n_{1})=\begin{cases}(n-w+b)F_{b,d}(w+1-b),&\text{if~{}}t=n-w+b-1;\\\
0,&\text{if~{}}t\neq n-w+b-1.\end{cases}$ (4.9)

Case $4$. If $t\geq b-1$ and $l\geq 3$, by the definition of $B(w,t,l)$,
$(\mathrm{C}1)$-$(\mathrm{C}4)$ and Lemma 4.1, we know that
$(N_{0},\ldots,N_{l+1})\in B(w,t,1)$ if and only if

$\displaystyle\begin{aligned} \begin{cases}n_{0}+n_{l+1}=t,\\\
n_{0}+n_{1}+n_{2}+\cdots+n_{l}+n_{l+1}=n,\\\
n_{1}+n_{3}+\cdots+n_{l}=w-{\frac{(l+1)(b-1)}{2}},\\\
n_{1}+n_{3}+\cdots+n_{l}\geq d,\\\ n_{0}\geq 0,~{}n_{l+1}\geq 0,~{}n_{i}\geq
1~{}(i=1,3,\ldots,l),~{}n_{j}\geq
b-1~{}(j=2,4,\ldots,l-1),\end{cases}\end{aligned}$

which is equavient to

$\displaystyle\begin{aligned} \begin{cases}n_{0}+n_{l+1}=t,\\\
(n_{2}-b+2)+(n_{4}-b+2)\cdots+(n_{l-1}-b+2)=n-w-t+b-1+\frac{l-1}{2},\\\
n_{1}+n_{3}+\cdots+n_{l}=w-\frac{(l+1)(b-1)}{2},\\\
n_{1}+n_{3}+\cdots+n_{l}\geq d,\\\ n_{0}\geq 0,~{}n_{l+1}\geq 0,~{}n_{i}\geq
1~{}(i=1,3,\ldots,l),~{}n_{j}-b+2\geq
1~{}(j=2,4,\ldots,l-1),\end{cases}\end{aligned}$ (4.10)

thus we have

$\displaystyle\begin{aligned} \begin{cases}n-w-t+b-1\geq 0,\\\
w-\frac{(l+1)(b-1)}{2}\geq\frac{l-1}{2}+1,\\\ w-\frac{(l+1)(b-1)}{2}\geq
d.\end{cases}\end{aligned}$ (4.11)

By (4.11), the upper bounds for $t$ and $\frac{l-1}{2}$ are given as

$\displaystyle\begin{aligned} t\leq n-w+b-1,\end{aligned}$ (4.12)

and

$\displaystyle\begin{aligned}
\frac{l-1}{2}\leq\min\bigg{\\{}\frac{w-b}{b},~{}\frac{w-d}{b-1}-1\bigg{\\}}=M_{2}(w,b).\end{aligned}$
(4.13)

Now by (4.10) and $(\ref{ut})$-$(\ref{ul})$, we have

$\displaystyle\begin{aligned}
&\sum\limits_{(N_{0},\ldots,N_{l+1})\in\mathrm{B}(w,t,l)}F_{b,d}(n_{1},n_{3},\ldots,n_{l+1})\\\
=&\begin{cases}(t+1)\binom{n-w-t+b+\frac{l-1}{2}-2}{\frac{l-1}{2}-1}\\!\\!\\!\\!\\!\\!\\!\\!\sum\limits_{\begin{subarray}{c}n_{1},n_{3},\ldots,n_{l}\in\mathbb{N}^{*}\\\
n_{1}+\cdots+n_{l}=w-\frac{(l+1)(b-1)}{2}\end{subarray}}\\!\\!&\\!\\!\\!\\!\\!\\!F_{b,d}(n_{1},n_{3},\ldots,n_{l}),\\\
&\text{~{}if~{}}t\leq n-w+b-1~{}\text{and}~{}\frac{l-1}{2}\leq M_{2}(w,b);\\\
0,&\text{~{}if~{}}t>n-w+b-1,~{}\text{or}~{}\frac{l-1}{2}>M_{2}(w,b).\\\
\end{cases}\end{aligned}$ (4.14)

So far, by $(\ref{AEF})$-$(\ref{key1})$, $(\ref{key2})$-$(\ref{key3})$ and
$(\ref{key4})$, we have

$\displaystyle A^{b}(w)=$
$\displaystyle\delta_{n}(w)\sum\limits_{t=0}^{b-2}(t+1)F_{b,d}(n-t)$
$\displaystyle+\sum\limits_{t=0}^{b-2}(t+1)\sum\limits_{\frac{l-1}{2}=1}^{\lfloor
M_{1}(w,b,t)\rfloor}\binom{n-w+\frac{l-1}{2}-1}{\frac{l-1}{2}-1}\sum\limits_{\begin{subarray}{c}n_{1},n_{3},\ldots,n_{l}\in\mathbb{N}^{*}\\\
n_{1}+n_{3}+\cdots+n_{l}=w-t-\frac{(l-1)(b-1)}{2}\end{subarray}}F_{b,d}(n_{1},n_{3},\ldots,n_{l})$
$\displaystyle+(n-w+b)F_{b,d}(w-b+1)$
$\displaystyle+\sum\limits_{t=b-1}^{n-w+b-1}(t+1)\sum\limits_{\frac{l-1}{2}=1}^{\lfloor
M_{2}(w,b)\rfloor}\binom{n-w-t+b+\frac{l-1}{2}-2}{\frac{l-1}{2}-1}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\sum\limits_{\begin{subarray}{c}n_{1},n_{3},\ldots,n_{l}\in\mathbb{N}^{*}\\\
n_{1}+n_{3}+\cdots+n_{l}=w-\frac{(l+1)(b-1)}{2}\end{subarray}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!F_{b,d}(n_{1},n_{3},\ldots,n_{l})$
$\displaystyle=$
$\displaystyle\delta_{n}(w)\sum\limits_{t=0}^{b-2}(t+1)F_{b,d}(n-t)+(n-w+b)F_{b,d}(w-b+1)$
$\displaystyle+\sum\limits_{t=0}^{b-2}(t+1)\sum\limits_{i=1}^{\lfloor
M_{1}(w,b,t)\rfloor}\binom{n-w+i-1}{i-1}\sum\limits_{\begin{subarray}{c}a_{1},a_{2},\ldots,a_{i+1}\in\mathbb{N}^{*}\\\
a_{1}+a_{2}+\cdots+a_{i+1}=w-t-i(b-1)\end{subarray}}F_{b,d}(a_{1},a_{2},\ldots,a_{i+1})$
$\displaystyle+\sum\limits_{t=b-1}^{n-w+b-1}(t+1)\sum\limits_{i=1}^{\lfloor
M_{2}(w,b)\rfloor}\binom{n-w-t+i+b-2}{i-1}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\sum\limits_{\begin{subarray}{c}a_{1},a_{2},\ldots,a_{i+1}\in\mathbb{N}^{*}\\\
a_{1}+a_{2}+\cdots+a_{i+1}=w-(i+1)(b-1)\end{subarray}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!F_{b,d}(a_{1},a_{2},\ldots,a_{i+1}).$

$\hfill\Box$

The proof for Theorem 3.2. The key of the proof is to find the connection
between $F_{b,d}(L_{1},\ldots,L_{I})$ and $N_{b}(r,L)$. The following
notations is necessary to calculate $F_{b,d}(L_{1},\ldots,L_{I})$.

${\bf Notations.}$

$\bullet$ For any
$({c}_{L_{1}+\cdots+L_{i-1}+1},\ldots,{c}_{L_{1}+\cdots+L_{i}})\in\mathbb{F}_{q}^{L_{i}}\backslash\\{\mathbf{0}\\}$,
we decompose the $L_{i}$ coordinates of $\mathbf{c}$ into $j_{i}$ blocks, i,e,

$\displaystyle[L_{1}+\cdots+L_{i-1}+1,L_{1}+\cdots+L_{i}]=N_{i,1}\cup
N_{i,2}\cup\cdots\cup N_{i,j_{i}},$

where

$\displaystyle
N_{i,y}=[L_{1}+\cdots+L_{i-1}+n_{i,1}+\cdots+n_{i,y-1}+1,~{}L_{1}+\cdots+L_{i-1}+n_{i,1}+\cdots+n_{i,y}]~{}~{}(y=1,\ldots,j_{i}),$

and $|N_{i,y}|=n_{i,y}\geq 1$. Obviously,
$L_{i}=\sum\limits_{y=1}^{j_{i}}n_{i,y}$. we call
$({c}_{L_{1}+\cdots+L_{i-1}+1},\ldots,{c}_{L_{1}+\cdots+L_{i}})\in\mathbb{F}_{q}^{L_{i}}\backslash\\{\mathbf{0}\\}$
possessing shape $(N_{i,1},N_{i,2},\ldots,N_{i,j_{i}})$ if it satisfies the
following two conditions.

$(\mathrm{B}1)$ For every block $N_{i,y}$, either each coordinate in $N_{i,y}$
is zero or nonzero;

$(\mathrm{B}2)$ For any two adjacent blocks $N_{i,y}$ and $N_{i,y+1}$ , either
each coordinate in $N_{i,y}$ is zero and each coordinate in $N_{i,y+1}$ is
nonzero, or vice versa.

$\bullet$ Let
$\mathbb{V}_{i}=\Big{\\{}(c_{1},\ldots,c_{L_{i}})\in\mathbb{F}_{q}^{L_{i}}~{}\big{|}~{}c_{1}\neq
0,~{}c_{L_{i}}\neq 0\Big{\\}}.$ Note that for a vector
$(c_{1},\ldots,c_{L_{i}})\in\mathbb{V}_{i}$ has shape
$(N_{i,1},N_{i,2},\ldots,N_{i,j_{i}})$, then $j_{i}$ is odd, thus the
following set

$\displaystyle
P_{i}\big{(}j_{i},m_{i}\big{)}=\Big{\\{}(N_{i,1},N_{i,2},\ldots,N_{i,j_{i}})~{}|$
$\displaystyle~{}|N_{i,1}|+|N_{i,3}|+\cdots+|N_{i,j_{i}}|=m_{i}~{}\text{and}~{}$
$\displaystyle\text{If~{}$\mathbf{c}\in\mathbb{V}_{i}$~{}has~{}shape~{}$(N_{i,1},N_{i,2},\ldots,N_{i,j_{i}})$},\text{then~{}$wt_{b-1}(\mathbf{c})=L_{i}$}\Big{\\}}.$

is well-defined.

$\bullet$ Let
$Q(m_{1},\ldots,m_{I},N_{1,1},\ldots,N_{1,j_{1}},\ldots,N_{I,1},\ldots,N_{I,j_{I}})$
be the number of codewords
$\mathbf{c}=(\underbrace{c_{1},\ldots,c_{L_{1}}}_{1},\underbrace{c_{L_{1}+1},\ldots,c_{L_{1}+L_{2}}}_{2},\ldots,\underbrace{c_{L_{1}+\cdots+L_{I-1}+1},\ldots,c_{L_{1}+\cdots+L_{I}}}_{I})\in\mathcal{C}$
satisfies $(\mathrm{F}1)$-$(\mathrm{F}2)$ and every
$\big{(}c_{L_{1}+\cdots+L_{i-1}+1},\ldots,c_{L_{1}+\cdots+L_{i}}\big{)}$ has
the Hamming weigh $m_{i}$ and shape
$\big{(}N_{i,1},\ldots,N_{1,j_{i}}\big{)}$.

Now by above notations and conditions $(\mathrm{F}1)$-$(\mathrm{F}2)$, we have

$\displaystyle\begin{aligned} &F_{b,d}(L_{1},\ldots,L_{I})\\\
=&\prod_{i=1}^{I}\sum\limits_{j_{i}}\sum\limits_{m_{i}}\sum\limits_{(N_{i,1},N_{i,2},\ldots,N_{i,j_{i}})\in
P_{i}(j_{i},m_{i})}Q(m_{1},\ldots,m_{I},N_{1,1},\ldots,N_{1,j_{1}},\ldots,N_{I,1},\ldots,N_{I,j_{I}}).\end{aligned}$
(4.15)

In the following,
$Q(m_{1},\ldots,m_{I},N_{1,1},\ldots,N_{1,j_{1}},\ldots,N_{I,1},\ldots,N_{I,j_{I}})$
is given by shorting $\mathcal{C}$. Let

$\displaystyle T=\underbrace{N_{1,2}\cup\cdots\cup
N_{1,j_{1}-1}}_{1}\cup\underbrace{N_{2,2}\cup\cdots\cup
N_{2,j_{2}-1}}_{2}\cup\cdots\cup\underbrace{N_{I,2}\cup\cdots\cup
N_{I,j_{I}-1}}_{I},$

then

$\displaystyle\big{|}[1,n]\backslash T\big{|}=m_{1}+m_{2}+\cdots+m_{I}.$

If $m_{1}+m_{2}+\cdots+m_{I}<d$, then

$\displaystyle
Q(m_{1},\ldots,m_{I},N_{1,1},\ldots,N_{1,j_{1}},\ldots,N_{I,1},\ldots,N_{I,j_{I}})=0.$
(4.16)

Otherwise, let $\mathcal{C}_{T}$ be the code shortened on $T$ from
$\mathcal{C}$. It follows from Lemma 2.4 that $\mathcal{C}_{T}$ is an MDS code
with parameters

$\displaystyle\bigg{[}\sum\limits_{i=1}^{I}m_{i},~{}\sum\limits_{i=1}^{I}m_{i}-d+1,~{}d~{}\bigg{]}.$

Ovbiously,
$Q(m_{1},\ldots,m_{I},N_{1,1},\ldots,N_{1,j_{1}},\ldots,N_{I,1},\ldots,N_{I,j_{I}})$
is equal to the number of codewords in $\mathcal{C}_{T}$ with Hamming weight
$\sum\limits_{i=1}^{I}m_{i}$, By Lemma 2.3, that is

$\displaystyle
Q(m_{1},\ldots,m_{I},N_{1,1},\ldots,N_{1,j_{1}},\ldots,N_{I,1},\ldots,N_{I,j_{I}})=\sum\limits_{j=0}^{\sum\limits_{i=1}^{I}m_{i}-d}(-1)^{j}\binom{\sum\limits_{i=1}^{I}m_{i}}{j}\bigg{(}q^{\sum\limits_{i=1}^{I}m_{i}-d+1-j}-1\bigg{)}.$
(4.17)

If $b=2$, then $\mathbf{c}\in\mathcal{C}$ which satisfy conditions
$(\mathrm{F}1)$-$(\mathrm{F}2)$ if and only if all the coordinates of
$\mathbf{c}$ are nonzero, i.e., $L_{i}=m_{i}$ and $j_{i}=1$. Thus one has

$\displaystyle
F_{b,d}(L_{1},\ldots,L_{I})=\sum\limits_{j=0}^{L-d}(-1)^{j}\binom{L}{j}\Big{(}q^{L+1-d-j}-1\Big{)}.$
(4.18)

If $b=3$, then the calculation of
$\sum\limits_{(N_{i,1},N_{i,2},\ldots,N_{i,j_{i}})\in P_{i}(j_{i},m_{i})}~{}1$
is given by calculating the number of solutions for the corresponding
equations.

For $m_{i}=L_{i}$, it is easy to see that $j_{i}=1$ and

$\displaystyle\sum\limits_{(N_{i,1},N_{i,2},\ldots,N_{i,j_{i}})\in
P_{i}(j_{i},m_{i})}1=1.$ (4.19)

For $m_{i}<L_{i}$, we have $j_{i}\geq 3$, and then by the definition of
$P_{i}\big{(}j_{i},m_{i}\big{)}$, we know that
$(N_{i,1},N_{i,2},\ldots,N_{i,j_{i}})\in P_{i}\big{(}j_{i},m_{i}\big{)}$ if
and only if

$\displaystyle\begin{cases}n_{i,1}+n_{i,2}+\cdots+n_{i,j_{i}}=L_{i};\\\
n_{i,1}+n_{i,3}+\cdots+n_{i,j_{i}}=m_{i};\\\
n_{i,y}\in\mathbb{N}^{*},~{}~{}n_{i,y}\leq b-2~{}(y~{}\text{is even});\\\
m_{i}<L_{i},~{}~{}j_{i}\geq 3\text{~{}is~{}odd},\end{cases}$

where $n_{i,y}=|N_{i,y}|$. Above equations is equivalent to

$\displaystyle\begin{cases}n_{i,2}+n_{i,4}+\cdots+n_{i,j_{i}-1}=L_{i}-m_{i};\\\
n_{i,1}+n_{i,3}+\cdots+n_{i,j_{i}}=m_{i};\\\
n_{i,y}\in\mathbb{N}^{*},~{}~{}n_{i,y}\leq b-2~{}(y~{}\text{is even});\\\
m_{i}<L_{i},~{}~{}j_{i}\geq 3\text{~{}is~{}odd}.\end{cases}$ (4.20)

Now we give the bound for $m_{i}$ and $\frac{j_{i}-1}{2}$. By $(\ref{njzs})$,
we have

$\displaystyle\begin{cases}\frac{j_{i}-1}{2}\leq
n_{i,2}+n_{i,4}+\cdots+n_{i,j_{i}-1}=L_{i}-m_{i}\leq\frac{j_{i}-1}{2}(b-2);\\\
\frac{j_{i}+1}{2}\leq n_{i,1}+n_{i,3}+\cdots+n_{i,j_{i}}=m_{i};\\\
n_{i,y}\in\mathbb{N}^{*},~{}~{}\leq n_{i,y}\leq b-2~{}(y~{}\text{is even});\\\
m_{i}<L_{i},~{}~{}j_{i}\geq 3\text{~{}is~{}odd}.\end{cases}$

Thus,

$\displaystyle\begin{cases}\frac{j_{i}-1}{2}\leq\min\\{L_{i}-m_{i},~{}m_{i}-1\\},\\\
L_{i}-m_{i}\leq\frac{j_{i}-1}{2}(b-2)\leq(m_{i}-1)(b-2)=(b-2)m_{i}-(b-2),\\\
\end{cases}$

it leads

$\displaystyle\begin{aligned}
\begin{cases}\big{\lceil}\frac{L_{i}-m_{i}}{b-2}\big{\rceil}\leq\frac{j_{i}-1}{2}\leq\min\\{L_{i}-m_{i},~{}m_{i}-1\\},\\\
\big{\lceil}\frac{L_{i}+(b-2)}{b-1}\big{\rceil}\leq m_{i}\leq
L_{i}-1.\end{cases}\end{aligned}$ (4.21)

Now by $(\ref{mm3})$, Lemma 2.5 and the definition of
$N_{b}(\frac{j_{i}-1}{2},L_{i}-m_{i})$, we have

$\displaystyle\begin{aligned}
&\sum\limits_{(N_{i,1},N_{i,2},\ldots,N_{i,j_{i}})\in P_{i}(j_{i},m_{i})}1\\\
=&\begin{cases}\binom{m_{i}-1}{\frac{j_{i}-1}{2}}N_{b}(\frac{j_{i}-1}{2},L_{i}-m_{i}),&\text{~{}if~{}}(\ref{mm3})~{}\text{holds};\\\
0,&\text{otherwise}.\end{cases}\end{aligned}$ (4.22)

So far, by $(\ref{FFF})$-$(\ref{F1})$, $(\ref{FFP})$, we have

$\displaystyle
F_{b,d}(L_{1},\ldots,L_{I})=\begin{cases}A\Big{(}\sum\limits_{i=1}^{I}L_{i},d\Big{)},\quad&\text{if}~{}b=2;\\\
f_{b}(L_{1},m_{1})\cdots
f_{b}(L_{I},m_{I})A\Big{(}\sum\limits_{i=1}^{I}m_{i},d\Big{)},\quad&\text{if}~{}b\geq
3.\\\ \end{cases}$

where

$\displaystyle
f_{b}(L_{i},m_{i})=\sum\limits_{m_{i}=\big{\lceil}\frac{L_{i}+(b-2)}{b-1}\big{\rceil}}^{L_{I}}\sum\limits_{e_{i}=\big{\lceil}\frac{L_{i}-m_{i}}{b-2}\big{\rceil}}^{\min\\{m_{i}-1,L_{i}-m_{i}\\}}\binom{m_{i}-1}{e_{i}}N_{b}(e_{i},L_{i}-m_{i}),$

and

$\displaystyle
A\Big{(}\sum\limits_{i=1}^{I}m_{i},d\Big{)}=\begin{cases}0,&\sum\limits_{i=1}^{I}m_{i}<d;\\\
\sum\limits_{j=0}^{\sum\limits_{i=1}^{I}m_{i}-d}(-1)^{j}\binom{\sum\limits_{i=1}^{I}m_{i}}{j}\bigg{(}q^{\sum\limits_{i=1}^{I}m_{i}+1-d-j}-1\bigg{)},&\text{otherwise}.\end{cases}$

$\hfill\Box$

###### Remark 4.1

In the proof of Theorem 3.2, For the cases $b=2$ and $b\geq 3$, we can see
that the method for giving the value of $F_{b,d}(L_{1},\ldots,L_{I})$ is
different. In fact, for $b=2$, the codeword $\mathbf{c}\in\mathcal{C}$ which
satisfy conditions $(\mathrm{F}1)$-$(\mathrm{F}2)$ is equivalent to all the
coordinates of $\mathbf{c}$ are nonzero, i.e., the Hamming weight of
$\mathbf{c}$ is equal to the length, and then $F_{b,d}(L_{1},\ldots,L_{I})$
can be obtained from the weight distribution of MDS code explictly. However,
for the general case $b\geq 3$, it might have zero in the coordinates of
codeword $\mathbf{c}\in\mathcal{C}$ which satisfy conditions
$(\mathrm{F}1)$-$(\mathrm{F}2)$. In order to give the value of
$F_{b,d}(L_{1},\ldots,L_{I})$, we need to establish the connection between
$F_{b,d}(L_{1},\ldots,L_{I})$ and $N_{b}(e_{i},L_{i}-m_{i})$ by using the
shorten method, which leads the form of the value
$F_{b,d}(L_{1},\ldots,L_{I})$ is more complicated than that of the case $b=2$.

##  5 Conclusions and Further Study

In this paper, we obtain the $b$-weight distribution for MDS codes, which is a
class of MDS $b$-symbol codes. For an MDS code $\mathcal{C}$, by calculating
the number of solutions for some equations and utilizing its shortened codes,
we give the connection between the $b$-weight distribution and the number of
codewords in shortened codes of $\mathcal{C}$ with special shape. Furthermore,
note thet shortened codes of $\mathcal{C}$ are MDS codes, and then the number
of these codewords with special shape are obtained by the shorten method. Our
result generalizes Theorem $1$ in [15].

The key points of our method is that the Hamming weight distribution for an
MDS code are uniquely determined by its parameters, and a shorten code of an
MDS code is also an MDS code. However, these points are not always true for an
MDS $b$-symbol code, but not an MDS code. Thus for an general MDS $b$-symbol
code, we can not determine its $b$-weight distribution by using the method in
this paper.

## References

  * [1] Brualdi, R. A., Introductory combinatorics (5th Edition). Pearson Education India (2009).
  * [2] Cassuto, Y., Blaum, M., Codes for symbol-pair read channels. IEEE Trans. Inf. Theory 57(12), 8011-8020 (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 (ISIT), 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] Ding, B., Zhang, T., Ge, G., Maximum distance separable codes for b-symbol read channels. Finite Fields Appl. 49, 180-197 (2018)
  * [8] 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 $p^{m}+up^{m}$. IEEE Access 7, 145039-145048 (2019)
  * [9] Dinh, H.Q., Nguyen, B.T., Sriboonchitta, S., MDS Symbol-Pair Cyclic Codes of Length 2$p^{s}$ over $p^{m}$. IEEE Trans. Inf. Theory 66(1), 240-262 (2020)
  * [10] 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)
  * [11] Huffman, W.C., Pless, V., Fundamentals of Error-Correcting Codes. Cambridge Univ. Press, Cambridge (2003)
  * [12] Kai, X., Zhu, S., Li, P., A construction of new MDS Symbol-Pair codes. IEEE Trans. Inf. Theory 61(11), 5828-5834 (2015)
  * [13] 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)
  * [14] 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)
  * [15] Ma, J., Luo, J., On symbol-pair weight distribution for MDS codes and simplex codes over finite fields. Cryptogr. Commun. 13, 643-653 (2021)
  * [16] Shi M., Özbudak F., Solé P., Geometric approach to $b$-symbol Hamming weights of cyclic codes. IEEE Trans. Inform. Theory 67(6), 3735–3751 (2021)
  * [17] Sun Z., Zhu S., Wang L., The symbol-pair distance distribution of a class of repeated-root cyclic codes over $\mathbb{F}_{p^{m}}$. Cryptogr. Commun. 10(4), 643–653 (2018)
  * [18] Yaakobi, E., Bruck, J., Siegel, P.H., Constructions and decoding of cyclic codes over $b$-symbol read channels. IEEE Trans. Inf. Theory 62(4), 1541-1551 (2016)
  * [19] Zhu, H., Shi, M., Özbudak, F., Complete $b$-symbol weight distribution of some irreducible cyclic codes. Des. Codes Cryptogr. 90, 1113–1125 (2022)