-
Consider a binary code that consists of only four valid codewords as given below :
00000,01011,10101,11110
Let the minimum Hamming distance of the code be p and the maximum number of erroneous bits that can be corrected by the code be q. Then the values of p and q are
-
- p = 3 and q = 1
- p = 3 and q = 2
- p = 4 and q = 1
- p = 4 and q = 2
- p = 3 and q = 1
Correct Option: B
As given that Code = 00000, 01011, 10101, 11110
Let Code 1 is 0 0 0 0 0
Code 2 is 0 1 0 1 1
Code 3 is 1 0 1 0 1
Code 4 is 1 1 1 1 0
Then the hamming distance between code 1 and code 2 is (3), because only three different digit between two code.
Similarly: hamming distance between (Code 1 and Code 3), (Code 1 and Code 4), (Code 2 and Code 3), (Code 2 and Code 4), (Code 3 and Code 4) are 3, 4, 4, 3, 3 respectively. So, as per given data, minimum hamming distance of all code words is (P) considered as hamming distance is = 3, (P = 3).
Now, the maximum number of erroneous bits that can be corrected (Code q), by the Hamming Code is = (2q + 1).
According to hamming code,
Minimum hamming distance of all the code word equal to the Maximum number of erroneous bits that can be corrected by the hamming code is
3 = (2q + 1)
3 – 1 = 2q
q = | = 1 | |
2 |
q = 1
Hence, option (a) is correct.