Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A received word using this code will have $3^{5-2}=27$ cosets:

if no error has occurred, the coset leader is 00000;

if only one error has occurred, then the coset leader is one of the ten possible weight-1 error words, right?

So this leaves us with $16$ cosets remaining, corresponding to $2$$5\choose2$$=20$ possible weight-$2$ error words. In this case, how are the error words distributed among the different cosets? Some cosets will clearly contain just one error word, implying that this code can correct some two-bit errors. Which contradicts the theorem saying that a code of minimum distance 4 (this one) can correct up to one error!! So where have I gone wrong?

share|cite|improve this question
A linear code of minimum distance 4 can correct all one-bit errors. That doesn't preclude being able to correct some two-bit errors, it just can't correct all of them. There doesn't seem to be a contradiction. – rschwieb May 3 '13 at 13:06
up vote 1 down vote accepted

There are a total of 40 vectors of weight two. Ten ways to select the two non-zero positions, and two non-zero values for both of the non-zero components. $$ 40={5\choose 2} (3-1)^2. $$

share|cite|improve this answer
Ah, yes of course, thanks! I promise that this is my final question on this topic, if you can spare a bit of time. I really appreciate your input and answers. – Ryan May 3 '13 at 17:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.