
Math350:Codes&Ciphers March3,2009
1
HomeworkExercises#4Solutions
Due3/10/09
1. WithoutusingMaple,locatethepositionofanyerrors,andthencorrectthem,inthefollowing
receivedwordsfromtheHamming‐(7,4)code:
a) r1=0101111errorposition2 correctedword=0001111
b) r2=0001101errorposition6 correctedword=0001111
c) r3=0100011errorposition3 correctedword=0110011
d) r4=0110011noerror correctedword=0110011
2. LetCbeabinarylinearcode.ProvethatthecodeC*obtainedbyaddinganoverallparitycheck
digittoCislinear(closedundertheoperationofaddition).
Proof:LetaandbbecodewordsinC.Then 12 12
(, , ), (,, ).
nn
aaa abbb b
=……
.abC+∈ *, *ab
12 1 12 1
*(,, , ),*(,, , ),
nn nn
aaaaabbbbb
+
==……
11
11
mod2, mod2.
nn
ni ni
ii
aa bb
++
==
==
∑∑ ** .abC
SinceCislinear,we
knowthatLetbecodewordsinC*obtainedbyaddingoverallparitycheckstoaand
brespectively.So where
Weneedtoshowthat
∈
1122 1 1
**( , ,, , )
nnn n
ab abab aba b
But
+
+= + + + +…
,abC+∈
11nn
ab
++
+
11
withalladditiondonemod2.
Since weonlyneedtoworryaboutthelastdigitoftheword.Inparticular,weneedto
showthat isanoverallparitycheck.But
overallparitycheckofpositions1throughnin
theword.SoandC*islinear.
11
⎥
1
mod 2 ( )mod2
nn n
nn i i ii
ii i
ab a b ab
++
== =
+= + = + =
∑∑ ∑
ab+** *,abC+∈
3. Foreachofthegeneratormatricesbelow‐‐listallthecodewordsinthecodeandfindtheminimum
distanceofthecode.
a) C1={00000,11110,00111,11001} d*=3
1
11110
00111
G⎡⎤
=⎢
⎣⎦
b)
2
100 1 10 1
0101011
0010111
G
⎡⎤
⎢⎥
=⎢⎥
⎢⎥
⎣⎦
C2={0000000,1001101,0101011,1100110,1011010,0111100,0111100,1110001,0010111}d*=4