Skip to main content

Hamming distance and weight importance; syndrome decoding

Short answer

Hamming weight and distance define error detection/correction capability; dmin = minimum non-zero weight for linear codes. Syndrome decoding computes s=rH^T; if non-zero, the syndrome pattern identifies the error. Example: for (6,3) code, r=100011 gives s=(110), matching column 3, so bit 3 is in error; corrected codeword 101011.

What is the importance of hamming distance and hamming weight in coding theory? Explain with example the syndrome decoding method in linear block coding.

Importance of Hamming distance and weight

  • Hamming weight (number of 1s) and Hamming distance (number of differing positions) measure how far codewords are apart.
  • For a linear code, minimum distance dmind_{min} = minimum non-zero weight, so it is found easily.
  • dmind_{min} sets the error-control power of the code: it detects up to dmin−1d_{min}-1 errors and corrects up to ⌊(dmin−1)/2⌋\lfloor(d_{min}-1)/2\rfloor errors.
  • Decoders choose the codeword at minimum Hamming distance from the received word (maximum-likelihood for a binary symmetric channel).

Syndrome decoding in linear block codes

For a code with generator G=[Ik∣P]G=[I_k\mid P] and parity-check matrix H=[PT∣In−k]H=[P^T\mid I_{n-k}], every codeword satisfies cHT=0\mathbf{c}H^T=\mathbf{0}. A received word is r=c⊕e\mathbf{r}=\mathbf{c}\oplus\mathbf{e}, where e\mathbf{e} is the error pattern. The syndrome is

s=rHT=cHT⊕eHT=eHT\mathbf{s}=\mathbf{r}H^T=\mathbf{c}H^T\oplus\mathbf{e}H^T=\mathbf{e}H^T

so it depends only on the error, not on the sent codeword.

Steps:

  1. Compute s=rHT\mathbf{s}=\mathbf{r}H^T.
  2. If s=0\mathbf{s}=\mathbf{0}, accept r\mathbf{r} as the codeword.
  3. Otherwise look up the coset leader (most likely error pattern, usually single-bit) with that syndrome; for a single error in bit ii, s\mathbf{s} equals the ii-th column of HH.
  4. Correct: c^=r⊕e\hat{\mathbf{c}}=\mathbf{r}\oplus\mathbf{e}.

Example: (6,3) code

H=[101100011010110001]H=\begin{bmatrix}1&0&1&1&0&0\\0&1&1&0&1&0\\1&1&0&0&0&1\end{bmatrix}

Syndrome table (single errors):

Error patternSyndrome
000000000
100000101
010000011
001000110
000100100
000010010
000001001

Message 101 gives codeword c=101011\mathbf{c}=101011. Suppose r=100011\mathbf{r}=100011 (bit 3 flipped).

s=rHT=col1⊕col5⊕col6=(1,0,1)⊕(0,1,0)⊕(0,0,1)=(1,1,0)\mathbf{s}=\mathbf{r}H^T=\text{col}_1\oplus\text{col}_5\oplus\text{col}_6=(1,0,1)\oplus(0,1,0)\oplus(0,0,1)=(1,1,0)

From the table, e=001000\mathbf{e}=001000, so c^=100011⊕001000=101011\hat{\mathbf{c}}=100011\oplus001000=101011, message 101 recovered.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Communication Systems chapter 8 questions →