Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Block code

From Wikipedia, the free encyclopedia
(Redirected fromLinear block code)
Family of error-correcting codes that encode data in blocks
This article includes a list ofgeneral references, butit lacks sufficient correspondinginline citations. Please help toimprove this article byintroducing more precise citations.(February 2025) (Learn how and when to remove this message)

Incoding theory,block codes are a large and important family oferror-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, andcomputer scientists to study the limitations ofall block codes in a unified way.Such limitations often take the form ofbounds 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 areReed–Solomon codes,Hamming codes,Hadamard codes,Expander codes,Golay codes,Reed–Muller codes andPolar codes. These examples also belong to the class oflinear codes, and hence they are calledlinear 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 typicallyhard-decoded using algebraic decoders.[jargon]

The termblock code may also refer to any error-correcting code that acts on a block ofk{\displaystyle k} bits of input data to producen{\displaystyle n} bits of output data(n,k){\displaystyle (n,k)}. Consequently, the block coder is amemoryless device. Under this definition codes such asturbo 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 hasmemory and is instead classified as atree code.

This article deals with "algebraic block codes".

The block code and its parameters

[edit]

Error-correcting codes are used toreliably transmitdigital data over unreliablecommunication channels subject tochannel 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 calledmessage and the procedure given by the block code encodes each message individually into a codeword, also called ablock 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 aninjective mapping

C:ΣkΣn{\displaystyle C:\Sigma ^{k}\to \Sigma ^{n}}.

Here,Σ{\displaystyle \Sigma } is a finite and nonemptyset andk{\displaystyle k} andn{\displaystyle n} are integers. The meaning and significance of these three parameters and other parameters related to the code are described below.

The alphabet Σ

[edit]

The data stream to be encoded is modeled as astring over somealphabetΣ{\displaystyle \Sigma }. The size|Σ|{\displaystyle |\Sigma |} of the alphabet is often written asq{\displaystyle q}. Ifq=2{\displaystyle q=2}, then the block code is called abinary block code. In many applications it is useful to considerq{\displaystyle q} to be aprime power, and to identifyΣ{\displaystyle \Sigma } with thefinite fieldFq{\displaystyle \mathbb {F} _{q}}.

The message lengthk

[edit]

Messages are elementsm{\displaystyle m} ofΣk{\displaystyle \Sigma ^{k}}, that is, strings of lengthk{\displaystyle k}.Hence the numberk{\displaystyle k} is called themessage length ordimension of a block code.

The block lengthn

[edit]

Theblock lengthn{\displaystyle n} of a block code is the number of symbols in a block. Hence, the elementsc{\displaystyle c} ofΣn{\displaystyle \Sigma ^{n}} are strings of lengthn{\displaystyle n} and correspond to blocks that may be received by the receiver. Hence they are also called received words.Ifc=C(m){\displaystyle c=C(m)} for some messagem{\displaystyle m}, thenc{\displaystyle c} is called the codeword ofm{\displaystyle m}.

The rateR

[edit]

Therate 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 quantity1R{\displaystyle 1-R} measures the overhead that occurs due to the encoding with the block code.It is a simpleinformation theoretical fact that the rate cannot exceed1{\displaystyle 1} since data cannot in general be losslessly compressed. Formally, this follows from the fact that the codeC{\displaystyle C} is an injective map.

The distanced

[edit]

Thedistance orminimum distanced of a block code is the minimum number of positions in which any two distinct codewords differ, and therelative distanceδ{\displaystyle \delta } is the fractiond/n{\displaystyle d/n}.Formally, for received wordsc1,c2Σn{\displaystyle c_{1},c_{2}\in \Sigma ^{n}}, letΔ(c1,c2){\displaystyle \Delta (c_{1},c_{2})} denote theHamming distance betweenc1{\displaystyle c_{1}} andc2{\displaystyle c_{2}}, that is, the number of positions in whichc1{\displaystyle c_{1}} andc2{\displaystyle c_{2}} differ.Then the minimum distanced{\displaystyle d} of the codeC{\displaystyle C} is defined as

d:=minm1,m2Σkm1m2Δ[C(m1),C(m2)]{\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 beinjective, any two codewords will disagree in at least one position, so the distance of any code is at least1{\displaystyle 1}. Besides, thedistance equals theminimum weight for linear block codes because:[citation needed]

minm1,m2Σkm1m2Δ[C(m1),C(m2)]=minm1,m2Σkm1m2Δ[0,C(m2)C(m1)]=minmΣkm0w[C(m)]=wmin{\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_{2})-C(m_{1})]=\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 distanced allows the receiver to detect up tod1{\displaystyle d-1} transmission errors since changingd1{\displaystyle d-1} positions of a codeword can never accidentally yield another codeword. Furthermore, if no more than(d1)/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(d1)/2{\displaystyle (d-1)/2}. If more than(d1)/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 uselist decoding, in which the decoder outputs a list of all codewords in a certain radius.

Popular notation

[edit]

The notation(n,k,d)q{\displaystyle (n,k,d)_{q}} describes a block code over an alphabetΣ{\displaystyle \Sigma } of sizeq{\displaystyle q}, with a block lengthn{\displaystyle n}, message lengthk{\displaystyle k}, and distanced{\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 withq=2{\displaystyle q=2}, the index is sometimes dropped.Formaximum distance separable codes, the distance is alwaysd=nk+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, thed{\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 containM{\displaystyle M} codewords of lengthn{\displaystyle n}. For block codes with messages of lengthk{\displaystyle k} over an alphabet of sizeq{\displaystyle q}, this number would beM=qk{\displaystyle M=q^{k}}.

Examples

[edit]

As mentioned above, there are a vast number of error-correcting codes that are actually block codes.The first error-correcting code was theHamming(7,4) code, developed byRichard 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 withd=nk+1{\displaystyle d=n-k+1} andq{\displaystyle q} being aprime power.Rank codes are family of[n,k,d]q{\displaystyle [n,k,d]_{q}} codes withdnk+1{\displaystyle d\leq n-k+1}.Hadamard codes are a family of[n,k,d]2{\displaystyle [n,k,d]_{2}} codes withn=2k1{\displaystyle n=2^{k-1}} andd=2k2{\displaystyle d=2^{k-2}}.

Error detection and correction properties

[edit]

A codewordcΣn{\displaystyle c\in \Sigma ^{n}}could be considered as a point in then{\displaystyle n}-dimension spaceΣn{\displaystyle \Sigma ^{n}} and the codeC{\displaystyle {\mathcal {C}}} is the subset ofΣn{\displaystyle \Sigma ^{n}}. A codeC{\displaystyle {\mathcal {C}}} has distanced{\displaystyle d} means thatcC{\displaystyle \forall c\in {\mathcal {C}}}, there is no other codeword in theHamming ball centered atc{\displaystyle c} with radiusd1{\displaystyle d-1}, which is defined as the collection ofn{\displaystyle n}-dimension words whoseHamming distance toc{\displaystyle c} is no more thand1{\displaystyle d-1}. Similarly,C{\displaystyle {\mathcal {C}}} with (minimum) distanced{\displaystyle d} has the following properties:

Lower and upper bounds of block codes

[edit]
Hamming limit[clarification needed]
There are theoretical limits (such as the Hamming limit), but another question is which codes can actually constructed.[clarification needed] It is likepacking spheres in a box in many dimensions. This diagram shows the constructible codes, which are linear and binary. Thex axis shows the number of protected symbolsk, they axis the number of needed check symbolsn–k. Plotted are the limits for different Hamming distances from 1 (unprotected) to 34. Marked with dots are perfect codes:
  • light orange onx axis: trivial unprotected codes
  • orange ony axis: trivial repeat codes
  • dark orange on data setd=3: classic perfect Hamming codes
  • dark red and larger: the only perfect binary Golay code

Family of codes

[edit]

C={Ci}i1{\displaystyle C=\{C_{i}\}_{i\geq 1}} is called family of codes, whereCi{\displaystyle C_{i}} is an(ni,ki,di)q{\displaystyle (n_{i},k_{i},d_{i})_{q}} code with monotonic increasingni{\displaystyle n_{i}}.

Rate of family of codesC is defined asR(C)=limikini{\displaystyle R(C)=\lim _{i\to \infty }{k_{i} \over n_{i}}}

Relative distance of family of codesC is defined asδ(C)=limidini{\displaystyle \delta (C)=\lim _{i\to \infty }{d_{i} \over n_{i}}}

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

Hamming bound

[edit]
Main article:Hamming bound
R11nlogq[i=0δn12(ni)(q1)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

[edit]
Main article: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+1n{\displaystyle R+\delta \leq 1+{\frac {1}{n}}}.

In other words, every block code satisfies the inequalityk+dn+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

[edit]
Main article:Plotkin bound

Forq=2{\displaystyle q=2},R+2δ1{\displaystyle R+2\delta \leq 1}. In other words,k+2dn{\displaystyle k+2d\leq n}.

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

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

For anyq-ary code with distanceδ{\displaystyle \delta },R1(qq1)δ+o(1){\displaystyle R\leq 1-\left({q \over {q-1}}\right)\delta +o\left(1\right)}

Gilbert–Varshamov bound

[edit]
Main article:Gilbert–Varshamov bound

R1Hq(δ)ϵ{\displaystyle R\geq 1-H_{q}\left(\delta \right)-\epsilon }, where0δ11q,0ϵ1Hq(δ){\displaystyle 0\leq \delta \leq 1-{1 \over q},0\leq \epsilon \leq 1-H_{q}\left(\delta \right)},Hq(x) =def xlogqxq1(1x)logq(1x){\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 theq-ary entropy function.

Johnson bound

[edit]
Main article:Johnson bound

DefineJq(δ) =def (11q)(11qδq1){\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)}.
LetJq(n,d,e){\displaystyle J_{q}\left(n,d,e\right)} be the maximum number of codewords in a Hamming ball of radiuse for any codeCFqn{\displaystyle C\subseteq \mathbb {F} _{q}^{n}} of distanced.

Then we have theJohnson Bound :Jq(n,d,e)qnd{\displaystyle J_{q}\left(n,d,e\right)\leq qnd}, ifenq1q(11qq1dn)=Jq(dn){\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

[edit]
Main article:Elias Bassalygo bound
R=logq|C|n1Hq(Jq(δ))+o(1){\displaystyle R={\log _{q}{|C|} \over n}\leq 1-H_{q}\left(J_{q}\left(\delta \right)\right)+o\left(1\right)}

Sphere packings and lattices

[edit]

Block codes are tied to thesphere 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 powerfulGolay 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 theN-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 the12-face and24-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 thekissing numbers.

The result is that the number of ways for noise to make the receiver choosea neighbor (hence an error) grows as well. This is a fundamental limitationof block codes, and indeed all codes. It may be harder to cause an error toa single neighbor, but the number of neighbors can be large enough so thetotal error probability actually suffers.[1]

See also

[edit]

References

[edit]
  1. ^abcChristian Schlegel and Lance Pérez (2004).Trellis and turbo coding. Wiley-IEEE. p. 73.ISBN 978-0-471-22755-7.

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Block_code&oldid=1282779815"
Category:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp