IAE Academy

GATE 2018 EC Q.16: solution and answer

GATE 2018 · ECQ.16 · 1 mark · NAT

Consider a binary channel code in which each codeword has a fixed length of 5 bits. The Hamming distance between any pair of distinct codewords in this code is at least 2. The maximum number of codewords such a code can contain is ______.

See the question in the paper

Answer and solution

ANSWER

The maximum number of codewords is 16.

Official answer: 16Source: Official answer key, GATE 2018 EC (IIT Guwahati)

  1. We need the largest binary code of length with minimum Hamming distance .

  2. Upper bound: delete the last bit of every codeword. Two distinct codewords differ in at least 2 positions, so after deleting one position they still differ in at least position. The shortened 4-bit words are therefore all distinct.

  3. There are only binary words of length 4, so the number of codewords satisfies .

  4. Achievability: take all 5-bit words of even weight (the single parity-check code). Two different even-weight words differ in an even number of positions, and in at least one, so in at least 2. Hence .

  5. The number of even-weight words of length 5 is .

  6. The upper bound is met, so the maximum number of codewords is .

KEY IDEA

A minimum distance of 2 means the code detects single-bit errors. Deleting one coordinate keeps all codewords distinct, so the size is at most , and the even-parity code reaches that bound.

WATCH OUT FOR

Using the Hamming bound or the Singleton bound incorrectly, or picking 32 because 5 bits give 32 words. Distance 2 forbids two codewords from differing in only one bit, so only half the words can be used.

From the GATE 2018 EC paper. Every question of this paper · Download the full paper · All 5 Error control questions, with notes

More Error control questions