An introduction to coding theory
Assignment-1 Solutions
February 8, 2017
Solution 1: (a) In channel coding, we add parity bits to the information sequence which help us in detecting/correcting the errors in the message.
Solution 2: (c) In R =
1
3
repetition code, each bit is sent thrice. Hence
information: 1101 −→ codeword: 111111000111
Solution 3: (b) The set of codewords can be found using the formula: v = uG where v and u are the codeword
and information sequence respectively and G is the k × n generator matrix. The list of codewords is obtained by
multiplying G with all possible combinations of information sequence.
u2 u1 u0
v 3 v2 v 1 v0
000
001
010
011
100
101
110
111
0000
1100
1111
0011
1010
0110
0101
1001
Solution 4: (d) In R = 13 repetition code, we have are two codewords, C1 = 000 and C2 = 111. If we transmit
C1 = 000 and three errors occur, we would receive “111”, which is C2 (a valid codeword). Similarly, if we transmit
C2 and three errors occur, we would receive C1 . Therefore, we would not be able to detect any error.
Solution 5: (d) For a (n, k) code, the rank of parity check matrix H is n − k = 7 − 4 = 3.
Solution 6: (a) The rank of H is n − k = 4, as the third row can be obtained by summing all other rows,
i.e., R3 = R1 + R2 + R4 + R5 . Since n = 7, we have k = n − 4 = 3. Hence, it corresponds to a (7, 3) code.
Solution 7: (b) First, we need to find the parity check
matrix:
1 1 0
1 1 1
G=
0 1 1
1 1 0
matrix for the given generator matrix. The generator
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
is in systematic form G = [P : Ik ]. Therefore, the parity check matrix will be of the form H = [In−k : PT ]. Hence
1 0 0 1 1 0 1
H= 0 1 0 1 1 1 1
0 0 1 0 1 1 0
for the received sequence r = (1100101), the syndrome is calculated by: s = rHT , which gives s = (111).
1
Solution 8: (c) The codewords “10110110” and “11001100” differ in five locations (2nd , 3rd , 4th , 5th and 7th
positions). Hence the Hamming distance is 5. Alternatively, the Hamming distance can be found by calculating the
Hamming weight of the modulo-2 addition of these codewords.
10110110 + 11001100 = 01111010
and Hamming weight of “01111010” is 5.
Solution 9: (c) In a communication system, compression is achieved by source coding where redundancy in the
information sequence is reduced.
Solution 10: (a) The probability of receiving sequence “01” is given as:
P(Rx = 0 and 1) = P(Rx = 0) · P(Rx = 1)
= {P(Tx = 0)P(Rx = 0) + P(Tx = 1)P(Rx = 0)} · {P(Tx = 1)P(Rx = 1) + P(Tx = 0)P(Rx = 1)}
= {0.4 × 0.6 + 0.6 × 0.4} · {0.6 × 0.6 + 0.4 × 0.4}
≈ 0.24
2
© Copyright 2026 Paperzz