The Johnson bound #
Let C be a code of length n and minimum distance at least d, and let w be a word. Each
codeword c within distance e of w agrees with w on a set of at least a = n - e
coordinates, and two distinct codewords agree with each other, hence on the intersection of their
sets, on at most t = n - d coordinates. Counting the pairs of such codewords that agree with
w at a coordinate, and applying the Cauchy–Schwarz inequality to the numbers of codewords that
agree with w at each coordinate, the number L of codewords within distance e satisfies
L * (a ^ 2 - n * t) ≤ n * (a - t) (Cslib.Code.card_filter_hammingDist_le_mul_le). When
a ^ 2 > n * t, that is when e < n - √(n * (n - d)), a Hamming ball of radius e therefore
contains at most n * (d - e) codewords (Cslib.Code.card_filter_hammingDist_le_le), whatever
the alphabet: the Johnson bound [Joh62], [GRS19]. Listing the messages
whose codewords lie in the ball is then a list decoder up to radius e / n with lists of
n * (d - e) messages (Cslib.Code.exists_listCode_listDecodes), in the sense of
Cslib.ListCode.ListDecodes; the decoder is chosen noncomputably, and no running time is claimed.
Over an alphabet of q letters the radius improves. If a of the M codewords in the ball agree
with w at a coordinate, the other M - a spread over q - 1 letters, so at least
a ^ 2 + (M - a) ^ 2 / (q - 1) ordered pairs of them agree there. Combining this with the
double counting behind the Plotkin bound (Cslib.Code.sum_sum_hammingDist_add_sum_sum_sum_ite)
gives, for q e ≤ (q - 1) n,
M ((q - 1) (n - e) ^ 2 + e ^ 2 - (q - 1) n (n - d)) ≤ (q - 1) n d
(Cslib.Code.card_filter_hammingDist_le_mul_le_of_mul_le): the q-ary Johnson bound
[GuruswamiRudraSudan2019, Theorem 7.3.1], which the source proves for q = 2 and leaves to its
Exercise 7.7 for general q. If d ≤ (1 - 1 / q) n, its hypotheses hold exactly when
e / n < J_q(d / n), where J_q(δ) = (1 - 1 / q) (1 - √(1 - q δ / (q - 1))); for larger d they
hold whenever q e ≤ (q - 1) n. A ball of such a radius then contains at most (q - 1) n d
codewords (Cslib.Code.card_filter_hammingDist_le_le_of_mul_le): the radius of Exercise 7.7, with
a list size within the q d n of Theorem 7.3.1 (Exercise 7.7 states 2 q n). As q grows,
J_q(δ) decreases to the alphabet-free radius 1 - √(1 - δ).
Main results #
Cslib.Code.card_mul_sub_le_of_le_card_of_card_inter_le,Cslib.Code.card_mul_le_two_mul_of_le_card_of_card_inter_le: double counting for families of agreement sets with bounded pairwise intersections.Cslib.Code.card_filter_hammingDist_le_mul_le: the Johnson bound, in agreement form.Cslib.Code.card_filter_hammingDist_le_le,Cslib.Code.card_filter_hammingDist_le_mul_le_two_mul: the Johnson bound on list sizes.Cslib.Code.exists_listCode_listDecodes: list decoding up to the Johnson radius.Cslib.Code.card_filter_hammingDist_le_mul_le_of_mul_le,Cslib.Code.card_filter_hammingDist_le_le_of_mul_le: the q-ary Johnson bound.
References #
Double counting for agreement sets. If each c ∈ L has a set S c ⊆ ι of size at least
a, and distinct members of L meet in at most t elements, then
#L * (a ^ 2 - |ι| * t) ≤ |ι| * (a - t).
Double counting for agreement sets, 2 * |ι| / a form. If each c ∈ L has a set
S c ⊆ ι of size at least a, distinct members of L meet in at most t elements, and
2 * |ι| * t ≤ a ^ 2, then #L * a ≤ 2 * |ι|.
The Johnson bound, in agreement form: for a code of length n and minimum distance at
least d, the number L of codewords within distance e of a word w satisfies
L * ((n - e) ^ 2 - n * (n - d)) ≤ n * (d - e). It bounds L when n * (n - d) < (n - e) ^ 2
and says nothing otherwise.
The Johnson bound [Joh62]: if n * (n - d) < (n - e) ^ 2, that is if
e < n - √(n * (n - d)), a Hamming ball of radius e contains at most n * (d - e) codewords of a
code of length n and minimum distance at least d, whatever the alphabet.
The Johnson bound, 2 * n / (n - e) form: if 2 * n * (n - d) ≤ (n - e) ^ 2, the number
L of codewords within distance e of a word w satisfies L * (n - e) ≤ 2 * n.
List decoding up to the Johnson radius. Let enc be an injective encoding of a finite
nonempty set of messages whose codewords have minimum distance at least d. If
n * (n - d) < (n - e) ^ 2, some list decoder with lists of n * (d - e) messages list decodes
enc up to radius e / n: it lists the messages whose codewords are within distance e of the
received word.
The q-ary Johnson bound #
The q-ary Johnson bound, in agreement form [GuruswamiRudraSudan2019, Theorem 7.3.1, at the
radius of Exercise 7.7 for general q]: for a code of length n and minimum distance at least d
over q letters, and a radius e with q e ≤ (q - 1) n, the number M of codewords within
distance e of a word w satisfies
M ((q - 1) (n - e) ^ 2 + e ^ 2 - (q - 1) n (n - d)) ≤ (q - 1) n d. It bounds M when
(q - 1) n (n - d) < (q - 1) (n - e) ^ 2 + e ^ 2 and says nothing otherwise. The hypothesis
q e ≤ (q - 1) n cannot be dropped: for q = 2 and e = d = n the ball is the whole space.
The q-ary Johnson bound on list sizes [GuruswamiRudraSudan2019, Theorem 7.3.1, at the
radius of Exercise 7.7 for general q]: if q e ≤ (q - 1) n and
(q - 1) n (n - d) < (q - 1) (n - e) ^ 2 + e ^ 2, that is if e / n < J_q(d / n) when
d ≤ (1 - 1 / q) n, a Hamming ball of radius e contains at most (q - 1) n d codewords of a code
of length n and minimum distance at least d over q letters. The list size (q - 1) n d is
within the q d n of Theorem 7.3.1 (Exercise 7.7 states 2 q n).