Download 9 Solved Problems on Codes and Ciphers - Assignment | MATH 350 and more Assignments Mathematics in PDF only on Docsity! Math 350: Codes & Ciphers March 3, 2009 1 Homework Exercises #4 Solutions Due 3/10/09 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) r1= 0101111 error position 2 corrected word = 0001111 b) r2= 0001101 error position 6 corrected word = 0001111 c) r3= 0100011 error position 3 corrected word = 0110011 d) r4= 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 na a a a b b b b= =… … .a b C+ ∈ *, *a b 1 2 1 1 2 1* ( , , , ), * ( , , , ),n n n na 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 na b a b a b a b a b But + ++ = + + + +… ,a b C+ ∈ 1 1n na 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) C1 = {00000, 11110, 00111, 11001} d* = 3 1 1 1 1 1 0 0 0 1 1 1 G ⎡ ⎤= ⎢ ⎣ ⎦ b) 2 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 0 1 0 1 1 1 G ⎡ ⎤ ⎢ ⎥= ⎢ ⎥ ⎢ ⎥⎣ ⎦ C2 = {0000000, 1001101, 0101011, 1100110, 1011010, 0111100, 0111100, 1110001, 0010111} d* = 4 Math 350: Codes & Ciphers March 3, 2009 2 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 0000 0000000 0 1001 0011001 1 0001 1101001 0 1010 1011010 0 0010 0101010 1 0101 0100101 1 0100 1001100 1 0111 0001111 0 1000 1110000 1 1011 0110011 0 0011 1000011 1 1101 1010101 0 0110 1100110 0 1110 0010110 1 1100 0111100 0 1111 1111111 1 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 101001100110101 011110111011011 000100001111000 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 =0 2) C2+C3+C6+C7+C10+C11+C14+C15+C18+C19+C22+C23+C26+C27+C30+C31=0 3) C4+C5+C6+C7+C12+C13+C14+C15+C20+C21+C22+C23+C28+C29+C30+C31=0 4) C8+c9+c10+C11+c12+C13+c14+1C5+c24+c25+C26+c27+c28+C29+c30+C31=0 5) C16+C17+C18+C19+C20+C21+C22+C23+C24+C25+C26+C27+C28+C29+C30+C31=0 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? 226 =67,108,864 e) What is the size (dimension) of the generator matrix G for this code? 26×31 f) Find the generator matrix for this code. (Use graph paper or Excel to write it – it’s not necessary to use Maple.)