Finding hamming distance of code

Celeritas picture Celeritas · Oct 5, 2012 · Viewed 15.3k times · Source

A question asks: find the hamming distance of the following code:

11111  
10101  
01010  
11100  
00011  
11001

The answer is 2. How does this work? I thought hamming distance is only between two strings?

Answer

guga picture guga · Oct 5, 2012

The Hamming distance of a code is defined as the minimum distance between any 2 codewords. So, in your case, finding the Hamming distance between any 2 of the listed codewords, no one is less than 2.