Minimizing the alphabet size in codes with restricted error sets
aa r X i v : . [ c s . I T ] F e b Minimizing the alphabet size in codes withrestricted error sets
Mira Gonen, Michael Langberg, Alex Sprintson
Abstract —This paper focuses on error-correcting codes thatcan handle a predefined set of specific error patterns. The needfor such codes arises in many settings of practical interest, includ-ing wireless communication and flash memory systems. In manysuch settings, a smaller field size is achievable than that offeredby MDS and other standard codes. We establish a connectionbetween the minimum alphabet size for this generalized settingand the combinatorial properties of a hypergraph that representsthe prespecified collection of error patterns. We also show aconnection between error and erasure correcting codes in thisspecialized setting. This allows us to establish bounds on theminimum alphabet size and show an advantage of non-linearcodes over linear codes in a generalized setting. We also considera variation of the problem which allows a small probabilityof decoding error and relate it to an approximate version ofhypergraph coloring.
I. I
NTRODUCTION
In many practical settings, there is a need to design error-correcting codes that can handle specific error patterns. For ex-ample, in wireless communications, magnetic recording, flashmemory systems, and Dynamic Random-Access Memories(DRAMs) the errors can appear in correlated locations such asbursts, single-row errors, or crisscrosss errors, e.g., [1]–[6].These settings benefit from customized error correcting codes,that may improve on the best known parameters of standard er-ror correcting codes. For example, the optimal error-correctingcapabilities of the classical ( n , k ) Maximum Distance Sepa-rable (MDS) code, such as the Reed-Solomon code, come atthe price of a significant alphabet size of q ≥ n − k + , [7]. As we show in this paper, in many settings with specific errorpatters, a much smaller alphabet size is needed.In this work, we present a general framework for codedesign that can handle any possible collection of predefinederror patterns. Our framework applies to both linear and non-linear codes. For an error-correcting code of length n , we usean n -vertex hypergraph G to represent the given collection oferror sets. Specifically, nodes of G represent the coordinates(symbols) of the codewords, while the hyperedges of G represent possible locations for errors, i.e., each hyperedge e represents the set of coordinates that can be corrupted inthe specific scenario represented by e . For each collection of Mira Gonen is with the Department of Computer Science, Ariel University,Ariel 40700, Israel (e-mail: [email protected]).Michael Langberg is with the Department of Electrical Engineering, Uni-versity at Buffalo (State University of New-York), Buffalo, NY 14260, USA(e-mail: [email protected]). Work supported in part by NSF grant 1909451.Alex Sprintson is with the Department of Electrical and Computer En-gineering, Texas A&M University, College Station, TX 77843-3128, USA(e-mail: [email protected]). The minimum alphabet size of an ( n , k ) MDS code is unknown, seeConjectures 1 and 2 in the paper. error sets represented by G , we are interested in finding theminimum alphabet size over which there exists a code that cancorrect all error sets specified by edges in G . In our setting, ( n , k ) -MDS codes can correct error patterns corresponding tothe complete ( n − k ) /2 -uniform n -vertex hypergraph.In this work, we relate the minimum alphabet size oferror-correcting codes with predefined error patterns to certainvariants of hypergraph coloring. Through reductive argumentsto erasure codes, and in particular to our prior work [8] inthe context of erasure codes with generalized decoding sets,we propose code design for the error setting at hand, andshow that non-linear error-correcting codes outperform linearones. We then turn to study a variation of the problem whichallows a small probability of decoding error and relate it toan approximate version of hypergraph coloring.Our work is structured as follows. In Section II, we givesome preliminaries and, in particular, we introduce our modelfor generalized erasure and error patterns. We also review ourprevious study on erasure codes in the generalized setting ofa predefined collection of decoding sets [8]. In Section III,we present bounds on the minimum alphabet size of thecorresponding codes through hypergraph coloring. In Sec-tion IV, we reduce the error-correcting setting to the erasuresetting. In Section V, we extend our studies to the problemof error detection. Finally, in Section VI, we relax the zero-error requirement for decoding a correct message and analyzesettings which allow small ε > probability of decoding error.II. M ODEL AND P RELIMINARIES
Since our paper makes a connection between erasure anderror correction in a generalized setting, we present definitionsfor both scenarios. We begin by presenting a definition and ourprior results for erasure correction scenarios.
A. Erasure Correction with predefined decoding sets.
We start by studying the design of erasure-codes in ageneralized setting in which decoding is required from acollection of predefined decoding sets. In this setting, thedecoding sets include the set of coordinates that can beused to decode the message. The setting is represented bya hypergraph G = ([ n ] , E ) , with the set [ n ] = {
1, . . . , n } of nodes representing coordinates and set of hyperedges E representing decoding sets.We define the q k parameter of a given hypergraph G =([ n ] , E ) as the minimum alphabet size of a ( n , k ) erasure codethat enables the receiver to decode the original message fromevery subset e ∈ E . efinition 1 (The q k parameter [8]) Let G = ([ n ] , E ) bea hypergraph on the vertex set [ n ] = {
1, . . . , n } . Let k beinteger. Let q k ( G ) denote the smallest size q of an alphabet F for which there exist an encoding function C : F k → F n and a decoding function D : ( F ∪ {⊥} ) n → F k such that for every edge e ∈ E and every message m ∈ F k itholds that D ( C e ( m )) = m . Here, C e ( m ) stands for the word obtained from the codeword C ( m ) by replacing the symbols in the locations of [ n ] \ e bythe erasure symbol ⊥ .Similarly, let q k , lin ( G ) denote the smallest prime power q for which there exist linear encoding and decoding functionsdefined above when F is a field of size q . In Definition 1, notice that for G that includes edges ofsize less than k no such ( C , D ) pair exists (no matter whatthe size of F is). In this case we define q k ( G ) and q k , lin ( G ) to be ∞ . Moreover, for every G with edges of size at least k , MDS codes satisfy the requirements on ( C , D ) and thus q k ( G ) < ∞ . Specifically, observe that for the complete n -vertex k -uniform hypergraph, denoted by κ n , k , the values of q k ( κ n , k ) and q k , lin ( κ n , k ) are equal to the minimum alphabetsizes of general and linear ( n , k ) MDS codes, respectively. Westate below the MDS conjectures for general and for linearcodes (see, e.g., [7], [9]–[11]).
Conjecture 1 (MDS Conjecture for general codes)
Forgiven integers k < q = , let n ( q , k ) be the largest integer n such that q k ( κ n , k ) ≤ q . Then, n ( q , k ) ≤ (cid:26) q + if | q and k ∈ { q − } q + otherwise. (1) Conjecture 2 (MDS Conjecture for linear codes)
Forgiven integers k < q where q is a prime power, let n ( q , k ) bethe largest integer n such that q k , lin ( κ n , k ) ≤ q . Then, n ( q , k ) ≤ (cid:26) q + if q is even and k ∈ { q − } q + otherwise. (2)There are strong relations between the q parameter ofhypergraphs and certain colorings. Definition 2 (Hypergraph strong-coloring) A valid strong-coloring of a hypergraph G is an assignment of colors toits vertices so that the vertices of each edge are assignedto distinct colors. The chromatic number χ ( G ) of G is theminimum number of colors that allows a valid strong-coloringof G . At times, we refer to χ simply as the chromatic numberof G . Definition 3 (Hypergraph k -coloring) A valid k -coloring ofa hypergraph G is an assignment of colors to its vertices sothat the vertices of each edge are assigned to at least k distinctcolors. The k -chromatic number χ k ( G ) of G is the minimumnumber of colors that allows a valid k -coloring of G . If G hasedges of size less than k , we define χ k ( G ) = ∞ . Note that a k -coloring of a k -uniform hypergraph is exactly astrong-coloring. Also, note that every hypergraph G for which q k ( G ) < ∞ (i.e., all edges are of size at least k ) satisfies χ k ( G ) ≤ χ ( G ) . In particular, for k -uniform hypergraphs G , χ k ( G ) = χ ( G ) . Theorem 1 (Connecting q k ( G ) with χ k ( G ) , [8]) For everyhypergraph G for which q k ( G ) < ∞ , q k ( G ) ≤ q k ( κ χ k ( G ) , k ) and q k , lin ( G ) ≤ q k , lin ( κ χ k ( G ) , k ) . In particular, q k ( G ) ≤ q k , lin ( G ) ≤ [ χ k ( G ) − ] pp . Here, for an integer x , [ x ] pp represents the smallest primepower that is greater or equal to x . Theorem 1 formalizes the natural intuition that for simple collections of erasure patterns G , i.e., the setting in which χ k ( G ) is small, a small alphabet size q suffices for a suitableerasure code. In particular, the theorem states that q k ( G ) is upper bounded by q k ( κ χ k ( G ) , k ) , which is the minimumalphabet size of a ( χ k ( G ) , k ) MDS code.The graph family G q , k , defined next, is helpful in analyzingthe tightness of the upper bound provided by Theorem 1. Definition 4 (The graph family G q , k ) For integers q and k ,let G q , k be the k -uniform hypergraph whose vertex set con-sists of all the balanced vectors of length q k over F = {
0, 1, . . . , q − } , that is, the vectors u ∈ F q k such that |{ i ∈ [ q k ] | u i = j }| = q k − for every j ∈ F , where k vertices u = ( u , . . . , u q k ) , ..., u k = ( u k , . . . , u kq k ) form an edge if thecollection of k -tuples { ( u i , u i , . . . , u ki ) } i ∈ [ q k ] is equal to [ q ] k . The following lemma identified hypergraphs G for whichthe gap between q k ( G ) and χ k ( G ) is maximal. Lemma 1 (The extremal nature of G q , k , [8]) For integers q and k , q k ( G q , k ) ≤ q , and χ k ( G ) ≤ χ k ( G q , k ) for every graph G with q k ( G ) = q . Extending results in [8], below we present (rater loose)bounds on χ ( G q , k ) . Proposition 1 (Bounds of χ k ( G k , q ) ) For every prime power q and k ≥ , q k − q − ≤ χ k ( G q , k ) ≤ (cid:18) q k − + q k − + (cid:19) . Proof:
We first study the collection of vertices in G q , k corresponding to normalized linear functions F k → F for field F of size q . A normalized linear function is one in which theleading nonzero coefficient equals 1. Such functions, whenconsidered in vector form ( u , . . . u q k ) ∈ F q k are balanced andthus correspond to vertices of G q , k . Moreover, it is not hard toverify that any two vertices of G q , k corresponding to distinctnormalized linear functions are included in an edge of G q , k (i.e., there exist k − additional vertices of G q , k correspond-ing to normalized linear functions that complete a linearlyndependent collection of functions). Thus, any k -coloringof G q , k must color all vertices corresponding to normalizedlinear functions with distinct colors. The number of normalizedlinear functions over F corresponding to vertices of G q , k is ∑ ki = q k − i = ( q k − ) / ( q − ) . Therefore χ ( G q , k ) ≥ q k − q − .On the other hand, we now show that χ ( G q , k ) ≤ ( q k − + q k − + ) .For any vector u in G q , k , consider the first q k − + entriesof u . By the pigeonhole principal, u i = u i = . . . = u i qk − + for some collection of entries indexed by i < i < . . . < i q k − + ∈ [ q k − + ] . Now, for any q k − + distinct indices i < i < . . . < i q k − + ∈ [ q k − + ] let A i , i ,..., i qk − + bethe set of all vertices u ∈ F q k of G q , k that satisfy u i = u i = . . . = u i qk − + . Every set A i , i ,..., i qk − + forms an independentset in G q , k , i.e., a set that does not include any two verticesfrom an edge of G q , k . This follows, since for every two distinctvertices u , v ∈ A i , i ,..., i qk − + we have u i = u i = . . . = u i qk − + and v i = v i = . . . = v i qk − + , which is too large ofan overlap to allow the balanced nature of vertices includedin edges of G q , k . Specifically, for vertices u and v that appearin an edge of G q , k , it must be for any j and j in F that |{ i ∈ [ q k ] | u i = j , v i = j ] }| = q k − . Such independent sets werereferred to as canonical in [8]. As the ( q k − + q k − + ) independentsets A i , i ,..., i qk − + of G q , k with i , i , . . . , i q k − + ∈ [ q k − + ] cover the entire vertex set of G q , k , coloring each one with adistinct color implies the required upper bound on χ k .Lemma 1 and Proposition 1 imply a gap between q k ( G q , k ) and χ k ( G q , k ) which can be extended to one between q k , lin andthe k -chromatic number of the subgraph of G q , k induced byvertices that correspond to normalized linear functions. Proposition 2 (Gap between q k , lin ( G ) and χ k ( G ) , [8]) For every k ≥ and every prime power q , there existsa k -uniform hypergraph G with q k , lin ( G ) ≤ q and yet χ k ( G ) ≥ q k − q − . We finally state a modest known gap between q k , lin and q k .Identifying graphs that exhibit a larger gap than that presentedbelow is a problem left open in this work. Proposition 3 (Gap between q k , lin and q k , [12]) For q = and k = it holds that q k , lin ( G q , k ) = [ χ k ( G q , k ) − ] pp = > ≥ q k ( G q , k ) . B. Error Correction with predefined error sets.
In what follows, we extend our discussion beyond erasuresto the context of errors . As we will see, several of our resultson the q -parameter corresponding to erasures extend naturallyto the p -parameter (defined below) corresponding to codeswith restricted error sets. Similarly, to the erasure setting,we represent the collection of error sets by using a hyper-graph G = ([ n ] , E ) , in which the set of vertices [ n ] representscoordinates of a codeword. Each edge e ∈ E of G representsan error set, i.e., the set of the coordinates that can be altered.Note that this is different from the notation used in Definition 1 for the erasure case in which edges e represented decoding sets(i.e., sets of uncorrupted symbols). Definition 5 (The p k parameter) Let G = ([ n ] , E ) be ahypergraph on the vertex set [ n ] = {
1, . . . , n } . Let k be aninteger. Let p k ( G ) denote the smallest size p of an alphabet F for which there exist an encoding function C : F k → F n and a decoding function D : F n → F k such that for every edge e ∈ E , every message m ∈ F k , andevery error vector v = ( v , . . . , v n ) ∈ F n , D ( C ( m ) ⋄ e v ) = m . Here, for C ( m ) = c , . . . , c n , the term C ( m ) ⋄ e v refers tothe vector y = y , . . . , y n for which for i ∈ [ n ] , y i = v i if i ∈ e , and otherwise y i = c i (i.e., we overwrite C ( m ) withvalues of v in the coordinates i ∈ e ).Similarly, let p k , lin ( G ) denote the smallest prime power p for which there exist linear encoding and decoding functionsas above when F is a field of size p . In Definition 5, the pair ( C , D ) corresponds to a code thatis resilient to errors on locations corresponding to an edge e ∈ E . That is, the edge set E represents the possible errorpatterns (i.e., sets of potentially corrupted symbols).Similar to Definition 1, in Definition 5, if G has edges ofsize greater than j n − k k , no such codes ( C , D ) exist, and wedefine p k ( G ) = p k , lin ( G ) = ∞ .As with erasures, for the complete hypergraph κ n , ⌊ n − k ⌋ , thevalues of p k ( κ n , ⌊ n − k ⌋ ) and p k , lin ( κ n , ⌊ n − k ⌋ ) are equal to theminimum alphabet sizes of general and linear ( n , k ) MDScodes, respectively. That is, p k ( κ n , ⌊ n − k ⌋ ) = q k ( κ n , k ) and p k , lin ( κ n , ⌊ n − k ⌋ ) = q k , lin ( κ n , k ) .Note that Definitions 1 and 5 assume zero-error decoding.We relax this requirement in Section VI.III. B OUNDS ON THE A LPHABET S IZE
Proposition 4 (Analog of Theorem 1)
Let k be an integer.For every hypergraph G = ([ n ] , E ) for which p k ( G ) < ∞ itholds that p k ( G ) ≤ p k ( κ χ , j χ − k k ) , where χ = χ ( ¯ G ) and ¯ G = ( V , ¯ E ) is the hypergraph withvertex set V = [ n ] and edges ¯ E = { V \ e | e ∈ E } . Proof:
To ease our notation, we assume that n − k and χ − k are even (minor modifications in notation are neededotherwise). Let G be as above and let χ = χ ( ¯ G ) . Denoting p = p k ( κ χ , ( χ − k ) /2 ) , it follows that there exist a ( χ , k ) MDScode C over an alphabet F of size p . To prove that p k ( G ) ≤ p ,we define a coding scheme for G over the alphabet F thatincludes the following two steps. First, fix a valid coloring g : [ n ] → [ χ ] of ¯ G . Second, consider the encoding function e C : F k → F n that given a message m ∈ F k outputs thevector in F n whose i ’th entry e C i ( m ) is C g ( i ) ( m ) , i.e., e C i ( m ) is the coordinate in the codeword C ( m ) which correspondso the color of the i ’th vertex. Here, and throughout, we usethe notation C i ( m ) to denote the i ’th entry in the codeword C ( m ) .The decoder e D : F n → F k for G is now defined using thefollowing procedure. Consider an error vector v ∈ F n , edge e ∈ E , and the corresponding received word y = e C ( m ) ⋄ e v .For each edge ¯ e in ¯ E , the decoder e D considers y ¯ e consistingof the entries of y restricted to the indices in ¯ e , and detectswhether y ¯ e has been corrupted, i.e., whether e C ¯ e ( m ) = y ¯ e . Asfor at least one such edge ¯ e it holds that e C ¯ e ( m ) = y ¯ e (e.g.for ¯ e = [ n ] \ e ), the decoder e D can use y ¯ e to decode m .We are left to show, given ¯ e ∈ ¯ E , how e D can detect whether e C ¯ e ( m ) = y ¯ e , and if so decode m .To detect whether a given ¯ e in ¯ E satisfies e C ¯ e ( m ) = y ¯ e wenote, by the definition of e C and the fact that all vertices in ¯ e have distinct colors under the coloring g , that the entries in e C ¯ e ( m ) correspond to at least ( n + k ) /2 distinct entries C ( m ) .The latter, in turn, implies that e C ¯ e ( m ) is itself a ( | ¯ e | , k ) MDScode. As such, e C ¯ e ( m ) can detect up to | ¯ e | − k ≥ n − k errorsand correct up to ( | ¯ e | − k ) /2 ≥ n − k errors. We conclude,as all error sets e are of size at most ( n − k ) /2 , that given ¯ e in ¯ E , the decoder e D can detect whether or not y ¯ e has beencorrupted, and if not, recover m as required.Proposition 4 is not tight, meaning that p k ( G ) might besmaller than p k ( κ χ , ( χ − k ) /2 ) . For k = take for example G = ([ ] , E ) to be the -cycle, i.e., the graph on vertices inwhich its edges E = { ( i , i + ) | i =
0, 1, . . . , 5 } (with addition mod p ( G ) = , since the binary encoding C : F → F in which for a message m = ( x , y ) ∈ F equals C ( x , y ) = ( x , y , x , y , x , y ) allows majority decoding for any 2errors along an edge in G . However, χ = χ ( ¯ G ) = , sinceevery pair of vertices in ¯ G is included in some edge in ¯ E , andby [13] it holds that p ( κ χ , j χ − k k ) = p ( κ ) = . In the nextsection, we improve on Proposition 4 by connecting the p k and q k parameters.IV. C ONNECTING E RROR AND E RASURE C ORRECTING C ODES
For parameters n and k , we say that encoder C : F k → F n is good for a given hypergraph G = ([ n ] , E ) with respect toerasures (res., errors) if there exists a decoder D satisfyingDefinition 1 (res., Definition 5). The following proposition isproven from basic principles. Proposition 5 (From errors to erasures)
Let n and k beparameters. Consider a hypergraph G err = ([ n ] , E err ) corre-sponding to errors. Let G era = ([ n ] , E era ) be the hypergraph(corresponding to erasures) for which E era = { [ n ] \ ( e err ∪ e err ) | e err , e err ∈ E err } . Let C : F k → F n be any encoder. Then, C is good for G err if and only if C is good for G era . Proof:
First assume that C is good for G err . We showthat for every edge e = e era ∈ E era , one can decode m from C e ( m ) . Assume in contradiction that there are twomessages m = m such that C e ( m ) = C e ( m ) . Recallthat e = [ n ] \ ( e ∪ e ) for e = e err ∈ E err and e = e err ∈ E err . Consider the word y = ( y , . . . , y n ) ∈ F n such that for i ∈ e = [ n ] \ ( e ∪ e ) : y i = C i ( m ) = C i ( m ) ,for i ∈ e \ e : y i = C i ( m ) , and for i ∈ e : y i = C i ( m ) .It is not hard to verify that there exist vectors v and v such that y = C ( m ) ⋄ e v = C ( m ) ⋄ e v . Namely, y couldbe obtained from the codeword C ( m ) with error vector v corresponding to e or from the codeword C ( m ) with errorvector v corresponding to e , contradicting the existence ofa decoder D according to Definition 5.For the other direction, if code C is not good for G err thenthere exist two messages, m and m , two error vectors v and v , and two edges e and e in E err such that C ( m ) ⋄ e v = C ( m ) ⋄ e v . Otherwise, it is not hard to verify theexistence of a natural decoder D according to Definition 5.Let e = [ n ] \ ( e ∪ e ) ∈ E era . The equality C ( m ) ⋄ e v = C ( m ) ⋄ e v now implies that C e ( m ) = C e ( m ) , which inturn implies that C is not good for G era .The proposition above has an operational perspective.Namely, one can design an error-correcting code C anddecoder D for a given graph G err , by designing an erasure-code for the graph G era . The latter can be done, e.g., usingTheorem 1 to obtain the following corollary. Corollary 2
Let k be an integer. For every hypergraph G err = ([ n ] , E ) for which p k ( G err ) < ∞ it holds that p k ( G err ) ≤ q k ( G era ) ≤ q k ( κ χ k ( G era ) , k ) ≤ [ χ k ( G era ) − ] pp , which, in turn, implies that p k ( G err ) ≤ p k ( κ χ , j χ − k k ) , where χ = χ k ( G era ) . We now extend the connections implied by Proposition 5to capture the p k and q k parameters. Theorem 3 (Connecting p k with q k ) Let n , k be parameterssuch that n − k ≥ k . Let G era = ([ n ] , E era ) be a hypergraphcorresponding to erasures such that q k ( G era ) < ∞ . Then,for N = n − k there exists a hypergraph G err on N vertices such that p k ( G err ) = q k ( G era ) and p k , lin ( G err ) = q k , lin ( G era ) . Proof:
Let G era = ([ n ] , E era ) be as above. We define twographs according to G era . First consider the graph G err =([ n ] ∪ U , E err ) corresponding to errors for which U is a vertexset of size n − k and E err = { U } ∪ { [ n ] \ e era | e era ∈ E era } . Here, we use the fact that edges in E era are subsets of [ n ] .Namely, the vertex set [ n ] ∪ U of G err is of size N = n − k and each edge in E err is of size at most N − k = n − k . Werefer to the edges in { [ n ] \ e era | e era ∈ E era } ⊂ E err as ordinary edges, and to the edge U ∈ E err as the special edge.Let G era be the graph corresponding to erasures defined by G err as in Proposition 5. Namely, G era = ([ n ] ∪ U , E era ) where E era = { ([ n ] ∪ U ) \ ( e err ∪ e err ) | e err , e err ∈ E err } . aking a closer look at the edge set E era , if an edge e era in E era is defined by two ordinary edges of E err , then it is nothard to verify that U ⊆ e era . If an edge e era in E era is definedby the special edge U and an ordinary edge e ∈ E err , then e era = [ n ] \ e . As the ordinary edge e ∈ E err , by definition,equals [ n ] \ e era for an edge e era ∈ E era we conclude that e era = e era . Finally, if an edge e in E era is defined solelyby U (i.e., we set e = e = U ), then e = [ n ] . All in all, weconclude that the edge set E era equals the edges E era ∪ { [ n ] } and an additional set of edges e era for which U ⊆ e era .We now show that p k ( G err ) = q k ( G era ) . We start bystudying codes for G era and G era . For any code C : F k → F n for G era , define the code C : F k → F n +( n − k ) for G era inwhich for every message m it holds that C ( m ) = C ( m ) onthe first [ n ] entries, that C ( m ) = m on entries n +
1, . . . , n + k and that C ( m ) equals the symbol a ∈ F for the remainingentries n + k +
1, . . . , 2 n − k . Here, we use the fact that n − k ≥ k . Similarly, for any code C : F k → F n + n − k for G era , let the code C : F k → F n for G era be the restrictionof C to the first n entries. It is now not hard to verify that C is good for G era if and only if C is good for G era . Morespecifically, let C be a code that is good for G era , and let D be the corresponding decoder. For any message m and edge e = e era it holds that D (( C ) e ( m )) = m . To show that C isgood for G era we define the decoder D , that for e era ∈ E era either runs D on the first n entries of C if e era ⊆ [ n ] , ordecodes using the identity mapping from U if U ⊆ e era . Forthe opposite direction, let C be good for G era , and let D bethe corresponding decoder. To show that C is good for G era we define the decoder D as the restriction of D that takesinto account only the first n entries of C . Correctness followsas E era ⊆ E era and as C is a restriction of C to the first n entries.To show that p k ( G err ) = q k ( G era ) , let N = n − k andlet C : F k → F N be any encoder. By Proposition 5, C is goodfor G err if and only if C is good for G era . By the discussionabove, C is good for G era if and only if the corresponding C is good for G era . Thus, C is good for G era if and only if C isgood for G err . Optimizing over | F | , we conclude p k ( G err ) = q k ( G era ) . As the reductions described above between C and C preserves linearity, we also conclude that p k , lin ( G err ) = q k , lin ( G era ) .By Theorem 3 the gap between the q k parameter and the q k , lin parameter for erasure codes stated in Proposition 3 im-plies a gap between the p k parameter and the p k , lin parameterfor error correcting codes. We summarize this results in thefollowing corollary. Corollary 4 (Non-linear codes outperform linear codes)
For k = , there exists a hypergraph G with p k , lin ( G ) = and yet p k ( G ) = . V. E
RROR DETECTION
Similar to the case of errors and erasures, one can defineanalogs of Definitions 1 and 5 for the case of error detection.Namely, for a given hypergraph G = ([ n ] , E ) the r k parameterdefined below equals the minimum size alphabet of an ( n , k ) error detection code that can detect error patters representedby E . Definition 6 (The r k parameter) Let G = ([ n ] , E ) be ahypergraph on the vertex set [ n ] = {
1, . . . , n } , and let k bean integer. Let r k ( G ) denote the smallest size r of an alphabet F for which there exist an encoding function C : F k → F n and a decoding function D : F n → { error, no-error } such that for every edge e ∈ E , every message m ∈ F k , andevery error vector v = ( v , . . . , v n ) ∈ F n , D ( C ( m ) ⋄ e v ) = “ error ′′ if and only if C ( m ) = C ( m ) ⋄ e v , ( ⋄ e is defined in Definition ). Similar to Definition 1, in Definition 6, r k ( G ) is defined ifand only if all edges of G are of size at most n − k , otherwisewe define r k ( G ) = ∞ . Also, similar to Proposition 5, thefollowing proposition is proven from basic principles (its proofis sketched here for completeness). Proposition 6 (Detecting errors vs. correcting erasures)
Let n and k be parameters such that n − k ≥ k . For ahypergraph G = ([ n ] , E ) , let ¯ G = ([ n ] , ¯ E ) be the hypergraphfor which ¯ E = { [ n ] \ e | e ∈ E } . Then, r k ( G ) = q k ( ¯ G ) . Proof:
Assume that ¯ C is a good erasure code for ¯ G . Thesame code can be used for detection on G . Namely, givena received word y , to check if y is corrupted in locationscorresponding to e ∈ E , decode to m using y ¯ e (via the erasuredecoding) and compare ¯ C ( m ) to y . For the other direction,assume that C is a good detection code for G . Use the samecode C for erasures. To decode from C ¯ e ( m ) , construct thecollection Y of size | F | n −| ¯ e | of words y ∈ F n that equal C ¯ e ( m ) on the locations of ¯ e and otherwise equal a (distinct) wordin F n −| ¯ e | . As C is a detection code for errors with support e = [ n ] \ ¯ e , we can detect the unique y ∈ Y that is a codeword,and accordingly decode m .VI. A VERAGE ERROR ε In what follows, we generalize the q k , p k , and r k parametersto include a decoding error. In our prior work [8], for k = in the context of erasures, we considered decoding error whenaveraged over the message set F k . We here consider a loosernotion of error that is also averaged over edges in the edge set E of the hypergraph at hand. As shown below, allowing a slighterror in decoding will in turn allow the construction of codeswith small alphabet sizes (independent of the blocklength n ). Definition 7 (The q ε , k , p ε , k , and r ε , k parameters) Let k bean integer. Let G = ([ n ] , E ) be a hypergraph on the vertexset [ n ] and let ε > . Let q ε , k ( G ) denote the smallest size q of an alphabet F for which there exist an encoding function C : F k → F n and a decoding function D : ( F ∪ {⊥} ) n → F k such that Pr e , m [ D ( C e ( m )) = m ] ≥ − ε , here m is uniformly chosen from F k , and e is uniformlychosen from E . One may define p ε , k ( G ) and r ε , k ( G ) in ananalogous manner. We will need the following approximate version of coloring.
Definition 8 (Hypergraph ( − ε ) - k -coloring) A valid ( − ε ) - k -coloring of a hypergraph G = ( V , E ) is an assignmentof colors to its vertices V so that for at least ( − ε ) | E | edges e ∈ E , the vertices of e are assigned to at least k colors.The ( − ε ) - k -chromatic number χ ε , k ( G ) of G is the minimumnumber of colors that allows a valid ( − ε ) - k -coloring of G . Theorem 5
Let G = ( V , E ) be a hypergraph, and ε > aparameter. Then q ε , k ( G ) ≤ [ χ ε , k ( G ) − ] pp . In particular, let n and k be any integers, q ε , k ( κ n , k ) ≤ O ( k / ε ) . Proof:
The proof that q ε , k ( G ) ≤ [ χ ε , k ( G ) − ] pp is almostidentical to the proof of Theorem 1 (presented in [8]) and isobtained by replacing q k and χ k by q ε , k and χ ε , k respectively.The second part of the theorem follows by showing that κ n , k can be ( − ε ) - k colored using k / ε colors. Considerpartitioning [ n ] into k / ε subsets, each of size ε n / k . Assignthe same color to all the vertices in the same subset, anddistinct colors to vertices in distinct subsets. We now showthat this is a ( − ε ) - k coloring. The fraction of edges that areassigned to at least k colors is ( k / ε k ) · ( ε n / k ) k ( nk ) . Now, for integers a and b , ( ab ) = ∏ b − j = ( a − j ) b ! , and a b ≥ ∏ b − j = ( a − j ) ≥ ( a − b ) b ≥ ( − b / a ) a b , thus ( − b / a ) a b b ! ≤ (cid:18) ab (cid:19) ≤ a b b ! . Therefore ( k ε k ) · ( ε n / k ) k ( nk ) ≥ − ε .Notice that implications corresponding to those in The-orem 5 on parameters p ε , k and r ε , k can be derived usingTheorem 3 and Proposition 6, respectively.R EFERENCES[1] Y. Wu. Novel burst error correction algorithms for reed-solomon codes.
IEEE Transactions on Information Theory , 58(2):519–529, 2012.[2] Eitan Yaakobi, Jing Ma, Laura Grupp, Paul H Siegel, Steven Swanson,and Jack K Wolf. Error characterization and coding schemes for flashmemories. In , pages 1856–1860, 2010.[3] G. Forney. Burst-correcting codes for the classic bursty channel.
IEEETransactions on Communication Technology , 19(5):772–781, 1971.[4] J. Moon and J. Park. Detection of prescribed error events: applicationto perpendicular recording. In
IEEE International Conference onCommunications, ICC 2005, Seoul , volume 3, pages 2057–2062. IEEE,200520.[5] L. Yohananov and E. Yaakobi. Codes for graph erasures.
IEEETransactions on Information Theory , 65(9):5433–453, 2019.[6] Vilas Sridharan and Dean Liberty. A study of dram failures in the field.In
Proceedings of the International Conference on High PerformanceComputing, Networking, Storage and Analysis , SC ’12, Washington, DC,USA, 2012. IEEE Computer Society Press.[7] K. A. Bush. Orthogonal arrays of index unity.
Ann. Math. Statistics ,23:426 – 434, 1952.[8] M. Gonen, I. Haviv, M. Langberg, and A. Sprintson. Minimizingthe alphabet size of erasure codes with restricted decoding sets. In
IEEE International Symposium on Information Theory, ISIT 2020, LosAngeles, CA, USA, June 21-26, 2020 , pages 144–149. IEEE, 2020. [9] B. Segre. Curve razionali normali e k-archi negli spazi finiti.
Ann. Mat.Pura Appl. , 39(4):357–379, 1955.[10] F. J. MacWilliams and N. J. A. Sloane.
The Theory of Error-CorrectingCodes . Amsterdam: North-Holland, 1977.[11] S. Huntemann. The upper bound of general maximum distance separablecodes, 2012. Honours Project.[12] A. R. Lehman and E. Lehman. Network coding: does the model needtuning? In