- #1
maiamorbific
- 5
- 0
*Devise a code for the digits 0 to 9 whose Hamming distance is 2.*
My efforts to answer this problem are kind of hard to explain, but I'll try. First I wrote out the digits 0 to 9 in binary. Then I tried to find a number that was only 2 numbers different from each one (get 2 ones when XOR them), but there was no single code that worked for all 9 numbers. I found one that worked from 0 to 7, but once the digits changed to 1000 it didn't work anymore.
Am I even approaching this right? Please help.
My efforts to answer this problem are kind of hard to explain, but I'll try. First I wrote out the digits 0 to 9 in binary. Then I tried to find a number that was only 2 numbers different from each one (get 2 ones when XOR them), but there was no single code that worked for all 9 numbers. I found one that worked from 0 to 7, but once the digits changed to 1000 it didn't work anymore.
Am I even approaching this right? Please help.