Let be the finite field of order , where and is a prime. An -linear code of length over is an -subspace of dimension of .
Symbol-pair read channels, in which the outputs of the read process are pairs of consecutive symbols, were studied by Cassuto and Blaum  in 2011. In the same paper, the pair weight and the pair distance of linear codes (see Definition 2.3 below) were defined, which can be used to check and correct pair errors from read channels. This new paradigm was motivated by the limitations of the reading process in high density data storage systems. Chen, Lin and Liu  presented three lower bounds for the minimum pair distance of constacyclic codes and obtained new MDS symbol-pair codes with minimum pair distance seven and eight through repeated-root cyclic codes. In , Liu, Xing and Yuan presented the list decodability of symbol-pair codes and a list decoding algorithm of Reed-Solomon codes beyond the Johnson-type bound in the pair weight. In  and , the authors calculated the symbol-pair distances of repeated-root constacyclic codes of lengths and , respectively. In , Yaakobi, Bruck and Siegel generalized the notion of symbol-pair weight to -symbol weight, and they considered the case where the read channel output is the number of consecutive symbols with . The authors provided some extensions of several concepts, results, and code constructions to this setting.
Motivated by cryptographical applications, the algebraic structure of linear codes from a new perspective was studied. By viewing the minimum Hamming weight as a certain minimum property of subspaces of dimension one, the notion of generalized Hamming weights was introduced in coding theory by Wei . These weights were described in a geometric setting in . The generalized Hamming weights were introduced to codes over finite chain rings and principal ideal rings, and bounds on the minimum generalized Hamming weights were given in . In , two general formulas on for irreducible -cyclic codes were presented using Gauss sums, and the weight hierarchy was completely determined for several cases, where is the -minimal Hamming weight of the code. In , The authors investigated the generalized Hamming weights of three classes of linear codes constructed through defining sets.
The Hamming equiweight code is a linear code of the constant weight for all nonzero codewords. This class of codes was firstly studied by Weiss  in 1966. In the same paper, Weiss gave a necessary and sufficient condition for a linear code to be a Hamming equiweight code. In , Wood determined completely the structure of linear equiweight codes over , where the weights include: Hamming weight, Lee weight and pre-homogeneous weights.
MacWilliams  and later Bogart, Goldberg, and Gordon  proved that, every linear isomorphism preserving the Hamming weight between two linear codes over finite fields can be extended to a monomial transformation. This classical result was called MacWilliams extension theorem. In , Wood proved MacWilliams extension theorem for all linear codes over finite Frobenius rings equipped with the Hamming weight. In the commutative case, he showed that the Frobenius property was not only sufficient but also necessary. In the non-commutative case, the necessity of the Frobenius property was proved in .
Compare with the Hamming weight of a code, the pair weight is a new weight and it can be used widely to check and correct pair errors in the communication system of symbol-pair read channel. This gives that the study of some special classes of linear codes with pair weights is interesting and valuable. Furthermore, MacWlliams extension theorem for the Hamming weight case is a fundamental result in classical coding theory. However, this result is not true in general for the pair weight case. The study of this fundamental result for the pair weight case is a challenge problem. In this paper, we first introduce the notion of generalized pair weights of an -linear code over a finite field and the notion of pair -equiweight codes, where . Then we characterize the generalized pair weights of linear codes over finite fields. We study the relationship between the pair equiweight codes and the pair -equiweight codes for any . Finally, we provide the MacWilliams extension theorem for the pair weight case.
This paper is organized as follows. Section 2 gives some preliminaries, the definition of the generalized pair weights of linear codes and a characterization of the pair weight of any codeword of linear codes. In Section 3, we give some basic results and bounds about the generalized pair weights of linear codes. In Section 4, we first obtain a necessary and sufficient condition for a linear code to be a pair equiweight code. Then we provide a relationship between the pair equiweight code and the pair -equiweight code for . Necessary and sufficient conditions for an -linear code to be a pair -equiweight code are given when and . A sufficient condition for an -linear code to be a pair -equiweight code is also obtained when . In Section 5, we give and prove the MacWilliams extension theorem for the pair weight case.
Throughout this paper, let be the finite field of order , where and is a prime. Let be a positive integer, and let be the
-dimensional vector space over. An -subspace of dimension of is called an -linear code. If , then is the zero code. We assume all codes in this paper are nonzero linear codes.
Let be a finite abelian group. A character of is a group homomorphism , where is the multiplication group of all nonzero complex numbers. The character of which maps all elements in to is called the trivial character, denoted by . Let be the finite group of all characters of , then as an abelian group. The following result is well-known.
() Assume the notation is given above. Let . Then
Let , and let be a primitive th root of unity in . Then for any is a nontrivial character of , where is the trace function from to its prime subfield . It turns out that any other character of has the form , where . Define a scalar operation on as follows:
where . Then is a vector space of dimension one over .
If , an arbitrary vector space of dimension over , we denote by the -dual space of . Then we have the following -linear isomorphism, denoted by again:
where for any ().
The following corollary is straightforward from Lemma 2.1.
() Assume the notation is given above. Let and . Then
Let be the map which is defined as
for any . The definition of the pair distance and the pair weight in was given by Cassuto and Blaum  in 2011 as follows.
() For any , the pair distance between and is defined as
where the indices are taken modulo . The pair weight of is defined as
Let be a code over . The minimal pair distance of is defined as
The pair weight of is defined as Note that if is an -linear code, then .
The following generalized Hamming weights of any -subspace of and the -minimal Hamming weight of -linear codes over for were defined by Wei .
() Let be an -subspace of . The Hamming support of , denoted by , is the set of all non-always-zero bit positions of , i.e.,
and the generalized Hamming weight of is defined as .
() Let be an -linear code over . For , the -minimal Hamming weight of is defined as .
Note that if , the -minimal Hamming weight of is just the minimal Hamming weight of . In , the following result was proved.
([13, Theorem 1]) Let be an -linear code over . Then we have
The set is called the generalized Hamming weight hierarchies.
The following definition of the Hamming -equiweight code over for was defined in  in 2003.
Let be an -linear code over and . We say that is a Hamming -equiweight code if for any subspace of dimension of .
Let be the set of all matrices over . For , let denote the transpose of . Let be the set of all invertible matrixes over . A monomial matrix over is a square matrix such that in every row and in every column there is exactly one nonzero element. Let denote the set of all the monomial matrices over .
Let and be two -linear codes over . Then there exists an -linear isomorphism which preserves Hamming weights if and only if there exists a monomial matrix such that for all .
In this paper, we introduce the notion of generalized pair weights of any -subspace of and -minimal generalized pair weight of -linear codes over , where .
Let be an -subspace of . The pair support of , denoted by , is the set of non-always-zero pair-positions of , i.e.,
where and the indices are taken modulo . The generalized pair weight of is defined as .
Let be an -linear code over . For , the -minimal pair weight of is defined as .
If , the -minimal pair weight of the code is just the minimal pair weight of .
Let be an -vector space of dimension . We denote by the subspace generated by the subspaces of , and let denote the quotient space modulo . For any , let
be the set of all subspaces of dimension of . Let denote the number of all -dimensional subspaces of -dimensional vector space . It is easy to see that . In particular, .
Let be an -linear code with a generator matrix , where is the column vector of . Let be the set of all natural numbers. For any , the function is defined as follows.
Using the function , for , we define the function to be
for any . When , we let be the zero function.
The function is defined as follows. For any ,
And the function induced by is defined to be
for any and . When , let be the zero functions. Let be the function from to for .
For an -linear code over with a generator matrix , we know that for any nonzero codeword , there exists a unique nonzero vector such that , where . We have
Assume the notations are given above. Let . Then for any , .
By the definitions of and , we have
The dimension of could be for a generator matrix of an -linear code . If , we can construct a new linear code with a generator matrix and a linear isomorphism from to keeping the pair weight invariant. Without loss of generality, we will assume that for a generator matrix of a linear code in the rest of the paper.
Let be an -linear code over and , we say that is a pair -equiweight code if for any subspace of dimension of .
If , the Hamming -equiweight code is the Hamming equiweight code as usual, and a pair -equiweight code is a pair equiweight code. In general, a Hamming equiweight code is not a pair equiweight code.
Let be the linear code with a generator matrix over . Then is a pair equiweight code but not a Hamming equiweight code. Let be the linear code with a generator matrix over . Then is a Hamming equiweight code but not a pair equiweight code.
The following proposition gives a method to construct a pair equiweight code from a Hamming equiweight code.
Let be an -linear code over with a generator matrix , and be a -linear code over with a generator matrix , where is the column zero vector. Then for any , is a Hamming -equiweight code if and only if is a pair -equiweight code.
Let be a map from to such that for any . Then is an -linear isomorphism and . The rest part of the proposition is trivial. ∎
3 Generalized pair weights of linear codes
In this section, we give some general properties of the generalized pair weights of linear codes. We obtain some bounds about the generalized pair weights of linear codes.
We first give a description on the relationship between the Hamming weight and the pair weight for any -subspace of . If , then . We have the following lemma.
Let be an -subspace of , and suppose . Let be a minimal partition of the set to subsets of consecutive indices (Indices may wrap modulo ) such that each subset and being the smallest integer that achieves such partition. Then .
If , there exists such that . Then the two pairs and are not and . Hence . Since , we have and
Hence . ∎
Let be an -linear code over . Then we have
for any .
If , then .
If , then .
(a) For , let be an -subspace of such that and . If , then
Let be an -subspace of such that and . Since , by Lemma 3.1, we have . Hence .
(b) We have by Lemma 3.1 since . Hence
(c) If , then . ∎
Let be an -linear code over with . Then we have
The inequlaity is trivial for . For any subspace of over with one dimension, there exists such that . Hence and .
For any , by Lemma 2.6, we have . Note that there exists a subspace of such that and by the definition of the -minimal pair weight of . If , then
There exists an -subspace of such that and by Lemma 2.6. Then and hence . Without loss of generality, we can assume . Then there exists an index such that , where the indices are taken modulo . Let . We know that , and . Hence and . Therefore, for . ∎
There exists a linear code of length such that . For example, let be the linear code over with generator matrix . Then we have .
Let be an -linear code over with . Then
if then .
if and only if .
(a) We first prove implies . Suppose otherwise that . Then there exists an index such that , where the indices are taken modulo . Let
We know , and . Hence and . Therefore, we have
which is a contradiction.
(b) By (a), , hence . Therefore, . ∎
The claim of ” implies ” is not true in general. For example, let be a -linear code over with the generator matrix . Then , and .
Let be an -linear code over . Then
for all , .
(a) By Theorem 3.3, for all , we get
The proof of (b) is also straightforward from Theorem 3.3. ∎
For an -linear code over , the upper bound for all and in the last corollary is called Singleton Bound respect to the generalized pair distance of the linear code . If satisfies for all and , then is called a maximum generalized pair distance separable code (MGPDS). In particular, when , we get which is the Singleton Bound of the pair distance of . And if satisfies , then is called a maximum pair distance separable code (MPDS).
Let be an -linear code over . Then is an MPDS code if and only if is an MGPDS code.
It is trivial by using the inequality in the proof of Corollary 3.6. ∎
4 Symbol pair -equiweight codes
In this section, we study symbol pair -equiweight codes. Before we provide our main theorems in this section, we need some notions and a lemma.
Recall that , where with . For convenience, we assume if . For