Consider a code with only four valid code words: 0000000000, 0000011111,…
2020
Consider a code with only four valid code words: 0000000000, 0000011111, 1111100000, and 1111111111. This code has distance 5. If the code word arrived is 0000000111 then the original code word must be _______
- A.
0000011111
- B.
0000000000
- C.
1111100000
- D.
1111111111
Attempted by 282 students.
Show answer & explanation
Correct answer: A
Key idea: find the codeword with the smallest Hamming distance to the received word. With minimum code distance 5 the correction radius is 2, so a nearest codeword within distance 2 is the correct original.
Distance to 0000000000: 3 (differences at positions 8, 9, 10).
Distance to 0000011111: 2 (differences at positions 6 and 7).
Distance to 1111100000: 8 (differences at positions 1–5 and 8–10).
Distance to 1111111111: 7 (differences at positions 1–7).
Conclusion: the closest codeword to the received word 0000000111 is 0000011111 with Hamming distance 2, and since the code corrects up to 2 errors this must be the original codeword.
A video solution is available for this question — log in and enroll to watch it.