*5.4. Comparison of Bounds*

We next consider the tightness of the refined bound (106) and the loosened bound (108). Since <sup>A</sup> is a subset of the *<sup>n</sup>*-dimensional cube {−1, 1}*n*, every point in <sup>A</sup> has at most ( *n <sup>d</sup>*) neighbors in A with Hamming distance *d*, so

$$|\mathbb{E}\_d(G)| \le \frac{1}{2} \binom{n}{d} |\mathcal{A}|.\tag{112}$$

Comparing the bound on the RHS of (106) with the trivial bound in (112) shows that the former bound is useful if and only if

$$\frac{\log|\mathcal{A}| - \frac{n}{d}\log \ell\_d}{\log \frac{m\_d}{\ell\_d}} \le \frac{n}{d} \tag{113}$$

which is obtained by relying on the identity ( *n <sup>d</sup>*) <sup>=</sup> *<sup>n</sup> d* ( *n*−1 *<sup>d</sup>*−1). Rearranging terms in (113) gives the necessary and sufficient condition

$$|\mathcal{A}| \le (m\_d)^{\frac{n}{d}},\tag{114}$$

which is independent of the value of *d*. Since, by definition, *md* ≥ 2, inequality (114) is automatically satisfied if the stronger condition

$$|\mathcal{A}| \le 2^{\frac{n}{4}} \tag{115}$$

is imposed. The latter also forms a necessary and sufficient condition for the usefulness of the looser bound on the RHS of (108) in comparison to (112).

**Example 1.** *Suppose that the set* A ⊆ {−1, 1}*<sup>n</sup> is characterized by the property that for all <sup>d</sup>* <sup>∈</sup> [*τ*]*, with a fixed integer <sup>τ</sup>* <sup>∈</sup> [*n*]*, if <sup>x</sup><sup>n</sup>* ∈ A *and <sup>x</sup>*(*k*1,...,*kd*) ∈ A *then all vectors <sup>y</sup><sup>n</sup>* ∈ {−1, 1}*<sup>n</sup> which coincide with <sup>x</sup><sup>n</sup> and <sup>x</sup>*(*k*1,...,*kd*) *in their* (*<sup>n</sup>* <sup>−</sup> *<sup>d</sup>*) *agreed positions are also included in the set* <sup>A</sup>*. Then, for all <sup>d</sup>* <sup>∈</sup> [*τ*]*, we get by definition that md* <sup>=</sup> <sup>2</sup>*d, which yields <sup>τ</sup>* ≤ log2 |A|*. Setting md* <sup>=</sup> <sup>2</sup>*<sup>d</sup> and the default value <sup>d</sup>* = 1 *on the RHS of* (106) *gives*

$$|\mathsf{E}\_d(G)| \le \frac{\binom{n-1}{d-1} |\mathcal{A}| \left(\log |\mathcal{A}| - \frac{n}{d} \log \ell\_d\right)}{2 \log \frac{m\_d}{\ell\_d}}\tag{116a}$$

$$=\frac{\binom{n-1}{d-1}\left|\mathcal{A}\right|\log\left|\mathcal{A}\right|}{2\log(2^d)}\tag{116b}$$

$$=\frac{1}{2d}\binom{n-1}{d-1}|\mathcal{A}|\,\log\_2|\mathcal{A}|\tag{116c}$$

$$=\frac{1}{2}\binom{n}{d}|\mathcal{A}|\cdot\frac{\log\_2|\mathcal{A}|}{n}.\tag{116d}$$

*Unless* <sup>A</sup> <sup>=</sup> {−1, 1}*n, the upper bound on the RHS of* (116d) *is strictly smaller than the trivial upper bound on the RHS of* (112)*. This improvement is consistent with the satisfiability of the (necessary and sufficient) condition in* (115)*, which is strictly satisfied since*

$$|\mathcal{A}| < 2^n = (2^d)^{\frac{n}{d}} = (m\_d)^{\frac{n}{d}}.\tag{117}$$

*On the other hand, the looser upper bound on the RHS of* (108) *gives*

$$|\mathsf{E}\_d(G)| \le \frac{1}{2} \binom{n}{d} |\mathcal{A}| \cdot \frac{d \log\_2 |\mathcal{A}|}{n},\tag{118}$$

*which is d times larger than the refined bound on the RHS of* (116d) *(since it is based on the exact value of md for the set* A*, rather than taking the default value of 2), and it is worse than the trivial bound if and only if* |A| > 2 *n <sup>d</sup> . The latter finding is consistent with* (115)*.*

*This exemplifies the utility of the refined upper bound on the RHS of* (106) *in comparison to the bound on the RHS of* (108)*, where the latter generalizes Theorem 4.2 of [6] from the case where d* = 1 *to all d* ∈ [*n*]*. As it is explained above, this refinement is irrelevant in the special case where d* = 1*, though it proves to be useful in general for d* ∈ [2 : *n*] *(as it is exemplified here).*

The following theorem introduces the results of our analysis (so far) in the present section.

**Theorem 2.** *Let* A ⊆ {−1, 1}*n, with <sup>n</sup>* <sup>∈</sup> <sup>N</sup>*, and let <sup>τ</sup>* <sup>∈</sup> [*n*]*. Let <sup>G</sup>* = (V(*G*), <sup>E</sup>(*G*)) *be an un-directed, simple graph with vertex set* <sup>V</sup>(*G*) = <sup>A</sup>*, and edges connecting pairs of vertices in G which are represented by vectors in* A *whose Hamming distance is less than or equal to τ. For <sup>d</sup>* <sup>∈</sup> [*τ*]*, let* <sup>E</sup>*d*(*G*) *be the set of edges in <sup>G</sup> which connect all pairs of vertices that are represented by vectors in* <sup>A</sup> *whose Hamming distance is equal to d (i.e.,* <sup>|</sup> <sup>E</sup>(*G*)<sup>|</sup> <sup>=</sup> <sup>∑</sup>*<sup>τ</sup> <sup>d</sup>*=<sup>1</sup> <sup>|</sup> <sup>E</sup>*d*(*G*)|*).*

*(a) For <sup>d</sup>* <sup>∈</sup> [*τ*]*, let the integers md* <sup>∈</sup> [<sup>2</sup> : min{2*d*, <sup>|</sup>*A*|}] *and <sup>d</sup>* <sup>∈</sup> [min{2*<sup>d</sup>* <sup>−</sup> 1, <sup>|</sup>*A*| − <sup>1</sup>}] *(be, preferably, the maximal possible values to) satisfy the requirements in* (92) *and* (94)*, respectively. Then,*

$$|\mathsf{E}\_d(G)| \le \frac{\binom{n-1}{d-1} |\mathcal{A}| \left(\log |\mathcal{A}| - \frac{n}{d} \log \ell\_d\right)}{2 \log \frac{m\_d}{\ell\_d}}.\tag{119}$$

*(b) A loosened bound, which only depends on the cardinality of the set* A*, is obtained by setting the default values md* = 2 *and <sup>d</sup>* = 1*. It is then given by*

$$|\mathbb{E}\_d(G)| \le \frac{1}{2} \binom{n-1}{d-1} |\mathcal{A}| \log\_2 |\mathcal{A}|, \quad d \in [\mathbb{r}],\tag{120}$$

*and, if <sup>τ</sup>* <sup>≤</sup> *<sup>n</sup>*+<sup>1</sup> <sup>2</sup> *, then the (overall) number of edges in G satisfies*

$$|\mathsf{E}(G)| \le \frac{1}{2} \exp\left( (n-1)\mathsf{H}\_{\mathsf{b}}\left(\frac{\pi - 1}{n - 1}\right) \right) |\mathcal{A}| \, \log\_2 |\mathcal{A}|.\tag{121}$$

*(c) The refined upper bound on the RHS of* (119) *and the loosened upper bound on the RHS of* (120) *improve the trivial bound* <sup>1</sup> 2 ( *n <sup>d</sup>*)|A|*, if and only if* |A| < (*md*) *n <sup>d</sup> or* |A| < 2 *n d , respectively (see Example 1).*
