# Generalized Reed-Solomon Codes with Sparsest and Balanced Generator Matrices

We prove that for any positive integers n and k such that n≥ k≥ 1, there exists an [n,k] generalized Reed-Solomon (GRS) code that has a sparsest and balanced generator matrix (SBGM) over any finite field of size q≥ n+k(k-1)/n, where sparsest means that each row of the generator matrix has the least possible number of nonzeros, while balanced means that the number of nonzeros in any two columns differ by at most one. Previous work by Dau et al (ISIT'13) showed that there always exists an MDS code that has an SBGM over any finite field of size q≥n-1 k-1, and Halbawi et al (ISIT'16, ITW'16) showed that there exists a cyclic Reed-Solomon code (i.e., n=q-1) with an SBGM for any prime power q. Hence, this work extends both of the previous results.

## Authors

• 8 publications
• 29 publications
11/11/2020

### Sparse and Balanced MDS Codes over Small Fields

Maximum Distance Separable (MDS) codes with a sparse and balanced genera...
04/25/2022

### The equivalence of GRS codes and EGRS codes

Generalized Reed-Solomon and extended generalized Reed-Solomon (abbrevia...
01/24/2018

### Further Progress on the GM-MDS Conjecture for Reed-Solomon Codes

Designing good error correcting codes whose generator matrix has a suppo...
09/21/2018

### Galois Hulls of Linear Codes over Finite Fields

The ℓ-Galois hull h_ℓ(C) of an [n,k] linear code C over a finite field F...
02/14/2020

### Constructions of quantum MDS codes

Let F_q be a finite field with q=p^e elements, where p is a prime number...
01/23/2020

### Sorting Permutations with Fixed Pinnacle Set

We give a positive answer to a question raised by Davis et al. ( Discret...
09/16/2021

### Small PCSPs that reduce to large CSPs

For relational structures A, B of the same signature, the Promise Constr...
##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## I Introduction

Maximum distance separable (MDS) codes, especially Reed-Solomon (RS) codes, with constrained generator matrices are recently attracting attention for their applications in the scenarios where encoding is performed in a distributed way [1][11]. Examples of such scenarios include wireless sensor networks [1], cooperative data exchange [3, 4, 11], and simple multiple access networks [2, 6]. An interesting problem of this topic is how to construct MDS codes that have a sparsest and balanced generator matrix (SBGM), where sparsest means that each row of the generator matrix has the least possible number of nonzeros, while balanced means that the number of nonzeros in any two columns differ by at most one [1]. More specifically, in an SBGM of an MDS code, the weight of each row is and the weight of each column is either or .

In general, for every MDS code we can easily find a sparsest generator matrix. The difficulty of this problem is to ensure that a sparsest generator matrix is also balanced. In [1], it was shown that there always exists an MDS code with an SBGM over any finite field of size for any . The authors in [9] constructed an cyclic Reed-Solomon code i.e., that has an SBGM for any prime power and any such that . However, it was left as an open problem whether there exists an generalized Reed-Solomon (GRS) code with an SBGM for . In this paper, we extends the results in [1, 9] by proving that for any positive integers and such that , there exists an generalized Reed-Solomon code that has an SBGM over any finite field of size .

### I-a Related Work

MDS codes with more general constraints on the support of their generator matrices were studied in [2, 4, 5]. A conjecture, called GM-MDS Conjecture, was proposed in [5] stating that given any binary matrix that satisfies the so-called MDS Condition, there exists an MDS code for any prime power that has a generator matrix satisfying whenever , where the MDS Condition requests that for any , the union of the supports of any rows of has size at least .111Another conjecture which is equivalent to the GM-MDS Conjecture was proposed in [4]. Unfortunately, the GM-MDS Conjecture is proved to be true only for some very special cases, that is, a) the rows of are divided into three groups such that the rows within each group have the same support [2]; or b) the supports of any two rows of intersect with at most one element [5]; or c) [10].

## Ii Preliminary

For any positive integer , ; if , is the empty set. For any set , is the size i.e., the number of elements of . We denote by the field with elements, where

is a prime power. The support of a row/column vector over

is the set of its nonzero coordinates and the weight of a row/column vector is the size of its support.

A multiset with underlying set

is a set of ordered pairs

, where each is an integer, called the multiplicity of and denoted by . We also denote as , where each appears times in and is also called an element of . The size of is the sum of the multiplicities of its different elements, i.e., . Any subset of can be viewed as a multiset such that if , and if . If is another multiset, not necessarily , the union of and , denoted by , is .

Let denote the set of polynomials in of degree less than , including the zero polynomial, where is an indeterminant. Then is a -dimensional vector space over according to the usual addition and multiplication of polynomials. Let and be distinct elements of . The generalized Reed-Solomon (GRS) code defined by is [MacWilliams]:

 C={(f(a1),f(a2),⋯,f(an));f∈Pk[x]}.

The code is an MDS code, i.e., the minimum distance of is . A generator matrix of is said to be sparsest and balanced if satisfies the following two conditions:

1. Sparsest condition: the weight of each row of is exactly ;

2. Balanced condition: the weight of each column of is either or .

A GRS code that has a sparsest and balanced generator matrix (SBGM) is simply called a sparsest and balanced GRS code.

## Iii Existence of Sparsest and Balanced GRS Codes

In this section, we prove that there always exists a sparsest and balanced GRS code for any . Formally, we have the following theorem.

###### Theorem 1

For any , there exists an generalized Reed-Solomon code that has a sparsest and balanced generator matrix over any field of size .

Clearly, is an SBGM of the

GRS code; and the identity matrix is an SBGM of the

GRS code. Hence, in the following, we only need to consider the case of

 n>k≥2.

Before proving Theorem 1, we first prove two lemmas.

First, let be an -tuple of distinct indeterminants. For each subset of and , let be the th elementary symmetric polynomial with respect to . That is,

 s(0)Z(α)=1,

and for ,

 s(ℓ)Z(α)=∑U⊆Z~{}and~{}|U|=ℓ(∏j∈Uαj).

Then we have the following lemma.

###### Lemma 1

Suppose . There exists a binary matrix satisfying the following four conditions:

1. The weight of each row of is ;

2. The weight of each column of is either or ;

3. , where

 ξ(α)=∣∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣∣s(0)Z1(α)s(0)Z2(α)⋯s(0)Zk(α)s(1)Z1(α)s(1)Z2(α)⋯s(1)Zk(α)s(2)Z1(α)s(2)Z2(α)⋯s(2)Zk(α)⋯⋯⋯⋯s(k−1)Z1(α)s(k−1)Z2(α)⋯s(k−1)Zk(α)∣∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣∣, (1)

and is the support of the th row of , ;

4. The degree of each in is at most .

###### proof 1

First, consider . In this case, we have . Let such that for each and each , and otherwise. Then we have , and are mutually disjoint. It is easy to check that satisfies conditions (i) (iv).

In the following, we consider the case that . Since we have assumed , then we always have

 k(k−1)>n>k≥2.

For convenience, we write as

 k(k−1)=an+r (2)

where , and let

 δ =(δ1,δ2,⋯,δn) =(r (a+1)'sa+1,⋯,a+1, n−r r'sa,⋯,a). (3)

Here we point out some simple facts about and . First, since , if , then

 2≤a=⌊k(k−1)n⌋=⌈k(k−1)n⌉

if , then

So we always have

 δj∈{⌊k(k−1)n⌋,⌈k(k−1)n⌉}. (4)

and

 2≤a+1≤k−1. (5)

Moreover, by (2) and (1), we have

 n∑j=1δj=(a+1)r+a(n−r)=an+r=k(k−1). (6)

Construction of : The binary matrix is constructed by the following three steps.

Step 1. List the elements of the multiset

 S={(1,k−1),(2,k−2),⋯,(k−1,1)}

in a sequence

 ¯¯¯¯S =1,2,⋯,k−1,1,2,⋯,k−2,⋯,1,2,1 =c1,c2,⋯,cK (7)

where

 K=k−1∑ℓ=1ℓ=k(k−1)2. (8)

Then construct subsets of by Algorithm 1.

Step 2. List the elements of the multiset

 T={(k,k−1),(k−1,k−2),⋯,(2,1)}

in a sequence

 ¯¯¯¯T =k,k−1,k,k−2,k−1,k,⋯,2,3,⋯,k =e1,e2,⋯,eK (9)

and let

 θ=(θ1,θ2,⋯,θn)=δ−(|S1|,|S2|,⋯,|Sn|). (10)

Then construct subsets of by Algorithm 2.

Step 3. Let be the binary matrix such that for each , is the support of the th column of .

Two examples of our construction are given in Section IV. Moreover, we have the following three claims.

Claim 1. For each , is a subset of and, when viewed as multisets, we have , where is the value of at the end of the while loop of Algorithm 1.

Claim 2. For each , is a subset of and . Moreover, when viewed as multisets, we have .

Claim 3. Let . Then there exist a unique and a unique such that , where denotes the permutation group on and, for each , denotes the set of all tuples such that and , .

The proof of Claims 1 3 are given in Appendices A C, respectively.

Note that for each , . Then by Claims 1 and 2, each is contained by sets in the collection , where is the support of the th column of by our construction. So each row of has weight , hence condition (i) is satisfied.

For each , by (4), So by Claims 1, 2 and Algorithm 2, the weight of the th column of is , hence condition (ii) is satisfied.

For any multiset , let

 αX:=n∏j=1αℓjj.

Then from (1), we have

 ξ(α) =∑σ∈Sksgn(σ)k∏i=1s(σ(i)−1)Zi(α) =∑σ∈Sksgn(σ)∑(X1,X2,⋯,Xk)∈XσαX1αX2⋯αXk =∑σ∈Sksgn(σ)∑(X1,X2,⋯,Xk)∈XσαX1⊔X2⊔⋯⊔Xk. (11)

where denotes the sign of the permutation . By Claim 3, there exist a unique and a unique such that . So by (1), is a non-zero monomial in . Hence, and condition (iii) is satisfied.

Note that and each column of has weight either or , i.e., each is contained by at most sets in , where is the support of the th row of . So in (1), the degree of in each is at most . Hence, the degree of in is at most . Hence, condition (iv) is satisfied, which completes the proof.

###### Lemma 2

Suppose is a nonzero polynomial over the field such that the degree of each is at most . If , then there exist distinct such that .

###### proof 2

Similar to the Schwartz-Zippel Theorem, this lemma can be proved by induction on the number of indeterminants . First, for , has at most zeros in because the degree of is at most . So there exists an such that , provided that .

Now assume that , and the induction hypothesis is true for polynomials of up to indeterminants. Consider the polynomial . Without loss of generality, assume the degree of in is . Then we can factor out and obtain

 ξ(α1,α2,⋯,αn)=t∑i=0αi1ξi(α2,⋯,αn),

where . Clearly, the degree of each in is at most . The induction hypothesis implies that there exist distinct such that . Then the polynomial

 η(α1)=ξ(α1,a2,⋯,an)=t∑i=0αi1ξi(a2,⋯,an)≢0

and has degree . Note that . There exists an such that

 ξ(a1,a2,⋯,an)=η(a1)≠0.

This completes the induction.

Now we are able to prove Theorem 1.

###### proof 3 (Proof of Theorem 1)

Let be a binary matrix satisfying conditions (i) (iv) of Lemma 1. By Lemma 2, if , there exist distinct such that .

For each , let

 fi(x)=∏j∈Zi(x−aj) (12)

where is the support of the th row of . Clearly, , , , . Moreover, , , , are linearly independent in , which can be proved as follows. By (12), we have

 fi(x) =∏j∈Zi(x−aj) =xk−1+k−1∑ℓ=1⎡⎣∑U⊆Zi,|U|=ℓ(∏j∈Uaj)⎤⎦(−1)ℓxk−1−ℓ =xk−1+k−1∑ℓ=1s(ℓ)Zi(a1,a2,⋯,an)(−1)ℓxk−1−ℓ

for each . Denote and

 C= ⎡⎢ ⎢ ⎢ ⎢⎣11⋯1−c1,1−c2,1⋯−ck,1⋯⋯⋯⋯(−1)k−1c1,k−1(−1)k−1c2,k−1⋯(−1)k−1ck,k−1⎤⎥ ⎥ ⎥ ⎥⎦.

Then ,, , are linearly independent in if and only if . From (1), we can easily see that

 ξ(a1,a2,⋯,an)=(−1)1+2+⋯+(k−1)det(C).

Since , then . Hence, , are linearly independent in .

Now, let be the GRS code defined by and

 G=⎛⎜ ⎜ ⎜ ⎜⎝f1(a1)f1(a2)⋯f1(an)f2(a1)f2(a2)⋯f2(an)⋯⋯⋯⋯fk(a1)fk(a2)⋯fk(an)⎞⎟ ⎟ ⎟ ⎟⎠.

Since ,, , are linearly independent in , then is a generator matrix of .

By assumption, satisfies conditions (i) and (ii) of Lemma 1, that is, the weight of each row of is and the weight of each column of is either or . Moreover, by (12), for each and , if and only if , that is because is the support of the th row of . So according to the construction of , the number of zeros in every row of is and the number of zeros in every column of is either or . Equivalently, the number of ones in every row of is and the number of ones in every column of is either or . So satisfies conditions (P1) and (P2), hence is an SBGM of .

## Iv Examples of the Construction

As an illustration of our construction, consider the following two examples, which reflect two typical cases of the output of Algorithm 1.

###### Example 1

Let and . Then . So , and . According to (1), we have

 δ=(5,5,4,4,4,4,4,4,4,4)

and according to (1), we have

 ¯¯¯¯S=1,2,3,4,5,6,1,2,3,4,5,1,2,3,4,1,2,3,1,2,1.

By Algorithm 1, is divided into as follows:

 1,2,3,4,5S1,6,1,2,3,4S2,5,1,2,3S3,4,1,2,3S4,1,2S5,1S6 (13)

and . Hence,

 (|S1|,|S2|,⋯,|Sn|)=(5,5,4,4,2,1,0,0,0,0)

and according to (10), we have

 θ =δ−(|S1|,|S2|,⋯,|Sn|) =(0,0,0,0,2,3,4,4,4,4).

Moreover, according to (1), we have

 ¯¯¯¯T=7,6,7,5,6,7,4,5,6,7,3,4,5,6,7,2,3,4,5,6,7.

Then by Algorithm 2, we have and is divided into as follows:

 7,6T5,7,5,6T6,7,4,5,6T7,7,3,4,5T8,6,7,2,3T9,4,5,6,7T10.

So we obtain

 W=⎡⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢⎣1111110000111110001011110001101101001101101001110101001110110000111111⎤⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥⎦.

We can easily check that Claims 1 and 2 are true. We now check that Claim 3 is true. From (13), we have and

 X∗ ={(1,|S1|),(2,|S2|),⋯,(6,|S6|)} ={(1,5),(2,5),(3,4),(4,4),(5,2),(6,1)}.

Suppose

 X∗=X∗1⊔X∗2⊔⋯⊔X∗k

for some and some . We show that and are unique as follows.

First, note that for each , equals the weight of the th column of . Then considering the first four columns of , we have , , and . So it must be that and . Recursively, we obtain and ; and ; and . And hence, we have for each , and for .

Further, consider the first five columns of . Since , then and . So and . Similarly, considering the first six columns of , we can obtain and . And finally, we can obtain and .

Hence, and are uniquely determined. That is, Claim 3 is true.

As discussed in the proof of Lemma 1, satisfies conditions (i) (iv) of Lemma 1.

###### Example 2

Let and . Then . So , and . According to (1), we have

 δ=(4,4,4,3,3,3,3,3,3,3,3,3,3)

and according to (1), we have