1
00:00:13,849 --> 00:00:20,190
Welcome to the course on Coding Theory As
we know the error correcting and error detecting
2
00:00:20,190 --> 00:00:26,449
capability of error correcting codes depends
on the distance profile of these codes so
3
00:00:26,449 --> 00:00:33,870
today we are going to talk and talk about
the distance properties of linear block codes
4
00:00:33,870 --> 00:00:42,309
We are going to describe what we mean by Hamming
distance of codes and then we are going to
5
00:00:42,309 --> 00:00:48,260
talk about how the minimum Hamming distance
of code is related to the columns of parity
6
00:00:48,260 --> 00:00:58,370
check matrix I am first going to describe
what is Hamming weight So if we have a n-tuple
7
00:00:58,370 --> 00:01:07,120
let's call it v so v is an n-tuple and since
we are restricting our discussion to binary
8
00:01:07,120 --> 00:01:14,470
linear block code So we consider a binary
n-tuple So this v 0 v 1 v 2 v n minus 1 could
9
00:01:14,470 --> 00:01:27,119
be either 0 or 1 So we define the Hamming
weight of this vector v as number of non zero
10
00:01:27,119 --> 00:01:29,659
components of v
11
00:01:29,659 --> 00:01:43,070
So for example let's say v is 0 0 1 0 1 1
Let's say this is my v So we can see here
12
00:01:43,070 --> 00:01:52,520
how many non-zero components we have 1 2 3
So the Hamming weight of v is in this example
13
00:01:52,520 --> 00:02:04,260
is 3 Now let v and w are two n-tuples So we
define the Hamming distance between v and
14
00:02:04,260 --> 00:02:17,150
w which is denoted by d v w as the number
of places where v and w are differing So for
15
00:02:17,150 --> 00:02:31,940
example if v is given by this 1 0 0 1 0 1
1 and w is given by 0 1 0 0 0 1 1 then what
16
00:02:31,940 --> 00:02:38,980
is the Hamming distance then let's look at
the first location This is 1 and this is 0
17
00:02:38,980 --> 00:02:44,790
So they are differing in the first location
So that's 1 Similarly the second location
18
00:02:44,790 --> 00:02:51,830
this is 0 this is 1 so they are differing
So now it's Hamming weight is Hamming distance
19
00:02:51,830 --> 00:02:59,580
2 0 0 both are same the third bit location
the fourth bit location this is 1 and this
20
00:02:59,580 --> 00:03:09,680
is 0 so there are differing so Hamming distance
is now 3 0 0 they are same this bit location
21
00:03:09,680 --> 00:03:17,210
both the v and w are 1 similarly in this location
v and w are same
22
00:03:17,210 --> 00:03:24,740
That means our Hamming distance between v
and w is 3 And these are three locations where
23
00:03:24,740 --> 00:03:34,150
they are differing One is this first bit location
second bit location and this fourth bit location
24
00:03:34,150 --> 00:03:45,450
so the Hamming distance between v and w in
this example is 3 Now if v w x are 3 binary
25
00:03:45,450 --> 00:03:52,890
n-tuples then the Hamming distance between
v and w Hamming distance between w and x and
26
00:03:52,890 --> 00:04:01,820
Hamming distance between v and x satisfies
this inequality which is known as triangular
27
00:04:01,820 --> 00:04:08,880
inequality So what is triangular inequality
The Hamming distance between v and w plus
28
00:04:08,880 --> 00:04:18,160
the Hamming distance between w and x is greater
than equal to Hamming distance between v and
29
00:04:18,160 --> 00:04:32,790
x So let us first try to prove this triangular
inequality So let v w and x are 3 binary n-tuples
30
00:04:32,790 --> 00:04:42,600
So the binary distance between v and w can
be defined as Hamming weight of v plus w Note
31
00:04:42,600 --> 00:04:50,000
that we are talking about binary n-tuples
And what is Hamming distance Hamming distance
32
00:04:50,000 --> 00:04:59,000
is number of positions in which v and w are
differing And since we are talking about binary
33
00:04:59,000 --> 00:05:07,560
n-tuples so the number of places where v and
w are differing can be found if we add v and
34
00:05:07,560 --> 00:05:17,490
w that is modulo 2 addition of v and w and
we find out the positions where the sum is
35
00:05:17,490 --> 00:05:19,540
1
36
00:05:19,540 --> 00:05:27,480
Because only in those locations where these
bits are differing v plus w will be 1 otherwise
37
00:05:27,480 --> 00:05:37,140
it will be 0 because we know for binary modulo
2 addition 0 plus 0 is going to be 0 1 plus
38
00:05:37,140 --> 00:05:45,520
1 is going to be 0 only when they are differing
0 plus 1 in this case it is going to be 1
39
00:05:45,520 --> 00:05:53,710
and if this is 1 and this is 0 in this case
also this Hamming weight is going to be 1
40
00:05:53,710 --> 00:06:02,150
So we can write down the Hamming distance
between v and w as the Hamming weight between
41
00:06:02,150 --> 00:06:10,750
v plus w Similarly we can write the Hamming
distance between w and x as the weight of
42
00:06:10,750 --> 00:06:19,980
this vector w plus x And we can define the
Hamming distance between v and x as the weight
43
00:06:19,980 --> 00:06:30,810
of v plus x So if we have 2 code vectors a
and b we know the weight of a plus the weight
44
00:06:30,810 --> 00:06:37,770
of b is going to be greater than or equal
to weight of a plus v Only when the 1's in
45
00:06:37,770 --> 00:06:44,240
a and b are non-overlapping this is going
to be equal otherwise weight of a plus weight
46
00:06:44,240 --> 00:06:53,120
of b will be greater than weight of a plus
b Now let us choose our a and b wisely So
47
00:06:53,120 --> 00:07:02,270
let us choose a to be v plus w and b to be
w plus x If we choose these values of a and
48
00:07:02,270 --> 00:07:14,740
b and put this in this inequality what we
get is weight of v plus w plus weight of w
49
00:07:14,740 --> 00:07:25,120
plus x is greater than equal to weight of
v plus w plus w plus x w plus w is going to
50
00:07:25,120 --> 00:07:33,230
be 0 so this will be v plus x This is given
by weight of v plus x So what we have shown
51
00:07:33,230 --> 00:07:41,889
is weight of v plus w plus weight of w plus
x is greater than equal to Hamming weight
52
00:07:41,889 --> 00:07:54,199
of v plus x And weight of v plus w is nothing
but Hamming distance between v and w So this
53
00:07:54,199 --> 00:08:01,770
we can replace by Hamming distance between
v and w This we can replace by Hamming distance
54
00:08:01,770 --> 00:08:12,710
between w and x And this we can replace by
Hamming distance between v and x Hence we
55
00:08:12,710 --> 00:08:19,930
get the Hamming distance between v and w plus
Hamming distance between w and x is greater
56
00:08:19,930 --> 00:08:26,010
than equal to Hamming distance between v and
x
57
00:08:26,010 --> 00:08:36,000
Now let us define by what do we mean by minimum
distance of a linear block code So we define
58
00:08:36,000 --> 00:08:43,000
a minimum distance of a linear block code
in this fashion It is the minimum Hamming
59
00:08:43,000 --> 00:08:54,720
distance between any 2 codewords so we define
minimum distance of linear block code C as
60
00:08:54,720 --> 00:09:02,019
minimum Hamming distance between v and w where
v and w are codewords and v is obviously not
61
00:09:02,019 --> 00:09:10,009
equal to w Now this can be written as we will
come to that Similarly we will define a minimum
62
00:09:10,009 --> 00:09:17,470
weight of a code A minimum weight of a code
is defined as minimum Hamming weight of code
63
00:09:17,470 --> 00:09:27,889
v non zero codeword v belonging to this linear
block code C It's easy to show that the minimum
64
00:09:27,889 --> 00:09:35,649
distance of a code is nothing but minimum
weight codeword of a linear block code minimum
65
00:09:35,649 --> 00:09:42,740
weight non zero codeword So let's see how
we can show this So minimum distance of a
66
00:09:42,740 --> 00:09:51,600
code is defined as Hamming minimum Hamming
distance between any two 2 codewords v and
67
00:09:51,600 --> 00:10:00,890
w belonging to this linear block code C where
v is not same as w Now we know that Hamming
68
00:10:00,890 --> 00:10:08,850
distance between v and w can be written in
terms of Hamming weight of v plus w So this
69
00:10:08,850 --> 00:10:15,899
can be written as Hamming weight of v plus
w So we can write minimum distance as minimum
70
00:10:15,899 --> 00:10:24,399
Hamming weight of v plus w where v plus w
are codewords belonging to this linear block
71
00:10:24,399 --> 00:10:35,720
code and v is not same as w Now v plus w now
since we are talking about linear block codes
72
00:10:35,720 --> 00:10:46,429
sum of 2 codewords is also a valid codeword
So v plus x v plus w is going to be another
73
00:10:46,429 --> 00:10:55,379
valid codeword belonging to this linear block
code C So we can write this as minimum weight
74
00:10:55,379 --> 00:11:04,089
of a codeword x belonging to this linear block
code where x is a non-zero codeword So in
75
00:11:04,089 --> 00:11:12,999
other words this is then nothing but minimum
weight of linear block code C so we can write
76
00:11:12,999 --> 00:11:22,009
then minimum distance of a linear block code
to be equal to the minimum weight of a non-zero
77
00:11:22,009 --> 00:11:27,740
codeword belonging to C
78
00:11:27,740 --> 00:11:38,579
Next we are going to show how is minimum distance
of a linear block code related to columns
79
00:11:38,579 --> 00:11:45,809
of a parity check matrix and how from the
columns we can find out what is the minimum
80
00:11:45,809 --> 00:11:52,490
distance of a linear block code So the result
which I am going to show you is as follows
81
00:11:52,490 --> 00:12:03,639
If C is an n k linear block code whose parity
check matrix is given by H so for each codeword
82
00:12:03,639 --> 00:12:11,829
of Hamming weight l there exist l columns
of this parity check matrix H such that the
83
00:12:11,829 --> 00:12:20,449
vector sum of these columns is equal to zero
vector So let's prove this Let's say we can
84
00:12:20,449 --> 00:12:27,709
write the parity check matrix in this form
Note this is n minus k cross n matrix so there
85
00:12:27,709 --> 00:12:37,670
are n columns which we are denoting by h 0
h 1 h 2 and h n minus 1 so h i represents
86
00:12:37,670 --> 00:12:44,029
the ith column of these parity check matrix
And we said that for each codeword of Hamming
87
00:12:44,029 --> 00:12:57,089
weight l so let us say that at this location
i 1 i 2 i 3 i l these are the locations where
88
00:12:57,089 --> 00:13:03,819
the codeword basically has a non-zero weight
So the let the non-zero components of the
89
00:13:03,819 --> 00:13:15,240
codeword v be denoted by v i 1 v i 2 v i 3
and v i l where we just without loss of generality
90
00:13:15,240 --> 00:13:20,610
we are just writing as i 1 is less than equal
to i 2 is less than equal to i 3 is less than
91
00:13:20,610 --> 00:13:27,759
equal to i 3 is less than equal to i l is
less than equal to n minus 1 And since these
92
00:13:27,759 --> 00:13:35,470
are the non-zero components of the codeword
at this location v will be 1 at other locations
93
00:13:35,470 --> 00:13:46,110
where are 0 components the values of v at
those locations will be 0
94
00:13:46,110 --> 00:13:58,559
Now we know that if v is a valid codeword
then v H transpose is equal to 0 So if v is
95
00:13:58,559 --> 00:14:07,529
a valid codeword then v H transpose is going
to be 0 This we can write as v naught times
96
00:14:07,529 --> 00:14:19,429
h 0 plus v 1 times h 1 plus v 2 times h 2
plus plus plus v n minus 1 h n minus 1 Now
97
00:14:19,429 --> 00:14:29,720
note that among these v 0 v 1 v 2 v n minus
1 there are l components which are non-zero
98
00:14:29,720 --> 00:14:40,509
And what are those l components v i 1 v i
2 v i 3 up to v i l so all other components
99
00:14:40,509 --> 00:14:49,199
of v will be 0 So here then only terms that
will be left we are left with is basically
100
00:14:49,199 --> 00:15:03,290
v i 1 h i 1 plus v i 2 h i 2 plus up to v
i l h i l Now since v i 1 v i 2 v i 3 v i
101
00:15:03,290 --> 00:15:17,459
l is 1 we can write this as h i 1 plus h i
2 plus h i 3 up to h i l is going to be 0
102
00:15:17,459 --> 00:15:27,179
and what are these h i 1 h i 2 h i 3 These
are columns of your parity check matrix H
103
00:15:27,179 --> 00:15:36,519
So what does this say It says that if we do
vector sum of these l columns of parity check
104
00:15:36,519 --> 00:15:44,259
matrix then basically their vector sum is
0 and that's what the theorem is about That
105
00:15:44,259 --> 00:15:52,160
if there exists a codeword for each codeword
of Hamming weight l there exist l columns
106
00:15:52,160 --> 00:16:00,740
of parity check matrix whose vector sum is
equal to l So we showed that if l components
107
00:16:00,740 --> 00:16:09,189
of this codeword v are non zero then this
relation follows
108
00:16:09,189 --> 00:16:18,720
Next we show another result which says of
l columns of parity check matrix whose vector
109
00:16:18,720 --> 00:16:32,449
sum is 0 vector then there exists a codeword
of Hamming weight l in this linear block code
110
00:16:32,449 --> 00:16:42,019
C So let's see So suppose the l columns of
parity check matrix H whose vector sum is
111
00:16:42,019 --> 00:16:53,820
zero are given by h i 1 h i 2 h i 3 up to
h i l then what we have is h i 1 plus h i
112
00:16:53,820 --> 00:17:07,540
2 plus h i 3 up to h i l is going to 0 Now
let us consider an n-tuple we denote it by
113
00:17:07,540 --> 00:17:18,929
x whose non-zero components are given by x
i 1 x i 2 up to x i l In other words at l
114
00:17:18,929 --> 00:17:28,820
locations this n-tuple is non zero so the
Hamming weight of x is l Now we want to show
115
00:17:28,820 --> 00:17:38,950
that if there exist l columns of these parity
check matrix H whose vector sum is 0 then
116
00:17:38,950 --> 00:17:48,539
there exist a codeword whose Hamming weight
is l So next we are going to show that if
117
00:17:48,539 --> 00:17:56,440
this condition happens and if there is an
n-tuple whose Hamming weight is l then this
118
00:17:56,440 --> 00:18:06,919
x has to be a codeword So how do we show x
is a codeword Well if x is a codeword x H
119
00:18:06,919 --> 00:18:17,100
transpose will be 0 So let us evaluate x H
transpose So what is x H transpose It's given
120
00:18:17,100 --> 00:18:31,159
by x 0 h 0 plus x 1 h 1 plus x 2 h 2 plus
up to x n minus 1 h n minus 1 Now since we
121
00:18:31,159 --> 00:18:41,240
know that l elements of these n-tuple x are
non-zero and they are given by x i 1 x i 2
122
00:18:41,240 --> 00:18:56,889
x i 3 x i n l so we can write this as x i
1 h i 1 plus x i 2 h i 2 up to x i l h i l
123
00:18:56,889 --> 00:19:08,240
Now since x i 1 x i 2 x i 3 x i l they are
all 1 we can write this as h i 1 plus h i
124
00:19:08,240 --> 00:19:21,279
2 plus h i 3 plus h i l Now what did we say
about vector sum of these l columns We say
125
00:19:21,279 --> 00:19:30,090
the vector sum of these l columns is 0 If
that's the case then this is equal to 0 So
126
00:19:30,090 --> 00:19:41,190
what we have shown now is x H transpose is
0 Now if x H transpose is 0 then x has to
127
00:19:41,190 --> 00:19:51,340
be a valid codeword So we have shown that
if vector sum of l columns of parity check
128
00:19:51,340 --> 00:20:05,820
matrix H sum up to 0 then there exist a codeword
of Hamming weight l
129
00:20:05,820 --> 00:20:14,830
Now using these 2 theorems this theorem and
this theorem we can make these following observations
130
00:20:14,830 --> 00:20:24,000
If C is a linear block code with parity check
matrix given by H and if no d minus 1 or fewer
131
00:20:24,000 --> 00:20:31,980
columns of parity check matrix add up to 0
then the code has a minimum weight of at least
132
00:20:31,980 --> 00:20:41,289
d So minimum distance of code is at least
d if no d minus 1 columns of this H matrix
133
00:20:41,289 --> 00:20:48,769
the vector sum of these d minus 1 columns
or fewer columns of this H matrix if they
134
00:20:48,769 --> 00:20:59,720
do not add up to 0 it means the linear block
code has at least minimum distance of d The
135
00:20:59,720 --> 00:21:05,720
second statement we can make is if there is
a linear block code C with parity check matrix
136
00:21:05,720 --> 00:21:14,340
H then minimum weight of this linear block
code C d min is basically equal to the smallest
137
00:21:14,340 --> 00:21:22,789
number of columns of this H matrix whose vector
sum add up to 0 Thank you