# Maximum number of binary codeword with certain number of 1 and distance.

I'm studying Neuroscience and don't have any background of coding theory. During my experiment, I got exciting result and I want to know if there is any theory for the maximum number of binary codewords length n, specific distance d (not minimum) and certain number of 1 (if the codeword is consist of 1 or 0). Hamming bound or Plotkin bound might be helpful but they don't restrict the number of 1 in codewords.

For example, If there is 100 neurons and 30 neurons are activated. The other day, 30 neurons out of 100 are activated but not the same neuron with the day before. If I represent the situation with binary and found that their distance is 40 (or their would be range from 35 to 45). I want to know the number of permutation set which satisfy the observation result.

Maybe it could be think as a problem that estimating a area from a point on a sphere with specific radius.

It would be grateful to give me reference or related documents. Thanks.

• If two pair of codewords have the same Hamming distance, then they have also the same euclidean distance, and the biggest subset of $\mathbb R^n$ of points such that each couple has the same distance has cardinality $n+1$ (vertices of hyper-tethraedron) so it is an upper bound – Exodd Sep 11 at 8:57
• btw, it can be reduced to this, that has still no answer math.stackexchange.com/questions/709643/… – Exodd Sep 11 at 9:17
• @Exodd Thanks for the reply ! Yeah, n+1 would be the upper bound. It's surprising that there is no dependency of how many '1' are there and how far the distance btw the codes. – ByungHun Sep 12 at 6:07
• If the number of active neurons in your example is exactly 30, then you may benefit from looking at constant weight codes. Bounds for their maximum size are a well studied problem. – Jyrki Lahtonen Sep 13 at 4:27