elec 6131: error detecting and correcting codes
TRANSCRIPT
LECTURE 4: Linear Block Codes
ELEC 6131: Error Detecting and Correcting Codes
Instructor: Dr. M. R. Soleymani, Office: EV-5.125, Telephone: 848-2424 ext: 4103. Time and Place: Tuesday, 17:45 โ 20:15.Office Hours: Tuesday, 15:00 โ 17:00
Linear Block Codes In a digital communication system, the sequence of bits to be transmitted are arranged in
blocks of ๐๐ bits. So, there are 2๐๐ possible ๐๐-tuples to be transmitted. In a block code, the encoder assigns ๐๐ bits to each ๐๐-tuple where ๐๐ > ๐๐. For a block code to be useful we require that all of 2๐๐, ๐๐-tuples (called codewords) be distinct. That is there should be a 1-to-1 correspondence between the input ๐ข๐ข and the output ๐ฃ๐ฃ of the encoder.
Unless the codewords are structured according to a certain structure, the encoding (and obviously decoding) will be prohibitively complex. That is why we are interested in linearblock codes. A code is linear if a linear combination of any two of its codewords is a codeword, or equivalently:
Definition: a block code of length ๐๐ and 2๐๐ codewords is an (๐๐, ๐๐) linear code if and only if its 2๐๐ codewords form the ๐๐-dimensional subspace of the vector space of ๐๐-tuples over ๐บ๐บ๐บ๐บ(2).
Block Encoderk bits n bits
Linear Block Codes A linear (๐๐, ๐๐) code ๐ถ๐ถ is a ๐๐-dimensional subspace of all the binary ๐๐-tuples (๐๐๐๐). So,
we can find ๐๐ linearly independent members of ๐ถ๐ถ, say ๐๐0,๐๐1,โฏ ,๐๐๐๐โ1 such that any๐ฃ๐ฃ โ ๐๐ can be written as:
๐ฃ๐ฃ = ๐ข๐ข0๐๐0 + ๐ข๐ข1๐๐1 + โฏ+ ๐ข๐ข๐๐โ1๐๐๐๐โ1.
Arranging these ๐๐ linearly independent in a matrix:
๐บ๐บ =
๐๐0๐๐1โฎ
๐๐๐๐โ1
=
๐๐00 ๐๐01 โฏ ๐๐0,๐๐โ1๐๐10 ๐๐11 โฏ ๐๐1,๐๐โ1โฎ
๐๐๐๐โ1,0
โฎ๐๐๐๐โ1,1
โฎโฏ ๐๐๐๐โ1,๐๐โ1
where ๐บ๐บ is a ๐๐ ร ๐๐, binary matrix.
Linear Block Codes A linear (๐๐, ๐๐) code ๐ถ๐ถ is a ๐๐-dimensional subspace of all the binary ๐๐-tuples (๐๐๐๐). So,
we can find ๐๐ linearly independent members of ๐ถ๐ถ, say ๐๐0,๐๐1,โฏ ,๐๐๐๐โ1 such that any๐ฃ๐ฃ โ ๐๐ can be written as:
๐ฃ๐ฃ = ๐ข๐ข0๐๐0 + ๐ข๐ข1๐๐1 + โฏ+ ๐ข๐ข๐๐โ1๐๐๐๐โ1.
Arranging these ๐๐ linearly independent in a matrix:
๐บ๐บ =
๐๐0๐๐1โฎ
๐๐๐๐โ1
=
๐๐00 ๐๐01 โฏ ๐๐0,๐๐โ1๐๐10 ๐๐11 โฏ ๐๐1,๐๐โ1โฎ
๐๐๐๐โ1,0
โฎ๐๐๐๐โ1,1
โฎโฏ ๐๐๐๐โ1,๐๐โ1
where ๐บ๐บ is a ๐๐ ร ๐๐, binary matrix.
Linear Block Codes Let ๐ข๐ข = (๐ข๐ข0, ๐ข๐ข1,โฏ ,๐ข๐ข๐๐โ1) be the message to be sent. Then, the codeword can
be given as:
๐ฃ๐ฃ = ๐ข๐ข ๏ฟฝ ๐บ๐บ = ๐ข๐ข0,๐ข๐ข1,โฏ ,๐ข๐ข๐๐โ1
๐๐0๐๐1โฎ
๐๐๐๐โ1
= ๐ข๐ข0๐๐0 + ๐ข๐ข1๐๐1 + โฏ+ ๐ข๐ข๐๐โ1๐๐๐๐โ1.
That is, rows of ๐บ๐บ, span or generate ๐ถ๐ถ. That is why ๐บ๐บ is called the generator matrix.
Example (Hamming code): Consider (7,4) code we saw before:
๐บ๐บ =
๐๐0๐๐1๐๐2๐๐3
=
1 1 0 1 0 0 00 1 1 0 1 0 011
10
1 0 0 1 01 0 0 0 1
Linear Block Codes Letโs message be ๐ข๐ข = (1 1 0 1). Then,
๐ฃ๐ฃ = 1 ๏ฟฝ ๐๐0 + 1 ๏ฟฝ ๐๐1 + 0 ๏ฟฝ ๐๐2 + 1 ๏ฟฝ ๐๐3= 1101000 + 0110100 + 1010001 = (0001101)
(7, 4) Hamming Code
message codeword0000 00000001000 11010000100 01101001100 10111000010 11100101010 00110100110 10001101110 01011100001 10100011001 01110010101 11001011101 00011010011 01000111011 10010110111 00101111111 1111111
Linear Block Codes Definition: a block code is called systematic if its message bits are consecutive and so
are its parity bits.
The generator matrix of a systematic linear code consists of a ๐๐ ร ๐๐ identity matrix (to repeat the message bits) and a ๐๐ ร (๐๐ โ ๐๐) parity matrix to generate parity bits:
๐บ๐บ =
๐๐0๐๐1โฎ
๐๐๐๐โ1
=
๐๐00 ๐๐01 โฏ ๐๐0,๐๐โ๐๐โ1 1 0 โฏ 0๐๐10 ๐๐11 โฏ ๐๐1,๐๐โ๐๐โ1 0 1 โฏ 0โฎ
๐๐๐๐โ1,0
โฎ๐๐๐๐โ1,1
โฎโฏ ๐๐๐๐โ1,๐๐โ๐๐โ1 0 0 โฏ 1
So, ๐บ๐บ = [๐๐ ๐ผ๐ผ๐๐], i.e., for an input ๐ข๐ข = ๐ข๐ข0,๐ข๐ข1,โฏ ,๐ข๐ข๐๐โ1 , the output of the encoder is:๐ฃ๐ฃ = ๐ฃ๐ฃ0,๐ฃ๐ฃ1,โฏ , ๐ฃ๐ฃ๐๐โ1 = ๐ข๐ข0,๐ข๐ข1,โฏ ,๐ข๐ข๐๐โ1 ๐บ๐บ.
So, ๐ฃ๐ฃ๐๐ = ๐ข๐ข0๐๐0๐๐ + ๐ข๐ข1๐๐1๐๐ + โฏ+ ๐ข๐ข๐๐โ1๐๐๐๐โ1,๐๐ for 0 โค ๐๐ < ๐๐ โ ๐๐ and ๐ฃ๐ฃ๐๐โ๐๐+๐๐ = ๐ข๐ข๐๐ for 0 โค๐๐ < ๐๐.
Parity Message
k digits n-k digits
Linear Block Codes Going back to our (7,4) example:
๐ฃ๐ฃ = ๐ข๐ข0,๐ข๐ข1,โฏ ,๐ข๐ข๐๐โ1
1 1 0 1 0 0 00 1 1 0 1 0 011
10
1 0 0 1 01 0 0 0 1
.
Therefore,
๐ฃ๐ฃ0 = ๐ข๐ข0 + ๐ข๐ข2 + ๐ข๐ข3๐ฃ๐ฃ1 = ๐ข๐ข0 + ๐ข๐ข1 + ๐ข๐ข2๐ฃ๐ฃ2 = ๐ข๐ข1 + ๐ข๐ข2 + ๐ข๐ข3
And:
๐ฃ๐ฃ3 = ๐ข๐ข0, ๐ฃ๐ฃ4 = ๐ข๐ข1, ๐ฃ๐ฃ5 = ๐ข๐ข2, ๐ฃ๐ฃ6 = ๐ข๐ข3.
Parity Check Matrix Let ๐บ๐บ be the generating matrix of a code ๐ถ๐ถ. Form an (๐๐ โ ๐๐) ร ๐๐ matrix ๐ป๐ป
whose rows are orthogonal to all rows of ๐บ๐บ. For a systematic code ๐บ๐บ = ๐๐|๐ผ๐ผ๐๐and ๐ป๐ป = [๐ผ๐ผ๐๐โ๐๐|๐๐๐๐], where ๐๐๐๐ is the transpose of ๐๐.
๐ป๐ป ๐ผ๐ผ๐๐โ๐๐|๐๐๐๐ =
1 0 00 1 0
โฏ 0 ๐๐00โฏ 0 ๐๐01
โฎ โฎ โฎ0 0 0
โฏ โฎ โฎโฏ 1 ๐๐0,๐๐โ๐๐โ1
โฏโฏโฏโฏ
๐๐๐๐โ1,0๐๐๐๐โ1,1โฎ
๐๐๐๐โ1,๐๐โ๐๐โ1
Then, we have:
๐บ๐บ ๏ฟฝ ๐ป๐ป๐๐ = 0.
Therefore, for any ๐ฃ๐ฃ โ ๐ถ๐ถ โ ๐ฃ๐ฃ = ๐ข๐ข ๏ฟฝ ๐บ๐บ ๏ฟฝ ๐ป๐ป๐๐ = 0.
For the (7, 4) Hamming code:
๐ป๐ป =1 0 0 1 0 1 10 1 0 1 1 1 00 0 1 0 1 1 1
.
Encoding of Linear Block Codes Note that a parity check matrix can generate an (๐๐, ๐๐ โ ๐๐) code. Each codeword of this
code, ๐ถ๐ถ๐๐ is orthogonal to each codeword of ๐ถ๐ถ. ๐ถ๐ถ๐๐ is called the dual code of ๐ถ๐ถ. To encode a linear block code, we use XOR gates to form parities. Following figure
shows how a systematic linear block code is encoded: Bits of the message are fed to a shift register and also go to the channel. When they are
in the shift register, they are linearly combined according to:๐ฃ๐ฃ๐๐ = ๐ข๐ข0๐๐0๐๐ + ๐ข๐ข1๐๐1๐๐ + โฏ+ ๐ข๐ข๐๐โ1๐๐๐๐โ1,๐๐ ,
and placed in an output register and fed to channel.
Encoding of Linear Block Codes As an example, for the (7, 4) Hamming code, the decoder structure is:
Syndrome Decoding of Linear Block Codes
Assume that the message ๐ข๐ข is encoded as ๐ฃ๐ฃ = ๐ข๐ข ๏ฟฝ ๐บ๐บ. If there is no error, at the receiver we have ๐๐ = ๐ฃ๐ฃ and no need for error detection and error
correction. But if there is an error, we get: ๐๐ = ๐ฃ๐ฃ + ๐๐, where ๐๐ = (๐๐0, ๐๐1,โฏ , ๐๐๐๐) is an error vector.
If we multiply ๐๐ by ๐ป๐ป๐๐, we get: ๐๐ ๏ฟฝ ๐ป๐ป๐๐ = ๐ฃ๐ฃ + ๐๐ ๏ฟฝ ๐ป๐ป๐๐ = ๐ฃ๐ฃ ๏ฟฝ ๐ป๐ป๐๐ + ๐๐ ๏ฟฝ ๐ป๐ป๐๐ = ๐๐ ๏ฟฝ ๐ป๐ป๐๐
It is important to note that the result does not depend on the message, but on the errorpattern ๐๐. We call the vector ๐ ๐ = ๐๐ ๏ฟฝ ๐ป๐ป๐๐ the syndrome.
Since ๐๐ is an ๐๐-vector and ๐ป๐ป๐๐ is ๐๐ ร (๐๐ โ ๐๐), there are (๐๐ โ ๐๐) bits in vector ๐ ๐ . So, ๐ ๐ can point to 2๐๐โ๐๐ patterns (one correct transmission 0, 0,โฏ , 0 and 2๐๐โ๐๐ โ 1 errorpatterns).
Syndrome Decoding of Linear Block Codes Example: consider the (7, 4) code. Let ๐๐ = (๐๐0, ๐๐1, ๐๐2, ๐๐3, ๐๐4, ๐๐5, ๐๐6) be the received
vector (output of demodulator). Then the syndrome is:
๐ ๐ = ๐ ๐ 0, ๐ ๐ 1, ๐ ๐ 2 = (๐๐0, ๐๐1, ๐๐2, ๐๐3, ๐๐4, ๐๐5, ๐๐6)
1 0 00 1 001011
01110
10111
or:๐ ๐ 0 = ๐๐0 + ๐๐3 + ๐๐5 + ๐๐6๐ ๐ 1 = ๐๐1 + ๐๐3 + ๐๐4 + ๐๐5๐ ๐ 2 = ๐๐2 + ๐๐4 + ๐๐5 + ๐๐6
Syndrome Decoding of Linear Block Codes We saw that:
๐ ๐ = ๐๐ ๏ฟฝ ๐ป๐ป๐๐ = ๐๐ ๏ฟฝ ๐ป๐ป๐๐ .So, we can write ๐ ๐ ๐๐โs as:
๐ ๐ ๐๐ = ๐๐๐๐ + ๐๐๐๐โ๐๐๐๐0๐๐ + ๐๐๐๐โ๐๐+1๐๐1๐๐ + โฏ+ ๐๐๐๐โ1๐๐๐๐โ1,๐๐ , ๐๐ = 0, 1,โฏ ,๐๐ โ ๐๐ โ 1. Since ๐๐ = ๐ฃ๐ฃ + ๐๐, we have:
๐ ๐ ๐๐ = ๐ฃ๐ฃ๐๐ + ๐๐๐๐ + ๐ฃ๐ฃ๐๐โ๐๐ + ๐๐๐๐โ๐๐ ๐๐0๐๐ + โฏ+ ๐ฃ๐ฃ๐๐โ1 + ๐๐๐๐โ1 ๐๐๐๐โ1,๐๐ .
But ๐ฃ๐ฃ๐๐ + ๐ฃ๐ฃ๐๐โ๐๐๐๐0๐๐ + โฏ+ ๐ฃ๐ฃ๐๐โ1๐๐๐๐โ1,๐๐ = 0 and
๐ ๐ ๐๐ = ๐๐๐๐ + ๐๐๐๐โ๐๐๐๐0๐๐ + ๐๐๐๐โ๐๐+1๐๐1๐๐ + โฏ+ ๐๐๐๐โ1๐๐๐๐โ1,๐๐ , ๐๐ = 0, 1,โฏ ,๐๐ โ ๐๐ โ 1. This shows that ๐๐ โ ๐๐ syndromes provide us with 2๐๐โ๐๐ equations about error pattern.
There are 2๐๐ error patterns, but we have 2๐๐โ๐๐ equations. So, we cannot catch all errors. In fact, there are 2๐๐ error patterns for each syndrome. To put it another way, the code ๐ถ๐ถ
is a subgroup of the set of ๐๐-tuples. The set of ๐๐-tuples is partitioned into 2๐๐โ๐๐ cosetsof ๐ถ๐ถ. All ๐๐-tuples in one coset result in the same syndrome. So, the syndrome onlypoints us to a coset of ๐ถ๐ถ not to a single error pattern. Out of 2๐๐ patterns (๐๐-tuples in thecoset), we decide (based on the property of the channel) which error has occurred.
Syndrome Decoding of Linear Block Codes Example: take again the (7, 4) code. Assume that we receive ๐๐ = (1001001). Then,
๐ ๐ = ๐๐ ๏ฟฝ ๐ป๐ป๐๐ = 1, 1, 1 .This means that
1 = ๐๐0 + ๐๐3 + ๐๐5 + ๐๐61 = ๐๐1 + ๐๐3 + ๐๐4 + ๐๐51 = ๐๐2 + ๐๐4 + ๐๐5 + ๐๐6
Any of the following 24 = 16 patterns satisfy these equations:To decide which error to choose depends on our expectation about the channel behaviours. For example, in a BSC channel, we know that the probability of a single error is more than multiple errors. So, we decide ๐๐ = (0000010) as the error and therefore, the codeword transmitted must have been:
๐ฃ๐ฃ = ๐๐ + ๐๐ = 1001001 + 0000010 = 1001011 .
Minimum Distance of Linear Codes Hamming distance ๐๐(๐ฃ๐ฃ,๐ค๐ค) between two vectors ๐ฃ๐ฃ and ๐ค๐ค is the number of places they are
different. In binary case, the distance ๐๐(๐ฃ๐ฃ,๐ค๐ค) is the weight (the number of places a vector isnon-zero) of ๐ฃ๐ฃ + ๐ค๐ค or
๐๐ ๐ฃ๐ฃ,๐ค๐ค = ๐ค๐ค(๐ฃ๐ฃ,๐ค๐ค)
The minimum distance of a code ๐ถ๐ถ is the minimum value of ๐๐ ๐ฃ๐ฃ,๐ค๐ค for all non-identical ๐ฃ๐ฃand ๐ค๐ค โ ๐ถ๐ถ
๐๐๐๐๐๐๐๐ = ๐๐๐๐๐๐ ๐๐ ๐ฃ๐ฃ,๐ค๐ค : ๐ฃ๐ฃ,๐ค๐ค โ ๐ถ๐ถ,๐ฃ๐ฃ โ ๐ค๐ค .
Since for any ๐ฃ๐ฃ and ๐ค๐ค โ ๐ถ๐ถ, ๐ฃ๐ฃ + ๐ค๐ค โ ๐ถ๐ถ then the minimum distance of a linear block code isequal to minimum weight of its non-zero codewords:
๐๐๐๐๐๐๐๐ = ๐๐๐๐๐๐ ๐ค๐ค ๐ฃ๐ฃ + ๐ค๐ค : ๐ฃ๐ฃ,๐ค๐ค โ ๐ถ๐ถ, ๐ฃ๐ฃ โ ๐ค๐ค
= ๐๐๐๐๐๐ ๐ค๐ค ๐ฅ๐ฅ : ๐ฅ๐ฅ โ ๐ถ๐ถ, ๐ฅ๐ฅ โ 0 = ๐ค๐ค๐๐๐๐๐๐.Therefore, we have:
Theorem 1: the minimum distance of a linear block code is equal to the minimum weight of itsnon-zero codewords.
Minimum Distance of Linear Codes Theorem 2: let ๐ถ๐ถ be an (๐๐, ๐๐) linear block code with parity check matrix ๐ป๐ป.โข For any codeword ๐ฃ๐ฃ โ ๐ถ๐ถ of weight ๐๐, there are ๐๐ columns of ๐ป๐ป such that their vector sum is 0.โข If there are ๐๐ columns of ๐ป๐ป whose vector sum is 0, then there is a codeword ๐ฃ๐ฃ โ ๐ถ๐ถ with weight ๐๐. Proof: let ๐ฃ๐ฃ = (๐ฃ๐ฃ0, ๐ฃ๐ฃ1,โฏ , ๐ฃ๐ฃ๐๐โ1) have ๐๐ non-zero elements at places ๐๐1, ๐๐2,โฏ , ๐๐๐๐. Then,
๐ฃ๐ฃ ๏ฟฝ ๐ป๐ป๐๐ = 0 โ ๐ฃ๐ฃ0โ0 + ๐ฃ๐ฃ1โ1 + โฏ+ ๐ฃ๐ฃ๐๐โ1โ๐๐โ1 = 0โ ๐ฃ๐ฃ๐๐1โ๐๐1 + ๐ฃ๐ฃ๐๐2โ๐๐2 + โฏ+ ๐ฃ๐ฃ๐๐๐๐โ๐๐๐๐ = 0
โ โ๐๐1 + โ๐๐2 + โ๐๐3 + โฏ+ โ๐๐๐๐ = 0So, part 1 is proved.Now assume that:
โ๐๐1 + โ๐๐2 + โ๐๐3 + โฏ+ โ๐๐๐๐ = 0.Take ๐ฅ๐ฅ = (๐ฅ๐ฅ0, ๐ฅ๐ฅ1,โฏ , ๐ฅ๐ฅ๐๐โ1) such that:
๏ฟฝ๐ฅ๐ฅ๐๐ = 1 ๐๐๐๐ ๐๐ = ๐๐1, ๐๐2,โฏ , ๐๐๐๐๐ฅ๐ฅ๐๐ = 0 ๐๐๐๐โ๐๐๐๐๐ค๐ค๐๐๐ ๐ ๐๐.
Then, ๐ฅ๐ฅ ๏ฟฝ ๐ป๐ป๐๐ = ๐ฅ๐ฅ0โ0 + ๐ฅ๐ฅ1โ1 + โฏ+ ๐ฅ๐ฅ๐๐โ1โ๐๐โ1
= ๐ฅ๐ฅ๐๐1โ๐๐1 + ๐ฅ๐ฅ๐๐2โ๐๐2 + โฏ+ ๐ฅ๐ฅ๐๐๐๐โ๐๐๐๐= โ๐๐1 + โ๐๐2 + โฏ+ โ๐๐๐๐ = 0,
so, ๐ฅ๐ฅ โ ๐ถ๐ถ.
Error Detection Capability of Linear Block Codes Corollary 2.1: let ๐ถ๐ถ be a linear block code with parity check matrix ๐ป๐ป. If no ๐๐ โ 1 or less columns of ๐ป๐ป
add to 0, then minimum weight of ๐ป๐ป is at least ๐๐. Corollary 2.2: the minimum distance of a linear block code ๐ถ๐ถ is the smallest number of columns of ๐ป๐ป
adding to 0.
If the minimum distance of a code is ๐๐๐๐๐๐๐๐, it can detect any error pattern with๐๐๐๐๐๐๐๐ โ 1 or less errors.
Definition: assume that ๐ด๐ด0,๐ด๐ด1,๐ด๐ด2,โฏ ,๐ด๐ด๐๐ are the number of codewords with weight 0, 1, 2,โฏ ,๐๐ in acode ๐ถ๐ถ. ๐ด๐ด0,๐ด๐ด1,๐ด๐ด2,โฏ ,๐ด๐ด๐๐ are called weight distribution of the code.
For example, for (7, 4) Hamming code,๐ด๐ด0 = ๐ด๐ด7 = 1, ๐ด๐ด3 = 7, ๐ด๐ด4 = 7, and ๐ด๐ด๐๐ = 0 otherwise.
If we send a codeword ๐ฃ๐ฃ and we receive ๐๐ = ๐ฃ๐ฃ + ๐๐, we can detect errors unless ๐๐ โ ๐ถ๐ถ. So, ๐๐๐ข๐ข ๐ธ๐ธ =โ๐๐=1๐๐ ๐ด๐ด๐๐(1 โ ๐๐)๐๐โ๐๐๐๐๐๐, where ๐๐๐ข๐ข ๐ธ๐ธ is the probability of undetected error and ๐๐ is the probability of errorof modulation-demodulation.
For the (7, 4) code, we have:
๐๐๐ข๐ข ๐ธ๐ธ = 7๐๐3(1 โ ๐๐)4+7๐๐4(1 โ ๐๐)3+๐๐7.
So, if ๐๐ = 10โ2, we get ๐๐๐ข๐ข ๐ธ๐ธ = 7 ร 10โ6. That is if one million bits are transmitted on the average 7errors go through undetected.
Error correction capability of Linear Block Codes A code ๐ถ๐ถ with minimum distance ๐๐๐๐๐๐๐๐ can correct ๐๐ = ๐๐๐๐๐๐๐๐โ1
2and less errors. ( ๐๐ denotes
the floor, i.e., the largest integer less than ๐๐). ๐๐ = ๐๐๐๐๐๐๐๐โ12
means that ๐๐๐๐๐๐๐๐ = 2๐๐ + 1 or๐๐๐๐๐๐๐๐ = 2๐๐ + 2 or 2๐๐ + 1 โค ๐๐๐๐๐๐๐๐ โค 2๐๐ + 2.
Proof: We use the Triangle inequality: ๐๐ ๐ฃ๐ฃ, ๐๐ + ๐๐(๐ค๐ค, ๐๐) โฅ ๐๐(๐ฃ๐ฃ,๐ค๐ค)
๐๐ ๐ฃ๐ฃ,๐ค๐ค โฅ ๐๐๐๐๐๐๐๐ โฅ 2๐๐ + 1.
Let ๐๐ ๐ฃ๐ฃ, ๐๐ = ๐๐โฒ, then: ๐๐ ๐ค๐ค, ๐๐ โฅ 2๐๐ + 1 โ ๐๐โฒ. If ๐๐โฒ โค ๐๐, then ๐๐ ๐ค๐ค, ๐๐ โฅ ๐๐. This means if thedistance between the received vector and the transmitted codeword is less than or equal to ๐๐, thereceived vector is closer to this codeword, say ๐ฃ๐ฃ, than any other codeword ๐ค๐ค.
A code ๐ถ๐ถ with minimum distance ๐๐๐๐๐๐๐๐ can correct ๐๐ = ๐๐๐๐๐๐๐๐โ12
errors. It may correct someof the error patterns of weight higher than ๐๐, but it cannot correct all of those with ๐๐ + 1errors. Probability of error is upper bounded as
๐๐ ๐ธ๐ธ โค ๏ฟฝ๐๐=๐ก๐ก+1
๐๐๐๐๐๐ ๐๐๐๐ 1 โ ๐๐ ๐๐โ๐๐ .
Erasure Decoding Sometimes instead of deciding 0 or 1 at the output of the demodulator, we decide 0 and
1 for those received values far away zero and ๐๐ or erasure for those close to zero.
A linear block code with ๐๐๐๐๐๐๐๐ can correct ๐พ๐พ errors and ๐๐ erasures such that:
๐๐๐๐๐๐๐๐ โฅ 2๐พ๐พ + ๐๐ + 1.
Error and Erasure Channel Erasure Channel
๐ถ๐ถ = 1 โ ๐ผ๐ผ
Standard Arrays We said that a code of length ๐๐ and dimension ๐๐, i.e., an (๐๐, ๐๐) code partitions the set
๐๐๐๐ of ๐๐-tuples into 2๐๐โ๐๐ cosets of the code ๐ถ๐ถ. If we write elements of ๐ถ๐ถ in a row and then from 2๐๐ โ 2๐๐ remaining ๐๐-tuples by taking a vector ๐๐2, add ๐๐2 to each element of ๐ถ๐ถ and write in the second row, then taking another unused element of the ๐๐-tuples say ๐๐3, add it to each codeword and write in the second row and continue this until we have used all ๐๐-tuples, we get a standard array.
Theorem 3: no two ๐๐-tuples in the same row are identical. Every ๐๐-tuple is in one andonly one row.
Proof: since ๐ถ๐ถ is a subgroup of ๐๐๐๐ and each row is a coset of ๐ถ๐ถ.
๐ฃ๐ฃ1 = 0 ๐ฃ๐ฃ2 โฏ ๐ฃ๐ฃ๐๐ โฏ ๐ฃ๐ฃ2๐๐
๐๐2 ๐๐2 + ๐ฃ๐ฃ2 โฏ ๐๐2 + ๐ฃ๐ฃ๐๐ โฏ ๐๐2 + ๐ฃ๐ฃ2๐๐
๐๐3 ๐๐3 + ๐ฃ๐ฃ2 โฏ ๐๐3 + ๐ฃ๐ฃ๐๐ โฏ ๐๐3 + ๐ฃ๐ฃ2๐๐
โฎ โฎ โฎ โฎ
๐๐๐๐ ๐๐๐๐ + ๐ฃ๐ฃ2 โฏ ๐๐๐๐ + ๐ฃ๐ฃ๐๐ โฏ ๐๐๐๐ + ๐ฃ๐ฃ2๐๐
โฎ โฎ โฎ โฎ
๐๐2๐๐โ๐๐ ๐๐2๐๐โ๐๐ + ๐ฃ๐ฃ2 โฏ ๐๐2๐๐โ๐๐ + ๐ฃ๐ฃ๐๐ โฏ ๐๐2๐๐โ๐๐ + ๐ฃ๐ฃ2๐๐
Standard Arrays Since a code ๐ถ๐ถ with minimum distance ๐๐๐๐๐๐๐๐ can correct up to ๐๐ = ๐๐๐๐๐๐๐๐โ1
2errors, we
can use as the first coset leaders (๐๐๐๐โs) the patterns with ๐๐ and less 1โs. this covers for:
๐๐0 + ๐๐
1 + โฏ+ ๐๐๐๐ = ๏ฟฝ
๐๐=0
๐ก๐ก๐๐๐๐
coset leaders, but this sum may not be equal to 2๐๐โ๐๐. So, we may add some error patternswith two or more errors.
Definition: if โ๐๐=0๐ก๐ก ๐๐๐๐ = 2๐๐โ๐๐, we say that the (๐๐, ๐๐) code is perfect.
(7, 4) code is perfect since it has ๐๐๐๐๐๐๐๐ = 3 and therefore, ๐๐ = 1 and
๏ฟฝ๐๐=0
๐ก๐ก๐๐๐๐ = 7
0 + 71 = 1 + 7 = 8 = 23 = 2๐๐โ๐๐ .
Standard Arrays Note that since the elements on each row of the standard array are the 2๐๐
codewords each added to a unique ๐๐-tuple (the coset leader), the syndromesof all members of a coset are the same. So, by finding the syndrome, we findout in what row of the standard array the received vector and hopefully thetransmitted codeword is. We can then output the coset leader as the errorpattern. For small codes, a lookup table is feasible. But for longer codes, weneed to calculate the error based on the syndrome