0% found this document useful (0 votes)
154 views

Group Codes

Coding theory deals with minimizing distortions in messages transmitted over noisy channels by encoding messages. Encoders transform messages into encoded words and decoders transform encoded words back into the original message. A group code encodes messages as codewords in a group where addition is modulo 2. Hamming codes add parity bits to detect and correct errors. The generator matrix defines the encoding function and the parity check matrix is used for decoding by checking for errors in the received word. Decoding tables can be used to decode received words and determine the original message if the number of errors is within the error correcting capability of the code.

Uploaded by

ABHISHEK MISHRA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views

Group Codes

Coding theory deals with minimizing distortions in messages transmitted over noisy channels by encoding messages. Encoders transform messages into encoded words and decoders transform encoded words back into the original message. A group code encodes messages as codewords in a group where addition is modulo 2. Hamming codes add parity bits to detect and correct errors. The generator matrix defines the encoding function and the parity check matrix is used for decoding by checking for errors in the received word. Decoding tables can be used to decode received words and determine the original message if the number of errors is within the error correcting capability of the code.

Uploaded by

ABHISHEK MISHRA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

CODING THEORY

INTRODUCTION
• Process of communication involves
transmitting some information carrying signal
that is conveyed by a sender to a receiver.
• Coding theory deals with minimizing the
distortions of the conveyed message due to
noise and retrieve the original message to the
optimal extent possible.
ENCODERS AND DECODERS
• ENCODER- a device which transforms the
incoming messages in such a way that the
presence of noise in the transformed message
is detectable.
• DECODER- a device which transforms the
encoded message into their original form that
can be understood by the receiver.
Transmitter→Encoder→Channel→Decoder→ Receiver

Noise
The input message which consists of a sequence of letters,
characters or symbols from a specified set –
transformed by the encoder into a string of characters
or symbols of another alphabet in a one-one fashion
GROUP CODE
• Defn. If B={0,1}, then B  {x1, x2 ,...xn | xi  B, i  1,, 2,...n}
n

is a group under the binary operation of addition modulo


2. The group ( B n
is called , )a group code. It is abelian.
• Defn. The codes obtained by introducing additional digits
called parity digits to the digits in the original message
are called Hamming codes. If the original message is a
binary string of length m, the Hamming encoded
message is string of length n (n>m). First m digits
represents the information and the remaining (n-m)
digits are used for the detection and correction of errors
in the message received.
Contd.,
• If the digit introduced in the last position gives
an even number/odd number of 1’s in the
encoded word of length n, the extra digit is
called an even/odd parity check.
• Eg: For a single even parity check , the words
000,001,010,011,100,101,110 and 111
become
0000,0011,0101,0110,1001,1010,1100 and
1111,
DEFINITIONS
• 1. The number of 1’s in the binary string x  B2
• is called the weight of x and is denoted by |x|.
• 2. If x and y represent the binary strings x1,x2,…,xn and y1,y2,
…,yn, the no. of positions in the strings for which xi≠yj is called
the Hamming distance between x and y and denoted by H(x,y).
x y
• H(x,y)=weight of
• x  y u=10101, then
(eg. 1) x=11010,
• H(x,y)=| |=|01111|=4
• 3. The min distance of a code is the minimum of the Hamming
distances between all pairs of encoded words in that code
• (eg2)For x=10110,y=11110 and z=10011,
• Then H(x,y)=1, H(y,z)=3 and H(z,x)=2. Min distance is 1.
GENERATOR MATRIX
• Defn. When m,nϵZ+ and m<n ,the encoding
function e:Bm→Bn, where B={0,1} is given by a
mxn matrix G over B. This matrix G is called
the generator matrix for the code and is of the
form [Im|A], Im is the mxm unit matrix and A is
an mx(n-m) matrix to be chosen suitably.
• Now e(w)=wG
PROBLEM
• Find the code words generated by the matrix
1 0 1 1 0
• G   when encoding function is e : B2
B5

0 1 0 1 1

• Soln: B2={00,10,01,11}.
• e(00)=[00000]; e(10)=[10110];
• e(01)=[01011]; e(11)=[11101]
PARITY CHECK MATRIX AND DECODING SCHEME
• 1. If r is a received word considered as a (1xn)
matrix and if H.rT=[0], then there is no error in
transmission and r is the code word
transmitted. The decoded message then
consists of the first m components of r.
• 2. If H.rT=the ith column of H, then we
conclude that a single error has occurred
during transmission and it has occurred in the
ith component of r. Changing the ith
component of r, we get the code word
transmitted.
• 3. If neither case(1) nor case(2) occurs then
we conclude that more than one transmission
error have occurred.

• Note:
• Theorem: A code can correct a set of at the
most k errors iff the min distance between any
two code words is atleast 2k+1.
PROBLEM
• 1. Find the code words generated by the
encoding function e:B2→B5 with respect to the
parity check matrix
 0 1 1 
 
 0 1 1 
H   1 0 0   [ A T
| I n  m ]
 
 0 1 0 
 0 0 1 

1 0 0 1 1
S o ln : G  [ I m | A ]  
0 1 0 1 1 
B 2  {0 0 , 0 1,1 0 ,1 1} , e ( w )  w G
e ( 0 0 )  [ 0 0 0 0 0 ]; e ( 0 1)  [ 0 1 0 1 1]
e (1 0 )  [1 0 0 1 1]; e (1 1)  [1 1 0 0 0 ]
PROBLEM
• 2. Find the code words generated by the parity
check matrix
1 1 1
1 0 1 

0 1 1
H   when the encoding function is e : B  B
3 6

1 0 0
0 1 0
 
0 0 1
PROBLEM
• 3. Given the generator matrix
1 0 0 1 1 0
G  0 1 0 0 1 1  , e : B3  B6
0 0 1 1 0 1 
• Find the corresponding parity check matrix
and use it to decode the following received
words and hence, to find the original message.
Are all the words decoded uniquely?
• (i)110101 (ii)001111 (iii)110001 (iv)111111
SOLUTION
1 0 1 1 0 0
G  [I3 | A], then H  [ AT | I3 ]  1 1 0 0 1 0
0 1 1 0 0 1 
(i)For r  [110101]
0
H.rT  0 , no error. Original message is 110
0
(ii)For r  [001111]
0
H.rT  1 is the same as fifth column of H. Error is in the 5th position.
0
Decoded word is 001101 and the original message is 001.
(iii)For r [110001]
1
H.rT  0 is the same as fourth column of H. Error is in the 4th position.
0
Decoded word is 110101 and the original message is 110.
(iv)For r [111111]
1
. T  1 is not identical with any column of H,
Hr
1
the received word cannot be decoded uniquely.
DECODING TABLE
• PROBLEM
• 1. Construct the decoding table for the group code is
given by the generator matrix
1 0 0 1 1 1
G  0 1 0 1 0 1
0 0 1 0 1 1

• Decoding the following received words using the


decoding table obtained . Which of the words could not
be decoded uniquely?
• 101111,011010,101110,111111.
• G is a 3x6 matrix, it corresponds to the encoding
function e:B3→B6.
• B3={000,001,010,100,011,101,110,111}
• e(000)=[000000]; e(001)=[001011]
• e(010)=[010101]e(100)=[100111];
e(011)=[011110];e(101)=[101100];
e(110)=[110010];e(111)=[111001]
• Form the decoding table by making these encoded
words as the element as the first row and the
coset leaders as the elements of the first column.
000000 001011 010101 100111 011110 101100 110010 111001
100000 101011 110101 000111 111110 001100 010010 011001

010000 011011 000101 110111 001110 111100 100010 101001
 
001000 000011 0111101 101111 010110 100100 111010 110001
000100 001111 010001 100011 011010 101000 110110 111101
 
000010 001001 010111 100101 011100 101110 110000 111011
000001 001010 010100 100110 011111 101101 110011 111000
 
011000 010011 001101 111111 000110 110100 101010 100001
Decoding of the received words
• (i)101111 appears in the 4th row and 4th
column. The coset leader of the 4th row is
001000, which contains only one 1
• Since the min weight of the code words is 3,
atmost one error can be corrected in the
received word
• The corrected word, the code word
transmitted is the top element of the 4th
column. It is 100111. The original message is
100.
• (ii) 011010 appears in the 5th row and 5th collumn .
Hence the corresponding code word transmitted is
011110 and hence the original message is 011.
• (iii) 101110 appears in the 6th row and 6th column.
Hence the corresponding code word transmitted is
101100 and hence the original message is 101
• (iv)111111 appears in the 8th row , the coset leader of
which contains two 1’s the received word contains 2
errors. Hence they can’t be corrected and the code
word transmitted cannot be uniquely determined.

You might also like