0% found this document useful (0 votes)
5 views

IntroToCBC_Chapter1

Chapter 1 introduces Coding Theory, focusing on error correcting codes that enable reliable message transmission through noisy channels. It discusses the encoding and decoding process, including examples such as ASCII with parity check digits and repetition codes, highlighting their advantages and limitations. The chapter also covers metrics like Hamming and Lee metrics, defining key concepts such as minimum distance, error detection, and error correction capabilities of codes.

Uploaded by

Terry Lau
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

IntroToCBC_Chapter1

Chapter 1 introduces Coding Theory, focusing on error correcting codes that enable reliable message transmission through noisy channels. It discusses the encoding and decoding process, including examples such as ASCII with parity check digits and repetition codes, highlighting their advantages and limitations. The chapter also covers metrics like Hamming and Lee metrics, defining key concepts such as minimum distance, error detection, and error correction capabilities of codes.

Uploaded by

Terry Lau
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Chapter 1

Introduction to Coding Theory

1.1 Error Correcting Codes

Message ⇒ Encoder → Channel → Decoder ⇒ Message


| {z }
+ noise

The goal of Coding Theory is to study how to encode messages so that


we can send them through a noisy channel with a good chance that correct
messages are received.
Mathematically, denote:

m : a message to be sent
C(·) : an encoder
e : noise introduced in the communication
D(·) : a decoder

Then the aim of a communication system is to ensure that

m = D (C(m) + e) .

One of the earliest coding scheme for detecting errors in computers is the
use of a parity check digit.
For example, the ASCII (American Standard Code for Information Inter-
change) coding system uses a byte (binary 8-tuple) to represent characters
used in early computers.

1
Although there are 256 (= 28 ) possible values for a byte, there are only
128(= 27 ) ASCII characters.
Only seven bits in a byte is needed. The extra bit in the binary 8-tuple is
called a parity check digit which is used for error detecting.
Example 1.1. The ACSII codewords representing A, B and C are

Character ASCII Codeword Decimal number


A 1000001 65
B 1000010 66
C 1000011 67

With the seven digits of ASCII codeword x1 x2 . . . x7 is stored, a parity check


digit x8 ≡ x1 + x2 + . . . + x7 mod 2 is added. Therefore,

Character Codeword Stored


A 10000010
B 10000100
C 10000111

Example 1.2. Does 10000000 have any error?


In coding theory, the repetition code is one of the most basic error correcting
codes. In order to transmit a message over a noisy channel that may corrupt
the transmission in a few places, the idea of the repetition code is to just
repeat the message several times. The hope is that the channel corrupts only
a minority of these repetitions. In other words, the decoding of repetition
code makes the following assumption:
Assumption 1.3 (Majority Logic Decoding). The largest number of occur-
rences of a symbol was the transmitted symbol.
This way the receiver will notice that a transmission error occurred since
the received data stream is not the repetition of a single message, and more-
over, the receiver can recover the original message by looking at the received
message in the data stream that occurs most often.
Repetition Code Encoding and Decoding. Let (x1 , x2 , . . . , xn ) be a
binary n-tuple original message. The message is encoded into a binary rn-
tuple by simply repeating the message r times:
C(x) = x1 . . . x1 k x2 . . . x2 k . . . k xn . . . xn .
| {z } | {z } | {z }
r times r times r times

2
Let v = (v1,1 . . . v1,r kv2,1 . . . v2,r k . . . kvn,1 . . . vn,r ) be the received message
with noise introduced during the communication, i.e. v = C(x) + e.
For each 1 ≤ i ≤ n, denote Zi as the number of vi,j such that vi,j = 0
counting over all j’s; and Oi as the number of vi,j such that vi,j = 1 counting
over all j’s. Then w0 = D(v) = (w1 , . . . , wn ) where
(
1 if Oi > Zi ;
wi =
0 if Zi > Oi .

Remark 1.4. What if Oi = Zi ? For this case, it is beyond the error cor-
recting capacity for the repetition code (of n−1
2 ). More on this will be
discussed later.

Example 1.5. Let m be the original message and be encoded as 3-repetitive


code.

Supposed that v = C(m) + e = (000k110k111k010k111) is received. What


is m?

In general, the decoding for repetition codes is slow and inefficient. The
main attraction of the repetition code is the ease of implementation.
In general coding theory, we want to construct encoder and decoder for

• fast encoding of messages;

• easy transmission of encoded messages;

• fast decoding of received messages;

• maximum transfer of information per unit time;

• maximal error correction capability.

Definition 1.6. Let A = {a1 , a2 , . . . , aq } be a set of q symbols where A is


called the code alphabet and a1 , a2 , . . . , aq are called code symbols.

Definition 1.7. A q-ary word of length n over A is a sequence x = x1 . . . xn


with xi ∈ A for all i. Equivalently, x can be viewed as a vector (x1 , . . . , xn ) ∈
An .

Definition 1.8. A q-ary block code (or simply, code) of length n over A is
a nonempty subset C of An . An element of C is called a codeword of C.

3
Definition 1.9. The number of codewords in C, denoted by |C| is called the
logq |C|
size of C. The information rate of C is defined to be . A code of
n
length n and size M is called an (n, M )-code.
Example 1.10. For the ASCII code with parity check digit:

• What is its code alphabet?


• What is its length and size?
• What is its information rate?
Example 1.11. For the binary r-repetition code of length n:

• What is its code alphabet?


• What is its length and size?
• What is its information rate?

1.2 Codes Endowed with Metrics


In this section, we assume the space of An is considered as a metric space. A
metric can be defined either by a distance function, or by a norm function.
We shall consider only integer-valued distance functions and norms.
A distance d(x, y) between x, y ∈ An is a function satisfying conditions:
(Non-negative) : d(x, y) ≥ 0, ∀x, y;
(Zero-value) : d(x, y) = 0 ⇔ x = y;
(Symmetry) : d(x, y) = d(y, x);
(Triangle Inequality) : d(x, y) ≤ d(x, z) + d(z, y), ∀x, y, z.
A norm function N (x) should satisfy next axioms:
(Non-negative) : N (x) ≥ 0, ∀x;
(Zero-value) : N (x) = 0 ⇔ x = 0;
(Triangle Inequality) : N (x + y) ≤ N (x) + N (y), ∀x, y.
The norm function allows to construct the distance function as follows:
d(x, y) := N (x − y).

Let Zq ∼
= Z/qZ be an additive group using the modulo q addition.

4
Definition 1.12 (Hamming metric). The Hamming norm wtH (x) of a vector
x is defined as the number of nonzero coordinates. The Hamming distance
between x and y ∈ An is the norm of the difference: dH (x, y) = wtH (x − y).

If A is an additive group, for x = x1 . . . xn and y = y1 . . . yn ∈ An , we have


z = z1 . . . zn = x − y where zi = xi − yi for 1 ≤ i ≤ n.
Alternatively, the Hamming weight of a vector wtH (x) can be defined as the
cardinality of its support:
Definition 1.13. Let x ∈ Znq . The support of x, Supp(x) is a set of indices
i ∈ {1, . . . , n} such that xi 6= 0.
Example 1.14. Let x = 10101, y = 11010 and z = 00011 be vectors in Z52 .
Determine dH (x, y), dH (x, z), dH (y, z); and wtH (x), wtH (y), wtH (z).
Definition 1.15 (Lee metric). Let z ∈ Zq . The Lee value of z, |z|L is defined
to be
|z|L = min{z, q − z}.
Let x = (x1 , . . . , xn ) ∈ Znq , the Lee weight is defined to be the sum of the
Lee values of its coordinates, i.e.
n
X
wtL (x) = |xi |L .
i=1

Let y ∈ Znq . The Lee distance x to y, denoted by dL (x, y) is defined as


dL (x, y) := wtL (x − y).
Example 1.16. Let x = (3, 1, 0), y = (4, 0, 1) and z = (1, 2, 3) be vectors
in Z35 . Then wtL (x) = 2 + 1 + 0 = 3, wtL (y) = 1 + 0 + 1 = 2, wtL (z) =
1 + 2 + 2 = 5; and

dL (x, y) = wtL (4, 1, 4) = 1 + 1 + 1 = 3,


dL (x, z) = wtL (2, 4, 2) = 2 + 1 + 2 = 5,
dL (y, z) = wtL (3, 3, 3) = 2 + 2 + 2 = 6.

Let Fqm be a finite field with q m elements, where q is a power of prime. Con-
sider the notation ha1 , . . . , am iFq as Fq -linear span of the elements a1 , . . . , am .
In fact, Fqm is an Fq -linear space with dimension m. In particular, there
exist m elements β1 , . . . , βm ∈ Fqm such that {β1 , . . . , βm } forms a basis for
Fqm , i.e. Fqm = hβ1 , . . . , βm iFq . We will omit the notation Fq is the context
is clear.

5
Definition 1.17 (Rank Support). Let x = (x1 , . . . , xn ) ∈ Fnqm . The support
of x, Supp(x) is an Fq -vector space spanned by elements x1 , . . . , xn , i.e.
Supp(x) = hx1 , . . . , xn i.
Definition 1.18 (Rank metric). Let x = (x1 , . . . , xn ) ∈ Fnqm , the rank
weight of x is defined to be the the dimension of the support of x, i.e.
wtR (x) = dim (Supp(x)) .
Alternatively, let {β1 , . . . , βm } be a basis of Fqm . For each 1 ≤ i ≤ n, we can
write xi as Fq -linear combination of the basis, i.e. there exist cij ∈ Fq such
that
Xm
xi = cji βj .
j=1

Forming an n × m matrix M = [cji ] ∈ Fq , we can rewrite x as


 
c11 . . . c1n
x = (x1 , . . . , xn ) = (β1 , . . . , βm )  ... .. ..  = (β , . . . , β )M

. .  1 m
cm1 . . . cmn
and the rank weight of x can also be defined as wtR (x) = rk (M ).
Let y ∈ Fnqm . The rank distance x to y, denoted by dR (x, y) is defined as
dR (x, y) := wtR (x − y).
Example 1.19. Suppose q = 2, m = n = 4. Let z be a primitive element
in F24 and z 3 , z 6 , z 9 , z 12 be a basis of F24 over F2 .


Let x = (x1 , x2 , x3 , x4 ) = (z 11 , z 10 , 0, z 14 ). Rewrite


x1 = z 11 = 1 × z 3 + 0 × z 6 + 1 × z 9 + 1 × z 12
x2 = z 10 = 0 × z 3 + 1 × z 6 + 0 × z 9 + 1 × z 12
x3 = 0 = 0 × z 3 + 0 × z 6 + 0 × z 9 + 0 × z 12
x4 = z 14 = 1 × z 3 + 1 × z 6 + 1 × z 9 + 0 × z 12
What is wtR (x)?
In the rest of this subsection, we consider the codes endowed with the Ham-
ming metric.
Let C be a code of length n over A. Suppose a codeword of C is sent and the
word x is received.
The minimum distance decoding rule will decode x to c0 if
dH (x, c0 ) = min dH (x, c).
c∈C

6
Definition 1.20 (Minimum distance). Let C be a code of length n over A
with C 6= {0}. The minimum distance of C, denoted by d(C), is

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


x,y∈C,x6=y

Note that this definition is applicable on the Hamming, Lee and rank metric.
A code of length n, size M and distance d is referred as an (n, M, d)-code.

Example 1.21. Consider the binary code

C = {00000, 00111, 11100, 11011}.

Suppose a codeword of C is sent and the word x = 01111 is received. How


do we decode x?

Furthermore, what is dH (C)?

Definition 1.22 (Error Detecting). Let C be a code. C is u-error-detecting


if whenever a codeword is sent and incurs t errors where 1 ≤ t ≤ u, the
received word is not a codeword and hence one always detects the existence
of errors. C is exactly u-error-detecting if C is u-error-detecting but not
(u + 1)-error-detecting.

Definition 1.23 (Error Correcting). Let C be a code. C is v-error-correcting


if whenever a codeword is sent and incurs t errors where 1 ≤ t ≤ v, the re-
ceived word can always be correctly decoded by using the minimum distance
decoding rule. C is exactly v-error-correcting if C is v-error-correcting but
not (v + 1)-error-correcting.

Remark 1.24. If C is u-error-detecting, then C is u0 -error detecting for


u0 < u. Similarly, if C is v-error-correcting, then C is v 0 -error-correcting for
v 0 < v.

Theorem 1.1. Let C be a code such that C 6= {0}. If dH (C) = d, then C is


d−1

exactly (d − 1)-error-detecting and exactly 2 -error-correcting.

Proof. Suppose a codeword c0 is sent and the word x is received with t


errors, where 1 ≤ t ≤ d − 1, i.e. dH (c0 , x) = t. For any c ∈ C, d(c0 , c) = 0
if c = c0 ; d(c0 , c) ≥ d if c 6= c0 . Therefore x is not a codeword in C, thus C
is (d − 1)-error-detecting.
On the other hand, since dH (C) = d, there exist codewords c, c0 ∈ C such
that dH (c, c0 ) = d. If c is sent, there is a chance that by incurring d errors,

7
c0 is received. Since c0 is a codeword, one does not aware the existence of
errors. So C is not d-error-detecting. Therefore, C is exactly (d − 1)-error
detecting.

d−1
 that a codeword c0 is sent
Suppose and
 d−1  the
d
word x is received with at most
2 errors, that is dH (c 0 , x) ≤ 2 < 2 For any c ∈ C such that c 6= c0 ,
.

d = dH (C) ≤ dH (c0 , c)
≤ dH (c0 , x) + dH (x, c)
d
< + dH (x, c)
2
d d
⇒ dH (x, c) > d − = > dH (c0 , x).
2 2
By the minimum distance decoding rule, the receiver
 d−1  decodes x back to c0
and hence the errors are corrected. So C is 2 -error-correcting.
On the other hand, since dH (C) = d, there exist codewords c, c0 ∈ C such
that dH (c, c0 ) = d. Without loss of generality, assume that c and c0 differ in
exactly the first d digits, i.e.

c = c1 . . . cd wd+1 . . . wn
| {z } | {z }
differ with c0 agree with c0

c0 = c01 . . . c0d wd+1 . . . wn .


| {z } | {z }
differ with c agree with c

Let v = d−1
 
2 . Note that 2v < d ≤ 2(v + 1). If c is sent, there is a chance
that by incurring v + 1 errors, the word

x = c01 . . . c0v+1 cv+2 . . . cd wd+1 . . . wn


| {z } | {z } | {z }
agree with c0 agree with c agree with c,c0

is received. Since dH (x, c0 ) = d − (v + 1) ≤ v + 1 = dH (x, c), by the


minimum distance decoding rule, x is wrongly decoded to c0 . So C is not
(v + 1)-error-correcting and hence C is exactly v-error-correcting.

Example 1.25. Consider the binary code

C = {00000, 00111, 11100, 11011}.

Since dH (C) = 3, by Theorem 1.1, the code C is exactly 2-error-detecting


and exactly 1-error correcting.

8
If one error occurred during the transmission, the receiver can always correct
it using the minimum distance decoding rule.
If there are two errors, then the receiver can detect the existence of errors
but may not be able to decode it correctly.
If there are three or more errors, then the receive may not detect the existence
of errors; and even he could detect the existence of errors he would decode
it wrongly.

1.3 Linear Codes


In the rest of this chapter, we will focus on linear codes endowed with the
Hamming metric.

Definition 1.26. Let C be a code of length n over a finite field Fq . C is


called a linear code over Fq if it is a subspace of Fnq , i.e. C ⊆ Fnq such that
for all x, y ∈ C and a, b ∈ Fq , ax + by ∈ C. If dim(C) = k, then C is called
an [n, k]-linear code over Fq . If dH (C) = d, then C is called an [n, k, d]-linear
code over Fq .

Remark 1.27. The linear code defined in Definition 1.26 is endowed with
the Hamming metric. Analogously, the definition can be extended into rank
metric and Lee metric. We will introduce the definition whenever it is nec-
essary.

Suppose C is an [n, k]-code over Fq . Since it is a linear subspace, consider a


basis {c1 , . . . , ck } for C, then every element in C can be written uniquely as
linear combinations of the basis, i.e.

a1 c1 + a2 c2 + . . . + ak ck for some a1 , . . . , ak ∈ Fq .

Then |C| is the number of choices for a1 , . . . , ak , which is equal to |Fq |k .


Therefore, an [n, k]-linear code over Fq is an (n, q k )-code.

Definition 1.28. Let C be a non-zero linear code. The minimum Hamming


weight of C, denoted by wtH (C) is

wtH (C) := min wtH (x).


x∈C,x6=0

Theorem 1.2. If C is a non-zero linear code, then dH (C) = wtH (C).

9
Proof. By Definition 1.20, there exists x, y ∈ C such that dH (C) = dH (x, y).
By Definition 1.12, dH (x, y) = wtH (x − y). Then

dH (C) = dH (x, y) = wtH (x − y) ≥ wtH (C)

since x − y ∈ C as C is linear.
On the other hand, by Definition 1.28, there exists z ∈ C such that wtH (C) =
wtH (z). Then

wtH (C) = wtH (z − 0) = dH (z, 0) ≥ dH (C).

Combining both inequalities, we have dH (C) = wtH (C).

Example 1.29. The binary code

C = {00000, 00111, 11100, 11011} = span{00111, 11100}

is a [5, 2]-linear code in F52 . Moreover,

wtH (C) = min{wtH (00111), wtH (11100), wtH (11011)}


= min{3, 3, 4} = 3.

Example 1.30. Determine a basis, the size and the minimum distance for
the following codes:

1. the binary code C = {00000, 00111, 11100, 11011},

2. the binary r-repetition code of length n,

3. the ASCII code with the parity check digit.

Some advantages of using linear codes:

• Since linear code is a vector subspace, it can be described by using a


basis.

• The distance of a linear code is equal to the minimum weight and hence
is easier to be determined.

• The encoding and decoding for a linear code are simpler and faster
than those for an arbitrary code.

10
Definition 1.31 (Dot Product). For x = (x1 , . . . , xn ), y = (y1 , . . . , yn ) ∈
Fnq , the dot product of x and y is defined as
n
X
T
x · y = xy = x i yi .
i=1

Definition 1.32 (Dual Code). Let C ⊆ Fnq be a linear code. The dual code
C ⊥ is defined to be

C ⊥ = {x ∈ Fnq |x · c = 0 for all c ∈ C} ⊆ Fnq

which is also a linear code over Fq .

Remark 1.33. The dot product over a finite field is not a true inner product.
It does not satisfy the following axiom of inner product:

for all nonzero vector u : hu, ui > 0.

There does not exist an ordering relation “<” in a finite field. Also, there
exists nonzero vectors u such that u · u = 0. For instance, 111 ∈ F33 and
111 · 111 = 0.
Also, C ∩ C ⊥ may be non-trivial and C + C ⊥ may not be equal to Fnq (for
example C = span{1100, 0011} ⊆ F42 ).

Theorem 1.3 (Dimension Theorem). Let C ⊆ Fnq be a linear code. Then

dim(C) + dim(C ⊥ ) = n = dim(Fnq ).

In other words, if C is an [n, k]-linear code over Fq , then the dual code C ⊥ is
an [n, n − k]-linear code over Fq .

Proof. Suppose that dim(C) = k. If C = {0}, then k = 0 and C ⊥ = {x ∈


Fnq |x · 0 = 0} = Fnq and hence dim(C) + dim(C ⊥ ) = 0 + n = n.
Suppose that k ≥ 1. Consider a basis {c1 , . . . 
, ck } for C. Form a k ×n matrix
c1
 c2 
G with ith row equals to ci , i.e. G =  . . Since C = span{c1 , . . . , ck },
 
 .  .
ck
C is the row span of G and hence dim(C) = rk(G).

11
On the other hand, for x ∈ Fnq ,
   
c1 c1 · x
 c2   c2 · x 
x ∈ C ⊥ ⇔ GxT = 
 T 
x =   = 0.
 
.. ..
 .   . 
ck ck · x

Hence C ⊥ is the nullspace of G and dim(C ⊥ ) = nullity(G).


By dimension theorem for matrices,

dim(C) + dim(C ⊥ ) = rk(G) + nullity(G) = n.

Let C be an [n, k]-linear code. Consider a basis {g1 , . . . , gk } for C, where


each gi = (gi1 , . . . , gin ) for gij ∈ Fq .
As discussed in previous section, we can define a k × n matrix G with its
row as g1 , . . . , gk , i.e.
 
g11 g12 . . . g1n
 g21 g22 . . . g2n 
G= . ..  .
 
.. . .
 .. . . . 
gk1 gk2 . . . gkn

For x ∈ Fnq ,

k
X
x∈C ⇔x= ai gi for some ai ∈ Fq
i=1
Xk
⇔x= ai (gi1 , . . . , gin ) for some ai ∈ Fq
i=1
 
g11 g12 . . . g1n
 g21 g22 . . . g2n 
⇔ x = (a1 , . . . , ak )  for some ai ∈ Fq
 
.. .. . . .. 
 . . . . 
gk1 gk2 . . . gkn
⇔ x = aG for some a ∈ Fkq .

This implies that C = {aG|a ∈ Fkq }.

12
Definition 1.34 (Generator Matrix). The matrix G defined above is called
a generator matrix for C.

The encoding of a linear code is very simple. Given a message a ∈ Fkq , we


simply encode it to the codeword c = aG.
Definition 1.35. A generator matrix G for an [n, k]-linear code C over Fq
is said to be in standard form or systematic form if G = [Ik | X] where Ik is
k×(n−k)
the k × k identity matrix and X ∈ Fq .
Remark 1.36. Not all codes have a generator matrix in standard form.
However, in practice, we prefer to use a linear code with a generator matrix
in standard form so that a given message a ∈ Fkq is encoded to the codeword

c = aG = a[Ik | X] = (a, aX)

where the first k digits of the codeword is the message itself.


Definition 1.37 (Parity Check Matrix). Let C be an [n, k]-linear code. A
generator matrix for the dual code C ⊥ is called a parity check matrix.
Example 1.38. Consider the code

C = {00000, 00111, 11100, 11011} = span{00111, 11100}.

Determine a generator matrix and a parity check matrix for C.


Theorem 1.4. Suppose C is an [n, k]-linear code over Fq with a generator
k×(n−k)
matrix G in standard form, i.e. G = [Ik | X] where X ∈ Fq . Then
H = [−X T | In−k ] is a parity check matrix for C. Furthermore, C = {c ∈
Fnq | cH T = 0}, that is C is the nullspace of H.

Proof. Since G is a generator matrix for C, for all x ∈ C, there exists a ∈ Fkq
such that x = aG. Let H be generator matrix for C 0 , for all y ∈ C 0 , there
exists b ∈ Fn−k
q such that y = bH. We want to show that C 0 = C ⊥ . Then

y · x = bH(aG)T
 
T Ik
= b[−X | In−k ] aT
XT
= b0(n−k)×k aT = 0.

This implies that y ∈ C ⊥ and C 0 ⊆ C ⊥ . Since dim(C 0 ) = rk(G) = n − k =


dim(C ⊥ ), we have C 0 = C ⊥ .

13
Let h1 , . . . , hn−k be the rows of H, note that {h1 , . . . , hn−k } is a basis for
C ⊥ . For any x ∈ C, hi · x = hi xT = 0 for all i. Then

h1 xT
   
h1
 h2  T
 T  h2 x
 
T
Hx =  .  x =   = 0(n−k)×1 .
 
. .
.
 .   . 
hn−k hn−k x T

Hence x ∈ null(H) and C ⊆ null(H).


Note that

dim(null(H)) = nullity(H)
= n − rk(H)
= n − dim(C ⊥ )
= n − (n − dim(C)) = dim(C).

Therefore C = null(H).

Theorem 1.5. Let C be a linear code over Fq with parity check matrix H.
Then

(i) dH (C) ≥ d if and only if any d − 1 columns of H are linearly indepen-


dent; and

(ii) dH (C) < d if and only if there exist d−1 columns of H that are linearly
dependent.

Proof. Since (i) and (ii) are logically equivalent, it suffices for us to show the
statement (ii).
Let H = k1T . . . knT where kiT is the ith column of H. For any x =
 

(x1 , . . . , xn ) ∈ Fnq , suppose that wtH (x) = t and the nonzero coordinates
are at the position i1 , . . . , it , i.e. xj = 0 if and only if j 6∈ {i1 , . . . , it }. Then
 
x1 n
HxT = k1T . . . knT  ...  =
 X X
xj kjT = xj kjT .
 

xn j=1 j∈{i1 ,...,it }

(⇒) Suppose that dH (C) = wtH (C) = t < d. Then there exists a codeword
x = x1 . . . xn ∈ C of weight t and the nonzero coordinates are at i1 , . . . , it .

14
X
Since HxT = 0, we have HxT = xj kjT = 0, and hence kiT1 , . . . , kiTt
j∈{i1 ,...,it }
are linearly dependent. By adding in any d − 1 − t other columns of H, we
have d − 1 linearly dependent columns of H.
(⇐) Suppose that H has d − 1 linearly dependent columns {kiT1 , . . . , kiTd−1 },
d−1
X
i.e. aj kiTj = 0(n−k)×1 where not all aj ’s are zero.
j=1
Choose a word x = x1 . . . xn such that xij = aj for 1 ≤ j ≤ d − 1 and xs = 0
d−1
X
otherwise. Then HxT = aj kiTj = 0(n−k)×1 . Hence x ∈ C by Theorem 1.4.
j=1
Since wtH (x) ≤ d − 1, we have dH (C) = wtH (C) ≤ wtH (x) ≤ d − 1 < d.

Corollary 1.6. Let C be a linear code with a parity check matrix H. Then
dH (C) = d if and only if

(i) any d − 1 columns of H are linearly independent; and

(ii) there exist d columns of H that are linearly dependent.

Example 1.39. Let C be a binary [5, 2]-linear code with a parity check
matrix  
1 1 0 0 0
H =  1 0 1 1 0 .
1 0 1 0 1
H has no zero column ⇒ dH (C) > 1.
No two columns are multiple of each other, which means that any 3 − 1
columns of H are linearly independent ⇒ dH (C) ≥ 3.
There exists 4 − 1 columns of H that are linearly dependent, i.e. 3rd, 4th
and 5th columns of H ⇒ dH (C) < 4.
Therefore dH (C) = 3, C is 1-error-correcting and 2-error-detecting.

15

You might also like