9 Solved Problems on Codes and Ciphers - Assignment | MATH 350, Assignments of Mathematics

Material Type: Assignment; Professor: Clark; Class: Sp Top: Probability; Subject: Mathematics; University: Hollins University; Term: Unknown 1989;

Typology: Assignments

Pre 2010

Uploaded on 08/18/2009

koofers-user-jr2-1
koofers-user-jr2-1 🇺🇸

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Math350:Codes&Ciphers March3,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
knowthatLetbecodewordsinC*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
pf3
pf4

Partial preview of the text

Download 9 Solved Problems on Codes and Ciphers - Assignment | MATH 350 and more Assignments Mathematics in PDF only on Docsity!

Homework Exercises #4 Solutions

Due 3/10/

1. Without using Maple, locate the position of any errors, and then correct them, in the following

received words from the Hamming‐(7,4) code:

a) r 1 = 0101111 error position 2 corrected word = 0001111

b) r

2

= 0001101 error position 6 corrected word = 0001111

c) r

3

= 0100011 error position 3 corrected word = 0110011

d) r

4

= 0110011 no error corrected word = 0110011

2. Let C be a binary linear code. Prove that the code C*obtained by adding an overall parity check

digit to C is linear (closed under the operation of addition).

Proof:^ Let^ a^ and^ b^ be^ codewords^ in^ C.^ Then^

1 2 1 2

( , , ), ( , , ). n n

a = a aa b = b bb

a + bC. a *, b *

1 2 1 1 2 1

  • ( , , , ), * ( , , , ), n n n n

a a a a a b b b b b

= … = …

1 1

1 1

mod 2, mod 2.

n n

n i n i

i i

a a b b

= =

= =

a * b * C.

Since C is linear, we

know that Let be codewords in C* obtained by adding overall parity checks to a and

b respectively. So where

We need to show that + ∈ ′

1 1 2 2 1 1

    • ( , , , , ) n n n n

But a b a b a b a b a b

  • = + + … + +

a + bC ,

n 1 n 1

a b

1 1

with all addition done mod 2.

Since we only need to worry about the last digit of the word. In particular, we need to

show that is an overall parity check. But

overall parity check of positions 1 through n in

the word. So and C* is linear.

1 1

1

mod 2 ( ) mod 2

n n n

n n i i i i

i i i

a b a b a b

= = =

  • = + = + =

a + b a * + b * ∈ C *,

3. For each of the generator matrices below ‐‐ list all the codewords in the code and find the minimum

distance of the code.

a) C 1 = {00000, 11110, 00111, 11001} d* = 3

1

G

b)

2

G

C 2 = {0000000, 1001101, 0101011, 1100110, 1011010, 0111100, 0111100, 1110001, 0010111} d* = 4

4. Use Maple to help you fill in the table below

Information

Digits

H‐ (7,4)

codeword

H ‐(8,4) parity

check digit

Information

Digits

H‐ (7,4)

codeword

H ‐(8,4) parity

check digit

5. Use Maple and the Hamming‐(15,11) code to encode the following information digits:

a) 1011 0110 101 b) 1101 1011 011 c) 0000 1111 000

6. Add an over‐all parity check digit to your codewords from #5. (You may simply list the parity check

digit.) 0; 1; 1

7. a) How many parity checks will the Hamming‐(31, 26) code have? 5

b) What are the parity checks for this code?

1) C1+C3+C5+C7 +C9+C11+C13+C15+... +C31 =

2) C2+C3+C6+C7+C10+C11+C14+C15+C18+C19+C22+C23+C26+C27+C30+C31=

3) C4+C5+C6+C7+C12+C13+C14+C15+C20+C21+C22+C23+C28+C29+C30+C31=

4) C8+c9+c10+C11+c12+C13+c14+1C5+c24+c25+C26+c27+c28+C29+c30+C31=

5) C16+C17+C18+C19+C20+C21+C22+C23+C24+C25+C26+C27+C28+C29+C30+C31=

c) What are the check positions for words in this code? 1, 2, 4, 8, 16

d) How many codewords are there in this code? 2

26

e) What is the size (dimension) of the generator matrix G for this code? 26×

f) Find the generator matrix for this code. (Use graph paper or Excel to write it – it’s not

necessary to use Maple.)

9. Use Maple to find and correct any errors in the following Hamming‐(15, 11) received words, and

then report the correct 11 information digits in each word. Indicate the position of any errors (if

there are any). If there are double‐errors indicate that you cannot correctly decode.

a) r

1

= [0011 0111 0001 1110] position 14 1011 0001101

b) r 2 = [0111 1111 1000 0001] position 16 1111 1000000

c) r

3

= [1011 0100 1010 1010] no error 1010 1010101

d) r

4

= [1100 1000 1001 0000] position 3 1100 1001000

e) r 5 = [0111 0010 1111 1111] double error