Sponsored Links
-->

Thursday, September 13, 2018

Code Block รข€
src: hc.weebly.com

In coding theory, a block code is any member of the 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. Block codes are conceptually useful because they allow 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.

The term block code may also refer to any error-correcting code that acts on a block of k bits of input data to produce n bits of output data (n,k). 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".


Video Block code



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

C : ? k -> ? n {\displaystyle C:\Sigma ^{k}\to \Sigma ^{n}} .

Here, ? {\displaystyle \Sigma } is a finite and nonempty set and k {\displaystyle k} and n {\displaystyle n} 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 ? {\displaystyle \Sigma } . The size | ? | {\displaystyle |\Sigma |} of the alphabet is often written as q {\displaystyle q} . If q = 2 {\displaystyle q=2} , then the block code is called a binary block code. In many applications it is useful to consider q {\displaystyle q} to be a prime power, and to identify ? {\displaystyle \Sigma } with the finite field F q {\displaystyle \mathbb {F} _{q}} .

The message length k

Messages are elements m {\displaystyle m} of ? k {\displaystyle \Sigma ^{k}} , that is, strings of length k {\displaystyle k} . Hence the number k {\displaystyle k} is called the message length or dimension of a block code.

The block length n

The block length n {\displaystyle n} of a block code is the number of symbols in a block. Hence, the elements c {\displaystyle c} of ? n {\displaystyle \Sigma ^{n}} are strings of length n {\displaystyle n} and correspond to blocks that may be received by the receiver. Hence they are also called received words. If c = C ( m ) {\displaystyle c=C(m)} for some message m {\displaystyle m} , then c {\displaystyle c} is called the codeword of m {\displaystyle m} .

The rate R

The rate of a block code is defined as the ratio between its message length and its block length:

R = k / n {\displaystyle R=k/n} .

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 1 - R {\displaystyle 1-R} 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 1 {\displaystyle 1} since data cannot in general be losslessly compressed. Formally, this follows from the fact that the code C {\displaystyle C} 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 ? {\displaystyle \delta } is the fraction d / n {\displaystyle d/n} . Formally, for received words c 1 , c 2 ? ? n {\displaystyle c_{1},c_{2}\in \Sigma ^{n}} , let ? ( c 1 , c 2 ) {\displaystyle \Delta (c_{1},c_{2})} denote the Hamming distance between c 1 {\displaystyle c_{1}} and c 2 {\displaystyle c_{2}} , that is, the number of positions in which c 1 {\displaystyle c_{1}} and c 2 {\displaystyle c_{2}} differ. Then the minimum distance d {\displaystyle d} of the code C {\displaystyle C} is defined as

d := min m 1 , m 2 ? ? k m 1 ? m 2 ? [ C ( m 1 ) , C ( m 2 ) ] {\displaystyle d:=\min _{m_{1},m_{2}\in \Sigma ^{k} \atop m_{1}\neq m_{2}}\Delta [C(m_{1}),C(m_{2})]} .

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 1 {\displaystyle 1} . Besides, the distance equals the minimum weight for linear block codes because:

min m 1 , m 2 ? ? k m 1 ? m 2 ? [ C ( m 1 ) , C ( m 2 ) ] = min m 1 , m 2 ? ? k m 1 ? m 2 ? [ 0 , C ( m 1 ) + C ( m 2 ) ] = min m ? ? k m ? 0 w [ C ( m ) ] = w min {\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 }} .

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 d - 1 {\displaystyle d-1} transmission errors since changing d - 1 {\displaystyle d-1} positions of a codeword can never accidentally yield another codeword. Furthermore, if no more than ( d - 1 ) / 2 {\displaystyle (d-1)/2} 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 ( d - 1 ) / 2 {\displaystyle (d-1)/2} . If more than ( d - 1 ) / 2 {\displaystyle (d-1)/2} 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 ( n , k , d ) q {\displaystyle (n,k,d)_{q}} describes a block code over an alphabet ? {\displaystyle \Sigma } of size q {\displaystyle q} , with a block length n {\displaystyle n} , message length k {\displaystyle k} , and distance d {\displaystyle d} . If the block code is a linear block code, then the square brackets in the notation [ n , k , d ] q {\displaystyle [n,k,d]_{q}} are used to represent that fact. For binary codes with q = 2 {\displaystyle q=2} , the index is sometimes dropped. For maximum distance separable codes, the distance is always d = n - k + 1 {\displaystyle d=n-k+1} , but sometimes the precise distance is not known, non-trivial to prove or state, or not needed. In such cases, the d {\displaystyle d} -component may be missing.

Sometimes, especially for non-block codes, the notation ( n , M , d ) q {\displaystyle (n,M,d)_{q}} is used for codes that contain M {\displaystyle M} codewords of length n {\displaystyle n} . For block codes with messages of length k {\displaystyle k} over an alphabet of size q {\displaystyle q} , this number would be M = q k {\displaystyle M=q^{k}} .


Maps Block code



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 [ 7 , 4 , 3 ] 2 {\displaystyle [7,4,3]_{2}} code.

Reed-Solomon codes are a family of [ n , k , d ] q {\displaystyle [n,k,d]_{q}} codes with d = n - k + 1 {\displaystyle d=n-k+1} and q {\displaystyle q} being a prime power. Rank codes are family of [ n , k , d ] q {\displaystyle [n,k,d]_{q}} codes with d <= n - k + 1 {\displaystyle d\leq n-k+1} . Hadamard codes are a family of [ n , k , d ] 2 {\displaystyle [n,k,d]_{2}} codes with n = 2 k - 1 {\displaystyle n=2^{k-1}} and d = 2 k - 2 {\displaystyle d=2^{k-2}} .


Linear Block Codes - YouTube
src: i.ytimg.com


Error detection and correction properties

A codeword c ? ? n {\displaystyle c\in \Sigma ^{n}} could be considered as a point in the n {\displaystyle n} -dimension space ? n {\displaystyle \Sigma ^{n}} and the code C {\displaystyle {\mathcal {C}}} is the subset of ? n {\displaystyle \Sigma ^{n}} . A code C {\displaystyle {\mathcal {C}}} has distance d {\displaystyle d} means that ? c ? C {\displaystyle \forall c\in {\mathcal {C}}} , there is no other codeword in the Hamming ball centered at c {\displaystyle c} with radius d - 1 {\displaystyle d-1} , which is defined as the collection of n {\displaystyle n} -dimension words whose Hamming distance to c {\displaystyle c} is no more than d - 1 {\displaystyle d-1} . Similarly, C {\displaystyle {\mathcal {C}}} with (minimum) distance d {\displaystyle d} has the following properties:

  • C {\displaystyle {\mathcal {C}}} can detect d - 1 {\displaystyle d-1} errors : Because a codeword c {\displaystyle c} is the only codeword in the Hamming ball centered at itself with radius d - 1 {\displaystyle d-1} , no error pattern of d - 1 {\displaystyle d-1} or fewer errors could change one codeword to another. When the receiver detects that the received vector is not a codeword of C {\displaystyle {\mathcal {C}}} , the errors are detected (but no guarantee to correct).
  • C {\displaystyle {\mathcal {C}}} can correct ? d - 1 2 ? {\displaystyle \textstyle \left\lfloor {{d-1} \over 2}\right\rfloor } errors. Because a codeword c {\displaystyle c} is the only codeword in the Hamming ball centered at itself with radius d - 1 {\displaystyle d-1} , the two Hamming balls centered at two different codewords respectively with both radius ? d - 1 2 ? {\displaystyle \textstyle \left\lfloor {{d-1} \over 2}\right\rfloor } do not overlap with each other. Therefore, if we consider the error correction as finding the codeword closest to the received word y {\displaystyle y} , as long as the number of errors is no more than ? d - 1 2 ? {\displaystyle \textstyle \left\lfloor {{d-1} \over 2}\right\rfloor } , there is only one codeword in the hamming ball centered at y {\displaystyle y} with radius ? d - 1 2 ? {\displaystyle \textstyle \left\lfloor {{d-1} \over 2}\right\rfloor } , therefore all errors could be corrected.
  • In order to decode in the presence of more than ( d - 1 ) / 2 {\displaystyle (d-1)/2} errors, list-decoding or maximum likelihood decoding can be used.
  • C {\displaystyle {\mathcal {C}}} can correct d - 1 {\displaystyle d-1} erasures. By erasure it means that the position of the erased symbol is known. Correcting could be achieved by q {\displaystyle q} -passing decoding : In i t h {\displaystyle i^{th}} passing the erased position is filled with the i t h {\displaystyle i^{th}} symbol and error correcting is carried out. There must be one passing that the number of errors is no more than ? d - 1 2 ? {\displaystyle \textstyle \left\lfloor {{d-1} \over 2}\right\rfloor } and therefore the erasures could be corrected.

What's a Code Block | The Dynamo Primer
src: primer.dynamobim.org


Lower and upper bounds of block codes

Family of codes

C = { C i } i >= 1 {\displaystyle C=\{C_{i}\}_{i\geq 1}} is called family of codes, where C i {\displaystyle C_{i}} is an ( n i , k i , d i ) q {\displaystyle (n_{i},k_{i},d_{i})_{q}} code with monotonic increasing n i {\displaystyle n_{i}} .

Rate of family of codes C is defined as R ( C ) = lim i -> ? k i n i {\displaystyle R(C)=\lim _{i\to \infty }{k_{i} \over n_{i}}}

Relative distance of family of codes C is defined as ? ( C ) = lim i -> ? d i n i {\displaystyle \delta (C)=\lim _{i\to \infty }{d_{i} \over n_{i}}}

To explore the relationship between R ( C ) {\displaystyle R(C)} and ? ( C ) {\displaystyle \delta (C)} , a set of lower and upper bounds of block codes are known.

Hamming bound

R <= 1 - 1 n ? log q ? [ ? i = 0 ? ? ? n - 1 2 ? ( n i ) ( q - 1 ) i ] {\displaystyle R\leq 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]}

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:

R + ? <= 1 + 1 n {\displaystyle R+\delta \leq 1+{\frac {1}{n}}} .

In other words, every block code satisfies the inequality k + d <= n + 1 {\displaystyle k+d\leq n+1} . Reed-Solomon codes are non-trivial examples of codes that satisfy the singleton bound with equality.

Plotkin bound

For q = 2 {\displaystyle q=2} , R + 2 ? <= 1 {\displaystyle R+2\delta \leq 1} . In other words, k + 2 d <= n {\displaystyle k+2d\leq n} .

For the general case, the following Plotkin bounds holds for any C ? F q n {\displaystyle C\subseteq \mathbb {F} _{q}^{n}} with distance d:

  1. If d = ( 1 - 1 q ) n , | C | <= 2 q n {\displaystyle d=\left(1-{1 \over q}\right)n,|C|\leq 2qn}
  2. If d > ( 1 - 1 q ) n , | C | <= q d q d - ( q - 1 ) n {\displaystyle d>\left(1-{1 \over q}\right)n,|C|\leq {qd \over {qd-\left(q-1\right)n}}}

For any q-ary code with distance ? {\displaystyle \delta } , R <= 1 - ( q q - 1 ) ? + o ( 1 ) {\displaystyle R\leq 1-\left({q \over {q-1}}\right)\delta +o\left(1\right)}

Gilbert-Varshamov bound

R >= 1 - H q ( ? ) - ? {\displaystyle R\geq 1-H_{q}\left(\delta \right)-\epsilon } , where 0 <= ? <= 1 - 1 q , 0 <= ? <= 1 - H q ( ? ) {\displaystyle 0\leq \delta \leq 1-{1 \over q},0\leq \epsilon \leq 1-H_{q}\left(\delta \right)} , H q ( x )   = d e f   - x ? log q x q - 1 - ( 1 - x ) ? log q ( 1 - x ) {\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)}} is the q-ary entropy function.

Johnson bound

Define J q ( ? )   = d e f   ( 1 - 1 q ) ( 1 - 1 - q ? q - 1 ) {\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)} .
Let J q ( n , d , e ) {\displaystyle J_{q}\left(n,d,e\right)} be the maximum number of codewords in a Hamming ball of radius e for any code C ? F q n {\displaystyle C\subseteq \mathbb {F} _{q}^{n}} of distance d.

Then we have the Johnson Bound : J q ( n , d , e ) <= q n d {\displaystyle J_{q}\left(n,d,e\right)\leq qnd} , if e n <= q - 1 q ( 1 - 1 - q q - 1 ? d n ) = J q ( d n ) {\displaystyle {e \over n}\leq {{q-1} \over q}\left({1-{\sqrt {1-{q \over {q-1}}\cdot {d \over n}}}}\,\right)=J_{q}\left({d \over n}\right)}

Elias-Bassalygo bound

R = log q | C | n <= 1 - H q ( J q ( ? ) ) + o ( 1 ) {\displaystyle R={\log _{q}{|C|} \over n}\leq 1-H_{q}\left(J_{q}\left(\delta \right)\right)+o\left(1\right)}

Linear Block Code - SixtySec - YouTube
src: i.ytimg.com


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. 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.


DesignScript Syntax | The Dynamo Primer
src: dynamoprimer.com


See also

  • Channel capacity
  • Shannon-Hartley theorem
  • Noisy channel
  • List decoding
  • Sphere packing

Linear Block Code - YouTube
src: i.ytimg.com


References

  • J.H. van Lint (1992). Introduction to Coding Theory. GTM. 86 (2nd ed.). Springer-Verlag. p. 31. ISBN 3-540-54894-7. 
  • F.J. MacWilliams; N.J.A. Sloane (1977). The Theory of Error-Correcting Codes. North-Holland. p. 35. ISBN 0-444-85193-3. 
  • W. Huffman; V.Pless (2003). Fundamentals of error-correcting codes. Cambridge University Press. ISBN 978-0-521-78280-7. 
  • S. Lin; D. J. Jr. Costello (1983). Error Control Coding: Fundamentals and Applications. Prentice-Hall. ISBN 0-13-283796-X. 

Sms Texting With Two Components - #ThunkableClassicDiscuss ...
src: community.thunkable.com


External links

  • Charan Langton (2001) Coding Concepts and Block Coding

Source of article : Wikipedia