Calculating minimum hamming distance of a code

11.9k Views Asked by At

We use hamming code of (7,4,3); Given 4 bits of information, we'll add 3 bits of parity, and one more parity bit for the 7-bits code.

Given $x_3,x_5,x_6,x_7$
$x_1 = (x_3+x_5+x_7) \mod 2$
$x_2 = (x_3+x_6+x_7) \mod 2$
$x_4 = (x_5+x_6+x_7) \mod 2$

For example,
for $0010$ the correspond codeword is $10101010$.
for $1001$ the correspond codeword is $00110011$.

So, I was asked to calculate the minimum hamming distance of the code. A naive way would be calculating the distance between each pair of codewords and taking the minimum value, and giving a small example using the naive way.

Thanks!

Now, is there a better way doing it? like a formula, or set of rules?
I've read several articles about this issue, and all they do is explaining what is a minimum hamming distance of a code.