GATE / CS ARCHIVE

SIMILAR QUESTIONS / COMPUTER NETWORKS

Compute minimum pairwise Hamming distance

2 questions solved the same way, newest first. Back to Computer Networks

How these are solved

XOR each pair of valid codewords, count differing positions and take the minimum; derive correction capacity where requested.

2 marks · MCQ
Report issue

Data Link, Framing, Error Control & ARQ

Question 34, GATE 2017: A binary code has valid words 00000,01011,10101,11110. Let p be its minimum Hamming distance and q the maximum guaranteed correctable number of bit errors. A:p=3,q=1. B:p=3,q=2. C:p=4,q=1. D:p=4,q=2.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Step through it (8 steps)

1. Hamming distance counts differing positions, obtainable by counting ones in the XOR. Against 00000 the other three words have weights 3,3,4, giving the first three distances.

2. The remaining pairs have distances d(01011,10101)=4, d(01011,11110)=3 and d(10101,11110)=3. Hence the minimum over all six pairs is p=3.

3. To correct every pattern of q errors, radius-q neighborhoods of distinct codewords must not overlap, requiring 2q<p. Thus q=floor((p-1)/2)=1. Select A. A distance-3 code can detect two errors, but guaranteed correction of two errors would require minimum distance at least 5.

Original paper, page 13 · Answer key

1 mark · MCQ
Report issue

Minimum distance of a binary code

Data Link, Framing, Error Control & ARQ

Question 1.12, GATE 1995: Find minimum Hamming distance of {000000,010101,101010,000111,011001,111111}; GateForum omits 101010.
Tap to enlarge
Your answer
Answer & solution

Answer: A: 2 (no official key was published)

Hamming distance counts differing bit positions. For example 010101 and 000111 differ in exactly two positions, so the minimum is at most two. Checking the other distinct pairs finds no pair differing in one position; their distances are two, three, four or six. Hence the minimum is two. The additional the paper codeword 101010 has distances three or six to some words and does not introduce a distance-one pair.

Original paper, page 2