You are on page 1of 50

Linear Block Codes

G r o u p s, F ie ld s a n d Ve c to r S p a c es , Co n s tr u ct io n O f G a lo is F ie ld s O f P r im e
O r d e r, S y nd r om e E r r o r D e t e ct io n , S ta n d a r d A r r a y a n d S y n d r o m e D e c o d in g ,
H a m m in g Co d e s, LD PC Co d e s .
Typical Communication System:
Consists of these blocks:
Information Source,
Source Encoder,
Channel Encoder,
Modulator,
Channel,
Demodulator,
Channel decoder,
Source decoder,
Information user.

Types of errors:
Random error channel: errors occur randomly with in the BSC, so whether a bit incurs an error in
independent of whether other bits incur errors.

Burst error channel: if errors have a tendency to occur in groups or burst.


Introduction to Block codes:

Notation of block code: (n, k)


Where n --- length of code/block, k --- length of message

Systematic codes: C = (
= parity bits+ message bits = (

= message bits + parity bits = (


Non systematic codes: C = (
=(

Code rate R = k/n;

Error vector e= ;
Received code (modulo 2 addition used)

For an error correcting code the decoder has to estimate or guess the code word from V.

Odd parity block code, even parity block code: (8,7); (5,4); (4,3)
Single parity check code: n = k+1

ASCII( American standard code for information interchange)-(8,7) code is used.


Start bit 7 information bits 1 Parity bit Stop bit

Redundant code/words:

j bits in error , out of n bits is ---- combinations.


If p is the bit error probability then is the probability of
obtaining j errors in an n-bit word.
Hamming code(7,4):
it is a single error correcting code.

C=(
V= C+e
Syndrome S= ,
For no error S=(0,0,0)
No error-----e=(0,0,0,0,0,0,0); ------------------- error syndrome S=(000)
One error-----e=(0000001),or (0001000) or(0100000)………..(1000000)-----(001),(100),(110),(111)
Two errors-----e= (1100000)or(0110000) or ……………(0101000) and so on……
If r=4; (15,11); no of parity bits r=4, no of syndroms-16, no of codes: 2048;
r= 5, (31,26), r=6, (63,37),
r=r, (
Product codes:
The single parity check codes have no error correction capability, they can only detect the
occurrence of odd numbers of errors. How ever, error correction can be achieved by
combing two single parity check codes in the form of a rectangular array.
Single error: Double error: Three errors:

Product code(35, 24) = product of two single parity check codes (5,4) X(7,6)
Information Encoder o/p C

Repetition Codes: (n, 1) 0 000


Ex: (3, 1) ; 1 111

Decoding: max likelihood rule/majority vote decoding.

Assume 0 is transmitted. No of Errors Received Code Decoder


V o/p
Zero error 000 0
1 error 100 0
010 0
001 0
2 errors 011 1
110 1
101 1
3 errors 111 1
Weight and distance of block codes:
W(0 1 1 0 1 0) = 3;

W(1 0 1 0 0 0) = 2;

d(C1,C2) = 3

Error detection and correction capabilities:


A linear code C of minimum distance can detect
up to t errors if and only if

r
t
A linear code C of minimum distance can r Ci Cj
Ci Cj r
correct up to t errors if and only if
Linear Block
Codes:
Input

[ ]
101 𝑝 1= 𝑑1 + 𝑑2 +𝑑 3 data
11 1 d4 d3 d2 d1
P=
110 output
0 11 Code
k X n-k 𝑝 3= 𝑑 1+ 𝑑 2+ 𝑑 4

p3 p2 p1

Parity check matrices: H Linear Block Code


(7, 4) Encoder
𝐻= [ 𝑃 𝐼 ]
𝑇
= n-k X k; I = n-k X n-k; H= n-k X n; columns in H ,

error correcting code the columns in H have to be non zero and unique.

= -----for all codewords C belongs to the code.

If incorrect word, syndrome = S =

The min distance of an (n, k) linear block code satisfies the condition which is known as
the Singleton bound.
The min distance can never be greater than 1+n-k and codes that have are known as
maximum distance codes.
Shortened and Extended Linear Codes:

Some times may not be possible to find a code with suitable block length, information length,
and minimum distance. Various modifications can be made to a linear code.

Shortened code (n-i, k-i):


setting the first (left hand side) data information bits to zero
shortened code Gs, Hs obtained:
Gs---Omitting the first I rows and columns of G
Hs--- Omitting the first I columns of H
parity bits: (n-i)-(k-i) = n-k
For example: (15,11) hamming code:---(12,8) shortened code
G(11 x 15)---Gs(8 x 12); H(4 x 15)----Hs(4 x12)

Extended linear code(n+1,k):


Parity check bit is added to give even parity code words.
For example: (7, 4)----(8,4)
Hamming Bound:

With syndrome decoding, an(n,k) linear block code can correct up to t errors per
codeword if n and k satisfy the following hamming bound:

Dual codes:
Any vector in one of the spaces is orthogonal to all the vectors in the other spaces.
Cd = D H = D Gd
In (n,k)--(7,4) ----G(4x7), H(3x7), C(1x7)
Gd(3x7) = H; Hd(4x7), C(1x7)----(n,n-k)
Codes C and Cd from the (7,4) and (7,3) code respectively are orthogonal,
So that the dot product of C and Cd is zero.
Standard array (n, k):
C0 C1 C2 - - - - C
W1 C1+W1 C2+W1 --- - -- C+W1

W2 C1+W2 C2+W2 -- C+W2

- - - - -

C1+ C2+ - -- C+

 The rows of the standard array are called cosets and the first word in each coset is called the coset leader.
ARQ (Automatic Repeat Request) Schemes:
Information transfer takes place in one direction only.
 Forward path-- source to the user and error correction techniques considered are known as FEC
(Forward error correction schemes).
 Return path-- User to source, return path allows requests to be made for transmission of information in
the event of a decoding failure.
Linear Algebra:
Sets: collection of objects,
A set with n objects is written as { s1,s2,s3,….sn} , where the objects s1,s2,s3,s4… sn are
referred as the set’s elements.
Finite set-----{0, 1 2, 3, 4, 5, 6, 7, 8, 9};
Infinite set-----{0, 1, 2,3,……………}.
Group: A group is constructed from a set by defining a group operation * between elements
with in the set.
1. Group is closed under operation * in that for any two elements a & b with the set then the
element c = a*b also belongs to the set.
2. Associative: a*(b*c)=(a*b)*c
3. There exist a unique identity element I with in the set. a*I = I*a = a
4. There exits a unique inverse a’ within the set. a*a’ = a’*a = I
5. Commutative: a*b = b*a;
6. Distributive: a*(b+c) = a*b+a*c.
Conditions 1 to 4 are necessary and sufficient for a set and operation to form a group.
The group operation is normally addition or multiplication so giving additive groups or
multiplicative groups respectively.

Consider the set of binary numbers {0, 1} along with modulo-2 addition.
Closure property is obeyed because modulo2 addition always gives{0, or 1};
0+0 =0; 1+1=0; 1+0 =1; 0+1 = 1;
Associative: 0+(1+1) = (0+1)+1 = 0;
Identity element I= 0; a+I = I+a = a;
0+1 = 1; 1+0 = 1; 0+0 = 0;
Each element is its own inverse: a+a’ = a’+a = I; 0+0 = 1+1 = 0;

a-b = a+(-b);
a/b = a * b’; where b’ is the multiplicative inverse of b.

n modulo m ----is defined as the remainder obtained after dividing n by m.


n modulo m = r;
For example: 5 modulo 4 = 1; 13 modulo 5 = 3;
The Additive group of integers modulo-5 The modulo-5 multiplicative group
+ 0 1 2 3 4
Set {0, 1, 2, 3, 4} X 1 2 3 4
0 0 1 2 3 4 set{1, 2, 3, 4}
1 1 2 3 4
1 1 2 3 4 0
2 2 4 1 3
2 2 3 4 0 1
3 3 1 4 2
3 3 4 0 1 2
4 4 3 2 1
4 4 0 1 2 3

Set {0, 1, 2, 3, ………….} -------it is not a group. Why? Inverse of 5 is -5 which does not belong to the set.

Set{ -----it is a group. (additive group)

For modulo-m:
Additive inverse of a non zero integer a is given by m-a. So, under modulo-5 addition, the inverse of 3 is 2.
[ formula: a + a’ = 0 = I (additive identity element) ]

The multiplicative inverse of a non zero element a is the element a’ such that a x a’ = 1 = I (multiplicative identity)
In modulo-5, inverse of 2 is 3, how ? 2 x 3 = 1 modulo-5,
Fields: Fields can be constructed from modulo-m addition and multiplication.
Field as – set of elements,
- an additive operation,
-a multiplicative operation,
-group operations satisfy the distributive law.

Order of the field: number of elements.


Ring lies between group and field.

-In the prime fields subtraction & division can be carried out by replacing an element by
its inverse and respectively carrying out addition and multiplication.

1) Evaluate ((2-3)x3)/4 over the prime field modulo-m when m=5.


Sol: the additive inverse of 3 is 2 and the multiplicative inverse of 4 is 4.
Hence ((2-3)x3)/4 = (2+2) x 3 x 4 modulo-5
= 4 x 3 x 4 modulo-5 = 3 modulo-5 = 3.
Vector spaces:

Vector is represented by n elements ------


If
For example; ;
If
Galois fields:
Consider the algebraic equation of the form: ( coefficients -real numbers)

Where

If root
roots can be obtained easily up to degree 4 by solving equation……
if quadratic equation is
-------------------------roots are complex/imaginary.

Now consider the coefficients are binary.

--------roots are complex


New root is defined
The root alpha lies within a finite field known as GF(Galois field)
The binary numbers---{0, 1}
Additive identity ----Multiplicative identity-------
Additive inverse of Multiplicative inverse of
The fields are usually expressed as

GF(
Addition table for GF(
+ 0 1
0 0 1
1 1 0
0 1
0 1
1 0
0 1
1 0
1 0
Multiplication table for GF(
X 0 1
0 0 0 0 0 0 0 0 0
1 0 1
0 1
0 1
0 1
0 1
0 1
0 1
The field elements of GF( The field elements of GF(
Consider the polynomial eq: Consider the polynomial equation
0
0
1
1

1
1
• A polynomial g(x) that can not be factored into polynomials of lower
degree is said to be irreducible.
• The polynomial is not only irreducible, it is also primitive which means
that successive powers of upto are all unique.
• Order of the element: for an element is defined as the smallest positive
integer such that .
• Order of the field: the number of elements with in the field.
• Beta is a field element of GF( then the conjugates of beta are where r is
the smallest integer such that .
• The minimal polynomial of in GF( is_____________
• Sol: Conjugates of are
• The minimal polynomial of is
Convolutional Encoder:
Cyclic Codes:
An n-bit cyclic code word represented as
C=

For Example: C= [0 0 0 0; 0 1 0 1; 1 0 1 0; 1 1 1 1]

Represented by the polynomial form:

Shifted by 1 place to the left:

;
Generator Polynomials:
Consider an (n, k) cyclic code,

For (7, 4) the generator polynomial


Matrix form is given by

The parity check polynomial

Dual Cyclic codes:

You might also like