Consider a collection $S_n$ of $n$ independent and uniformly distributed binary strings, each of length $n$. Let $f(S_n)$ be the smallest Hamming distance between any pair of strings in $S_n$. I am interested in $\mathbb{E}(f(S_n))$.
Let $X$ be the Hamming distance between a randomly chosen pair of strings in $S_n$. If we let $\mu = \frac{n}{2}$ then we know by the Chernoff bound that:
$$P( X \le (1-\delta)\mu) \le e^{-\frac{\delta^2\mu}{2}}, \qquad 0 \le \delta \le 1.$$
and
$$Pr( X \ge (1+\delta)\mu)\le e^{-\frac{\delta^2\mu}{2+\delta}}, \qquad 0 \le \delta$$
Therefore we may suspect that $\mathbb{E}(f(S_n))$ will be close to $\frac{n}{2}$ for large $n$.
For small $n$, we have e.g. $\mathbb{E}(f(S_4)) = \frac{3}{4}$.
My question is this:
What is $\mathbb{E}(f(S_n))$ asymptotic to?
I am particularly interested in the lower order terms.
Between 2 and 100, a fair estimate seems to be $$\mathbb{E}(f(S_n))\approx \frac n2+1-\frac12\sqrt{\pi n\ln(n+1)}$$ Here is the graph after $n/2$ has been subtracted from both sides
It may be possible to derive that formula or a similar one by assuming all of the $n\choose2$ distances are independent and normally distributed.