Hamming distance conjecture

Someone on Usenet asked how many code points are possible in 16-bit code with a Hamming distance of 5. This type of problem is relevant to error detection and correction. I conjecture that for a n-bit code (where n ≥= 4) with a Hamming distance of d (where 1 ≤ d < n/2), that for odd valus of d there are 2^(n+2-2*d) code points, and for even values of d there are 2^(n+3-2*d) code points.

It would be nice to have a proof, but I don’t currently have one.

A crude brute-force C program to find the valid code points given n and d values may be found here.

Finding alogrithms to determine an efficient mapping of data values to code words and vice versa, and to detect and correct errors in codewords is left as an exercise for the reader.

This entry was posted in Computing, Software, Software I've written. Bookmark the permalink.

One Response to Hamming distance conjecture

  1. eric says:

    Kaie Wasserman found counterexamples with n=15 or 16 and d=7.

    I think there may be some nontrivial bound below which the relations hold, but it must be less than d < n/2.

Leave a Reply