Given a bitstring x and a subset $P \subset \{0,1\}^n $. There are $n \choose k $ bitstrings in $\{0,1\}^n $ with Hamming distance $k$. How many bistrings with Hamming distance $k$ are in the subset $P$, in terms of $|P|$? Also tight bounds would be interesting.
Edit:
partiulary I would like to bound for $x,x' \in P$, $\sum\limits_{x \neq x' } H(x,x')$
You can't say anything interesting with respect to $|P|$ unless $P$ has some property. You can both build a subset $P$ where each element has Hamming distance $k$ or, viceversa, where no element has Hamming distance $k$.