EECS 554 hw4
EECS 554 hw4
Homework 4
Due: 10/21
1 Block Codes
1.1 Show that the Hamming distance is indeed a valid distance metric, by proving that it
satisfies the triangular inequality.
( )
1.2 Using Stirling’s approximation to the factorial function, show that nk ≈ 2nh(k/n) , where
h(·) is the binary entropy function defined as h(x) = −x log x − (1 − x) log(1 − x). Based on
this asymptotic result, derive the asymptotic√version
( nof
)n the Hamming bound.
λn 1 1
Hint: Stirling’s approximation is: n! = 2πn e e with 12n+1 < λn < 12n .
1.3 Let Mq (n, d) denote the maximum size of an arbitrary code of length n and minimum
distance d over a q-ary alphabet. Prove the following
1. Mq (n, n) = q
2. Mq (n, d) ≤ qMq (n − 1, d)
3. From the above show that Mq (n, d) ≤ q n−d+1 or equivalently, for any q-ary code C with
length n and minimum distance d, we have d ≤ n − logq |C| + 1
1.4 Prove the converse of the “guaranteed error correction capability proposition”, which
can be stated as follows. If dmin ≤ 2t then not all error patterns of weight w(e) ≤ t can be
corrected.
Hint: Consider two codewords at minimum distance and find another word at distance
≤ t from both codewords. What will happen if such a word is received?
1.5 In this exercise we will be concerned with a simple procedure which will allow us to
construct a new (better) code from given code. Assume we have a code C (not necessarily
linear, but defined over an alphabet X which is a field) of length n, size |C| = M and
minimum distance d. If d is odd, then we can∑extend the code by appending to each codeword
x = (x1 , · · · , xn ) the extra symbol xn+1 = − ni=1 xi .
How do the parameters of the original code change in the extended code? In particular,
show using a simple example that for general alphabets X , the minimum distance does not
necessarily increase in the extended code. Furthermore, show that for X = {0, 1} and for
odd d, the minimum distance increases by 1 in the extended code.