PowerPoint 簡報 - 國立台北大學
Download
Report
Transcript PowerPoint 簡報 - 國立台北大學
Perfect and Related Codes
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)
p2.
Perfect and Related Codes
[1] Some bounds for codes
1. The number of word of length n , weight t
n!
( )
t !(n t )!
n
t
2. Theorem 3.1.1
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
(n0 ) (1n ) (n2 ) .... (nt )
p3.
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
2n
C n
(0 ) (1n ) (n2 ) .... (nt )
Eg 3.1.4 Give an upper bound of the size of a linear code C of
length n=6 and distance d=3
|C |
26
6 6
0
1
64
7
So | C | 9 but the size of a linear code C must be a power of 2 so | C | 8
p4.
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)
p5.
Perfect and Related Codes
6. Theorem 3.1.13 Gilbert-Varshamov condition
There exists a linear code of length n, dimension k and distance d
if
(n0 1 ) (1n 1 ) ..... (dn 12 ) 2n k
(<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
2n 1
C n-1
n-1
(0 ) (1n-1 ) (n-1
)
....
(
2
d-2 )
(<pf> choose k such that
then |C| = 2k =
2nk 1
2n 1
RHS
2n k 1
(n0 1 ) (1n 1 ) ..... (dn 12 ) 2n k
)
p6.
Perfect and Related Codes
Eg 3.1.15 Does there exist a linear code of length n=9, dimension k=2,
and distance d=5? Yes, because
8 8 8 8
93 128 292
0 1 2 3
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?
291
2.75 but |C| is a power of 2 so |C| ≧ 4
G-V lower bound: |C| ≧
93
29
512
Hamming upper bound: |C| ≦
11.13
9 9 9
0 1 2
1 9 36
but |C| is a power of 2 so |C| ≦ 8
p7.
Perfect and Related Codes
Eg 3.1.17 Does there exists a (15, 7, 5) linear code?
Check G-V condition
n 1 n 1
n 1 14 14 14 14
...
0
1
d
2
0 1 2 3
1 14 91 364 470 2157 2nk 256
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)
p8.
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
2n
C n
(the Hamming bound)
n
n
n
(0 ) (1 ) (2 ) .... (t )
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
p9.
Perfect and Related Codes
[3]. Hamming Codes
r
1. Definition: Hamming code of length 2 -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
110
1000111
101
0100110
parity check matrix H 011 ,the generator matrix G=
0010101
100
0001011
010
001
p10.
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)
n
n
n
2r 1
2
2
2
2
2r 1r
n
2
C
n
n
n
n
n
r
(0 ) (1 ) (2 ) .... (t ) (0 ) (1 ) 1 n 1 2 1
p11.
Perfect and Related Codes
[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* = H
0
Why?
H
G H G b
0
*
*
j where j is the nx1 col of all ones.
1
j
GH Gj b 0 0 0
1
where Gj+b=0
p12.
Perfect and Related Codes
Eg 3.4.1
C: length 5
10010
G= 01001 ,
00111
C*: length 6
10010 0
G*= 01001 0 ,
00111 1
10
01
H= 11 , GH=0
10
01
10 1
01 1
11 1
H*=
, G*H*=0
10
1
01 1
00 1
p13.
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
1 1 0 1 1 1 0 0 0 1 0 1
B:
B
B 1
j
1
0
1
1
j T 1
0 0
0
0
1
0
1
0 1 1 1 0 0 0 1 0 1 1
1 1 1 0 0 0 1 0 1 1 1
1 1 0 0 0 1 0 1 1 0 1
1 0 0 0 1 0 1 1 0 1 1
0 0 0 1 0 1 1 0 1 1 1
0 0 1 0 1 1 0 1 1 1 1
0 1 0 1 1 0 1 1 1 0 1
1 0 1 1 0 1 1 1 0 0 1
0 1 1 0 1 1 1 0 0 0 1
1 1 0 1 1 1 0 0 0 1 1
1 1 1 1 1 1 1 1 1 1 0
p14.
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
B
H (Algorithm 2.5.7)
I
Another parity check matrix
I
I
H , GH=[I, B] I 2 B 2 I BB T I I 0
B
B
Another generator matrix [B, I]
C24 self-dual; C24 C⊥
24
The distance of C is 8
C24 is a three-error-correcting code
p15.
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
p16.
Perfect and Related Codes
2. Eg. 3.6.2
decode w = 101111101111, 010010010010
s wH 101111101111 001111101110
= 100000000001
= = > wt ( s ) 3 (rule 2)
= = > u [s, 0] 100000000001, 00000000000
= = > v w u 001111101110, 010010010010
p17.
Perfect and Related Codes
[7]. The Golay code
1. C23
Removing a digit from every word in C24
B : 12 x 11 matrix by deleting the last column of B
^
G: 12x23 matrix, G=[I12, B ]
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
p18.
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)= K 2m
RM(r, m) = {(x , x y ) | x RM (r , m 1), y RM (r 1, m 1)}, 0 r m
2. Eg 3.8.1
R M (0, 0) {0, 1}
R M (0, 1) {00, 11}
R M (1, 1) K 2 {00, 01, 10, 11}
R M (0, 2) {0000, 1111}
R M (2, 2) K 4
R M (1, 2) {(x , x y ) | x {00, 01, 10, 11}, y {00, 11}}
p19.
Perfect and Related Codes
3. Generator matrix G of RM(r, m)
i) 0< r< m
ii) r= 0,
iii)r= m,
G (r , m 1) G (r , m 1)
G (r , m )
0
G (r 1, m 1)
G (0, m ) [11....1]
G (m 1, m )
G (m , m )
0........01
4. Eg 3.8.4 Find G(1,3)
11 11
G (1, 2) 01 01
00 11
G (1, 2)
G (1, 3)
0
G (1, 2)
G (0, 2)
1111
0101
G (1, 3)
0011
0000
1111
0101
0011
1111
p20.
Perfect and Related Codes
5. The properties of RM(r,m)
(1) lengt h n= 2m
(2) dist ance d= 2m-r
r
(3) dimension k= ( mi )
i= 0
(4) RM(r-1,m) is cont ained in RM(r,m), r> 0
(5) dual code RM(m-1-r, m), r< m
p21.
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
1 1
H
I2
1
-1
1 1 0
1 -1 0
I2 H
0 0 1
0 0 1
Definition:
1 0
0 1
0
1
0
0
H I2
1
1
-1
0
H mi I 2m i H I
0
1 0 1
0 -1 0
1 0 -1
0
1
2i 1
p22.
Perfect and Related Codes
2. Algorithm 3.9.4 decoding the RM(1,m) code
_
1) Replace 0 by -1 in w forming w
_
2) Cimput e w1 w H m1 and wi wi 1H mi , for i 2, 3, ..., m
3) Find t he posit ion j of t he largest component of wm
4) v( j ) t he binary represent at ion of j(low order digit s first )
if t he jt h component of wm is
posit ive= > t he presummed message is (1, v( j ))
negat ive= > t he presummed message is (0, v( j ))
codeword v = presumed message m x G(1,m)
p23.
Perfect and Related Codes
Eg 3.9.5 m=3, w=10101011
_
1) w (1, 1, 1, 1, 1, 1, 1, 1)
2)compute :
_
w1 w H 31 (0, 2, 0, 2, 0, 2, 2, 0)
_
w2 w H 32 (0, 4, 0, 0, 2, 2, 2, 2)
_
w 3 w H 33 (2, 6, 2, 2, 2, 2, 2, 2)
3) t he largest component of w 3 is 6 in posit ion 1= > j 1
4) v(1) 100 and 6> 0 = > t he presumed message m = 1100
codeword
1
0
v 1 1 0 0
0
0
1
1
0
0
1
0
1
0
1
1
1
0
1
0
0
1
1
1
0
1
1
0
1
1
1
1
1 0 1 0 1 0 1 0
1
1
p24.