On Partial Maximally-Recoverable and Maximally-Recoverable Codes S. B. Balaji and P. Vijay Kumar, Fellow,IEEE Department of Electrical Communication Engineering, Indian Institute of Science, Bangalore. Email: [email protected], [email protected] Abstract—An [n,k] linear code C that is subject to locality distance under a weaker notion called information-symbol constraints imposed by a parity check matrix H0 is said to locality was derived in [1]: be a maximally recoverable (MR) code if it can recover from any erasure pattern that some k-dimensional subcode of the k d ≤ (n−k+1)− ⌈ ⌉−1 . (1) null space of H0 can recover from. The focus in this paper min r 5 is on MR codes constrained to have all-symbol locality r. (cid:18) (cid:19) 1 Given that it is challenging to construct MR codes having Thesameboundalsoappliestocodeswithall-symbollocality 0 small field size, we present results in two directions. In the and is often (but not always) tight, see [2] for instance. The 2 first, we relax the MR constraint and require only that apart Pyramid codes introduced in [3] are shown in [1] to be an from the requirement of being an optimum all-symbol locality n example of codes with information-symbol locality that are code, the code must yield an MDS code when punctured in a a single, specific pattern which ensures that each local code is optimalwithrespecttothisbound.Theexistenceofcodewith J punctured in precisely one coordinate and that no two local all-symbol locality was established in [1] for the case when 8 codessharethesamepuncturedcoordinate.Wetermthesecodes (r+1)|n. Codes with locality also go by the names locally 2 as partially maximally recoverable (PMR) codes. We provide a repairable codes [4] or local reconstruction codes [5]. simple construction for high-rate PMR codes and then provide ] a general, promising approach that needs further investigation. A class of codes with all-symbol locality known as ho- T In the second direction, we present three constructions of MR momorphic self-repairing codes were constructed in [6] with I codes with improved parameters, primarily the size of the finite the aid of linearized polynomials. An example provided in . s field employed in the construction. [6] is optimal with respect to the bound in (1). A general c [ Index Terms—Distributed storage, codes with locality, maxi- construction of optimal codes with all-symbol locality is mally recoverable codes, partial-MDS codes. providedin [7],thatisbased ontheconstructionofGabidulin 1 maximum rank-distance codes. An upper bound on minimum v I. INTRODUCTION distance,similar to thatin (1), was derivedin [4], thatapplies 0 3 In a distributed storage network, each file is regarded as a also to non-linear codes. Also provided, in [4], is an explicit 1 message,encodedintoacodewordbyaddingredundancy,and construction of a class of linear, optimal all-symbol locality 7 storedinthenetwork.Eachcodesymbolistypicallyplacedon codespossessingavectoralphabet.Thisconstructionisrelated 0 adifferentnodetoprovideresiliencyagainstnodefailure.Both to an earlier construction in [8], of codes termed as simple . 1 replicationandReed-Solomoncodesarecommonlyemployed regenerating codes. Most recently, Tamo and Barg [9] have 0 to protect data but have their drawbacks. While replication provided general constructions for optimal codes with all- 5 incurs largeoverhead,RS codes are inefficientwhen it comes symbol locality. 1 to node repair. The notion of codes with locality introduced : v in [1], was motivated in part, by this shortcoming of an RS B. Maximally Recoverable Codes i X code. The notion of a maximally recoverable code is most easily r defined in terms of the generator matrix G of the code. a A. Codes with Locality Let C be an [n,k] code that satisfies the all-symbol, r Definition 1: [1] An [n,k] code C of block length n and locality-r constraints imposed by a parity-check matrix H . 0 dimension k is said to have all-symbol locality r if for every LetC denotethenullspaceofH andG bethecorrespond- 0 0 0 code symbol c in C, the dual code C⊥ contains a codeword ing generator matrix. Then C is said to be an MR code with i with supportL satisfying i∈L and |L |≤(r+1). We will respect to H if for any collection of k linearly independent i i i 0 callL therecoverysetforcodesymboli.Weassumew.l.o.g. columns in G , the corresponding columns of G are also i 0 that L 6⊂ ∪ L . We will write [n,k] to indicate an linearly independent. i j∈[n], j6=i j r [n,k]codewithsuchall-symbollocalityr and[n,k,d] ifthe The construction of optimum codes with locality given in r code has minimum distance d. [9], has field size on the order of block length. A principal Codes with all-symbol locality have the property that the code constructed in their paper corresponds to a subcode number of code symbols that need to be accessed to repair a of an RS code. The coordinates of this code are grouped failednodeisatmostr.Thefollowingboundontheminimum together in accordance with cosets of a cyclic subgroup of the group of nth roots of unity. The subcode of the RS code with improved parameters, primarily field size. is selected so that the restriction of the RS code to a coset II. PARTIAL MAXIMUM RECOVERABILITY of size (r + 1) corresponds to evaluation of a polynomial of degree (r−1), thus providing locality. The degree of the Given thatthe constructionof MR codeshaving small field encoding polynomials is shown to be such that the resulting sizeischallenging,weseekheretoconstructcodesthatsatisfy codesareoptimalwithrespecttotheminimumdistancebound a weaker conditionwhich we will refer to in this paper as the in (1). Theauthorsin [10] definea generalnotionof maximal partial maximally recoverable (PMR) condition. Let C be an recoverable codes and provide a construction for maximally [n,k]r code having all-symbol locality and whose minimum recoverable codes of field size nk−−11 . In [11], a general distancesatisfiestheboundin(1)withequality.LetLi denote form of parity-check matrix was considered with the aim of the recoverysets. In the contextof PMR codes,an admissible (cid:0) (cid:1) constructing MR codes. These codes are referred to in [11] puncturing pattern {e1,e2,··· ,em} is one in which the {ei} as partial MDS codes. The authors provide conditions under satisfy the condition: which the proposed form of parity-check matrix defines an MR code and identify explicit parameter sets for which their e ∈ L \ L . i i j construction results in an MR code. A particular instance of their construction has field size O(2n), where n in the block j∈[m[], j6=i lengthofthecode.Forthecaseofasingleglobalparitycheck, A PMR code is then defined simply as an optimal all- theauthorsprovideaconstructionwherethefieldsizeisO(n). symbol locality code which becomes an MDS code upon The authors of [12], construct codes termed as sector-disk puncturing under some admissible puncturing pattern. The (SD) codes. These are codes which for certain puncturing parity-checkmatrixofaPMRcodeischaracterizedbelow.We patternsassociatedtoacombinationofdiskandsectorfailures assume w.l.o.g. in the section below, that {e1,e2,··· ,em) = result in MDS codes. The authors provide a construction for (1,2,··· ,m) through symbol reordering. the case of 2 global parities for handling the correction of A. Characterizing H for a PMR Code a single or double erasure in each local code and present a parameter range for which their construction satisfies the Theorem 2.1: Let C be a PMR code as defined above for requirementof an SD code through computer search. In [13], admissible puncturing pattern e = {e1,...,em}. Then C can be assumed to have parity-check matrix of the form: the authors present a construction for maximally recoverable codes with 2 global parities with field size of O(n) that can I F m handle single erasures through local error correction. In [14], a construction of SD codes with 2 global parities is provided H = (m×k0) , [0] H havingfieldsizeofO(n)tohandleoneortwoerasuresineach |M{zD}S localcode.Thiswassubsequentlystrengthenedin[15],where (∆×k0) aconstructionofSDcodeandpartialMDScodewasprovided whereH istheparity-checkma|tri{xzo}fan[k ,k −∆]MDS MDS 0 0 for 2 globalparities having field size of O(n) that can handle code and F is of the form: any number of erasures through local error correction. xt In [16], a family of explicit, MR codes for single local 1 xt epraarsituieresccoarnrebcetioanrbiistraprryo.viIdteids iansswumhiecdhhtheerentuhmatbe(rro+f 1g)lo|banl F = ..2. whereristhelocalityparameterofthecode.Theparitycheck xt m matrix in [16] has the same form as in [11] except that the in which each x is a vector of Hamming weight at most r. authors use variables to fill up the entries of the parity check i Proof: Clearly, H can be assumed to be of the form matrix and then proceed to derive conditions needed to be satisfied by these variables in order to yield an MR code. Im F In [17], a relaxation in the definition of an MR code is H = (m×k0) , proposed. Here the authors seek to correct a select set of H H 1 |{z2} erasure patterns. Each codeword is put into matrix form in (∆×k0) such a way that each row corresponds to a local code. A vector is used to specify the number of columns of this code which can be transformed, upon row|{zr}eduction to the form: matrix in which erasure can occur, the maximum number of I F m erasuresallowedwithin eachcolumnas wellasthe maximum numberofcompletecolumnerasurespermitted.Aconstruction H = (m×k0) . [0] H satisfying these requirements is provided. |{z3} In the present paper, a relaxation of the MR criterion (∆×k0) termed as a partial maximally recoverable (PMR) criterion is It is desired that upon puncturing|{tzh}e first m coordinates presented and a simple, high-rate construction provided. Also (corresponding to coordinates of the identity matrix I in m contained in the paper are three constructions of MR codes the upper left), the code be MDS. But since the dual of a puncturedcodeis the shortenedcodeinthe same coordinates, H , it is not hard to see that it suffices to show that any MDS itfollowsthatH mustbetheparity-checkmatrixofanMDS (∆+1) columns of 3 code. F H = , B. A Simple Parity-Splitting Construction for a PMR Code a HMDS (cid:20) (cid:21) when ∆≤(r−1) are linearly independent. But the rowspace of F contains the We will assume throughout the rest of the paper that C is vector xt, hence it suffices to show that any (∆+1) columns an [n,k] code where (r+1)|n and having parameters m,∆ of r given by: H = HMDS = H b xt 0 n = m(r+1), k = mr, (cid:20) (cid:21) 0 are linearly independent,but this is clearly the case, since H 0 k = k −∆ = n−(m+∆). 0 istheparity-checkmatrixofanMDScodehavingredundancy Thus ∆ represents the number of “global” parity checks (∆+1). imposed on top of the m “local” parity checks. Remark 1: The construction gives rise to codes having Assume that ∆≤(r−1). Let H be the the (∆+1×k ) parameters [m(r+1),mr−∆,∆+2]r and hence, high rate: 0 0 parity-check matrix of an MDS code. Let xt be the last row ∆+1 r R = 1− ≥ 1− . of H0 and H1 be H0 with the last row deleted, i.e., m(r+1) m(r+1) H III. A GENERALAPPROACH TOPMRCONSTRUCTION H = 1 . 0 xt We attempt to handle the general case (cid:20) (cid:21) Intheconstruction,wewillrequirethatH alsobetheparity- ∆ = ar+b, 1 check matrix of an MDS code and set H = H . For MDS 1 in this section and outline one approach. At this time, we are example, this is the case when H is either a Cauchy or 0 onlyabletoprovideconstructionsforselectedparameterswith a Vandermonde matrix. Let {xt}m be the m contiguous i i=1 ∆ = 2r−2 and field size that is cubic in the block length component (1×r) vectors of xt defined through of the code and hold out hope that this construction can be xt = xt xt ··· ,xt . generalized. 1 2 m ThedesiredminimumdistanceofthePMRcode(withHas Let F be given by (cid:0) (cid:1) giveninTheorem2.3andH chosentobeaVandermonde MDS xt matrix) can be shown to equal in this case, 1 xt k F = 2 ... . d := dmin = (n−k+1)−(cid:18)⌈r⌉−1(cid:19) xtm = (m+∆+1)− ⌈mr−∆⌉−1 r (cid:18) (cid:19) = ∆+2+a. Lemma 2.2: Itfollowsthateventhecodeontherighthavingparity-check mr−∆ ∆ ⌈ ⌉ = m−⌊ ⌋. matrix r r F H = , pun H MDS (cid:20) (cid:21) Theorem 2.3 (Parity-Splitting Construction): The [n,k] musthavethesamevalueofd andtherefore,thesubmatrix min code C having parity-check matrix H given by formed by any (d−1) columnsof H must have full rank. pun Im F LetAbethesupportofthissubsetof(d−1)columnsofHpun. Let this supporthave non-emptyintersection with the support H = [0] (Hm×k0) , of s local codes and the support of the intersection with the |M{zD}S ith code being A of size |A | = ℓ . The correspondingsub i i i (∆×k0) matrix will then take on the form: withH ,F,x asgivenabovea|nd{∆z }≤(r−1),haslocality MDS i a1(θ1i) r, the PMR property and minimum distance achieving the a2(θ2i) bound ... d = (n−k+1) − ⌈k⌉−1 ··· 1 ··· ··· 1 ··· ··· ··· as(1θsi) ··· , min = ∆+2. (cid:18) r (cid:19) ······ θθ112ii ······ ······ θθ222ii ······ ······ ······ θθss2ii ······ ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· Proof: We need to show that any (∆+1) columns of ··· θ1∆i−1 ··· ··· θ2∆i−1 ··· ··· ··· θs∆i−1 ··· H are linearly independent.From the propertiesof the matrix wherea (x)arethepolynomialswhoseevaluationsprovide i the local parities. Since we want this matrix to have full rank a) Numerical Evidence: Computer verification was car- (d−1) it must be that the left null space of the matrix must ried out for the ∆ = 5,r = 3 case for n = 12 over F (24)3 be of dimension (∆+s)−(∆+a+1) = s−(a+1). and n = 36 over F with h = α(i−1)β(ij) where α is (26)3 ij Computing the dimension of this null space is equivalent to the primitive element of F and F respectively for the two 24 26 computing the number of solutions to cases and β(ij) is fifth and seventh root of unity respectively (the choice of fifth and seventh roots of unity varies for each s ℓi (x−θ ) i,j). For both cases, it was found that the elements A,B,C kl c a (θ ) = f(x), i i ij (θ −θ ) never simultaneously vanished for all instances. ij kl Xi=1 Xj=1 (k,lY)6=(i,j) IV. MAXIMAL RECOVERABLE CODES where f(x) is generic notation for a polynomial of degree A. A Coset-Based Construction with Locality r=2 ≤(∆−1). Let us define Since this constructionis based on Construction1 in [9] of ℓi (x−θ ) all-symbol locality codes, we briefly review the latter here. kl Ei(x) = ai(θij) , Let n = m(r+1), and q be a power of a prime such that (θ −θ ) Xj=1 (k,lY)6=(i,j) ij kl n≤ (q−1), for example, q could equal (n+1). Let α be a primitive element of F and β an element of order (r+1). q andnotethateachE (x)willingeneral,havedegree(∆+a). i Let Consider the matrix E whose rows correspond to the coeffi- cients of Ei(x). It follows that the first (a+1) columnsof E Ai = αi−1{1,β,β2,··· ,βr}, 1≤i≤m. must have full rank. Note that {A }m are pairwise disjoint and partition [n]. Let i i=1 k = ar+b. Let the supports of the local codes be A ,1 ≤ i A. Restriction to the Case a=1, i.e., r ≤∆≤2r−1 i ≤ m. Note that the monomial xr+1 is constant on each of We now assume that a = 1 so that (a+1) = 2 and we the sets Ai. Let us set need the first 2 columns of E to have rank =2. We consider a−1r−1 b−1 the (2×2) sub matrix made up of the first two rows and first f(x) = a xj(r+1)+i + a xj(r+1)+i, ij ij two columns of E. The determinantof this (2×2) upper-left j=0i=0 j=ai=0 XX XX matrix formed of E is given by where the second term is vacuous for b = 0, i.e., is not present when r | k. Consider the code C of block length n ℓ1 a1(θ1j) ℓ1 a1(θ1j)(P(k,l)6=(1,j)θkl) and dimension k where each polynomial is associated to a det j=1 P1j j=1 P1j PP=ℓj2=−1da2eP(tθ2j2j) ℓjPP1=1ℓj2=a11P(aθ12j1j(θ)2j)(Pℓj(P1=k2,j1l)6=a(12(,jθP)11jθj)kθl1)j dealniesdmtinhecantstscmoodifneiSwmomiu=rmd1oAdbiit.satTiannhecidsebcdyomdeievnapslouatsaistsiefnsygsientshgea(l1pl-)os.lyymnobmolialolcaatltihtye " Pℓj2=1 a2P(θ2j2j) Pℓj2=1 a2(θP22jj)θ2j # eacNhotpeoltyhnaotmthiealefxp(xo)nesnattsisefyinet6=herm(omnoomdiral+te1rm).sItfoirsmtihnigs where P P propertythispropertythatgivesthecodeitslocalityproperties. OurconstructionofanMRcodehereisbasedontheabove P = (θ −θ ) construction with parameters given by n = q−1,r =2,k = ij ij kl 2D+1 so that a = D and b = 1. Thus the local codes all (k,lY)6=(i,j) havelength3. Letus denotethe algebraicclosure ofF by F. q This is equal to Theorem 4.1: Given positive integers N,D with 2D < 2 N 3 and ℓ1 ℓ2 a (θ )a (θ ) 1 1j 2 2t (θ −θ ). (N −1) P P 1j 2t q > Σ2D ⌊jg(j)⌋ 3 3j +N −2, j=1t=1 1j 2t j=2 j XX (cid:18) (cid:19) where Let ∆ = 2r −1 and a (θ ) = θ , a (θ ) = θ , θ = 1 1j 1j 2 2t 2t ij ξ+h , h ∈F and ξ ∈ F \F . Then this becomes: 1 for j even and 2(D−1)≥j ≥4 ij ij q q3 q g(j) = 1 otherwise, (cid:26) 2 ℓ1 ℓ2 ξ2+ξ(h +h )+h h 1j 2t 1j 2t there exists an [N,k = 2D+1] MR code with r = 2 that is (θ −θ ) j=1t=1 (cid:0) P1j(θ1j)P2t(θ2t) (cid:1) 1j 2t obtainedfromC bypuncturingthecodeatacarefullyselected XX set of s = q−1 − N cosets {A ,A ,··· ,A }. =Aξ2+Bξ+C 3 3 i1 i2 is Proof: Please see the Appendix A . with A,B,C ∈ F which will be nonzero if the minimum Example 1: Let k = 5,n = 15. The condition in the q polynomial of ξ over F has degree = 3, unless all the theorembecomesq >499whereas,theoptimizedconstruction q given in [16] requires a field size of 214. The construction in coefficients are equal to zero. [10] requires q > n−1 =1001. k−1 (cid:0) (cid:1) B. Modification of Construction by Blaum et al. for ∆=2 xt = (x , x ,··· , x ) i i1 i1 ir in [15], the authors provide a construction for an MR is a maximally recoverable code for any H with a field MDS code (the code is referred to as a partial MDS code in their size of O(n∆−1) (for fixed r,∆). paper). We present a modification of this construction here. Proof: The proof is skipped for lack of space. The modification essentially amounts to a different choice of The above construction can be extended in a straight for- finite-field elements in the construction of the parity check ward manner to give maximal recoverable codes with field matrix given in [15] for the partial MDS code. The modified size of O(n∆−1) when the matrix F is made up of blocks of parity-check matrix is provided below. δ×(r+1) local codes where we correct δ erasures in each local code. H 0 ··· 0 0 0 H ··· 0 ACKNOWLEDGMENT 0 H = ... ... ... ... , The authorswould like to thankP. Gopalanfor introducing us to this problem and for subsequent, useful discussions. 0 0 ··· H 0 H1 H2 ··· Hm REFERENCES where [1] P. Gopalan, C. Huang, H. Simitci, and S. Yekhanin, “On the Locality of Codeword Symbols,” IEEE Trans. Inf. Theory, vol. 58, no. 11, pp. 1 βδ β2δ ··· β(r)δ H = , 6925–6934, Nov.2012. j αj−1 αj−1β−1 αj−1β−2 ··· αj−1β−(r) [2] N. Prakash, V. Lalitha, and P.V. Kumar, “Codes with locality fortwo (cid:18) (cid:19) erasures,” in IEEE International Symposium on Information Theory, and 2014,2014,pp.1962–1966. [3] C.Huang,M.Chen,andJ.Li,“Pyramidcodes:Flexibleschemestotrade 1 1 1 ··· 1 spaceforaccessefficiencyinreliabledatastoragesystems,”inNetwork 1 β1 β2 ··· βr ComputingandApplications,2007.NCA2007.SixthIEEEInternational 1 β2 β4 ··· β2r Symposium on. IEEE,2007,pp.79–86. H = . 0 ... ... ... ... ... [4] iDn.ISn.foPrampaatiiloionpoTuhloeosryandPrAoc.eeGd.inDgsim(aIkSiIsT,),“L2o0c1a2llyIErEepEairIanbtelerncaotidoensa,”l Symposium on,july2012,pp.2771–2775. 1 βδ−1 β2(δ−1) ··· βr(δ−1) [5] C.Huang,H.Simitci,Y.Xu,A.Ogus,B.Calder,P.Gopalan,J.Li,and Intheabove,αisaprimitiveelementofF andβ isaψthroot S.Yekhanin,“Erasurecodinginwindowsazurestorage,”inProceedings q of the 2012 USENIX conference on Annual Technical Conference, ser. of unity for any ψ ≥r+1 and hence ψ divides q−1. Using USENIX ATC’12. Berkeley, CA, USA: USENIX Association, 2012. the closed-form expression for the determinant given in [15], [Online]. Available: http://dl.acm.org/citation.cfm?id=2342821.2342823 it can be seen that this construction yields an MR code with [6] F. Oggier and A. Datta, “Self-repairing homomorphic codes for dis- tributed storage systems,” in INFOCOM, 2011 Proceedings IEEE. field size q−1≥ψm. Note that the field size is independent IEEE,2011,pp.1215–1223. of δ. [7] N. Silberstein, A. S. Rawat, and S. Vishwanath, “Adversarial Error Resilience in Distributed Storage Using MRD Codes and MDS Array V. NON-EXPLICIT CONSTRUCTION OF MRCODES WITH Codes,”CoRR,vol.abs/1202.0800, 2012. O(n∆−1)FIELD SIZE [8] D. Papailiopoulos, J. Luo, A. Dimakis, C. Huang, and J. Li, “Simple regenerating codes: Network coding forcloud storage,” inINFOCOM, In this section we provide a construction for MR codes 2012Proceedings IEEE,march2012,pp.2801–2805. derived by ensuring that certain polynomialconstraints which [9] I.TamoandA.Barg, “Afamilyofoptimal locally recoverable codes,” IEEE Transactions on Information Theory, vol. 60, no. 8, pp. 4661– reflect the rank conditions the parity-check matrix of an MR 4676,2014. code has to satisfy, hold. Our starting point is the canonical [10] M.Chen,C.Huang,andJ.Li,“Onthemaximallyrecoverableproperty form of the parity-check matrix for an MR code given in formulti-protection groupcodes,(toappear.” [11] M. Blaum, J. Hafner, and S. Hetzler, “Partial-MDS Codes and their Theorem 2.1. In our construction, the sub-matrix H is MDS ApplicationtoRAIDTypeofArchitectures,”CoRR,vol.abs/1205.0997, fixedandweshowtheexistenceofassignmentofvaluestothe 2012. local parities corresponding to the elements of F that result [12] J. S. Plank and M. Blaum, “Sector-disk (SD) erasure codes for mixed failure modesinRAIDsystems,”TOS,vol.10,no.1,p.4,2014. in an MR code. Our approach yields improved field size in [13] M.Blaum,“Construction ofPMDSandSDcodes extending RAID5,” comparison with the approach in Lemma 32 of [16]. CoRR,vol.abs/1305.0032, 2013. Theorem 5.1: There exists a choice of x such that [14] M.BlaumandJ.S.Plank,“ConstructionoftwoSDcodes,”CoRR,vol. ij abs/1305.1221, 2013. I F [15] M.Blaum,J.S.Plank,M.Schwartz, andE.Yaakobi, “Construction of m partialMDS(PMDS)andsector-disk(SD)codeswithtwoglobalparity H = (m×k0) , symbols,”CoRR,vol.abs/1401.4715, 2014. [0] H [16] P.GopalanandC.HuangandB.JenkinsandS.Yekhanin,“Explicitmax- |M{zD}S imallyrecoverablecodeswithlocality,”arXivpreprintarXiv:1307.3150, (∆×k0) 2013. [17] M.LiandP.P.C.Lee,“STAIRcodes:ageneralfamilyoferasurecodes | {z } xt for tolerating device and sector failures in practical storage systems,” 1 in Proceedings of the 12th USENIX conference on File and Storage xt F = 2 ... 2Te0c1h4n,oplopg.i1e4s,7–F1A6S2T.2014,SantaClara,CA,USA,February17-20,2014, xt m APPENDIX A previous sentence (roots of f1 − f2 satisfies R(D)) there PROOFS OF THEOREMSON MAXIMAL RECOVERABILITY can be atmost 2D distinct zeros in the N − l evaluation positions. This is a contradiction as N − l = 2N > 2D Proof of Theorem 4.1: The code C has optimum min- 3 (by the condition 2D < 2 given in the theorem). Hence imum distance w.r.t locality r = 2 [1]. Hence puncturing at N 3 if we choose l cosets such that for any pattern e and any any number of cosets (local codes) without changing k will 2D distinct elements X ,..,X from the l cosets after maintain the optimum minimumdistance. We say that e is an 1 2D puncturing by e, none of X ,..,X from F such that admissible puncturing pattern if e⊂[N] and |e∩L | = 1, 2D+1 3D i X ,..X satisfiesR(D)whicharedistinctfromX ,...,X all i. 1 3D 1 2D lieinthechosencosetsafterpuncturingbyethenwearedone. Let F be the algebraicclosure ofF . Throughoutthe proof q wheneverwesayapatterneorjuste,itreferstoanadmissible Proposition 1: LetS beasetofelements3Aelementsfrom puncturingpattern for an [N,k] code with all symbollocality F satisfying R(A) and S contains αiH for some i then S− r. Throughout the discussion any [N,k] code referred to are αiH satisfies R(A−1). polynomial evaluation codes and we assume that the set of Proof: Since S satisfies R(A), this implies evaluation positions of the [N,k] code to be ordered. We use σ (S)=0 for i=1,..,A. ealsotoindicatetheactualfinitefieldelementsatthepositions 1+3(i−1) indicated by the puncturing pattern e in the set of evaluation σ (S)=σ (αiH)σ (S−αiH)+ 1+3(i−1) 3 1+3(i−1)−3 positions of the [N,k] code. σ (αiH)σ (S−αiH)+ Maximal Recoverability: 2 1+3(i−1)−2 Let l= N. σ1(αiH)σ1+3(i−1)−1(S−αiH)+σ1+3(i−1)(S−αiH) 3 We denote an encoding polynomial of C by f(x) and we assumef 6=0.LetH denotethecyclicgroupofcuberootsof unity.LetαbeaprimitiveelementinFq.If{X1,...X3D}⊂F σ3(αiH)=a,σ2(αiH)=0,σ1(αiH)=0, for some a6=0. are the roots of f(x) then it must satisfy: Hence σ1(X1,...,X3D)=0 σ (S)= aσ (S−αiH)+ 1+3(i−1) 1+3(i−1)−3 σ4(X1,...,X3D)=0 σ (S−αiH) 1+3(i−1) . . . For i = A, σ (S −αiH) = 0 as S −αiH has 1+3(A−1) σ (X ,...,X )=0 only 3(A−1) elements. 1+3(D−1) 1 3D Hence, where σ refers to the ith elementary symmetric function. i Lets denote the above set of conditions based on elementary σ1+3(A−1)(S)=aσ1+3(A−1)−3(S−αiH) symmetric functions on X ,...,X by R(D). 1 3D Hence If we have a [N,k =2D+1] maximally recoverable code based on the theorem and let H ,...H be the chosen cosets σ (S)=0=>σ (S−αiH)=0 1 l 1+3(A−1) 1+3(A−1)−3 ofevaluationpositionsforformingthecodewordofthe[N,k] for i=A−1, maximally recoverable code and if we puncture this [N,k] codeby a patterne then forthe resulting[N−l,k](assuming σ (S)= aσ (S−αiH)+ 1+3(A−2) 1+3(A−2)−3 k doesnt change after puncturing) code to be MDS we need σ (S−αiH) d =N−l−k+1=N−2D−l. Based on the degreeof 1+3(A−2) min f(x), we know that d ≥N −l−deg(f)=N −l−3D. Since, σ (S)=0 and σ (S−αiH)=0, this min 1+3(A−2) 1+3(A−2) Hence out of 3D roots of f(x), we want atleast D roots implies that σ (S−αiH)=0 1+3(A−2)−3 to lie outside H − e(1),..,H − e(l) for any e. In other 1 l words its enough if we choose l cosets such that for any By induction, if we assume, σ (S−αiH)=0 then 1+3(i−1) {X ,...,X } ⊂ F which satisfies the condition R(D), since σ (S)=0, we have 1 3D 1+3(i−1) atmostonly2Ddistinctelementswilllieinthechosenlcosets σ (S −αiH) = 0 (i = A is the starting condition 1+3(i−1)−3 after puncturing by any e. Note that this condition will also of the induction which we already proved). ensure that the dimension of a N −l length punctured code Hence S−αiH satisfies R(A−1). obtained by puncturingthe [N,k] code by a pattern e is k for Claim: anye.Ifnotthereare2distinctnonzeromessagepolynomials Its enough to choose l cosets such that for any (A ≤ D) f (x),f (x) which after evaluating at l cosets of evaluation and any X ,...,X (contained in the chosen l cosets) which 1 2 1 2A positions of the [N,k] code yields the same codeword after are distinct and containsatmost one element from each coset, puncturing by a pattern e to N − l length. This means none of the X ,..,X from F such that X ,...,X 2A+1 3A 1 3A f −f is anothernonzero message or evaluationpolynomial satisfies R(A), which are distinct from X ,...,X lies in 1 2 1 2A with N − l zeros in the chosen l cosets after puncturing the chosen l cosets after puncturing by e for any e disjoint by e but by the condition of choosing cosets mentioned in from X ,...,X . 1 2A Proof: Fromhereonwe proceedto finda setofl cosetssatisfying This is because if X ,...,X satisfying R(D) contains at R (l) and R (l). We proceed by choosing 1 coset at each 1 3D 1 2 least 2 element from some coset αiH for some i, since the step inductively until we choose the required set of l cosets. polynomial f (x) = (x−X )...(x−X ) restricted to any At each step we select and add one coset to our list and 1 1 3D coset is a degree 1 polynomial, the third element from coset throw away a collection of cosets from the cosets not chosen. is also a root of f . Hence the entire coset is contained in Let the cosets chosen upto ith step be G(i) and the cosets 1 X ,...,X and by similar reasoning X ,...,X can be thrown upto ith step be T(i) and let the total collection of 1 3D 1 3D writtenasX1,...,X3(D−j)∪αi1H∪...αijH forsomei1,...,ij cosets in the field Fq be W. where X ,...,X contains at most one element from 1 3(D−j) each coset and satisfies R(D−j) by proposition 1. 1) The first coset is chosen to be any coset. Hence G(1) Now by the property of the chosen cosets, we have consists of just the coset chosen. We don’t throw away any that for any distinct X ,...,X from the chosen l cosets atthis step. Hence T(1)is empty.G(1) satisfies R (1) 1 2(D−j) 1 cosets containing atmost one element from each coset, and R (1) trivially. 2 any of X ,...,X which are distinct from 2(D−j)+1 3(D−j) X ,...,X such that X ,...,X satisfies R(D−j) 2) The second coset is also chosen to be any coset 1 2(D−j) 1 3(D−j) will not lie inside the chosen cosets after puncturing by from W −G(1). Hence G(2) consists of the 2 chosen cosets. e for any e such that e ∩ {X ,...,X } = ∅. Wlog R (2): 1 2(D−j) 1 this implies the chosen cosets after puncturing by any e For A = 1, and for any 2A = 2 distinct elements can contain atmost only (writing only distinct elements) X ,X , one from each coset in G(2), any X such that 1 2 3 X1,...,X2(D−j)∪αi1H −e(i1)∪...αijH −e(ij) of the 3D σ1(X1,X2,X3) = 0 cannot be distinct from X1,X2 and lie elements. Hence there can be atmost 2(D−j)+3j−j =2D in any of the cosets in G(2). If it does, wlog let X and X 1 3 rootsoutof3Drootsinsidethechosencosetsafterpuncturing lie in same coset which is in G(2) then X = −(X +X ) 2 1 3 by any e. Hence we are done. but every coset is a coset of cube roots of unity. Hence X +X +X = 0 where X is the third element from the 1 3 From here we term a set of l cosets satisfying the above same coset as X ,X . Hence X = −(X + X ) which 1 3 1 3 claim, to be satisfying R (l). implies X = X but X is in the same coset as X ,X and 1 2 1 3 We are going put another set of conditions R (l) on a set of X is in the other coset in G(2). Hence a contradiction. 2 2 l cosets. The necessity of this condition will be clear in the This implies that additive inverse of sum of 2 distinct proof. elements from differentcosets cannotlie in the same coset as the 2 elements. R (l): For A ≥ 2, 2A ≥ 4, we need to pick 4 distinct elements, 2 A given set of l cosets, is said to satisfy condition R (l) if, from distinct cosets but there are only 2 cosets in G(2). 2 For any 1 ≤ A ≤ D and any X1,...,X2A(contained in the Hence R1(2) is satisfied. chosen l cosets) which are distinct and contains atmost one element from each of l cosets, the matrix P(A) given by R (2): 2 P(A)= For A=1, P (1)=[1],P (1)=[1], hence non-singular. 1 2 For A≥2, we need to pick 2A≥4 and 2A−1≥3 distinct 1 0 ··· ··· 0 σ3(S) σ2(S) ··· ··· σ3+1−A(S) elements from distinct cosets but there are only 2 cosets. ... ... ... ... ... Hence R2(2) is satisfied. σ3(i−...1)(S) σ3(i−1)...−1(S) ··...· ·.·.·. σ3(i−1)+...1−A(S) T(2): 0 ··· σ2A(S) σ2A−1(S) σ2(A−1)(S) ForeverytwodistinctelementsX1,X2 chosenonefromeach isnon-singular, where S ={X1,...,X2A}. of the 2 cosets in G(2), find the third element X3 such that σ (X ,X ,X )=0andthrowawaythecosetinW−(G(2)) 1 1 2 3 Furthermore, for any 3 ≤ A ≤ D and any X1,...,X2A−1 which contains it. Since G(2) satisfies R1(2), X3 will either (contained in the chosen l cosets) which are distinct and not lie any coset in G(2) or won’t be distinct from X1,X2. containsatmostoneelementfromeachofl cosets,thematrix In the first case, we throw the coset and in the latter case, P (A) given by we don’t do anything. There are 3x3=9 possible summations 1 P1(A)= X1+X2 butifX1+X2+X3 =0thenθ(X1+X2+X3)=0 1 0 ··· ··· 0 and θX is in the same cosetas X for any cube rootof unity 3 3 σ3(...S) σ2(...S) ··...· ·.·.·. σ3+1−...A(S) θco.sHetesncaendsowluetitohnroswfoarw9aypotshseibsele3sucmosmetast.ions lie in atmost 3 σ3(i−...1)(S) σ3(i−1)...−1(S) ··...· ·.·.·. σ3(i−1)+...1−A(S) 3) Let i ≥ 2D and assume we have G(i) satifying 0 ··· 0 σ2A−1(S) σ2(A−1)(S) is non-singular. where S ={X1,...,X2A−1}. R1(i),R2(i). T(i): a) For everyA≤D, Choose 2A cosets (say H ,...,H ) out let S ={X ,...,X } and S ={X ,...,X ,X }. 1 2A 1 1 2A−1 1 2A−1 2A ofG(i)cosets,andchooseX ,...,X onefromeachofthese P(A)= 1 2A 2Acosets,nowfindthesetofallX ,...,X fromF such 2A+1 3A 1 0 ··· ··· 0 that σ (X ,...,X ) = 0,...,σ (X ,...,X ) = 0 1 1 3A 1+3(A−1) 1 3A σ3(S) σ2(S) ··· ··· σ3+1−A(S) and throw away all the cosets in which X2A+1,...,X3A lies. ... ... ... ... ... GSwii(nlilc)ee.iItGhne(trih)beesfiantriossttfidceiasssteRin1wc(teif)r,doomthnetXde1ol,e.ma.n.,eyXntths2iAnignoraXnwd2iAlil+nl1ite,h.e.o.u,lXtastit3deAer σ3(i−...1)(S) σ3(i−1)...−1(S) ··...· ·.·.·. σ3(i−1)+...1−A(S) case, we throw away these cosets. 0 ··· σ2A(S) σ2A−1(S) σ2(A−1)(S) = To find the number of solutions X ,...,X such that 2A+1 3A σ (X ,...,X ) = 0,...,σ (X ,...,X ) = 0, we 1 1 3A 1+3(A−1) 1 3A solve for X ,...,X given X ,...,X . 1 0 ··· ··· 0 It can b2Ae+1seen th3Aat to sat1isfy σ12A(X1,...,X3A) = σ3(i−1σ)(3S(S1)1)++σσ30......(2i(−S11−)1X)(2SA1)X2A σ3(i−1)−σ1(2S(S1)1)++σ·σ3·......(·1i(−S11)−)X1−21A(S1)X2A σ2A−1··(··S......··1)X2A σ2A−1(S1)+σ··..2··..A··..−1−1(S1)X2A σ3(i−σσ123)(++A11−−−1AA)(((SSS111)))+++σσσ233......((+Ai−1−−11)A+)−−111−((ASS−11))1XX(S221AA)X2A. 0,...,σ (X ,...,X )=0, The determinant of above matrix P(A) can be seen as a 1+3(A−1) 1 3A σ1(X2A+1,...,X3A),...,σA(X2A+1,...,X3A) has to satsify a polynomialinX2AanditsdegreeisatmostA−1.Theconstant linear equation of the form termofthispolynomialisthedeterminantoffollowingmatrix: 1 0 ··· ··· 0 P(A−)[[σσ1((XX2,A.+..,1X,...,X),3.A..,)σ,...,σA(X2(AX+1,...,,X...3,AX)]t =)]t σ3(...S1) σ2(...S1) ··...· ·.·.·. σ3+1−...A(S1) 1 1 2A 1+3(A−1) 2A+1 3A since G(i) satifies R2(i), P(A) is non singular and there σ3(i−1...)(S1) σ3(i−1)...−1(S1) ··...· ·.·.·. σ3(i−1)+...1−A(S1) is a unique solution, for 0 ··· 0 σ2A−1(S1) σ2(A−1)(S1) The above matrix is non-singular for A ≥ 3 sinceG(i) [σ (X ,...,X ),...,σ (X ,...,X )] which 1 2A+1 3A A 2A+1 3A satisfies R (i). Hencethe det(P(A)) asa polynomialin X implies a unique solution for X ,...,X . Hence 2 2A 2A+1 3A is a non-zero polynomial (has a non zero constant term), and for a given distinct X ,...,X , from distinct cosets, 1 2A since its degree is atmost A−1, it can have atmost A−1 there is a unique solution for X ,...,X such that 2A+1 3A solutions for X . Hence its enough to throw away these σ (X ,...,X )=0,...,σ (X ,...,X )=0. Hence 2A 1 1 3A 1+3(A−1) 1 3A A−1 cosets containing these A−1 solutions. itsenoughtothrowtheseAcosetscontainingX ,...,X 2A+1 3A The above procedure is done for every choice of 2A − 1 (unique solution). cosets from G(i) cosets and every choice of X ,...,X 1 2A−1 from the chosen 2A−1 cosets. The aboveprocedureis donefor everychoice of 2A cosets from G(i) cosets and every choice of X ,...,X from the 1 2A The number of cosets thrown are atmost: chosen 2A cosets. |G(i)| 32A−1(A − 1). It can be seen that det(P(A)) is 2A−1 a homogenous polynomial in X ,...,X and hence as Hence the total number of cosets thrown are atmost (cid:0) (cid:1) 1 2A |G(i)| 32AA but if for X ,...,X , X ,...,X before if for X1,...,X2A−1,X2A, det(P(A)) = 0 then 2A 1 2A 2A+1 3A for θ(X ,...,X ,X ) also det(P(A)) = 0. Hence its put together satisfies R(A) then for θ(X ,...,X ), 1 2A−1 2A (cid:0) (cid:1) 1 2A enough to throw away atmost: |G(i)| 32A−2(A−1). θ(X2A+1,...,X3A) (which doesn’t change the cosets of 2A−1 X2A+1,..,X3A for any cube root of unity θ) satisfies R(A) For A = 1, P(A) = [1] wh(cid:0)ich is(cid:1) trivially non- singular and this choice is unique as seen before. Hence out of 32A and we don’t do anything. For A = 2, choose 3 cosets from choices for X ,...,X from a given chosen 2A cosets, its enough to thro1w away2Acosets for 32A choices of X ,...,X . G(i) and choose distinct X1,X2,X3 one from each of these 3 1 2A distinct cosets, now find the set of all X such that P(A) is 4 singular. This X can’t be in any coset in G(i) which doesnt Hence the total number of cosets thrown are atmost 4 contain X ,...,X as G(i) satisfies R (i). If X lies in the |G(i)| 32A−1A. 1 3 2 4 2A coset which contains any of X ,...,X , then we don’t do 1 3 (cid:0) b) F(cid:1)or every 3 ≤ A ≤ D, Choose 2A − 1 cosets (say anything.If X4 lies outside G(i), we throw the coset. To find the number of solutions of X for a given X ,...,X such H ,...,H ) outofG(i) cosets, andchooseX ,...,X 4 1 3 1 2A−1 1 2A−1 that P(A) is singular, one from each of these 2A−1 cosets, now find the set of all X fromF such that P(A) is singular. ThisX can’tbe in 2A 2A anycosetinG(i)whichdoesntcontainX1,...,X2A−1 asG(i) det(P(A))=σ2(X1,X2,X3,X4)= satisfies R (i). If X lies in the cosetwhich containsanyof 2 2A σ (X ,X ,X )+X σ (X ,X ,X ) 2 1 2 3 4 1 1 2 3 X ,...,X ,thenwedon’tdoanything.IfX liesoutside 1 2A−1 2A G(i), we throw the coset. To find the number of solutions of Given the chosen X ,X ,X , the above expression for 1 2 3 X for a given X ,...,X such that P(A) is singular, det(P(A)) can be seen as a linear expression in X . if 2A 1 2A−1 4 σ (X ,X ,X )=0,σ (X ,X ,X )=0then(X−X )(X− is non zero (because G(i) satisfies R (i)), we have that the 2 1 2 3 1 1 2 3 1 2 X )(X−X )=X3−X X X =X3−γ.Here X ,X ,X determinant of the matrix mentioned before corresponding to 2 3 1 2 3 1 2 3 constitutes the solution set for X3 = γ but X H also the constant term of the polynomial det(P (A)) is also non 1 1 constitutes 3 solutions for the equation X3 =γ but there can zero. Hence the det(P (A)) as a polynomial in X is 1 2A−1 beatmost3solutionsfortheequationX3 =γ.HenceX H = a non-zero polynomial (has a non zero constant term), and 1 {X ,X ,X } which implies they all belong to same coset since its degree is atmost A−1, it can have atmost A−1 1 2 3 whichisa contradiction.Henceeitherσ (X ,X ,X )6=0or solutions for X . Hence its enough to throw away these 2 1 2 3 2A−1 σ (X ,X ,X ) 6= 0 which implies det(P(A)) is a non zero A−1 cosets containing these A−1 solutions. 1 1 2 3 degree 1 polynomial in X . Hence we can find the solution The above procedure is done for every choice of 2A − 2 4 and throw away the coset containing it. cosets from G(i) cosets and every choice of X ,...,X 1 2A−2 The number of cosets thrown are atmost: |G(i)| 33 but by from the chosen 2A−2 cosets. 3 similar argument as before we can see that the number of cosets thrown are atmost: |G(i)| 32 (cid:0) (cid:1) The number of cosets thrown are atmost: 3 c) For every 3 ≤ A ≤ D, Choose 2A − 2 cosets (say |G(i)| 32A−2(A − 1). It can be seen that det(P (A)) (cid:0) (cid:1) 2A−2 1 H ,...,H ) outofG(i) cosets, andchooseX ,...,X is a homogenous polynomial in X ,...,X and hence 1 2A−2 1 2A−2 1 2A−1 (cid:0) (cid:1) one from each of these 2A−2 cosets, now find the set of all as before if for X ,...,X ,X , det(P (A)) = 0 1 2A−2 2A−1 1 X2A−1 fromF such thatP1(A) is singular. ThisX2A−1 can’t then for θ(X1,...,X2A−2,X2A−1) also det(P1(A)) = 0. beinanycosetinG(i)whichdoesntcontainX1,...,X2A−2as Henceitsenoughtothrowawayatmost: |2GA(−i)2| 32A−3(A−1). G(i)satisfiesR (i).IfX liesinthecosetwhichcontains 2 2A−1 (cid:0) (cid:1) any of X1,...,X2A−2, then we don’t do anything. If X2A−1 4) Followingthe previousstep, we want to select one more lies outside G(i), we throw the coset. cosettoformG(i+1)suchthatitsatisfiesR (i+1),R (i+1) 1 2 To find the number of solutions of X2A−1 for a given : X1,...,X2A−2 such that P1(A) singular, Choose any coset (say) H1 from the collection W −(T(i)∪ let S1 ={X1,...,X2A−2} and S ={X1,...,X2A−2,X2A−1}. G(i)). HenceG(i+1)=G(i)∪{H1}.Itcanbeeasily shown thatG(i+1)satisfiesR (i+1),R (i+1)usingtheproperties 1 2 P1(A)= of T(i) and G(i). We skip the proof due to space constraints. 5) The argument for throwing cosets for i<2D is similar 1 0 ··· ··· 0 σ3(S) σ2(S) ··· ··· σ3+1−A(S) to the abovearguments(point3) exceptthatwe skip the parts ... ... ... ... ... where it becomes vacuous. The procedure for selecting new σ3(i−1)(S) σ3(i−1)−1(S) ··· ··· σ3(i−1)+1−A(S) coset to form G(i) and showing that it satisfies R1(i) and ... ... ... ... ... R2(i) can be done in a straight forward manner. 0 ··· 0 σ2A−1(S) σ2(A−1)(S) = We repeat the steps 3 and 4 until we pick l cosets. Note that the set of cosets thrown away at ith step contains the set 1 0 ··· ··· 0 σ3(i−1σ)(3S(S1)1)++σσ3(20......i(−S11−)1X)(2SA1−)X12A−1 σ3(i−1)−σ1(2S(S1)1)++σσ3·(1·......i(−·S11)−)X1−21A(−S11)X2A−1 ··0··......·· σ2A−1−1··(..··S..··..1)X2A−1 σ3(i−σσ123)(++A11−−−1AA)(((SSS111)))+++σσσ323((+......iA−1−−11)A+)−−111−((ASS−11))1XX(S221AA)−−X112A−1. ofHcoesnectes tthhreowtontalawnauymabteri−of1cothsesttsepth.rown until ith step is The determinant of above matrix P1(A) can be seen as (from the step 3): a polynomial in X and its degree is atmost A − 1. 2A−1 The constant term of this polynomial is the determinant of following matrix: |T(i)|≤ΣD |G(i)| 32j−1j+ΣD |G(i)| 32j−2(j−1)+ j=1 2j j=3 2j−1 1 0 ··· ··· 0 (cid:18) (cid:19) (cid:18) (cid:19) |G(i)| |G(i)| σ3(S1) σ2(S1) ··· ··· σ3+1−A(S1) 32+ΣD 32j−3(j−1) ... ... ... ... ... (cid:18) 3 (cid:19) j=3(cid:18)2j−2(cid:19) σ3(i−1)(S1) σ3(i−1)−1(S1) ··· ··· σ3(i−1)+1−A(S1) wecanpicki+1thcosettoformG(i+1)aslongas|T(i)|+ ... ... ... ... ... |G(i)| < |W|. Hence we can pick l = n cosets (evaluating 3 0 ··· 0 0 σ (S ) positions)toformmaximallyrecoverablecodeofblocklength 2(A−1) 1 naslongas|T(l−1)|+|G(l−1)|<|W|.|W|= q−1.Hence Now σ2(A−1)(S1) 6= 0 (because this is just the product of 3 we can form [n,k =2D+1] maximally recoverable code as 2(A−1) non zero elements) , since the determinant of the long as: matrix: ΣD |G(l−1)| 32j−1j+ΣD |G(l−1)| 32j−2(j−1)+ 1 0 ··· ··· 0 j=1 2j j=3 2j−1 σ3(...S1) σ2(...S1) ··...· ·.·.·. σ3+1−(A...−1)(S1) (cid:0)|GU(l3−si1n)|(cid:1)g(cid:0)32|G+(ΣiDj)=|3(cid:1)(cid:0)=|G2(jil−−,21i)|t(cid:1)3c2aj−n3(bje(cid:0)−s1e)e+n|Gt(cid:1)h(la−t1th)|e<aqb−3o1ve inequality σ3(i−1...)(S1) σ3(i−1)...−1(S1) ··...· ·.·.·. σ3(i−1)+1−...(A−1)(S1) is implied by: 0 ··· σ2(A−1)(S1) σ2(A−1)−1(S1) σ2(A−2)(S1) l−1 q−1 Σ2D ⌊jg(j)⌋ 3j−1+(l−1)< j=2 j 3 (cid:18) (cid:19) g(j)=1 for 2(D−1)≥j ≥4 and j even g(j)= 1 otherwise 2 hence: (n −1) Σ2D ⌊jg(j)⌋ 3 3j +n−2<q j=2 j (cid:18) (cid:19)