s5 information transmission theory

7
S5. Hamming Group Codes A code word of length n which has k information symbols and m control (check) symbols can be written as a vector: 1 2  n v a a a   Determining the number of information symbols k: for a binary code which is used to transmit N symbols of the information source S, k information symbols are required, which respect the following relation: 2 k  N  Determining the number of control symbols m: for correcting a number of t errors, the number of control symbols is determined using the following relations: - The Hamming margin (n ec essary condition, but not suf fic ient) 0 2 t m i n i C  - The Varsamov-Gilbert margin (su ffi cient condition, but not necessary) 2 1 1 1 2 t m i n i C  Constructing the Hamming codes: - Control (check) matrix H The control matrix H is formed of the base vectors of the space V, in total m vectors, which form the columns of the control matrix H. 1 11 12 1 2 21 22 2 1 2 1 2 n n n m m m mn u h h h u h h h  H h h h u h h h The rule is that the c olumns which have only one symbol of 1 correspond to control symbols in the code word, while the rest of the columns correspond to information symbols. If the control symbols are not clearly delimited from the information symbols, the code is said to be non- systematic. Using elementary transformations, the control matrix can be written in the systematic form, where the control and information symbols are clearly delimited. ' '' m m  H Q I  H I Q One way to form the control matrix H when we know the code parameters is to have on every column the binary representation of the column number. The code word is determined by using the following relation: 0 T  H v

Upload: jesse-meyer

Post on 09-Mar-2016

214 views

Category:

Documents


0 download

DESCRIPTION

S5 Information Transmission Theory

TRANSCRIPT

7/21/2019 S5 Information Transmission Theory

http://slidepdf.com/reader/full/s5-information-transmission-theory 1/7

S5. Hamming Group Codes

A code word of length n which has k information symbols and m control (check) symbols can be

written as a vector:

1 2   nv a a a  

Determining the number of information symbols k: for a binary code which is used to transmit N

symbols of the information source S, k information symbols are required, which respect the following

relation:

2k   N 

Determining the number of control symbols m: for correcting a number of t errors, the number

of control symbols is determined using the following relations:

- The Hamming margin (necessary condition, but not sufficient)

0

2t 

m i

ni

- The Varsamov-Gilbert margin (sufficient condition, but not necessary)

2 1

1

1

2t 

m i

n

i

Constructing the Hamming codes:

- Control (check) matrix H

The control matrix H is formed of the base vectors of the space V, in total m vectors, which form

the columns of the control matrix H.

1 11 12 1

2 21 22 2

1 2

1 2

n

n

n

m m m mn

u h h h

u h h h H h h h

u h h h

The rule is that the columns which have only one symbol of 1 correspond to control symbols in

the code word, while the rest of the columns correspond to information symbols. If the control

symbols are not clearly delimited from the information symbols, the code is said to be non-

systematic.

Using elementary transformations, the control matrix can be written in the systematic form,

where the control and information symbols are clearly delimited.

'

''

m

m

 H Q I 

 H I Q

One way to form the control matrix H when we know the code parameters is to have on every

column the binary representation of the column number.

The code word is determined by using the following relation:

0T 

 H v

7/21/2019 S5 Information Transmission Theory

http://slidepdf.com/reader/full/s5-information-transmission-theory 2/7

- The generator matrix G

The base vectors of size n of the space V, in number of k, determine the rows of the generator

matrix G.

1 11 12 1

2 21 22 2

1 2

n

n

m k k kn

v g g g

v g g gG

v g g g

Similarly, the generator matrix G can be written in its systematic form:

'

''

G I P

G P I 

The code word is determined using the following relation:

v i G

- The relation between G and H

Between the two matrices we have the following relation:

0T 

 H G Considering the systematic forms defined above, we have:

P Q

Q P

Transmission and decoding

The code word v is transmitted through noisy channels and the received code word will be:

'v v   ε where ε is the channel error.

The decoder computes the syndrome using the relation:

' ( )T T T 

s H v H v H  ε ε

In the case of a single error, the syndrome gives the position of the error as the column number

of the control matrix H. If s=0, the transmission was successful.

In order for a code to correct or detect a number of transmission errors, we must have a

minimum distance between code words:- For correcting t errors:

min  2 1d t 

- For detecting t errors:

min  1d t 

Exercises:

1. A number of 20 symbols is transmitted through a noisy channel using a Hamming group code

which can correct a single error.

a. Determine the code parameters n, m and kb. Write the control matrix H of the code and it’s systematic (canonical) forms H’ and H’’

7/21/2019 S5 Information Transmission Theory

http://slidepdf.com/reader/full/s5-information-transmission-theory 3/7

c. Write the canonical forms of the generator matrix G’ and G’’

d. Code the following information word:   1 1 0 0 1i 

e. Considering the error   0 0 1 0 0 0 0 0 0ε   , decode the received code

word and determine the position of the error

2. For the code H(7,3,4) we have the generator matrix G

0 0 1 0 1 1 1

0 1 0 1 1 1 0

1 0 1 1 1 0 0

G

a. Determine the systematic form of the generator matrix G’

b. Determine the systematic form of the control matrix H’

c. Code the information word   0 0 1i  using both the systematic form of the

generator matrix G’ and the control matrix H’

d. Calculate the syndrome for the error   0 1 0 0 1 0 0ε  

3. For the code H(6,3,6) we have the generator matrix G

0 1 1 0 1 0

1 1 0 0 0 1

1 1 0 1 1 0

G

a. Determine the systematic form of the generator matrix G’

b. Code the information word   1 1 0i  using both the systematic and non-systematic

forms of the generator matrix G

c. Calculate the syndrome for the error   0 0 0 0 0 1ε   using the systematic

code word

Solutions:

1. a.2 2 20 5

k k  N k  1

0 0

2 2 2 1 2 1 2 1 5 4t 

m i m i m m m

n n

i i

C C n m k m m

9n m k 

b.

7/21/2019 S5 Information Transmission Theory

http://slidepdf.com/reader/full/s5-information-transmission-theory 4/7

0 0 0 0 0 0 0 1 1

0 0 0 1 1 1 1 0 0

0 1 1 0 0 1 1 0 0

1 0 1 0 1 0 1 0 1

 H 

1 2 3 4 5 6 7 8 9v c c i c i i i c i

0 0 0 0 1 1 0 0 0

0 1 1 1 0 0 1 0 0'

1 0 1 1 0 0 0 1 0

1 1 0 1 1 0 0 0 1

m H Q I 

1 0 0 0 0 0 0 0 1

0 1 0 0 0 1 1 1 0''0 0 1 0 1 0 1 1 0

0 0 0 1 1 1 0 1 1

m H I Q

c.

T P Q

1 0 0 0 0 1 0 1 1

0 1 0 0 0 0 1 0 1

'   0 0 1 0 0 0 1 1 0

0 0 0 1 0 0 1 1 1

0 0 0 0 1 1 0 0 1

k G I P

1 0 1 1 1 0 0 0 0

0 1 0 1 0 1 0 0 0

''   0 1 1 0 0 0 1 0 0

0 1 1 1 0 0 0 1 0

1 0 0 1 0 0 0 0 1

k G P I 

d.

1 1 0 0 1i 

7/21/2019 S5 Information Transmission Theory

http://slidepdf.com/reader/full/s5-information-transmission-theory 5/7

1

2

3

8 9   8

4

4 5 6 7   45

2 3 6 7   2

6

11 3 5 7 9

7

8

9

10 0 0 0 0 0 0 1 1

10 0 0 1 1 1 1 0 00 00 1 1 0 0 1 1 0 0   1

1 0 1 0 1 0 1 0 1   1

c

c

ic i   c

c

c i i i   c H v ic i i i c

icc i i i i

i

c

i

           

   

1 1 1 1 1 0 0 1 1v 

e.

' 1 1 0 1 1 0 0 1 1v v   ε

3

1

1

00 0 0 0 0 0 0 1 1 0

10 0 0 1 1 1 1 0 0 0

'   10 1 1 0 0 1 1 0 0 1

01 0 1 0 1 0 1 0 1 1

0

1

1

T  z H v h

2. a.

1 0 0 0 1 1 1

' 0 1 0 1 1 1 0

0 0 1 1 1 0 1

k G I P

b.

Q P

0 1 1 1 0 0 0

1 1 1 0 1 0 0'

1 1 0 0 0 1 0

1 0 1 0 0 0 1

m H Q I 

c.

Using the generator matrix G’

1 0 0 0 1 1 1

' 0 0 1 0 1 0 1 1 1 0 0 0 1 1 1 0 1

0 0 1 1 1 0 1

v i G

7/21/2019 S5 Information Transmission Theory

http://slidepdf.com/reader/full/s5-information-transmission-theory 6/7

Using the control matrix H’

1

2

4 2 3   4

3

55 1 2 3

4

66 1 2

5

77 1 3

6

7

10 1 1 1 0 0 0

11 1 1 0 1 0 00 0

01 1 0 0 0 1 0

1 0 1 0 0 0 1   1

i

ic i i   c

icc i i i

 H v ccc i i

ccc i i

c

c

         

     

1 2 3 4 5 6 7  0 0 1 1 1 0 1v i i i c c c c

d.

' 0 1 1 1 0 0 1v v   ε

0

10 1 1 1 0 0 0 1

11 1 1 0 1 0 0 0

'   11 1 0 0 0 1 0 1

01 0 1 0 0 0 1 0

0

1

T  z H v

The syndrome is not equal to any column in H’ and is different from 0. This is due to the fact

that there is more than one error in the received code word. Note that the syndrome is equal to the

sum between the 2

nd

and the 5

th

columns in H’ (the positions of the errors).

3. a.

3

1 0 0 0 1 1

' 0 1 0 1 0 1

0 0 1 1 1 1

G I P

b.

0 1 1 0 1 0

1 1 0 1 1 0 0 0 1 1 0 1 0 1 1

1 1 0 1 1 0

v i G

1 0 0 0 1 1

' 1 1 0 0 1 0 1 0 1 1 1 0 1 1 0

0 0 1 1 1 1

sv i G

c.

T Q P

0 1 1 1 0 0

' 1 0 1 0 1 0

1 1 1 0 0 1

m H Q I 

7/21/2019 S5 Information Transmission Theory

http://slidepdf.com/reader/full/s5-information-transmission-theory 7/7

' 1 1 0 1 1 1s sv v   ε

7

1

10 1 1 1 0 0 0

0

' ' 1 0 1 0 1 0 011 1 1 0 0 1 1

1

1

s z H v h