Generating a binary code with maximized Hamming distance

Solution 1:

The coding-theoretic function $A(n,d)$ is the maximal size of a binary code of a length $n$ with minimum distance $d$. There is no known way to find its value easily, so in other words, it is not easy to determine whether, given $n$, $M$ and $d$, an $(n,M,d)$ binary code exists. In your case, there is no easy way even to find the maximal Hamming distance, let alone construct a code with the maximal Hamming distance. Some of the known values of $A$ are tabulated e.g. here.

Solution 2:

I wrote a python script for this O(n!), reasonable time for up to N=15

https://github.com/Golbstein/binary-code-generator/blob/master/maximum_hamming_distance_codes_generator.ipynb