Consider a code with five valid code words of length ten : 0000000000,…

2014

Consider a code with five valid code words of length ten :

0000000000, 0000011111,

1111100000, 1110000011,

1111111111

Hamming distance of the code is

  1. A.

    5

  2. B.

    10

  3. C.

    4

  4. D.

    9

Attempted by 406 students.

Show answer & explanation

Correct answer: C

Key idea: the Hamming distance of a code is the smallest Hamming distance between any two distinct codewords.

Given codewords:

  • 0000000000

  • 0000011111

  • 1111100000

  • 1110000011

  • 1111111111

Check the pair that gives the smallest distance:

  • Compare 1111100000 and 1110000011: they are identical in positions 1–3 and 6–8, but differ in positions 4, 5, 9, and 10.

  • Therefore their Hamming distance is 4.

Conclusion: the Hamming distance of the code is 4.

Explore the full course: Tpsc Assistant Technical Officer