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  and 
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. This is a generalization of MDS (Maximal Distance Separable) codes. We refer to [5, 14, 20, 23] 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 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, 18] for the discussion of the background. Considering the recent progress in [2, 7, 13, 22, 10] 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.
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 [15, 1]. A code attaining this bound is called an optimal LRC code with -locality. Tamo-Barg good polynomial construction in  of -LRC codes can be generalized to optimal LRC codes with -locality. Some other optimal LRC codes with -locality were constructed in [15, 19, 3, 8].
1.2 Known LRC constructions
1.2.1 Case A:
1. Binary LRC codes over with large lengths: In  an almost optimal binary LRC code with and was constructed. In  a family of optimal binary cyclic LRC codes satisfying for some positive integer , , was constructed. In  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 .
2. Optimal LRC codes over and with large lengths: In  optimal LRC codes over with , were constructed. In  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 . It was asked in  if there exists a family of optimal LRC codes over with length , and all values of . In  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 .
3. Optimal LRC codes over with lengths up to : In  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  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 .
4. More general codes: In July, 2018 Guruswami, Xing and Chen proved in  an upper bound on the length of an optimal LRC code over satisfying . They also proved the existence of optimal LRC codes satisfying . In [22, 10] some optimal LRC with very close to and small distances were constructed. Our constructed LRC codes in the main result have longer lengths than the existence result in  and are in the range of the upper bound. The codes in our main result can be given explicitly.
In  optimal LRC codes with and was constructed. Optimal cyclic LRC codes over any given finite field with and were constructed in . In  optimal LRC codes over any given finite field with slightly smaller than were constructed by the using of good polynomials. This was extended in  to give more such optimal LRC codes over any given finite field with more possible values of the locality. In [19, 3, 8, 4] optimal -LRC codes with some special properties were constructed from cyclic codes. However few known optimal -LRC codes over have their lengths larger than .
Main open problem. In all above cases no optimal LRC code over with length and unbounded locality and unbounded minimum distance has been given.
In this paper we give an affirmative answer to this problem.
1.3 Tamo-Barg construction
We recall the Tamo-Barg construction of optimal LRCs in . Their construction rely on the existence of certain polynomials called good polynomials.
Let be any given finite field. A polynomial is called -good if and only if
1) The degree of is ;
2) There exist pairwise disjoint subsets of with cardinality , , such that the restriction of to , , is a constant.
For , if is an -good polynomial with degree . Set and , where . For any given , let . Set , then the code is a LRC code with and locality .
The condition is sufficient that each
is a non-zero vector for a non-zero. The degree of each considered as a polynomial in is at most . Then the minimum distance is at least . The fact that the locality is can be proved by the -goodness of the polynomial . It is clear that the length has to satisfy in the above construction. It was proved that the condition can be removed in .
Let be a finite field with cardinality and has a factor . Then has a subgroup with order . Then cosets are pairwise disjoint and . The polynomial is obviously constant on each such coset. This is an -good polynomial. An optimal LRC codes with code length can be constructed as in .
If we take a degree good polynomial on , where are pairwise disjoint, , , then the above construction gives an optimal -LRC code.
1.4 Our contribution and an open problem
In this paper we prove the following main result.
Main Theorem. For any given finite field , 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.
Open Problem: From our construction and the result in  it is natural to ask if there exist LRC codes with length and unbounded localities and unbounded distances.
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
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. Otherwise
are 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 . 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
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 .
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.
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.
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.
In this paper for any given finite field , any given and given satisfying , we give an optimal LRC code with length , locality and minimum distance . This is the only known family of optimal LRC codes with , unbounded localities and unbounded distances. The construction is an extension of Tamo-Barg good polynomial construction. We speculate there exists optimal LRC codes with , unbounded localities and unbounded distances.
-  A. Barg, I. Tamo and S. Vlǎduţ, Locally recoverable codes on algebraic curves, IEEE Transactions on Information Theory, vol.63, no. 8, pp. 4928-4939, 2017.
-  A. Barg, K. Haymaker, E. W. Howe, G. Matthews and A. Várilly-Alvarado, Locally revoerable codes from algebraic curves and surfaces, in Algebraic Geometry and Coding Theory and Cryptography, E. W. Howe, K. E. Lauter and J. L. Walker, Editors, Springer, pp. 95-126, 2017.
-  B. Chen, S. T. Xia, J. Hao and F. W. Fu, Construction of optimal cyclic locally repairable codes, IEEE Transactions on Information Theoru, vol. 64, no. 4, pages 2499-2511, 2018.
-  W. Fang and F. Fu, Optimal cyclic locally reparable codes, with unbounded length, ITW 2018, pp.1-5, 2018.
-  P. Gopalan, C. Huang, H. Simitci and S. Yekhanin, On the locality of codeword symbols, IEEE Transactions on Information Theory, vol.58, no. 11, pp. 6925-6934, 2011.
-  S. Goparaju and R. Calderbank, Binary cyclic codes that are locally repairable, Proc. IEEE Int. Symp. Inf. Theory (ISIT), June/July 2014, pp. 676-680.
-  V. Guruswami, C. Xing and Y. Chen, How long can optimal locally repairable codes be? arXiv:1807.01064v1, July 3, 2018.
-  L. Holzbaur, R. Freij-Hollanti and A. Wachter-Zeh, Cyclic codes with locality and Availability, arXiv:1812.06897v2,2019.
-  P. Huang, E. Yaakobi, H. Uchikawa and P. I. Siegel, Binary linear reparable codes, IEEE Transactions on Information Theory, vol. 62, no.11, pp. 6268-6283, 2016.
-  L. Jin, Explicit construction of optimal locally recoverable codes of distance 5 and 6 via binary constant weight code, CoRR, abs/1808.04558, 2018.
-  X. Li, L. Ma and C. Xing, Optimal locally repairable codes via elliptic curves, IEEE Transactions on Information Theory, vol.65, no. 1, pp. 108-117, 2019.
-  J. Liu, S. Mesnager and L. Chen, New construction of optimal locally recoverable codes via good polynomials, IEEE Transactions on Information Theory, vol.64, no. 2, pp. 889-899, 2018.
-  Y. Luo, C.Xing and Y. Chen, Optimal locally repairable codes of distances and vial cyclic codes, IEEE Transactions on Information Theory, vol. 65, no.2, pp. 1048-1053, 2019.
-  D. S. Papailiopoulos and A. G. Dimakis, Locally repairable codes, IEEE Transactions on Information Theory, vol.60, no. 10, pp. 5843-5855, 2014.
-  N. Prakash, G. M. Kamath, V. Lalitha and P. V. Kumar, Optimal linear codes with a local-error-correction property, Proc. IEEE Int. Symp. Inf. Theory (ISIT), July 2012, pp. 2776-2780.
-  M. Shahabinejad, M. Khabbazian and M. Ardakani, An efficient binary locally repairable code for Hadoop distributed file systems, IEEE Commun.Lett., vol. 18, no. 8, pp. 2776-2780.
-  N. Silberstein, A. S. Rawat, O. O. Koyluoglu and S. Vishwanath, Optimal locally repairable codes via rank-distance codes, Proc. IEEE Int.Symp.Inf.Theory (ISIT), July, ppp. 1819-1823, 2013.
-  I. Tamo and A. Barg, A family of optimal locally revoerable codes, IEEE Transactions on Information Theory, vol.60, no. 8, pp. 4661-4676, 2014.
-  I. Tamo, A. Barg, S. Goparaju and R. Calderbank, Cyclic LRC codes, binary LRC codes, and upper bounds on cyclic codes, [Online]. Available: http://arxiv.org/abs/1603.08878, 2016.
-  I. Tamo, A. Barg and A. Frolov, Bounds on the parameters of locally recoerable codes, IEEE Transactions on Information Theory, vol.62, no. 6, pp. 3070-3083, 2016.
-  T. Westerbäck, T. Ernvall and C. Hollanti, Almost affine locally repairable codes and matriod theory, Proc. IEEE Inf. Theory Workshop(ITW), Nov. 2014, pp. 621-625.
-  C. Xing and Y. Chen, Construction of optimal locally revorable codes and connection with hypergraph, arXiv:1811.09142v2, 2018.
-  M. Ye and A. Barg, Explicit construction of high-rate MDS array codes with optimal repair bandwidth, IEEE Transactions on Information Theoy, vol. 63, no. 4, pp. 2001-2014, 2017.
-  A. Zeh and E, Yaakobi, Optimal linear and cyclic locally repairable codes over small fields, ITW 2015, April 2015.