Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

The Dual Code and The Parity-Check Matrix: If Is A Linear Code

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Chapter 7

The Dual Code and the Parity-Check


Matrix

Definition 7.1. Let x, y ∈ V (n, q). Then

x · y = x1 y1 + x2 y2 + · · · + xn yn

is the scalar product of x and y.


If x · y = 0, then x and y are orthogonal.

Note 7.2. The scalar product satisfies the following:

(i) (x + y) · z = x · y + y · z;

(ii) (λx · y) = λ(x · y);

(iii) x · y = y · x.

Definition 7.3. Given an [n, k]-code C, the dual code C ⊥ is given by

C ⊥ = {x ∈ V (n, q) | x · y = 0, for all y ∈ C}.

Example 7.4. (i)


C = {0000, 1001, 0110, 1111},
C ⊥ = {0000, 1001, 0110, 1111}.

(ii)
C = {0000, 1000, 0100, 1100},
C ⊥ = {0000, 0010, 0001, 0011}.

Lemma 7.5. If C is an [n, k]-code with generator matrix G, then

(i) C ⊥ is a linear code;

(ii) C ⊥ = {x ∈ V (n, q) | xGT = 0}; that is, x is orthogonal to every row of G.

30
Proof (i) If y, y ′ ∈ C ⊥ , then

x · y = x · y ′ = 0 for all x ∈ C
⇒ x · (y + y ′) = 0 for all x ∈ C,
x · (λy) = 0 for all x ∈ C.

(ii)
xGT = 0 ⇐⇒ x[r1T , . . . , rkT ] = 0 ⇐⇒ x · riT = 0 for all i ⇐⇒ x · ri = 0 for all i,

where r1 , . . . , rk are the rows of G. 

Definition 7.6. A parity-check matrix H for an [n, k]-code C is an (n − k) × n matrix which


is a generator matrix for C ⊥ .
Theorem 7.7. (i) If C is an [n, k]-code over Fq , then C ⊥ is an [n, n − k]-code over Fq .

(ii) If G = [Ik A], then a generator matrix for C ⊥ is H = [−AT In−k ].

Proof (i) By Lemma 7.5, C ⊥ is a linear code of length n over Fq . If G is a generator matrix
for C, with rows r1 , . . . , rk and columns c1 , . . . , cn , then
 
r1
G = [c1 , . . . , cn ] =  ...  .
 
rk

Consider ϕ : V (n, q) −→ V (k, q) given by

x 7−→ xGT = x[r1T , . . . , rkT ]


= (x · r1 , . . . , x · rk )
= x1 cT1 + · · · + xn cTn

Then
n = dim(ker ϕ) + dim(im ϕ). (7.1)
As rank G = k, considering im ϕ in terms of the columns of G, so dim(im ϕ) = k. Hence,
from (7.1) dim(ker ϕ) = n − k.
Aliter, let G = [Ik A] be a generator matrix for C, then x ∈ C ⊥ ⇔ GxT = 0:
 x1
 

1 0 ··· 0 a11 · · · a1,n−k  .. 
 0 1 ··· 0 a21 · · · a2,n−k   . 
 .. ..   xk  ;
  
 . .  . 
 .. 
0 ··· 1 ak1 · · · ak,n−k
xn

x1 + a11 xk+1 + · · · + a1,n−k xn = 0,


x2 + a21 xk+1 + · · · + a2,n−k xn = 0,
.. ..
. .
xk + ak1 xk+1 + · · · + ak,n−k xn = 0.

31
So any choice can be made for xk+1 , . . . , xn ; then x1 , . . . , xk are determined. Hence C ⊥ = q n−k .
Hence dim C ⊥ = n − k.
(ii) G = [Ik A], H = [−AT In−k ], rank H = n − k. Then
 
T −A
GH = [ Ik A ] = Ik (−A) + AIn−k = −A + A = 0.
In−k

So HGT = 0; that is, the rows s1 , . . . , sn−k of H are in C ⊥ . But rank H = n − k; so H is a


generator matrix for C ⊥ . 

Example 7.8. C2 = {000, 011, 101, 110} is a [3, 2]2 -code


 
1 0 1
G= , H = [ 1 1 1 ].
0 1 1

Theorem 7.9. The following are equivalent conditions on H:


(i) H is a parity-check matrix for C;

(ii) HxT = 0 for all x ∈ C;

(iii) xH T = 0 for all x ∈ C.


Note 7.10. (i) rank G = k, rank H = n − k;

(ii) C is equally well-specified by G or H;


(iii) If G = [Ik A] then a suitable parity-check matrix is H = [−AT In−k ].
Theorem 7.11. If C is an [n, k]q -code then (C ⊥ )⊥ = C.

Proof If x ∈ C, then x · y = 0 for all y ∈ C ⊥ . So x ∈ (C ⊥ )⊥ . But

dim (C ⊥ )⊥ = n − (n − k) = k.

Hence C ⊂ (C ⊥ )⊥ . As dim C = dim (C ⊥ )⊥ , so C = (C ⊥ )⊥ . 

Definition 7.12. If H = [B, In−k ] it is in standard form.


Example 7.13. C3 = {00000, 01101, 10110, 11011} is a [5, 2]-code. Then, with
 
  1 1 1 0 0
1 0 1 1 0
G= , H =  1 0 0 1 0 .
0 1 1 0 1
0 1 0 0 1

If x = (x1 , x2 , x1 + x2 , x1 , x2 ) ∈ C3 ,

x1 + x2 + x3 = 0,
x1 + x4 = 0,
x2 + x5 = 0,
x = (x1 , x2 , x1 + x2 , x1 , x2 ).

Note that C3⊥ is a [5, 3]-code.

32
Explanation for the term parity-check matrix If u = u1 · · · uk v1 · · · vn−k , where the
message symbols are u1 · · · uk ,
HuT = 0,
u1
 
 .. 
 . 
 u 
 
c1 c2 · · · ck e1 e2 · · · en−k  k  ,

 v1 
 . 
 .. 
vn−k
u1
 
 ..
 .


 uk

 
B | In−k  = 0,

 v1


 .
 ..


vn−k
u1
 
  . 
b11 · · · b1k 1 0 ··· 0   .. 
 b21 · · · b2k 0 1 ··· 0   uk 
 
.. .. ..  = 0,

  v1 
 
 . . .
· · · 1  ... 
 
bn−k,1 · · · bn−k,k 0 0
vn−k
k
X
bij uj + vi = 0, for i = 1, . . . , n − k.
j=1

As bij = −aji , so the symbols vi are determined.

Syndrome Decoding
Definition 7.14. Let H be a parity-check matrix for the [n, k]-code C. Then for any y ∈
V (n, q),
sH (y) = yH T = (Hy T )T
is the syndrome of y, a vector of length n − k.
Lemma 7.15. (i) yH T = 0 ⇐⇒ y ∈ C;
(ii) x + C = y + C ⇐⇒ x and y have the same syndrome;
(iii) There exists a one to one correspondence between cosets and syndrome.

Proof (i) This is by definition.


(ii) x + C = y + C ⇐⇒ x − y ∈ C ⇐⇒ (x − y)H T = 0 ⇐⇒ xH T = yH T .
(iii) This follows from (ii).

33
Algorithm 7.16. I. Set up 1-1 correspondence between coset leaders and syndromes.
II. If y is a received vector, calculate the syndrome s = yH T .

III. Find coset leader e associated to s.

IV. Correct y to y − e.
Now much less needs to be stored, namely just coset leaders and syndromes.
Example 7.17. C3 = {00000, 10110, 01101, 11011} Single error-correcting [5, 2]-code.
 
  1 1 1 0 0
1 0 1 1 0
G= H= 1 0 0 1 0 
0 1 1 0 1
0 1 0 0 1

coset leader 00000 10000 01000 00100 00010 00001 11000 10001
syndrome 000 110 101 100 010 001 011 111
If the received message appears in the last two cosets we need to ask for retransmission,
since the weight of the coset leader is 2.
(i) y = 11110, yH T = 101, e = 01000,

x = y − e = y + e = 10110.

(ii) y = 01100, yH T = s = 001, e = 00001,

x = y + e = 01101.

(iii) y = 11100, yH T = 111, e = 10001,

ask for retransmission.

Theorem 7.18. Let C be an [n, k]-code with parity-check matrix H. Then

d(C) = d = min d(x, y)


x6=y

if and only if some d columns of H are linearly dependent but every d−1 columns are linearly
independent.

Proof Let the columns of H be c1 , . . . , cn , that is, H = [c1 , . . . , cn ]. Then x ∈ C, with


x = x1 · · · xn , if and only if HxT = 0; that is,

x1 c1 + · · · + xn cn = 0.

Now, x has weight d − 1 ⇐⇒ ∃j1 , . . . , jd−1 ∈ N such that xj1 , . . . , xjd−1 6= 0 and all other
xj = 0 ⇐⇒ xj1 cj1 + · · · + xjd−1 cjd−1 = 0. Hence there exists no word of weight d − 1 if and
only if every d − 1 columns are linearly independent.
Similarly x is a word of weight d if and only if there exists i1 , . . . , id ∈ N such that
xi1 , . . . , xid 6= 0 and all other xi = 0; this occurs if and only if xi1 ci1 + · · · + xid cid = 0. Hence
there exists a word of weight d if and only some d columns are linearly dependent. 

34
Corollary 7.19. (Singleton bound) For an [n, k, d]-code,

d ≤ n − k + 1.

Proof As every d − 1 columns of H are linearly independent, rank (H) = n − k ≥ d − 1.




Example 7.20. (i) Ternary [4, 2]-code with parity-check matrix


 
1 2 0 1
H= , d = 3.
0 2 1 2

(ii) Binary [5, 2]-code with parity-check matrix


 
1 1 1 1 0
H =  0 1 1 0 1 , d = 3.
0 0 1 1 1

(iii) Binary [8, 4]-code with parity-check matrix


 
1 0 0 0 1 0 1 1
 0 1 0 0 0 1 1 1 
H=  0 0 1
, d = 4.
0 1 1 0 1 
0 0 0 1 1 1 1 0

Definition 7.21. An [n, k, d]-code over Fq with d = n−k +1 is maximum distance separable,
abbreviated MDS.

35

You might also like