ArticleslgStudy

computer science

Locally recoverable code

Locally recoverable code is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Locally recoverable code rather than just read about it. In short: Locally recoverable codes are a family of error correction codes that were introduced first by D. S.

Key takeaways

  • Locally recoverable code belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Locally recoverable code to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Locally recoverable code from memory before moving on to harder problems.

Reference excerpt

Locally recoverable codes are a family of error correction codes that were introduced first by D. S. Papailiopoulos and A. G. Dimakis and have been widely studied in information theory due to their applications related to distributive and cloud storage systems. An [n,k,d,r]q LRC is an [n,k,d]q linear code such that there is a function fi that takes as input i and a set of r other coordinates of a codeword c=(c1,…,cn)∈C different from ci, and outputs ci.

Overview Erasure-correcting codes, or simply erasure codes, for distributed and cloud storage systems, are becoming more and more popular as a result of the present spike in demand for cloud computing and storage services. This has inspired researchers in the fields of information and coding theory to investigate new facets of codes that are specifically suited for use with storage systems. It is well-known that LRC is a code that needs only a limited set of other symbols to be accessed in order to restore every symbol in a codeword. This idea is very important for distributed and cloud storage systems since the most common error case is when one storage node fails (erasure). The main objective is to recover as much data as possible from the fewest additional storage nodes in order to restore the node. Hence, Locally Recoverable Codes are crucial for such systems. The following definition of the LRC follows from the description above: an [n,k,r]-Locally Recoverable Code (LRC) of length n is a code that produces an n-symbol codeword from k information symbols, and for any symbol of the codeword, there exist at most r other symbols such that the value of the symbol can be recovered from them. The locality parameter satisfies 1≤r≤k because the entire codeword can be found by accessing k symbols other than the erased symbol. Furthermore, Locally Recoverable Codes, having the minimum distance d, can recover d−1 erasures.

Definition Let C be a [n,k,d]q linear code. For i∈{1,…,n}, let us denote by ri the minimum number of other coordinates we have to look at to recover an erasure in coordinate i. The number ri is said to be the locality of the i-th coordinate of the code. The locality of the code is defined as An [n,k,d,r]q locally recoverable code (LRC) is an [n,k,d]q linear code C∈𝔽qn with locality r. Let C be an [n,k,d]q-locally recoverable code. Then an erased component can be recovered linearly, i.e. for every i∈{1,…,n}, the space of linear equations of the code contains elements of the form xi=f(xi1,…,xir), where ij≠i.

Optimal locally recoverable codes Theorem Let n=(r+1)s and let C be an [n,k,d]q-locally recoverable code having s disjoint locality sets of size r+1. Then An [n,k,d,r]q-LRC C is said to be optimal if the minimum distance of C satisfies

Tamo–Barg codes Let f∈𝔽q[x] be a polynomial and let ℓ be a positive integer. Then f is said to be (r, ℓ)-good if

• f has degree r+1, • there exist distinct subsets A1,…,Aℓ of 𝔽q such that – for any i∈{1,…,ℓ}, f(Ai)={ti} for some ti∈𝔽q , i.e., f is constant on Ai, – #Ai=r+1, – Ai∩Aj=∅ for any i≠j. We say that {A1,…,Aℓ} is a splitting covering for f.

Tamo–Barg construction The Tamo–Barg construction utilizes good polynomials.

• Suppose that a (r,ℓ)-good polynomial f(x) over 𝔽q is given with splitting covering i∈{1,…,ℓ}. • Let s≤ℓ−1 be a positive integer. • Consider the following 𝔽q-vector space of polynomials V={∑i=0sgi(x)f(x)i:deg⁡(gi(x))≤deg⁡(f(x))−2}. • Let T=⋃i=1ℓAi. • The code {evT(g):g∈V} is an ((r+1)ℓ,(s+1)r,d,r)-optimal locally coverable code, where evT denotes evaluation of g at all points in the set T.

Parameters of Tamo–Barg codes • Length. The length is the number of evaluation points. Because the sets Ai are disjoint for i∈{1,…,ℓ}, the length of the code is |T|=(r+1)ℓ. • Dimension. The dimension of the code is (s+1)r, for s ≤ ℓ−1, as each gi has degree at most deg⁡(f(x))−2, covering a vector space of dimension deg⁡(f(x))−1=r, and by the construction of V, there are s+1 distinct gi. • Distance. The distance is given by the fact that V⊆𝔽q[x]≤k, where k=r+1−2+s(r+1), and the obtained code is the Reed-Solomon code of degree at most k, so the minimum distance equals (r+1)ℓ−((r+1)−2+s(r+1)). • Locality. After the erasure of the single component, the evaluation at ai∈Ai, where |Ai|=r+1, is unknown, but the evaluations for all other a∈Ai are known, so at most r evaluations are needed to uniquely determine the erased component, which gives us the locality of r. To see this, g restricted to Aj can be described by a polynomial h of degree at most deg⁡(f(x))−2=r+1−2=r−1 thanks to the form of the elements in V (i.e., thanks to the fact that f is constant on Aj, and the gi's have degree at most deg⁡(f(x))−2). On the other hand |Aj∖{aj}|=r, and r evaluations uniquely determine a polynomial of degree r−1. Therefore h can be constructed and evaluated at aj to recover g(aj).

Example of Tamo–Barg construction We will use x5∈𝔽41[x] to construct [15,8,6,4]-LRC. Notice that the degree of this polynomial is 5, and it is constant on Ai for i∈{1,…,8}, where A1={1,10,16,18,37}, A2=2A1, A3=3A1, A4=4A1, A5=5A1, A6=6A1, A7=11A1, and A8=15A1: A15={1}, A25={32}, A35={38}, A45={40}, A55={9}, A65={27}, A75={3}, A85={14}. Hence, x5 is a (4,8)-good polynomial over 𝔽41 by the definition. Now, we will use this polynomial to construct a code of dimension k=8 and length n=15 over 𝔽41. The locality of this code is 4, which will allow us to recover a single server failure by looking at the information contained in at most 4 other servers. Next, let us define the encoding polynomial: fa(x)=∑i=0r−1fi(x)xi, where fi(x)=∑i=0kr−1ai,jg(x)j. So, fa(x)= a0,0+ a0,1x5+ a1,0x+ a1,1x6+ a2,0x2+ a2,1x7+ a3,0x3+ a3,1x8. Thus, we can use the obtained encoding polynomial if we take our data to encode as the row vector a= (a0,0,a0,1,a1,0,a1,1,a2,0,a2,1,a3,0,a3,1). Encoding the vector m to a length 15 message vector c by multiplying m by the generator matrix

For example, the encoding of information vector m=(1,1,1,1,1,1,1,1) gives the codeword c=mG=(8,8,5,9,21,3,36,31,32,12,2,20,37,33,21). Observe that we constructed an optimal LRC; therefore, using the Singleton bound, we have that the distance of this code is d=n−k−⌈kr⌉+2=15−8−2+2=7. Thus, we can recover any 6 erasures from our codeword by looking at no more than 8 other components.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Locally recoverable code

Start with the simplest possible case. Write down what Locally recoverable code claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Locally recoverable code before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Locally recoverable code ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Locally recoverable code

In research
Locally recoverable code appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Locally recoverable code in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Locally recoverable code is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cryptography, Error detection and correction, Information theory, so understanding it makes those chapters shorter.
In everyday life
Look for Locally recoverable code outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Locally recoverable code” →

How to study Locally recoverable code in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Locally recoverable code means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Locally recoverable code out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Locally recoverable code in simple terms?

Locally recoverable codes are a family of error correction codes that were introduced first by D. S.

Why does Locally recoverable code matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Locally recoverable code?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Locally recoverable code.

Tags

  • Cryptography
  • Error detection and correction
  • Information theory

Keep exploring