Sparse Ball Cardinality Formula #
Explicit formula for the cardinality of sparseBallCeil d k x in terms of binomial coefficients.
For a k-sparse binary vector x in {0,1}^d, the ball of radius < ⌈k/2⌉ around x has cardinality: |ball(x)| = Σ_{j=0}^{R-1} C(k,j) · C(d-k,j) where R = (k+3)/4 (in ℕ).
The proof constructs a bijection between ball elements and pairs (J, K) where J ⊆ supp(x) with |J| = j, K ⊆ supp(x)ᶜ with |K| = j.
Support of x equals its filter set, which has cardinality l0norm.
Complement of support has cardinality d - k.
J ⊆ support(x) and K ⊆ complement implies J and K are disjoint.
flipVec preserves l0norm when J ⊆ support, K ⊆ complement, |J| = |K|.
The positions where x and flipVec x J K differ are exactly J ∪ K.
hammingDist between x and flipVec x J K equals |J| + |K|.
Reconstruction: any y equals flipVec x J K where J = supp(x)\supp(y), K = supp(y)\supp(x).
The ball size formula: |sparseBallCeil d k x| = Σ_{j<R} C(k,j)·C(d-k,j) where R = (k+3)/4.
The constraint hammingDist < (k+1)/2 with hammingDist = 2j yields j < (k+3)/4.