考虑一个二进制代码,它只包含四个有效代码字,如下所示。 00000, 01011, 10101, 11110
null
设码的最小汉明距离为p,可由码纠正的最大错误位数为q。p和q的值为:
(A) p=3,q=1 (B) p=3,q=2 (C) p=4,q=1 (D) p=4,q=2 答复: (A) 说明: 我们需要找到最小值 汉明距离 (相应位位置的差异)
00000, 01011, 10101, 11110 For two binary strings, hamming distance is number of ones in XOR of the two strings. Hamming distance of first and second is 3, so is for first and third. Hamming distance of first and fourth is 4. Hamming distance of second and third is 4, and second and fourth is 3. Hamming distance of third and fourth is 3. Thus a code with minimum Hamming distance d between its codewords can detect at most d-1 errors and can correct ⌊(d-1)/2⌋ errors. Here d = 3. So number of errors that can be corrected is 1.
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END