Block code
In coding theory, block codes are a large and important family of error-correcting codes that encode data in blocks. There is a vast number of examples for block codes, many of which have a wide range of practical applications. The abstract definition of block codes is conceptually useful because it allows coding theorists, mathematicians, and computer scientists to study the limitations of all block codes in a unified way. Such limitations often take the form of bounds that relate different parameters of the block code to each other, such as its rate and its ability to detect and correct errors.
Examples of block codes are Reed–Solomon codes, Hamming codes, Hadamard codes, Expander codes, Golay codes, and Reed–Muller codes. These examples also belong to the class of linear codes, and hence they are called linear block codes. More particularly, these codes are known as algebraic block codes, or cyclic block codes, because they can be generated using boolean polynomials.
Algebraic block codes are typically hard-decoded using algebraic decoders.[jargon]
The term block code may also refer to any error-correcting code that acts on a block of [math]\displaystyle{ k }[/math] bits of input data to produce [math]\displaystyle{ n }[/math] bits of output data [math]\displaystyle{ (n,k) }[/math]. Consequently, the block coder is a memoryless device. Under this definition codes such as turbo codes, terminated convolutional codes and other iteratively decodable codes (turbo-like codes) would also be considered block codes. A non-terminated convolutional encoder would be an example of a non-block (unframed) code, which has memory and is instead classified as a tree code.
This article deals with "algebraic block codes".
The block code and its parameters
Error-correcting codes are used to reliably transmit digital data over unreliable communication channels subject to channel noise. When a sender wants to transmit a possibly very long data stream using a block code, the sender breaks the stream up into pieces of some fixed size. Each such piece is called message and the procedure given by the block code encodes each message individually into a codeword, also called a block in the context of block codes. The sender then transmits all blocks to the receiver, who can in turn use some decoding mechanism to (hopefully) recover the original messages from the possibly corrupted received blocks. The performance and success of the overall transmission depends on the parameters of the channel and the block code.
Formally, a block code is an injective mapping
- [math]\displaystyle{ C:\Sigma^k \to \Sigma^n }[/math].
Here, [math]\displaystyle{ \Sigma }[/math] is a finite and nonempty set and [math]\displaystyle{ k }[/math] and [math]\displaystyle{ n }[/math] are integers. The meaning and significance of these three parameters and other parameters related to the code are described below.
The alphabet Σ
The data stream to be encoded is modeled as a string over some alphabet [math]\displaystyle{ \Sigma }[/math]. The size [math]\displaystyle{ |\Sigma| }[/math] of the alphabet is often written as [math]\displaystyle{ q }[/math]. If [math]\displaystyle{ q=2 }[/math], then the block code is called a binary block code. In many applications it is useful to consider [math]\displaystyle{ q }[/math] to be a prime power, and to identify [math]\displaystyle{ \Sigma }[/math] with the finite field [math]\displaystyle{ \mathbb F_q }[/math].
The message length k
Messages are elements [math]\displaystyle{ m }[/math] of [math]\displaystyle{ \Sigma^k }[/math], that is, strings of length [math]\displaystyle{ k }[/math]. Hence the number [math]\displaystyle{ k }[/math] is called the message length or dimension of a block code.
The block length n
The block length [math]\displaystyle{ n }[/math] of a block code is the number of symbols in a block. Hence, the elements [math]\displaystyle{ c }[/math] of [math]\displaystyle{ \Sigma^n }[/math] are strings of length [math]\displaystyle{ n }[/math] and correspond to blocks that may be received by the receiver. Hence they are also called received words. If [math]\displaystyle{ c=C(m) }[/math] for some message [math]\displaystyle{ m }[/math], then [math]\displaystyle{ c }[/math] is called the codeword of [math]\displaystyle{ m }[/math].
The rate R
The rate of a block code is defined as the ratio between its message length and its block length:
- [math]\displaystyle{ R=k/n }[/math].
A large rate means that the amount of actual message per transmitted block is high. In this sense, the rate measures the transmission speed and the quantity [math]\displaystyle{ 1-R }[/math] measures the overhead that occurs due to the encoding with the block code. It is a simple information theoretical fact that the rate cannot exceed [math]\displaystyle{ 1 }[/math] since data cannot in general be losslessly compressed. Formally, this follows from the fact that the code [math]\displaystyle{ C }[/math] is an injective map.
The distance d
The distance or minimum distance d of a block code is the minimum number of positions in which any two distinct codewords differ, and the relative distance [math]\displaystyle{ \delta }[/math] is the fraction [math]\displaystyle{ d/n }[/math]. Formally, for received words [math]\displaystyle{ c_1,c_2\in\Sigma^n }[/math], let [math]\displaystyle{ \Delta(c_1,c_2) }[/math] denote the Hamming distance between [math]\displaystyle{ c_1 }[/math] and [math]\displaystyle{ c_2 }[/math], that is, the number of positions in which [math]\displaystyle{ c_1 }[/math] and [math]\displaystyle{ c_2 }[/math] differ. Then the minimum distance [math]\displaystyle{ d }[/math] of the code [math]\displaystyle{ C }[/math] is defined as
- [math]\displaystyle{ d := \min_{m_1,m_2\in\Sigma^k\atop m_1\neq m_2} \Delta[C(m_1),C(m_2)] }[/math].
Since any code has to be injective, any two codewords will disagree in at least one position, so the distance of any code is at least [math]\displaystyle{ 1 }[/math]. Besides, the distance equals the minimum weight for linear block codes because:
- [math]\displaystyle{ \min_{m_1,m_2\in\Sigma^k\atop m_1\neq m_2} \Delta[C(m_1),C(m_2)] = \min_{m_1,m_2\in\Sigma^k\atop m_1\neq m_2} \Delta[\mathbf{0},C(m_1)+C(m_2)] = \min_{m\in\Sigma^k\atop m\neq\mathbf{0}} w[C(m)] = w_\min }[/math].
A larger distance allows for more error correction and detection. For example, if we only consider errors that may change symbols of the sent codeword but never erase or add them, then the number of errors is the number of positions in which the sent codeword and the received word differ. A code with distance d allows the receiver to detect up to [math]\displaystyle{ d-1 }[/math] transmission errors since changing [math]\displaystyle{ d-1 }[/math] positions of a codeword can never accidentally yield another codeword. Furthermore, if no more than [math]\displaystyle{ (d-1)/2 }[/math] transmission errors occur, the receiver can uniquely decode the received word to a codeword. This is because every received word has at most one codeword at distance [math]\displaystyle{ (d-1)/2 }[/math]. If more than [math]\displaystyle{ (d-1)/2 }[/math] transmission errors occur, the receiver cannot uniquely decode the received word in general as there might be several possible codewords. One way for the receiver to cope with this situation is to use list decoding, in which the decoder outputs a list of all codewords in a certain radius.
Popular notation
The notation [math]\displaystyle{ (n,k,d)_q }[/math] describes a block code over an alphabet [math]\displaystyle{ \Sigma }[/math] of size [math]\displaystyle{ q }[/math], with a block length [math]\displaystyle{ n }[/math], message length [math]\displaystyle{ k }[/math], and distance [math]\displaystyle{ d }[/math]. If the block code is a linear block code, then the square brackets in the notation [math]\displaystyle{ [n,k,d]_q }[/math] are used to represent that fact. For binary codes with [math]\displaystyle{ q=2 }[/math], the index is sometimes dropped. For maximum distance separable codes, the distance is always [math]\displaystyle{ d=n-k+1 }[/math], but sometimes the precise distance is not known, non-trivial to prove or state, or not needed. In such cases, the [math]\displaystyle{ d }[/math]-component may be missing.
Sometimes, especially for non-block codes, the notation [math]\displaystyle{ (n,M,d)_q }[/math] is used for codes that contain [math]\displaystyle{ M }[/math] codewords of length [math]\displaystyle{ n }[/math]. For block codes with messages of length [math]\displaystyle{ k }[/math] over an alphabet of size [math]\displaystyle{ q }[/math], this number would be [math]\displaystyle{ M=q^k }[/math].
Examples
As mentioned above, there are a vast number of error-correcting codes that are actually block codes. The first error-correcting code was the Hamming(7,4) code, developed by Richard W. Hamming in 1950. This code transforms a message consisting of 4 bits into a codeword of 7 bits by adding 3 parity bits. Hence this code is a block code. It turns out that it is also a linear code and that it has distance 3. In the shorthand notation above, this means that the Hamming(7,4) code is a [math]\displaystyle{ [7,4,3]_2 }[/math] code.
Reed–Solomon codes are a family of [math]\displaystyle{ [n,k,d]_q }[/math] codes with [math]\displaystyle{ d=n-k+1 }[/math] and [math]\displaystyle{ q }[/math] being a prime power. Rank codes are family of [math]\displaystyle{ [n,k,d]_q }[/math] codes with [math]\displaystyle{ d \leq n-k+1 }[/math]. Hadamard codes are a family of [math]\displaystyle{ [n,k,d]_2 }[/math] codes with [math]\displaystyle{ n=2^{k-1} }[/math] and [math]\displaystyle{ d=2^{k-2} }[/math].
Error detection and correction properties
A codeword [math]\displaystyle{ c \in \Sigma^n }[/math]could be considered as a point in the [math]\displaystyle{ n }[/math]-dimension space [math]\displaystyle{ \Sigma^n }[/math] and the code [math]\displaystyle{ \mathcal{C} }[/math] is the subset of [math]\displaystyle{ \Sigma^n }[/math]. A code [math]\displaystyle{ \mathcal{C} }[/math] has distance [math]\displaystyle{ d }[/math] means that [math]\displaystyle{ \forall c\in \mathcal{C} }[/math], there is no other codeword in the Hamming ball centered at [math]\displaystyle{ c }[/math] with radius [math]\displaystyle{ d-1 }[/math], which is defined as the collection of [math]\displaystyle{ n }[/math]-dimension words whose Hamming distance to [math]\displaystyle{ c }[/math] is no more than [math]\displaystyle{ d-1 }[/math]. Similarly, [math]\displaystyle{ \mathcal{C} }[/math] with (minimum) distance [math]\displaystyle{ d }[/math] has the following properties:
- [math]\displaystyle{ \mathcal{C} }[/math] can detect [math]\displaystyle{ d-1 }[/math] errors : Because a codeword [math]\displaystyle{ c }[/math] is the only codeword in the Hamming ball centered at itself with radius [math]\displaystyle{ d-1 }[/math], no error pattern of [math]\displaystyle{ d-1 }[/math] or fewer errors could change one codeword to another. When the receiver detects that the received vector is not a codeword of [math]\displaystyle{ \mathcal{C} }[/math], the errors are detected (but no guarantee to correct).
- [math]\displaystyle{ \mathcal{C} }[/math] can correct [math]\displaystyle{ \textstyle\left\lfloor {{d-1} \over 2}\right\rfloor }[/math] errors. Because a codeword [math]\displaystyle{ c }[/math] is the only codeword in the Hamming ball centered at itself with radius [math]\displaystyle{ d-1 }[/math], the two Hamming balls centered at two different codewords respectively with both radius [math]\displaystyle{ \textstyle\left \lfloor {{d-1} \over 2}\right \rfloor }[/math] do not overlap with each other. Therefore, if we consider the error correction as finding the codeword closest to the received word [math]\displaystyle{ y }[/math], as long as the number of errors is no more than [math]\displaystyle{ \textstyle\left \lfloor {{d-1} \over 2}\right \rfloor }[/math], there is only one codeword in the hamming ball centered at [math]\displaystyle{ y }[/math] with radius [math]\displaystyle{ \textstyle\left \lfloor {{d-1} \over 2}\right \rfloor }[/math], therefore all errors could be corrected.
- In order to decode in the presence of more than [math]\displaystyle{ (d-1)/2 }[/math] errors, list-decoding or maximum likelihood decoding can be used.
- [math]\displaystyle{ \mathcal{C} }[/math] can correct [math]\displaystyle{ d-1 }[/math] erasures. By erasure it means that the position of the erased symbol is known. Correcting could be achieved by [math]\displaystyle{ q }[/math]-passing decoding : In [math]\displaystyle{ i^{th} }[/math] passing the erased position is filled with the [math]\displaystyle{ i^{th} }[/math] symbol and error correcting is carried out. There must be one passing that the number of errors is no more than [math]\displaystyle{ \textstyle\left \lfloor {{d-1} \over 2}\right \rfloor }[/math] and therefore the erasures could be corrected.
Lower and upper bounds of block codes
Family of codes
[math]\displaystyle{ C =\{C_i\}_{i\ge1} }[/math] is called family of codes, where [math]\displaystyle{ C_i }[/math] is an [math]\displaystyle{ (n_i,k_i,d_i)_q }[/math] code with monotonic increasing [math]\displaystyle{ n_i }[/math].
Rate of family of codes C is defined as [math]\displaystyle{ R(C)=\lim_{i\to\infty}{k_i \over n_i} }[/math]
Relative distance of family of codes C is defined as [math]\displaystyle{ \delta(C)=\lim_{i\to\infty}{d_i \over n_i} }[/math]
To explore the relationship between [math]\displaystyle{ R(C) }[/math] and [math]\displaystyle{ \delta(C) }[/math], a set of lower and upper bounds of block codes are known.
Hamming bound
- [math]\displaystyle{ R \le 1- {1 \over n} \cdot \log_{q} \cdot \left[\sum_{i=0}^{\left\lfloor {{\delta \cdot n-1}\over 2}\right\rfloor}\binom{n}{i}(q-1)^i\right] }[/math]
Singleton bound
The Singleton bound is that the sum of the rate and the relative distance of a block code cannot be much larger than 1:
- [math]\displaystyle{ R + \delta \le 1+\frac{1}{n} }[/math].
In other words, every block code satisfies the inequality [math]\displaystyle{ k+d \le n+1 }[/math]. Reed–Solomon codes are non-trivial examples of codes that satisfy the singleton bound with equality.
Plotkin bound
For [math]\displaystyle{ q=2 }[/math], [math]\displaystyle{ R+2\delta\le1 }[/math]. In other words, [math]\displaystyle{ k + 2d \le n }[/math].
For the general case, the following Plotkin bounds holds for any [math]\displaystyle{ C \subseteq \mathbb{F}_q^{n} }[/math] with distance d:
- If [math]\displaystyle{ d=\left(1-{1 \over q}\right)n, |C| \le 2qn }[/math]
- If [math]\displaystyle{ d \gt \left(1-{1 \over q}\right)n, |C| \le {qd \over {qd -\left(q-1\right)n}} }[/math]
For any q-ary code with distance [math]\displaystyle{ \delta }[/math], [math]\displaystyle{ R \le 1- \left({q \over {q-1}}\right) \delta + o\left(1\right) }[/math]
Gilbert–Varshamov bound
[math]\displaystyle{ R\ge1-H_q\left(\delta\right)-\epsilon }[/math], where [math]\displaystyle{ 0 \le \delta \le 1-{1\over q}, 0\le \epsilon \le 1- H_q\left(\delta\right) }[/math], [math]\displaystyle{ H_q\left(x\right) ~\overset{\underset{\mathrm{def}}{}}{=}~ -x\cdot\log_q{x \over {q-1}}-\left(1-x\right)\cdot\log_q{\left(1-x\right)} }[/math] is the q-ary entropy function.
Johnson bound
Define [math]\displaystyle{ J_q\left(\delta\right) ~\overset{\underset{\mathrm{def}}{}}{=}~ \left(1-{1\over q}\right)\left(1-\sqrt{1-{q \delta \over{q-1}}}\right) }[/math].
Let [math]\displaystyle{ J_q\left(n, d, e\right) }[/math] be the maximum number of codewords in a Hamming ball of radius e for any code [math]\displaystyle{ C \subseteq \mathbb{F}_q^n }[/math] of distance d.
Then we have the Johnson Bound : [math]\displaystyle{ J_q\left(n,d,e\right)\le qnd }[/math], if [math]\displaystyle{ {e \over n} \le {{q-1}\over q}\left( {1-\sqrt{1-{q \over{q-1}}\cdot{d \over n}}}\, \right)=J_q\left({d \over n}\right) }[/math]
Elias–Bassalygo bound
- [math]\displaystyle{ R={\log_q{|C|} \over n} \le 1-H_q\left(J_q\left(\delta\right)\right)+o\left(1\right) }[/math]
Sphere packings and lattices
Block codes are tied to the sphere packing problem which has received some attention over the years. In two dimensions, it is easy to visualize. Take a bunch of pennies flat on the table and push them together. The result is a hexagon pattern like a bee's nest. But block codes rely on more dimensions which cannot easily be visualized. The powerful Golay code used in deep space communications uses 24 dimensions. If used as a binary code (which it usually is), the dimensions refer to the length of the codeword as defined above.
The theory of coding uses the N-dimensional sphere model. For example, how many pennies can be packed into a circle on a tabletop or in 3 dimensions, how many marbles can be packed into a globe. Other considerations enter the choice of a code. For example, hexagon packing into the constraint of a rectangular box will leave empty space at the corners. As the dimensions get larger, the percentage of empty space grows smaller. But at certain dimensions, the packing uses all the space and these codes are the so-called perfect codes. There are very few of these codes.
Another property is the number of neighbors a single codeword may have.[1] Again, consider pennies as an example. First we pack the pennies in a rectangular grid. Each penny will have 4 near neighbors (and 4 at the corners which are farther away). In a hexagon, each penny will have 6 near neighbors. Respectively, in three and four dimensions, the maximum packing is given by the 12-face and 24-cell with 12 and 24 neighbors, respectively. When we increase the dimensions, the number of near neighbors increases very rapidly. In general, the value is given by the kissing numbers.
The result is that the number of ways for noise to make the receiver choose a neighbor (hence an error) grows as well. This is a fundamental limitation of block codes, and indeed all codes. It may be harder to cause an error to a single neighbor, but the number of neighbors can be large enough so the total error probability actually suffers.[1]
See also
References
- ↑ 1.0 1.1 1.2 Christian Schlegel and Lance Pérez (2004). Trellis and turbo coding. Wiley-IEEE. p. 73. ISBN 978-0-471-22755-7. https://books.google.com/books?id=9wRCjfGAaEcC&pg=PA73.
- J.H. van Lint (1992). Introduction to Coding Theory. GTM. 86 (2nd ed.). Springer-Verlag. p. 31. ISBN 3-540-54894-7. https://archive.org/details/introductiontoco0000lint/page/31.
- F.J. MacWilliams; N.J.A. Sloane (1977). The Theory of Error-Correcting Codes. North-Holland. p. 35. ISBN 0-444-85193-3. https://archive.org/details/theoryoferrorcor0000macw.
- W. Huffman; V.Pless (2003). Fundamentals of error-correcting codes. Cambridge University Press. ISBN 978-0-521-78280-7. https://archive.org/details/fundamentalsofer0000huff.
- S. Lin; D. J. Jr. Costello (1983). Error Control Coding: Fundamentals and Applications. Prentice-Hall. ISBN 0-13-283796-X.
External links
- Charan Langton (2001) Coding Concepts and Block Coding
Original source: https://en.wikipedia.org/wiki/Block code.
Read more |