HOME

TheInfoList



OR:

In
coding theory Coding theory is the study of the properties of codes and their respective fitness for specific applications. Codes are used for data compression, cryptography, error detection and correction, data transmission and data storage. Codes are stud ...
, an erasure code is a
forward error correction In computing, telecommunication, information theory, and coding theory, an error correction code, sometimes error correcting code, (ECC) is used for controlling errors in data over unreliable or noisy communication channels. The central idea is ...
(FEC) code under the assumption of bit erasures (rather than bit errors), which transforms a message of ''k'' symbols into a longer message (code word) with ''n'' symbols such that the original message can be recovered from a subset of the ''n'' symbols. The fraction ''r'' = ''k''/''n'' is called the code rate. The fraction ''k’/k'', where ''k’'' denotes the number of symbols required for recovery, is called reception efficiency.


Optimal erasure codes

Optimal erasure codes have the property that any ''k'' out of the ''n'' code word symbols are sufficient to recover the original message (i.e., they have optimal reception efficiency). Optimal erasure codes are maximum distance separable codes (MDS codes).


Parity check

Parity check is the special case where ''n'' = ''k'' + 1. From a set of ''k'' values \_, a checksum is computed and appended to the ''k'' source values: :v_= - \sum_^k v_i. The set of ''k'' + 1 values \_ is now consistent with regard to the checksum. If one of these values, v_e, is erased, it can be easily recovered by summing the remaining variables: :v_= - \sum_^v_i.


Polynomial oversampling


Example: Err-mail (''k'' = 2)

In the simple case where ''k'' = 2, redundancy symbols may be created by sampling different points along the line between the two original symbols. This is pictured with a simple example, called err-mail:
Alice Alice may refer to: * Alice (name), most often a feminine given name, but also used as a surname Literature * Alice (''Alice's Adventures in Wonderland''), a character in books by Lewis Carroll * ''Alice'' series, children's and teen books by ...
wants to send her telephone number (555629) to Bob using err-mail. Err-mail works just like e-mail, except #About half of all the mail gets lost. #Messages longer than 5 characters are illegal. #It is very expensive (similar to air-mail). Instead of asking Bob to acknowledge the messages she sends, Alice devises the following scheme. #She breaks her telephone number up into two parts ''a'' = 555, ''b'' = 629, and sends 2 messages – "A=555" and "B=629" – to Bob. #She constructs a linear function, f(i) = a + (b-a)(i-1), in this case f(i) = 555 + 74(i-1), such that f(1) = 555 and f(2) = 629. #She computes the values ''f''(3), ''f''(4), and ''f''(5), and then transmits three redundant messages: "C=703", "D=777" and "E=851". Bob knows that the form of ''f''(''k'') is f(i) = a + (b-a)(i-1), where ''a'' and ''b'' are the two parts of the telephone number. Now suppose Bob receives "D=777" and "E=851". Bob can reconstruct Alice's phone number by computing the values of ''a'' and ''b'' from the values (''f''(4) and ''f''(5)) he has received. Bob can perform this procedure using any two err-mails, so the erasure code in this example has a rate of 40%. Note that Alice cannot encode her telephone number in just one err-mail, because it contains six characters, and that the maximum length of one err-mail message is five characters. If she sent her phone number in pieces, asking Bob to acknowledge receipt of each piece, at least four messages would have to be sent anyway (two from Alice, and two acknowledgments from Bob). So the erasure code in this example, which requires five messages, is quite economical. This example is a little bit contrived. For truly generic erasure codes that work over any data set, we would need something other than the ''f''(''i'') given.


General case

The linear construction above can be generalized to
polynomial interpolation In numerical analysis, polynomial interpolation is the interpolation of a given data set by the polynomial of lowest possible degree that passes through the points of the dataset. Given a set of data points (x_0,y_0), \ldots, (x_n,y_n), with n ...
. Additionally, points are now computed over a
finite field In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field that contains a finite number of elements. As with any field, a finite field is a set on which the operations of multiplication, addition, subt ...
. First we choose a finite field ''F'' with order of at least ''n'', but usually a power of 2. The sender numbers the data symbols from 0 to ''k'' − 1 and sends them. He then constructs a (Lagrange) polynomial ''p''(''x'') of order ''k'' such that ''p''(''i'') is equal to data symbol ''i''. He then sends ''p''(''k''), ..., ''p''(''n'' − 1). The receiver can now also use polynomial interpolation to recover the lost packets, provided he receives ''k'' symbols successfully. If the order of ''F'' is less than 2''b'', where b is the number of bits in a symbol, then multiple polynomials can be used. The sender can construct symbols ''k'' to ''n'' − 1 'on the fly', i.e., distribute the workload evenly between transmission of the symbols. If the receiver wants to do his calculations 'on the fly', he can construct a new polynomial ''q'', such that ''q''(''i'') = ''p''(''i'') if symbol ''i'' < ''k'' was received successfully and ''q''(''i'') = 0 when symbol ''i'' < ''k'' was not received. Now let ''r''(''i'') = ''p''(''i'') − ''q''(''i''). Firstly we know that ''r''(''i'') = 0 if symbol ''i'' < ''k'' has been received successfully. Secondly, if symbol ''i'' ≥''k'' has been received successfully, then ''r''(''i'') = ''p''(''i'') − ''q''(''i'') can be calculated. So we have enough data points to construct ''r'' and evaluate it to find the lost packets. So both the sender and the receiver require ''O''(''n'' (''n'' − ''k'')) operations and only ''O''(''n'' − ''k'') space for operating 'on the fly'.


Real world implementation

This process is implemented by Reed–Solomon codes, with code words constructed over a
finite field In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field that contains a finite number of elements. As with any field, a finite field is a set on which the operations of multiplication, addition, subt ...
using a
Vandermonde matrix In linear algebra, a Vandermonde matrix, named after Alexandre-Théophile Vandermonde, is a matrix with the terms of a geometric progression in each row: an matrix :V=\begin 1 & x_1 & x_1^2 & \dots & x_1^\\ 1 & x_2 & x_2^2 & \dots & x_2^\\ 1 & x ...
.


Near-optimal erasure codes

''Near-optimal erasure codes'' require (1 + ε)''k'' symbols to recover the message (where ε>0). Reducing ε can be done at the cost of CPU time. ''Near-optimal erasure codes'' trade correction capabilities for computational complexity: practical algorithms can encode and decode with linear time complexity.
Fountain code In coding theory, fountain codes (also known as rateless erasure codes) are a class of erasure codes with the property that a potentially limitless sequence of encoding symbols can be generated from a given set of source symbols such that the origi ...
s (also known as ''rateless erasure codes'') are notable examples of ''near-optimal erasure codes''. They can transform a ''k'' symbol message into a practically infinite encoded form, i.e., they can generate an arbitrary amount of redundancy symbols that can all be used for error correction. Receivers can start decoding after they have received slightly more than ''k'' encoded symbols.
Regenerating code Regeneration may refer to: Science and technology * Regeneration (biology), the ability to recreate lost or damaged cells, tissues, organs and limbs * Regeneration (ecology), the ability of ecosystems to regenerate biomass, using photosynthesis ...
s address the issue of rebuilding (also called repairing) lost encoded fragments from existing encoded fragments. This issue occurs in distributed storage systems where communication to maintain encoded redundancy is a problem.


Applications of erasure coding in storage systems

The classical way to recover from failures in storage systems was to use replication. However, replication incurs significant overhead in terms of wasted bytes. Therefore, increasingly large storage systems, such as those used in data centers use erasure-coded storage. The most common form of erasure coding used in storage systems is Reed-Solomon (RS) code, an advanced mathematics formula used to enable regeneration of missing data from pieces of known data, called parity blocks. In a (''k'', ''m'') RS code, a given set of ''k'' data blocks, called "chunks", are encoded into (''k'' + ''m'') chunks. The total set of chunks comprises a ''stripe''. The coding is done such that as long as at least ''k'' out of (''k'' + ''m'') chunks are available, one can recover the entire data. This means a (''k'', ''m'') RS-encoded storage can tolerate up to ''m'' failures. Example: In RS (10, 4) code, which is used in Facebook for their HDFS, 10 MB of user data is divided into ten 1MB blocks. Then, four additional 1 MB parity blocks are created to provide redundancy. This can tolerate up to 4 concurrent failures. The storage overhead here is 14/10 = 1.4X. In the case of a fully replicated system, the 10 MB of user data will have to be replicated 4 times to tolerate up to 4 concurrent failures. The storage overhead in that case will be 50/10 = 5X. This gives an idea of the lower storage overhead of erasure-coded storage compared to full replication and thus the attraction in today's storage systems.


Examples

Here are some examples of implementations of the various codes:


Near optimal erasure codes

* Tornado codes * Low-density parity-check codes


Near optimal fountain (rateless erasure) codes

*
Fountain code In coding theory, fountain codes (also known as rateless erasure codes) are a class of erasure codes with the property that a potentially limitless sequence of encoding symbols can be generated from a given set of source symbols such that the origi ...
* Online codes * LT codes * Raptor codes * Network Codes


Optimal erasure codes

*
Parity Parity may refer to: * Parity (computing) ** Parity bit in computing, sets the parity of data for the purpose of error detection ** Parity flag in computing, indicates if the number of set bits is odd or even in the binary representation of the r ...
: used in
RAID Raid, RAID or Raids may refer to: Attack * Raid (military), a sudden attack behind the enemy's lines without the intention of holding ground * Corporate raid, a type of hostile takeover in business * Panty raid, a prankish raid by male colleg ...
storage systems. * Parchive * Tahoe-LAFS include
zfec
* Reed–Solomon codes
Erasure Resilient Systematic Code
an MDS code outperforming Reed–Solomon in the maximal number of redundant packets, se
RS(4,2) with 2 bits
o
RS(9,2) with 3 bits
* Regenerating Codes see als
Storage Wiki
*any other MDS code (a type of "Maximum distance separable code")


Other

*
Spelling alphabet A spelling alphabet ( also called by various other names) is a set of words used to represent the letters of an alphabet in oral communication, especially over a two-way radio or telephone. The words chosen to represent the letters sound sufficie ...


See also

*
Forward error correction In computing, telecommunication, information theory, and coding theory, an error correction code, sometimes error correcting code, (ECC) is used for controlling errors in data over unreliable or noisy communication channels. The central idea is ...
codes. * Secret sharing (differs in that the original secret is encrypted and obscured until the decode quorum is reached)


References

{{Reflist


External links


Jerasure
is a Free Software library implementing Reed-Solomon and Cauchy erasure code techniques with SIMD optimisations.

by Luigi Rizzo describes optimal erasure correction codes
Feclib
is a near optimal extension to Luigi Rizzo's work that uses band matrices. Many parameters can be set, like the size of the width of the band and size of the finite field. It also successfully exploits the large register size of modern CPUs. How it compares to the near optimal codes mentioned above is unknown.
Coding for Distributed Storage wiki
for regenerating codes and rebuilding erasure codes.
ECIP "Erasure Code Internet Protocol"
Developed in 1996, was the first use of FEC "Forward Error correction" on the Internet. It was first used commercially to

Coding theory