HD = Hamming distance; this question is an extension to this.
For an example 4-bit string, I want to be able to express ALL binary bit strings in a set that are a multiple of certain HD (in this example say 2) from each other in the set.
For 4 bit strings, the correct set would be {0000,1100,0110,0011,1001,0101,1010,1111}
My understanding of the combinatorics formula is 4C0+4C2+4C4=8 elements as above.
But when I follow the same formula for 4-bit strings, HD=3, it comes to 4C0+4C3 = 5 elements which are wrong: {0000,0111,1011,1101,1110}. As you can see only 0000 is an HD=3 away from other elements. I want this set {0000,1110} as they are uniquely an HD=3 away from each other.
Is there any way to generalize this number of combinations in the set through combinatorics/any formula for n bit strings?
EDIT:
All these are correct for HD=3: {0000,0111} or {0000,1011} etc. as long as all the elements are an HD=3n ( n >= 1,2...) away from each other.
For say 6 bits, these would be the correct set for HD=3: { 000000, 000111, 111000, 111111 } because the number of elements = 6C0+ 2 (I don't know how to express this with combinatorics) + 6C6
If you have $n$ bits and want distance $3$, you need $n$ to be a multiple of $3$. You just divide the bits into blocks of $3$ bits and turn on or off each block. You will get $2^{n/3}$ words, each with a multiple of $3$ bits turned on, and each a Hamming Distance a multiple of $3$ from each other. For example, with $n=9$ we might have the words
$000000000\\ 111000000,000111000,000000111\\ 111111000,111000111,000111111\\ 111111111$