Data Link, Framing, Error Control & ARQ

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.
