Given the set of codewords C={00000,01011,10101,11110}:
Calculate the Hamming distance d(ci,cj) between every pair of distinct codewords:
d(00000,01011)=3
d(00000,10101)=3
d(00000,11110)=4
d(01011,10101)=4
d(01011,11110)=3
d(10101,11110)=3
The minimum Hamming distance is:
p=dmin=3 The relationship between the minimum Hamming distance dmin and the error-correcting capability q is:
dmin≥2q+1 3≥2q+1⟹2q≤2⟹q=1
Therefore, p=3 and q=1, which corresponds to option (A).