Finding average number of elements within a particular radius

112 Views Asked by At

Let $$X=\{(x_1,x_2, \cdots, x_n): x_i\in \{0,1,2,3\}, x_{i+1}\ne x_i, \sum_i (1_{x_i=0}+1_{x_i=1}) = w \}$$ for a given $w$ such that $0\le w\le n$.

Let $$V_r(x) \triangleq \left|\{y\in X : d(x,y)\le r\}\right|$$ where $d(x,y) = \sum_i 1_{x_i\ne y_i}$

Then, I want to compute $$W_d \triangleq \frac{1}{|X|} \sum_{x\in X}V_d(x)$$ A decent upper bound would work too.

Preliminary Result: I have an upper bound, as $\sum_{r=0}^{d}\sum_{i=0}^{min{\lfloor r/2 \rfloor,w,n-w}} \binom{w}{i}\binom{n-w}{i} \binom{n-2i}{r-2i} 2^{2i}$. This is an upper bound on any $V_d(x)$ and thus on the average. It is obtained by changing $i$ locations in $\{0,1\}$ to $\{2,3\}$ and thus to maintain sum of $0,1$ entries to $w$, the other shift will be $i$ too. Any better upper bound will be appreciated.