perfect and related codes. p2. outline [1] some bounds for codes [2] perfect codes [3] hamming...
TRANSCRIPT
Perfect and Related Codes
p2.p2.
OUTLINE
[1] Some bounds for codes
[2] Perfect codes
[3] Hamming codes
[4] Extended codes
[5] The extended Golay code
[6] Decoding the extended Golay code
[7] The Golay code
[8] Reed-Muller codes
[9] Fast decoding RM(1,m)
p3.p3.
Perfect and Related Codes
[1] Some bounds for codes
1. The number of word of length n , weight t
2. Theorem 3.1.1
!
( )!( )!
nt
nt n t
n n n n0 1 2 t
If 0 t n and if v is a word of length n, then the number
of words of length n of distance at most t is
( ) ( ) ( ) .... ( )
p4.p4.
Perfect and Related Codes
3. Theorem 3.1.3 Hamming bound(upper bound) C: a code of length n, distance d = 2t+1 or 2t+2
Eg 3.1.4 Give an upper bound of the size of a linear code
C of length n=6 and distance d=3
So but the size of a linear code C must be a power of 2 so
n n n n
0 1 2 t
2C
( ) ( ) ( ) .... ( )
n
7
64
1
6
0
62
||6
C
9|| C 8|| C
p5.p5.
Perfect and Related Codes
4. Theorem 3.1.7 Singleton bound(upper bound) For any (n, k, d) linear codes, d-1≦ n-k (i.e. k ≦ n-d+1 or |C| ≦2n-d+1 )
<pf> the parity check matrix H of an (n,k,d) linear code is an n by n-k matrix such that every d-1 rows of H are independent. Since the rows have length n-k, we can never have more than n-k independent row vectors. Hence d-1≦ n-k.
5. Theorem 3.1.8
For a (n, k, d) linear code C, the following are equivalent:
d = n-k+1
Every n-k rows of parity check matrix are linearly independent
Every k columns of the generator matrix are linearly independent
C is Maximum Distance Separable(MDS) (definition: if d=n-k+1)
p6.p6.
6. Theorem 3.1.13 Gilbert-Varshamov condition There exists a linear code of length n, dimension k and distance d
if
(<pf> design a parity check matrix under this condition. See Ex3.1.22)
7. Corollary 3.1.14 Gilbert-Varshamov bound(lower bound) If n≠1 and d ≠1, there exists a linear code C of length n and distance at
least d with
(<pf> choose k such that
then |C| = 2k = )
Perfect and Related Codes
1 1 1
0 1 2( ) ( ) ..... ( ) 2n n n n kd
1
n-1 n-1 n-1 n-10 1 2 d-2
2C
( ) ( ) ( ) .... ( )
n
12 kn 1 1 1
0 1 2( ) ( ) ..... ( ) 2n n n n kd
RHSkn
n
1
1
2
2
p7.p7.
Eg 3.1.15 Does there exist a linear code of length n=9,
dimension k=2, and distance d=5? Yes, because
Eg 3.1.16 What is a lower and an upper bound on the size or
the dimension, k, of a linear code with n=9 and d=5?
G-V lower bound: |C| ≧ but |C| is a power of 2 so |C| ≧
4
Hamming upper bound: |C| ≦
but |C| is a power of 2 so |C| ≦ 8
Perfect and Related Codes
292128933
8
2
8
1
8
0
8
75.293
2 19
13.113691
512
2
9
1
9
0
929
p8.p8.
Eg 3.1.17 Does there exists a (15, 7, 5) linear code?
Check G-V condition
G-V condition does not hold, so G-V bound does not tell us
Whether or not such a code exists.
But actually such a code does exist. (See BCH code later)
Perfect and Related Codes
2562247036491141
3
14
2
14
1
14
0
14
2
1...
1
1
0
1
715
kn
d
nnn
p9.p9.
Perfect and Related Codes
[2]. Perfect Codes 1. Definition:
A code C of length n and odd distance d = 2t+1 is called perfect code if
2. Theorem 3.2.8 If C is perfect code of length code of length n and
distance d = 2t+1, then C will correct all error pattern of weight less than or equal t
n n n n
0 1 2 t
2C (the Hamming bound)
( ) ( ) ( ) .... ( )
n
p10.p10.
Perfect and Related Codes
[3]. Hamming Codes 1. Definition: Hamming code of length 2r-1
A code of length n = 2r-1, r ≧2, having parity check matrix H whose rows of all nonzero vectors of length r
Eg 3.3.1 the Hamming code of length 7(r=3)
111
1101000111
1010100110
parity check matrix 011 ,the generator matrix G=0010101
1000001011
010
001
H
p11.p11.
Perfect and Related Codes
H contains r rows of weight one, so its r columns are linearly independent.
Thus a Hamming code has dimension k=2r-1-r and contains 2k codewords.
It is a perfect single error-correcting code (d=3)
1. Any two rows of H are lin. indep so d ≧3 2. 100…0, 010…0, and 110…0 are lin. dep. so d ≦3 and thus
d=3 3. Attains the Hamming bound (t=1)
2 12 1
n n n n n n0 1 2 t 0 1
2 2 2 22 C
( ) ( ) ( ) .... ( ) ( ) ( ) 1 1 2 1
r
rn n n
rrn
p12.p12.
[4]Extended Codes 1. Definition: A code C* of length n+1 obtained from C of length n
Construction:
Let G: kxn and choose G*=[G, b] : kx(n+1) where the last col b of G* is appended so that each row of G* has even weight.
Let H: nx(n-k) then H* = where j is the nx1 col of all ones.
Why?
where Gj+b=0
Perfect and Related Codes
10
jH
00010
**
bGjGH
jHbGHG
p13.p13.
Eg 3.4.1
C: length 5
C*: length 6
Perfect and Related Codes
10
10010 01
G= 01001 , H= , GH=011
00111 10
01
10 1
01 110010 0
11 1G*= 01001 0 , H*= , G*H*=0
10 100111 1
01 1
00 1
p14.p14.
Perfect and Related Codes
[5]. The extended Golay code(C24) 1. Definition
the linear code C24 with generator matrix G= [I, B] I: 12x12 identity matrix
B:
011111111111
110001110110
100011101101
100111011010
101110110100
111101101000
111011010001
110110100011
101101000111
111010001110
110100011101
101000111011
01
j
jBB
T
p15.p15.
Perfect and Related Codes
2. Important facts of the extended Golary Code C24
Length n =24, dimension k= 12 , 212=4096 codewords Parity check matrix
Another parity check matrix
Another generator matrix [B, I] C24 self-dual; The distance of C is 8 C24 is a three-error-correcting code
(Algorithm 2.5.7)
BH
I
2 2 , GH=[I, B] 0TI I
H I B I BB I IB B
⊥24 24C C
p16.p16.
Perfect and Related Codes
[6]. Decoding the extended Golay code
1. Algorithm 3.6.1 IMLD for Code C24
w: received word 1) s = wH 2) if wt(s)≦3 then u = [ s,0 ](error pattern) 3) if wt(s+bi) ≦2 for some row bi of B then u=[s+bi, ei] 4) compute the second syndrome sB 5) if wt(sB)≦3 then u=[0, sB] 6) if wt(sB+bi)≦2 for some row bi of B then u=[ei, sB+bi] 7) if u is not yet determined then request retransmission
p17.p17.
Perfect and Related Codes
2. Eg. 3.6.2
decode w = 101111101111, 010010010010
101111101111 001111101110
= 100000000001
==> wt( ) 3 (rule 2)
==> [ ,0] 100000000001,00000000000
==> 001111101110,010010010010
s wH
s
u s
v w u
p18.p18.
Perfect and Related Codes
[7]. The Golay code
1. C23
Removing a digit from every word in C24
: 12 x 11 matrix by deleting the last column of B
G: 12x23 matrix, G=[I12, ]
Length n=23, dimension k=12, 212=4096 words, distance d=7
Perfect code, three-error-correcting code
Algorithm 3.7.1 (decoding)
Form w0 or w1, which has odd weight
Decode wi(I is 0 or 1) using Algorithm 3.6.1 to a codeword c in C24
Removing the last digit from c
^B
^B
p19.p19.
Perfect and Related Codes
[8]. Reed-Muller codes
1. r-th order, length 2m, 0≦r≦m, RM(r, m)
RM(0, m)={00…0, 11…1}, RM(m, m)=
RM(r, m) =
2. Eg 3.8.1
{( , ) | ( , 1), ( 1, 1)},0x x y x RM r m y RM r m r m
2mK
2
4
(0,0) {0,1}
(0,1) {00,11} (1,1) {00,01,10,11}
(0,2) {0000,1111} (2,2)
(1,2) {( , ) | {00,01,10,11}, {00,11}}
RM
RM RM K
RM RM K
RM x x y x y
p20.p20.
Perfect and Related Codes
3. Generator matrix G of RM(r, m)
4. Eg 3.8.4 Find G(1,3)
( , 1) ( , 1)i) 0<r<m ( , )
0 ( 1, 1)
ii) r=0, (0, ) [11....1]
( 1, )iii)r=m, ( , )
0........01
G r m G r mG r m
G r m
G m
G m mG mm
11 11
(1,2) 01 01
00 11
1111 1111
(1,2) (1,2) 0101 0101(1,3) (1,3)
0011 0011 0 (0,2)
0000 1111
G
G GG G
G
p21.p21.
Perfect and Related Codes
5. The properties of RM(r,m)
m
m-r
r
i=0
(1) length n=2
(2) distance d=2
(3) dimension k= ( )
(4) RM(r-1,m) is contained in RM(r,m), r>0
(5) dual code RM(m-1-r, m), r<m
mi
p22.p22.
Perfect and Related Codes
[9]. Fast decoding for RM(1,m) 1. The Kronecker product of matrices
A x B = [aijB]
Eg 3.9.1
Definition:
2
2 2
1 1 1 0 I
1 -1 0 1
1 1 0 0 1 0 1 0
1 -1 0 0 0 1 0 1
0 0 1 1 1 0 -1 0
0 0 1 -1 0 1 0 -1
H
I H H I
12 2m i i
imH I H I
p23.p23.
Perfect and Related Codes
2. Algorithm 3.9.4 decoding the RM(1,m) code
codeword v = presumed message m x G(1,m)
_
_ 11 1
1) Replace 0 by -1 in forming
2) Cimpute and , for 2,3,...,
3) Find the position of the largest component of
4) ( ) the binary representation of j(low order digits first
im mi i
m
w w
w wH w w H i m
j w
v j )
if the th component of is
positive=>the presummed message is (1, ( ))
negative=>the presummed message is (0, ( ))
mj w
v j
v j
p24.p24.
Perfect and Related Codes
Eg 3.9.5 m=3, w=10101011
codeword
_
_ 11 3
_ 22 3
_ 33 3
3
1) (1, 1,1, 1,1, 1,1,1)
2) :
(0,2,0,2,0,2,2,0)
(0,4,0,0,2,2, 2,2)
(2,6, 2,2, 2,2,2, 2)
3) the largest component of is 6 in position
w
compute
w wH
w wH
w wH
w
1=> 1
4) (1) 100 and 6>0 => the presumed message m = 1100
j
v
01010101
11110000
11001100
10101010
11111111
0011
v