You are on page 1of 4

DISCRETE MATHEMATICS Coding Theory Chapter 2

Encoding and Decoding :

An Encoding function is an one-to-one function E: Zm2 → Zn2 which provides a means to detect OR
correct Errors occurred during transmission of signals(0’s and 1’s)

The above process is known as Encoding process.

A Decoding function is an onto function E: Zn2 → Zm2 which provides a means to recapture the
transmitted word The process is known as Decoding process.

The word after encoding is –code word.

The rule given by encoding function(E) is known as CODE

EXAMPLES

( Coding function of ex. 1 & 2 are known as (m,m+1) parity-check code)

1.An Encoding function E: Z82 → Z92 is defined as each w1 w2 w3w4 w5 w6 w7 w8 ∈ Z82

,E(w) = w1 w2 w3w4 w5 w6 w7 w8 w9 where w9 = Σ wi i =1 to 8.(Sum wrt modulo 2)

Discuss the significance of E(w).

FURTHER if p = 0.002 is the probability of incorrect transformation of signals find the probability that a
code word (say 110010010) is received with at most one error

Solution 1:the significance of E(w).

E(w) = w1 w2 w3w4 w5 w6 w7 w8 w9 where w9 = Σ wi i =1 to 8.(Sum wrt modulo 2)

if w = w1 w2 w3w4 w5 w6 w7 w8

(1) has even number of 1’s then w9 is 0

(2) has odd number of 1’s then w9 is 1

In both the cases coded word contains even number of 1’s

Next we find probability.

As

p =0.002 probability of receiving word with at the most one error

= p0(1-p)9 +p1(1-p)8
= 0.0020(1-0.002)10 + 0.0021(1-0.002)8

Q2.An Encoding function E: Zm2 → Zm+12 is defined as each w1 w2 w3w4 w5 w6 w7 w8 ∈ Z82

,E(w) = E(w1 w2 w3…wm) = w1 w2 w3…wmwm+1

wm+1 = 0, if w contains even number of 1’s

=1, if w contains odd number of 1’s

and Decoding function D: Zm+12 → Zm2 with D(w) = D(r1 r2 r3…rmrm+1) = r1 r2 r3…rm

1.encode (find codeword) of

000,001,011,100,110,101,010∈ Z32

2.Dcode

0000,0001,0101,1111,1010,1100,1101,1001

Ans(2)

By the definition of E

E(000)=0000 E(100)=1000 E(110)=1101 E(001)=0011

E(101)=1011 E(011)=0111 E(010)=0100

2.Dcoding

D(0000)=000 D(0001)=000

D(0101)= 010 D(1010)=101

D(1111)=111 D(1100)=110

D(1101)=110 D(1001)=100
(3m,m) Triple Repetition code
Q3.An Encoding function E: Zm2 → Z3m2 is defined as

each w1 w2 w3w4 w5 w6 w7 w8 ∈ Z82

,E(w) = E(w1 w2 w3…wm) = w1 w2 w3…wmw1 w2 w3…wmw1 w2 w3…wm

and Decoding function

D: Z3m2 → Zm2

D(w) = D(r1 r2 r3…rmrm+1 r2 r3…r2mr2m+1 r2 r3…rm3m) = s1 s2 s3…sm

Where si = 1 if majority of ri+m ri +2m ri+3m

=0 if majority of ri+m ri +2m ri+3m

(a) Encode (Or find Code words) of

E: Z32 → Z62

000,011,010,100,001,101,110,111

(b) Decode E: Z62 → Z22

111111,101010, 010101,100100,0100011,110110,010111,000111

Ans 3a)Encoding(Or find Code words)

E(000) = 000 000 000; E(011) =011 011 011

E(010) = 010 010 010; E(100)= 100 100 100

E (001) = 001 001 001; E(110) = 110 110 110

E(101) = 101 101 101; E( 111) = 111 111 111

b) Decoding

D(111111)=11; D(101010) =10; D(010101)=01; D(100100) =00;

D(010011)=01; D(110110) =11;D(010111)= 01; D(000111) = 01;


Q4.An Encoding function is E: Z32 → Z92 Use triple repetition(9,3) code to
Decode

(a)111101100,000100011,010011111, 001 110011

(b)find THREE different received words r for which D(r ) = 000

Ans4.D: Z92 → Z32

triple repetition(9,3) code to Decode are

si = 1 if majority of ri+m ri +2m ri+3m

=0 if majority of ri+m ri +2m ri+3m

a)D(111101100)=1010 D(000100011) =000

D(010011111)= 011 D(001 110011) = 011

(b)
D(000) = 000000000
D(000) = 010000100
D(000) = 100010001

You might also like