## 1 Introduction

### 1.1 Preliminaries

Let be finite field with elements where is a prime power. For a linear code over with length , dimension and minimum distance , we define the locality as follows. Given , set , where is an arbitrary coordinate position. is the restriction of to the coordinate positions in . The linear code is a locally recoverable code with locality , if for each , there exists a subset of cardinality at most such that for any given . It was proved a Singleton-like bound for LRC codes in [12] and [22]

where is the smallest integer greater than or equal to . It is clear that , this upper bound is just the Singleton bound for linear codes when . A linear code attaining this upper bound is called an optimal LRC code. In coding theory linear codes attaining the Singleton bound are called MDS (maximal distance separable). Then the optimal LRC code is a generalization of the MDS (Maximal Distance Separable) code. We refer to [12, 22, 28, 31] for the background in distributed storage.

The main conjecture of MDS codes claims that the length of an MDS code over is at most , except some trivial exceptional cases. Many optimal LRC codes with large code length have been constructed. Hence the main conjecture type upper bound on the lengths of optimal LRC codes does not hold directly. However it is still a challenging problem to ask the maximal possible length of an optimal LRC code over any given finite field . We refer to [2, 26] for the discussion of the background. Considering the recent progress in [2, 15, 21, 30, 18] it is natural to ask that if there exists optimal LRC -codes with length and unbounded locality and unbounded minimum distances. In this paper we give an affirmative answer.

On the other hand almost and near MDS codes have been studied in coding theory. Almost MDS codes are linear codes satisfying . An almost MDS codes with its dual also almost MDS is called near MDS. We refer to [6, 5, 7, 3, 14, 9, 8] for almost and near MDS codes. For near MDS codes it was conjectured that their maximal lengths are around (see [8]). In [9] Corollary 8 it was proved that the length of an almost MDS code satisfies if and . In this paper we call the defect of the locality- LRC code. Many long -locality LRC codes with very large lengthes and small defects are also constructed, see Table 2.

The more general locally recoverable codes tolerating multiple erasures can be defined as follows. A linear code has -locality if each coordinate position is contained in a subset with cardinality such the restriction of to has minimum distance at least . In the case , it is just the LRC code with the locality . The Singleton-like bound for a linear code with -locality is

We refer the detail to [23, 1]. A code attaining this bound is called an optimal LRC code with -locality. Tamo-Barg good polynomial construction in [26] of -LRC codes can be generalized to optimal LRC codes with -locality. Some other optimal LRC codes with -locality were constructed in [23, 27, 4, 16].

### 1.2 Known LRC constructions

We summarize previous constructions of optimal LRC codes in [23, 29, 13, 15, 25, 26, 27, 2, 20, 19, 4, 16] as follows.

#### 1.2.1

1. Binary LRC codes over with large lengths: In [29] an almost optimal binary LRC code with and was constructed. In [13] a family of optimal binary cyclic LRC codes satisfying for some positive integer , , was constructed. In [17] some upper bounds on the minimum distances of LRC and constructions of binary LRC were given. Many interesting construction of LRC with small localities over binary or small fields were given in [32].

2. Optimal LRC codes over and with large lengths: In [29] optimal LRC codes over with , were constructed. In [2] an optimal LRC code over with was constructed. An optimal LRC code over with and some other optimal LRC codes over and with length and were also constructed in [2]. It was asked in [2] if there exists a family of optimal LRC codes over with length , and all values of . In [21] distance and optimal LRC codes with arbitrary lengths were constructed via cyclic codes. The locality has to satisfy some number-theoretic property in the result of [21].

3. Optimal LRC codes over with lengths up to : In [19] by the using of elliptic curves and other algebraic-geometric techniques, optimal LRC codes over with code length up to and locality were constructed. In the case , even, the locality of optimal LRC codes in [19] can be . To our knowledge this is the only known family of optimal LRC codes with larger distances over a general finite field with code lengths greater than field size. However the locality has to be smaller than or equal to .

#### 1.2.2

In [23] optimal LRC codes with and was constructed. Optimal cyclic LRC codes over any given finite field with and were constructed in [27]. In [26] optimal LRC codes over any given finite field with slightly smaller than were constructed by the using of good polynomials. This was extended in [20] to give more such optimal LRC codes over any given finite field with more possible values of the locality. In [27, 4, 16, 10] optimal -LRC codes with some special properties were constructed from cyclic codes. However few known optimal -LRC codes over have their lengths larger than . In all previous constructions minimum distances of long optimal LRC codes are bounded by some absolute constant.

Main open problem. In all above cases no optimal LRC code over with length and and unbounded minimum distance has been given.

In this paper we give an affirmative answer to this problem.

#### 1.2.3 Known asymptotic bound

.

In [1] Proposition 6.3 the following asymptotic bound for limits and for sequences of LRC codes with locality and lengths was established by using Garcia-Stichtenoth curves.

and

We will give new constructions of LRC codes with any given locality with better asymptotic bound in Section 4.

### 1.3 Our contribution and an open problem

In this paper we prove the following main result.

Main result. Over any given finite field , for a given positive integer , a given positive integer satisfying , and a positive integer , an optimal LRC code with the locality can be constructed.

We also extend our result to optimal -LRC codes.

Corollary 1.1. 1) For any prime power , we construct explicit optimal LRC code with locality over ;

2) For any prime power , we construct explicit optimal LRC code with locality over ;

3) For any prime power , we construct explicit optimal LRC code with locality over .

Compared with known optimal LRC codes in subsection 1.2.1 our construction gives a lot of longer optimal LRC codes with unbounded minimum distances. This shows that the lengths of optimal LRC codes can be very close to even with unbounded minimum distances. This is quite different to the main conjecture type upper bound on MDS codes.

Open Problem. From our construction and the result in [15] it is natural to ask if there exist LRC codes with length and unbounded localities and unbounded distances.

We give a new asymptotic bound as follows. It is better than Proposition 6.3 in [1] in some interval of .

Better asymptotic bound. Let be a square of a prime power. For any given locality , and any given real number , we have a sequence of -ary LRC codes with locality satisfying

and

.

## 2 Our construction

### 2.1 LRC codes

Let be a set and be any given finite field. The function is a function such that there exist sets of cardinality , , where are distinct elements in (then ). It is easy to construct the set and the function satisfying the above property. For example, , where is a set of cardinality and is the projection to the second factor. For any given

where , we consider the function

on . Let be a subset with distinct elements (then ) in . We denote elements of as , , then for . The subset consists of the following elements for and .

Proposition 2.1. We assume . If is zero on all points of the set , then .

Proof. We consider on the subset consisting of elements . Then

Since , this is a constant for all , set . Then the polynomial has roots . This implies that for all possible . Since , then the conclusion follows directly.

### 2.2 Recover procedure and minimum distance

Set be a linear subspace with dimension , we consider the linear code , , defined by

Since and for and in , this is a linear code with dimension from Proposition 2.1.

Definition 2.1. For any given , , is number of common roots in the set B of equations for . That is, there exist elements of the set , , such that

for and . We define .

Theorem 2.1. The locality of is at most , the minimum distance of is at least .

Proof. For a given coordinate position, say , if

, then the evaluation vector of

and at coordinate positions can not be the same. Otherwiseare the same for . Here we notice that for all . If the evaluation vectors above are the same, since are constants only depending on and , the two polynomials in of degree are the same at points . Then the two polynomials have to be the same, that is, for all . Then we have . On the other hand if the evaluation at the points , are given, then the coefficients can be solved from the Vandermonde matrix. Then the value

can be recovered. Here we notice that from the definition of the function . This is essentially the same as the recover procedure in page 4663 of [26]. Thus the locality is at most .

For any given , we consider

From Definition 2.1 the equation for , is valid for elements in the set . Then the number of zeros of in the set is at most

Actually for each , there are solutions. For any element in the set ,

is not a zero polynomial, then it has at most possibilities of the value satisfying

For each such , has at most one solution , since is fixed. The conclusion is proved.

### 2.3 Optimal LRC Code construction

#### 2.3.1

This case is trivial. In the case , it is clear . Then . When , . When , . That is we have a length , dimension , minimum distance optimal LRC code over with any given locality .

#### 2.3.2 d=3

Lemma 3.1. Let be a finite field satisfying . For linear subspaces ( copies) in ( copies), where is a dimension linear subspace in , , we can find a codimension linear subspace in ( copies) such that the intersection of with the union of these dimension linear subspaces is empty.

Proof.

Suppose linear independent vectors have been chosen, in the final step, if

, then we can find the desired linear independent vector in . The conclusion is proved.It should be noticed that when is small, the conclusion of Lemma 3.1 is not valid. For example if , is covered by hyper-planes defined , where .

In the above construction if is the full space , it is clear that can attain the maximal possibility , that is, for some , there are elements in the set , such that for all . Then in this case the minimum distance of the constructed optimal LRC code is . Then we show that of the constructed optimal LRC code can be enhanced if is satisfied.

For a equation

where are constant coefficients in considered as a point in the projective space , if roots are fixed, then is a fixed point in . Then for possibilities of roots in the set , they corresponds to points of coefficients in ( copies) satisfying that for and , where is any fixed elements in the set . From Lemma 3.1 if , there exists a codimension linear subspace of ( copies) such that these coefficient points are not in . That is for , at least for one of ,

can not have roots in the set . Hence in Theorem 2.1 can not be its maximal possibility , we have . From we have a linear code with length , dimension and distance . This code has locality and satisfies the Singleton-like bound. It is an optimal LRC code with and locality .

#### 2.3.3 General case

In general we consider the case that the equation

where are constant coefficients in considered as a point in the projective space , has at least roots in the set , where is a fixed positive integer in the set . For example, suppose are such roots. Then the equation is of the form

, where are variables. Then the coefficient points corresponds to a linear subspace in of dimension . We have such linear subspaces in ( copies). Hence from Lemma 3.1 if , a linear subspace in ( copies) with codimension can be found which has no intersection with these products of such linear subspaces. That is, we can find a linear subspace of ( copies) of codimension such that for , at least for one of ,

can not have roots in the set . Then . The Singleton-like upper bound is . From Theorem 2.1, the lower bound is . Hence the locality is and .

Therefore we have proved that the minimum distance of the constructed optimal LRC code can be enhanced when the field size is large. In the following part we prove that actually the same conclusion can be proved when the field size satisfies .

#### 2.3.4 Construction based on the Vandermonde matrix

The above construction depends on Lemma 3.1 with a ”counting points” argument. However the linear subspace of (of the coefficients ) defined by the condition that ”there are roots in the set ” is defined by a partial Vandermonde matrix as follows.

Hence if is satisfied, we can pick up distinct elements in . Then the codimension linear subspace in defined by the following partial Vandermonde matrix satisfying the requirement in Lemma 3.1. Actually a Vandermonde matrix from distinct elements is of rank .

The two conditions about the coefficient vector that

1)there are roots in the set and

2)in the subspace ,

correspond to a rank Vandermonde matrix. If the linear subspace has non-empty intersection with one of the linear subspaces in Lemma 3.1, the point in the intersection has to be a zero vector. This is a contradiction. Then we have the following result.

Theorem 2.2. For any given finite field , a positive integer , a positive integer , and a positive integer , an optimal LRC code with the locality can be constructed.

In the following Table 1 we give many long optimal LRC codes with very close to .

Table 1 Explicit optimal LRC codes with

locality | length | dimension | distance |
---|---|---|---|

6 | |||

7 | |||

8 | |||

9 | |||

10 | |||

11 | |||

12 | |||

13 |

## 3 Long optimal -LRC codes

Let be a positive integer. We construct a function as in section 2 and pick up subsets , where are distinct elements in , , . For any given

where , we consider the function

on . Let be a subset with distinct elements , then . We denote elements of as , . The subset consists of the following elements for and . Set be a linear subspace with dimension , we consider the linear code , where , defined by

This is a linear code with dimension . We have the following result.

Theorem 3.1. is a -LRC code, the minimum distance of is at least .

Proof. We consider the restriction of to the subset

Then the conclusion follows from a similar argument as the proof of Theorem.2.1.

When , then . Hence we get a -LRC code attaining the Singleton-like bound, with length . Hence for any given finite field , a positive integer , a locality where is any value in and is an arbitrary positive integer satisfying , an optimal -LRC code with length , dimension and minimum distance can be constructed.

For optimal -LRC codes we have the following result by a similar construction as in the proof of Theorem 2.2.

Corollary 3.1. For any given finite field , any given satisfying , a positive integer satisfying , a positive integer , an optimal -LRC code over with length , dimension , and distance can be explicitly constructed.

Hence many optimal -LRC codes with lengths are constructed.

## 4 Better asymptotic bound

Let be a smooth projective absolutely irreducible curve of genus defined over , be a set of -rational points, be a -rational divisor with its degree satisfying . Let be the base of , where . For any given value , we consider functions

defined on where and . For a given linear subspace of dimension in , we define a linear code