Você está na página 1de 2

Due Time: 11:00pm, Monday September 21

EECS 376, Foundations of Computer Science

Due at Ctools

Fall 2015, University of Michigan, Ann Arbor

EECS 376 Homework 1


Problems marked with an E are graded on effort. This does NOT mean all answers will receive full
credit. You are expected to show that you are engaged with the material. If you cannot find the correct
answer explain what you tried and why what you tried did not work. If you do not understand the question
explain what you do understand and what about the question you find confusing.
E (1.1) A matrix over Zn is a matrix whose entries are all members of Zn , i.e. are taken modulo n. Additionally,
matrix multiplication in Zn operates in the same way as matrix multiplication in Z, but the elements
of the product are all taken modulo n. For instance, with n = 5,

 
 
 

1 3
0 3
0+3=3 3+6=9=4
3 4

=
=
2 4
1 2
0 + 4 = 4 6 + 8 = 14 = 4
4 4
Matrix inversion of the matrix A over Zn is similar; it is finding a matrix A1 such that AA1 = I =
A1 A, where I is the identity matrix and matrix multiplication is done in Zn . For example,

 
 
 
 
 

1 3
3 4
3 + 3 = 6 = 1 4 + 6 = 10 = 0
1 0
3 4
1 3

=
=
=

2 4
1 2
6 + 4 = 10 = 0 8 + 8 = 16 = 1
0 1
1 2
2 4



2 1
Is
invertible over Z5 ? If so, find the inverse. If not, explain why it is not invertible. What
2 3
about over Z8 ?
(1.2) Let m and n be positive integers, let = Zm , and let V = n . For example, if m = 2 and n = 3,
then ~u1 = (1, 0, 1) and ~u2 = (1, 0, 0) are elements of V , and ~u1 + ~u2 = (0, 0, 1). The Hamming weight
of a vector ~u V , denoted wH (~u), is the number of its nonzero components. The Hamming distance
between two vectors ~u1 , ~u2 V , denoted dH (~u1 , ~u2 ), is equal to the number of components in which
the two vectors differ, i.e., it is the weight of ~u1 ~u2 . Verify that dH is a metric on V , that is, for all
~u1 , ~u2 , ~u3 V ,
(i) dH (~u1 , ~u2 ) 0, with equality if and only if ~u1 = ~u2 .
(ii) dH (~u1 , ~u2 ) = dH (~u2 , ~u1 ).
(iii) dH (~u1 , ~u2 ) dH (~u1 , ~u3 ) + dH (~u3 , ~u2 ).
The last property is often called the triangle inequality.
(1.3) Let m be a positive integer, and let = Zm . Let k and n be integers such that k < n, and let
C : k n be an injective mapping. The minimum distance of C, denoted dist(C), is defined as
dist(C) = min dH (C(~x1 ), C(~x2 ))
~
x1 6=~
x2

where the minimum is taken over pairs of distinct vectors in k .


Let e be a positive integer. Show that if dist(C) 2e, then there exists a vector w
~ n and vectors
k
~x1 , ~x2 with ~x1 6= ~x2 , such that dH (w,
~ C(~x1 )) e and dH (w,
~ C(~x2 )) e. In particular, the code
cannot correct e errors.
Hint: A chain is a list of vectors ~u0 , . . . , ~uk such that dH (~ui , ~ui+1 ) = 1 for i = 0, . . . , k 1. Show that
if l is a positive integer and ~u, ~v are vectors such that dH (~u, ~v ) = l, then there exists a chain of length
l + 1, ~u0 , . . . , ~ul , such that ~u = ~u0 and ~v = ~ul . In other words, you can get from ~u to ~v by making one
step at a time.
E (1.4) If C is a linear binary code, prove that either every codeword in Im(C) has even Hamming weight or
exactly half of the codewords in Im(C) have even Hamming weight.

(1.5) The Hamming [15,11] code is given by the generator matrix

1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0

0 0 1 0 0 0 0 0

0 0 0 1 0 0 0 0

0 0 0 0 1 0 0 0

0 0 0 0 0 1 0 0

0 0 0 0 0 0 1 0

G=
0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

1 1 1 1 0 1 1 0

1 1 1 0 1 1 0 1

1 1 0 1 1 0 1 1
1 0 1 1 1 0 0 0

0
0
0
0
0
0
0
0
1
0
0
1
0
0
1

0
0
0
0
0
0
0
0
0
1
0
0
1
0
1

0
0

0
.
0

1
1

(a) Give a parity check matrix for this code.


(b) What is the rate of this code?
(c) What is the minimum distance of this code?
(d) How many errors can be detected with this code? How about corrected?
(e) Use this code to decode the message 101101110011100.
(1.6) Consider the following generator matrix:

1
0

0
G=
1

1
1

0
1
0
1
0
1

0
0

1
0

(a) Find all the codewords generated by this generator matrix.


(b) Determine the number of errors that this code will detect.
(c) Determine the number of errors that this code will correct.

Você também pode gostar