# Error detection/correction algorithm

We have 2 stations that communicate with each other, but we need to detect (or even correct) when something is wrong.

We use 8 binary words: each consisting of 3 bits and to send it we code it as where is the complement of and is the even parity check bit of .

We need to find the capabilities of this code (up to how many can we detect and how many can we correct). BUT, a proof is required.

This is how far I've reached so far:

First we find the hamming distance: If changes then changes, also changes. So we have a hamming distance of 3.

This means that we can detect two bit errors or correct a single error.

Can you help me write the proof for that?

(also the tags may need some refinement - comments about the downvote are welcome)

• This really isn't very difficult. Why not show us what you've done, and which part is giving you trouble? – Beta Feb 4 '14 at 2:04
• Why are your making up your own error-correcting code instead of just using one of the standard ones? – David Richerby Feb 4 '14 at 15:19

Consider any two codewords based on $b_2b_1b_0$ and $c_2c_1c_0$. The Hamming distance between the two codewords is at least twice the Hamming distance between $b_2b_1b_0$ and $c_2c_1c_0$ (why?). Furthermore, if the Hamming distance between $b_2b_1b_0$ and $c_2c_1c_0$ is exactly $1$, then your argument shows that the Hamming distance between the codewords is $3$. We can conclude that the Hamming distance is always at least $3$.