Exam ple 4 :
a) Find the mini mum dista nce of the (2, 4) enco ding func
tion e, give n belo w :
e(OO) = 0000~ e(10) = 0110, e(0l} = 1011, e(ll) = 1100.
b) How many error s will e detec t?
Solution : Let x = e(OO) = 0000, x = e(l0) = _0110
1 2
x3 = e(0l) . = 1011, x_. = e(ll) = 1100
The dista nce betw een x and y is I x e y I
Here, I "i 6l x2 I = I 0000 EB 0110 I = I 0110 I = 2,
I "i 6l ~ I = I 0000 EB 1011 I = I 1011 I =. 3,
I "i @ x_. I = I 0000 EB 1100 I = 11100 I, = 2,
I x2 @ x 3 I = I 0110 EB 1011 I = 11101 I = 3,
I x2 6l x_. I = I 0110 EB 1100 I = 11010 I = 2,
I~ 6l x_. I = I 1011 EB 1100 I = I 0111 I = 3
,a) From abov e we conc lude that the mini mum dista nce
of e is 2.
b) Since e can detec t k or fewe r error iff its mini mum dista
nce is at least k + 1.
We have 2 ~ k + 1 or l< ~ 1
:. e can detec t 1 or fewe r error .
:. e can detec t k = 1 or fewe r error .
Example 5 : Fi,nd the dista nce betw een. x and y
a) x = 00111001 ~d y = 10101001.
b) x = 11010010 and y = 00100111
c) x = 1100010 and y = 1010001
d) x = 0100110 and y == 1010001
Solu tion : Dista nce betw een x and y is I x e y I
a) I x e y I = I 00111001 e 10101001 I = I 10010000 I =
i
b) I x e y I = I 11010010 e 00100111 I = I 11110101 I
= 6
c) I x e y I = I 1100010 e 1010001 I = I 0110011 I = 4
d) I x e y I = I 0100110 e 0110010 I = I 0010100 I = 2
Exam ple 6: Cons ider (2, 6) enco ding funct io_n e as e(00)
= 000000, e(l0) =
e(0l} = 011110, e(ll) = 111000 1010 10
. - '
a) Find the minimum dista nce.
b} How ~ y error s will e detec t?
Solution : Cons ider the (2, 6) enco ding func tion e as : "i = e(00)
= 000000, x =
e(10) = 101010, x3 = e(l0) = 011110, x_. = e(ll) = 111000 2
I x1 e x2 I = I 000000 e 101010 I = I 101010 I = 3
I X, e x~ I = l 000000 e 011 110 I :::: I Ol 1110 I = 4
I x, e x, t = I 000000 a 111000 J = I 111000 t • 3
I ~ e xJ I = I 101010 s 011110 t = I 110100 I : 3
t Xa e x ~ I = f 101010 ~ 111000 I = I 01001 O I = 2
I ~ e x" I = I 011110 s 111<XXJ I = I 100110 I = 3
a) The min imu m distance is 2
distance is at leas t k + 1.
b) As e can detect k or fewer erro rs iff its min imu m
\Ve have 2 ~ k + 1 or k ~ 1
:. e can dete ct 1 or fewe r erro r.
e as e(OOJ) = CXKXXXXO.l, e(OOl)
Exa mpl e 7 : Con side r the (3, 9) enco ding func tion
010011010,
V = 011100101, e(010) = 01010100), e{Ol l} = 11001cxxn, e(100) =
e(lO l )= 111101011, e(110) = 001011CXXJ, e(111) = 11cn xn1 1.
a) Find min imu m distance.
b) How many erro rs will e detect?
n by
Solu tion : Let e _be the (3,9) enco ding function give
"i = e (OOJ) = OOCXXXXXX)
~ = e{001) =
011100101, ~ = e(Ol0) = 010101(0)
Xi = e(011) = 11001CXXJ1, x..> = e(100) = 01001101
•
0
X. = e{101) = 111101011, x, = e(l 10) = 0010 11(0 ) -
x, = e(111} = 11CXXXJ111 ~
The distance betw een x and y is I x ~ y I
I ~ a "2 I = 5, I ~ s x 3 I = 3, I ~ s x: I = 4,
I ~ s x l = 4, f x_ e xr. I = 7, , ~ e x.. J = 3,
3
I Xi e x_ I = 5, f ~ a x 3 I = 4, I x1 s x~ I = 5,
I ~ a x.: f = 6, t ~ e x, 1= 3, 1 ~ & x, ? = 6,
f x, e Xa I = •t I x 3 e x, I = 5. l ~ ~ X; I = 3,
I x} 8 x,. I - 4, I xl s x_ I = 4, I x 3 e X. I = 6,
f x, a x3 f = 4, I x. a x. I = 5,. i x. e x, t = 5,
~ _ f .: 4., I x . a .l• t = 5, t .)._,.J a 'L l = 3.
l x ' 9 -... I
.)
f ~ 8 .~ f ~ 5, l x, ii ~ l = b , i "• e ~ ~ = -1,
f x,0 x. l ; '8
a) from above the rrunimum distance ol ~ is 3
b) The enco ding function e can defect t or fewer errors iff its min imu m dista nce
is adeast k ,.. 1.
\\fe have 3 ~ k + 1 or k ~ l
·. e can dett..~ t 2 or ·fe'\1a•t T e,rro rs
Group codes 4.4: An (m, n) encoding function e: Bm ➔ B" is called as a group codr
if e (Bm) = {e (b) I b E Bm} = Ran { e} is a subgrou p of group <B" , e >
Note : H~e ~e ~ow !:}lat N is subgroup of group B" if a) the identity of 8" is in N
b) if x and y belong to N then x e y E N c) if x is in N the its inverse is in N.
Theorem : Let e : Bm ➔ Bn be a group code. Then the minimum distance of e is the
minimum ~eight of a non zero code. , • -. 1 ~ o,f fl M 7. ~ r,,.
Proof : Let e : Bm ➔ Bn be a group code d,, 1 ,; ~ n 6" f""" \ f'\ · v,.)-t} ~ ,,, ·( , d Q 'rJ t/'<.
Let 6 be the minimum distance of the group code. Assume that o = b(x, y)
C~\ c,1. ~ w h ere x and y are distinct code · h t Of ~
words. Also let n be the minimum we1g
r ';.. \ 1 ~
", a no~ _zero code word and suppose tliat n = I z I for a code word z. ~ C!-,,,...
u .: e
is a group code, x e y is a .non zero code word.
Thus 6 = 6(x, y) = I x e y I ~ n ....... (1)
on the otherhan d, since o and z are distinct code words.
'
n = I z I = I z e o I = o (z, o ).~ o .. :... (2)
from (1) & (2) o ;!: n & n ;!: o
- n =o
Hence the minimum distance of e is the minimum weight of a non zero code
word.
Definition : (1) _consider _the set B with operation + defined in .table as
+ . or 1\. 1
0 0 1
1 1 0
Now let D = .[d-]
•
and E = [elJ..] be mxn Boolean matrices. We define mod 2 sum
of D and E as the Boolean matrix De E which is also mxn matrix F = [F..] where
lJ
f, = d• + e., 1 ~ i ~ m and 1 ~ j ~ ·n Here note that if F = D e E then f ii = o
when both dii and eii are zero or both are 1. ·
(2) Conside r the set B with binary operation given in the table as
* 0 1
0 0 0
1 0 1
Here B is the unique ·Boolean algebra with ·two elements ,.
Let D == (dij] be mxp Boolean ma~ & E = [elk] be a ·p xn Boolean matrix. We
define the mod 2 B~lean product D e E = F = [fnJ mxn where
l
~.
f,, : f d• .eik : d" .e,.
J= l
+du. e,. + ....... + d,,.e"' , 1 :,;; ,;; m, 1 ,; i :s; m, i ,; j ,; n.
Boolean matrix.
Theo rem : Let D and E be mxp Boolean matrices and let F be a p:xn
0
Then (D e E) * F = (D * F) e (E * F)°
Theo rem : Let x = YiYi-···Y m~····xr ... Xr E B". Then x * H = if and o
only if x = eH(b)
for some b E Bm. \..J \.,_ •U .. " ~ ·, _, ya--r a(
~,.o c"l-.. , N' &) ~ V o! 0\- ,,d.. Ut
.
1" vY
Proof : Let X = Y1Y2····Ym~Xi-···xr E 8".
Let H be an nxr Boolean matrix as given below :
h 11 h 12 h 1r Here last r rows form the r x r ident ity
h 21 h ll hb ma trix and H is called as a parity
check matrix.
h ml hm2 hmr
1 0 0
H= 0 1 0
0 0 1
First assum e that x * H = 0 · This giv~s
y,l\, +y,h,, +. . +.~mh°';: ~ ~ 0) .... (1)
Y1J\2 + Yfln Y
+ ... . m m2 2 -
: h+ +yhmr +x= O
Y11\r + Yr"a .... m • r
. th f ' t equat ion in (1) IS as ..... (2)
We wnte e rrs u..:t
....i--e a = y r"n + Yfln + .... + Ymhmr
, + x1 = 0 , .Yn1c1. h
' · a~ a + (a + x1 ) = a + 0 (': ad~ g a to both sides of (2))
- a
~ (a + a ) + x1 -
(': a + a =0
~ Xi = a. d e for each row, therefore
. -
This can be on
j, + + y h . for 1 - 1,2 .... r
- h + Yr"2i ....
b
Ill ma
_ b .
x. - Yr.. --ii
I
. = b1, yz -- z, ....., y,,. - m'
Talon g Y1 atisfy the equat ion as
we see that x,, X2 .•. Xm 5 . -
-bh . h . for 1 - 1,2 .... r )
+ b zh 2i. + .... + b "'nu
X - .. , . b h
i 1 I • b h + bfln + .... + m m1
- ..... (3)
whic h g:iv~ Xi - 1 .. --i1 b h
= b 1l\i + bPzz + .... + m °'2
Xi = b h + bPzr + ···· +bh m mr
xn 1'.. '1,
• I
-.r
11
1 v
H~n11 h • 1l, 1\ , J'"' 1l, l1\ <: ·1~ 11'
H~n., ~u : »'" ➔ B" i~ ,lrfinClcl by
~ " • --~II (b) • h,b2hy ... b,nx,x, .... x, for b = b,b, ....h"' E IJI"
wh,""' xi, ~.... 'l<, ~,re as in (3) .
~-\-'1''-'_\rsclv ~ppost? tha t an encoding function
~ : 8 111 - B" is defined by x = e 11 (b) for some b = b 1b2•••• b,. E 8 \ whel'e X1X,····x,
11
at-e as in (3). Here equations in (3) can be rewritten by adding x 1 to both. sides
of th e 1·th equation,.
1. -- }. , 2 .•.. r as
b1h.1 + h 2~1 + ···· + bmhmt + X, = Xl + x, = O
blh,2 + h 2h22 + .... + bmh,n2 + x2 = x, + x2 = 0
h r + .... + b mh m, + xr = xr + xr =O
b 1h• '1 r + b 2"''1
which is m.erely as x * H = o
Ex.ample 8 : Show that the (2, 5) encoding {unction e : Bl - 8 ~ defint.:'Ci by
e(OO) • 00000, e(0l) a: 01110
e(l0) • 10101, e(11) • 11011, is a group code.
Solution : Consider the set of all codewords as e (B•) •
N • (00000, 01110, 10101 , 1101.1) • ( o, a, h, c)
where o•
00000, a • 01110, b • 10101 , , • 11 011 .
:. Compnsition tab}(, for <N, <D > is
$ () a b L
5 0 0 b ('
a a 0 (' h
h b ('
0 •
h a 0 .\ '
C C
H..>r,·, I tjJ j tt (n)i.)ll -
- t)
b ,111 h .. l) 4 t • ,· - ll
aG..h ... (
1 ~ < • 10101 Q h
b • t .-. OJ 110 ~
ckarly O ... (XX(X) it ,Je1,Uf)• ~ N 41\J t'\.., ••) · d1.•nlt>-nt of N l• ,~ '-'Wn in\'~fW'
Alsa aU d~ ,-n~ "' ,h..- •~t»..- liru tlw ,.. l~u~1, h .:,I N ll~~ , N# ~ > 1$ a
subgroup of 8 , ,u\11 1lils> ttw, th,.. in i••n ,·t\\.v1.hn>~ hu"- u.ou ,. L'> a ~,uup o.lJl
Example 9 : Show _that the (3, 7) encoding functi~n
7
➔ B defined by e(OOO) = 0000000
3
e : B
e(OOl) = 0010110, e(OlO) = 0101000, e(Oll) = 0111110
e(lOO) = 1000101, e(101) = 1010011, e(llO) = 1101_101
e(lll) = 1111011, ~ a group code.
Solution : Consider the set of code words as e(B7) := N = {0000000, 0010110,
0101000, 1000101, 0111110, 1010011, 1101101, 1111011 }
= {0, a, b, c, d, e, f, g }, where
0 = 0000000, a = 0010110, b = 0101000, c = 1000101, d = 0111110, e =
1010011, f = 110110~, g = 1111011
composition table for <N, e > is as below :
e 0 a . b C d e f g
0 0 a b C d e f g
a a 0 -d e b C g f
b b d 0 f a g C e
C C e f 0 g a b d
d d b a g ·O f e C
e e C g a f 0 d ·b
f g C b e d 0 a
f
f e d C b a 0
g g
. the 1.denti·ty for N = e(B7) and every element of N 1s its own inverse
clearly O is
entries are ·the elements of N. Hence N = e(B7) is a
and from -table all the
7 that e is th~ group code.
subgroup Of B ' so - ·
Example 10 : · Compute
- a)
[ ~ I 0] [I : :] I 1 @ · 0
l l I
1 0 l
I 1 0 I O I
@ O I 0
O O I
0 I I O O I
Solution :
I t ] = [ I + I I + I O+ I]
I 11 w [ 01
Ol]in I I O+O l+l l+l
a) [O
- [o
- 0 0
0
~]
0 1 1
0 1 0
EB
b) 0 0 0 1 0
0 0 0
1+ 1 0+l 1+ 1 0 0
l+l l+0 0+l 0 1 I
=
= 0+0 0+l l+0 0 1
0+0 l+0 l+l 0 l 0
Example 11 : Compute
✓
a) r 1 · ~]
.0 I
1
· I O • [~- :
b)
Solution ·: -
u~ :J •[: i i]
l] [lxO+lxl lxl+lxl lxl+lx0]
a) O
= Ix0+0xl lxl+0xl lxl+0x0
0x0+lxl . 0xl+lxl 0xl+lx0
= [i:~ : ~ : ~]
0+l 0+I 0+0
= [~
I
0 0~]
I
-b)
u :J ·[: I
0
0
0
[lxO+lxl+Oxl lxl+lx0+0x0 lxl+lxl+OxO]
l]
0x0+lxl+lxl 0xl+lx0+lx0 0xl+lxl+lx0
==
Jx0+0xl+lxl lxl+0xl+lx0 lxl+0xl+lx0
-
o+ ' + o ' + o+ o
[ O+ t + I 0 + 0 + 0
l+O+O
I+ I+ o
O+l+O
l+O+O
l
0 + ( 1- I
- [~ ~ :]
Example 12 :
0 I I
0 I l
0 0 be
Let H = 0 l 0
0 0 1
2 ➔ B5
a parit y check matri x Determine the (2, 5) group code funct ion eH : B
0 l l
0 I l
l O 0
Solution : Let H = be a parity check matrix and
0 1 0
0 0
eH : B2 ➔ B5 be an ~need ing function : Here
B2 ...:. { 00, 01, 10, 11}
Let b = b~ bi E B2, then eH(b) = b1b2 ~X2'S E B5
Wher e xl = bl .0 + b2.o =0
X2 = bl. 1 + b2. 1 = bl. + b2
X3 = + b-,. l -- b1 +b 2
- b .1
1 -
• (b) = e. 1-1 (b) = b 1b 2~x2xJ = b1b20 (b1 + b2) (b1 + b 2), V b = b 1b 2EB2 ·
1.e. e
~ e(00) = 00000, e(0l) = 01011
e(l0) = 10011, e(ll) = 11000.
·red group code is
Henc e thereqUl
ett(B2) ~ {e(0Q), _e(0l_), _e(10), e(ll)}
= [00000, 01011, 10011, 11000}.
:E xample 13 :
I I 0
1 0 I
0 l l
Let H =
1 O O be a parity check matrix. Determine tlie (3, 6) group code
0 I 0
0 0 I
~ : Bl ~W,
Solution:
l l 0
I O I
0 I l
Let H = 1 O O be a parity check matmc.
0 I 0
0 0 l
and ~ : IP ~ B6· be the (3, 6) encoding function Here
B3 = {cm, 100, 010, 001, 011, 101, 110, 111}
L r 1 • = • 1b 2b3 E B3 then define eH(b) = b b b ~,s,s
1 2 3
, ,._1 h ere ~ = br1 + b 2.1 + b:3.0 = b 1 + b2
JS = bl.] + bro + b3.1 = bl + b3
JS = bl.O + bi-1 + b3.1 = b2 + b3
:. ~(b) = e.i(b1 b2bJ = bl b2b3 {bl + bi) (bl + bJ (bl + bJ
~(000) = c:MXOXl, ~(001) = 001011,
eJOlO) = 010101, ~ (100} = 100110,
~(011} = 011110, ~ (101) = 101101,
~ (110) = 110011, ~(111) = 111000.
Hence, the required group code is
e.ri (IV) = {~(CXX>), eH(OlO), eH(001), e.-\(011), eH(lOO), eH(1on, eH(llO), eH(lll)}
= {<XXXXX>, 001011, 010101, 100110, 011110, 101101, 110011, 111000}