Assgn3 Solution PDF
Assgn3 Solution PDF
Assignment-3 Solutions
February 15, 2017
Solution 1: (a) If C1 is a dual code of C2 , then we should have G1 GT2 = 0 and rank(G1 ) + rank(G2 ) = n. In
the problem, both the matrices (a) and (b) are orthogonal to G1 . However, the matrix in (b) is not full rank and
therefore rank(G1 ) + rank(G2 ) = 3 + 2 = 5 ≤ n. Hence (a) is the correct option.
Solution 2: (b) If we arrange the columns of the parity check matrix of a (n, k) Hamming code such that column
in position i represents the integer i, then the syndrome represents the bit location where the error has occurred.
The parity check matrix of a (7,4) Hamming code is given by
1 0 1 0 1 0 1
H= 0 1 1 0 0 1 1
0 0 0 1 1 1 1
Solution 3: (a) A code with minimum distance dmin can simultaneously detect λ errors and correct l errors if
and only if dmin ≥ λ + l + 1. The RM(r, m) code has a minimum distance dmin = 2m−r . In this problem, we have
dmin = 24−2 = 4, λ = 2 and l = 1. Therefore, the statement is true.
Solution 4: (c) In a (k + 1, k) single parity check (SPC) code, the parity bit is calculated as
p = u0 + u1 + u2 + . . . + uk−1
where ui ’s are the information bits. So, p is 1 if information sequence has odd number of ones and is 0 otherwise.
Therefore, all the codewords in SPC will have even weight (sum of all bits = 0). The SPC can detect error if and
only if odd number of bits are in error so that the received codeword would have an odd weight. Here, the received
sequence is r = 110001, which has odd weight. This is possible if and only if odd number of errors have occurred.
vi = 0, . . . , 0, 1, . . . , 1, 0, . . . , 0, . . . , 1, . . . , 1 , 1≤i≤m
| {z } | {z } | {z } | {z }
2i−1 2i−1 2i−1 2i−1
1
Since r = 1, the generator matrix would have the form G = {v0 , v1 , v2 , . . . , vm }. The codewords vi are
v0 = 1 1 1 1 1 1 1 1
v1 = 0 1 0 1 0 1 0 1
v2 = 0 0 1 1 0 0 1 1
v3 = 0 0 0 0 1 1 1 1
Solution 6: (a) A (n, k, dmin ) code with dmin ≥ 2t + 1 where t is the number of errors the code can correct, is
called perfect code if it satisfies the Hamming bound with equality, i.e.,
n n n
n − k = log2 1 + + + ··· +
1 2 t
Here, both (7,4,3) and (7,4,4) satisfy Hamming bound. However, (7,4,4) is not a valid codeword as it does not satisfy
the Plotkin bound.
n2k−1
P lotkin Bound : dmin ≤ .
2k − 1
Solution 7: (c) See the lecture slides.
Solution 9: (d) (7,4,4) and (7,5,3) are not valid codes as (7,4,4) does not satisfy the Plotkin bound and (7,5,3) does
not satisfy the Hamming bound.
H
Solution 10: (b) The parity check matrix given in the problem is of the form H1 = · · · , where H is the
1
parity check matrix of a (15,11) Hamming code and 1 is an all one row vector. Therefore, it is an example of
expurgated Hamming code. (See the lecture slides for definition).