Beruflich Dokumente
Kultur Dokumente
Dr D D Karunaratna
Properties of a good code
A good code (n,M,d)-code should have the following
properties(n- length of a code word, M – number of code
words in the code, d- minimum distance of the code)
Small code length n
Large number of code words M
Large Minimum Distance D
Therefore Aq(n,n) = q
Properties of a good code ….
Consider the following code.
Code C3
00000
01101
10110
11011
d(c) = 3
Can correct 1 error.
n n!
m m!(n m)!
Question : How many different binary codes with 5 codewords (M) can be
constructed from the vectors in (F2)5 ?
32 32!
5 5!(32 5)!
= 201,376
Some of these codes may be equivalent
To find a better code than the binary (5,4,3) code, the minimum distance
of all possible codes has to be computed – Time consuming task.
Permutation of a set
A permutation of a set S = {x1, x2, …., xn } is a one-to-one
mapping f, from S to itself.
Example :
S = {x1, x2, x3 , x4, x5 }
0 0 0 0 0
0 1 1 0 1
C
1 0 1 1 0
1 1 0 1 1
Code equivalence …
Deduce an equivalent code to the following code which
contains the all-zero vector.
012
120
201
Code equivalence …
Deduce an equivalent code to the following code which
contains the all-zero vector.
012 apply the permutation f(0) = 2, 002
120 f(1) = 0, f(2) =1 to the 2nd 110
201 column 221
……………
A2(n,d) = ?
What is A2(5,3) ?
A2(n,d) = ?
What is A2(5,3) ?
Therefore A2(5,3) = 4
Code equivalence …
Any q-array(n,M,d)-code over an alphabet {0,1,…..,q-1} is
equivalent to an (n,M,d)- code which contains the all-zero vector
0= 0 0 0 …..0.
Proof : Take any codeword x1x2….xn and for each xi ≠ 0 apply the
permutation f(xi) = 0, f(0) = xi, f(j) = j for all other values to the
column in which xi appears. Repeat this operation for all xi s
where xi ≠ 0.
Weight of a vector
Lets define the weight of a vector x in (F2)n as the number
of 1’s in x and denoted by w(x).
Example :
w(11100) = 3
w(00011) = 2
Binomial coefficients
Question : How many vectors with weight i are in (F2) n ?
Binomial coefficients
Question : How many vectors with weight i are in (F2) n ?
= Select any different i positions from n positions
assign those positions the value 1 and the other positions 0.
=
n
i
d(11100,00111) = 4
w(11100 + 00111) = w(11011) = 4
d(11100,00111) = w(11100 + 00111)
How can we prove that the minimum distance of this code (C’) is
d+1?
w(x) is even for any x in C’
Since d(x,y) = w(x) + w(y) – 2w(x ∩ y), the distance
between any two code words of C’ should be even
d ≤ d(C’) ≤ d + 1 and d is odd
Since d(C’) has to be even d(C’) should be d+1
Example
Add overall parity check to the following code
00000
01101
10110
11011
Example
Add overall parity check to the following code
00000 000000
01101 → 011011
10110 101101
11011 110110
Example ….
If d is odd, how can we obtain a binary (n,M,d)-code from a
binary (n+1,M,d+1)-code?
How can we obtain (5,4,3)-code from the following (6,4,4)-
code?
000000
011011
101101
110110
Example ….
Choose code words x and y such that d(x,y) = 4.
Choose a position in which x and y differ and delete that
column from all code words.
000000 00000
011011 01101
101101 10111
110110 11010