Consider the binary code that consists of only four valid codewords as given…

2017

Consider the binary code that consists of only four valid codewords as given below:

00000,01011,10101,11110

Let the minimum Hamming distance of the code \(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

  1. A.

    \(p=3 \) and \(q=1\)

  2. B.

    \(p=3 \) and \(q=2\)

  3. C.

    \(p=4\) and \(q=1\)

  4. D.

    \(p=4\) and \(q=2\)

Attempted by 283 students.

Show answer & explanation

Correct answer: A

Solution: compute the minimum Hamming distance p and the error-correcting capability q.

  1. List the codewords: 00000, 01011, 10101, 11110.

  2. Compute pairwise Hamming distances (number of bit positions that differ):

    • d(00000, 01011) = 3

    • d(00000, 10101) = 3

    • d(00000, 11110) = 4

    • d(01011, 10101) = 4

    • d(01011, 11110) = 3

    • d(10101, 11110) = 3

  3. The smallest of these distances is 3, so the minimum Hamming distance p = 3.

  4. The maximum number of errors that can be corrected is q = floor((p - 1) / 2) = floor((3 - 1) / 2) = 1.

  5. Therefore, p = 3 and q = 1.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir