The Plotkin bound #
Let C be a code of length n and minimum distance at least d over an alphabet α of q
letters. At every coordinate, by the Cauchy–Schwarz inequality, at least a 1 / q fraction of
the ordered pairs of codewords agree (Cslib.Code.sq_card_le_card_mul_sum_sum_ite). Summing
over the coordinates, the sum of the distances over all ordered pairs of codewords is at most
(1 - 1 / q) n |C|² (Cslib.Code.card_mul_sum_sum_hammingDist_add_le), while each of the
|C| (|C| - 1) pairs of distinct codewords contributes at least d. Comparing the two gives the
Plotkin bound [Plo60], [GuruswamiRudraSudan2019, Theorem 4.4.1 and Exercise 4.17]:
|C| (q d - (q - 1) n) ≤ q d (Cslib.Code.card_mul_sub_le_of_le_minDist), so that
|C| ≤ q d / (q d - (q - 1) n) when d > (1 - 1 / q) n
(Cslib.Code.card_le_div_of_le_minDist).
The argument only uses the coordinates where codewords may differ, so it bounds every code whose
words agree outside a set T of coordinates by the same expression with |T| in place of n
(Cslib.Code.card_mul_sub_le_of_le_minDist_of_forall_notMem_eq). Shortening a code to any m
coordinates, that is splitting it according to its letters at the other n - m coordinates,
gives |C| (q d - (q - 1) m) ≤ q ^ (n - m) q d
(Cslib.Code.card_mul_sub_le_pow_mul_of_le_minDist). Two consequences:
- At relative distance exactly
1 - 1 / q, that isq d = (q - 1) n, shortening one coordinate gives|C| ≤ q n(Cslib.Code.card_le_mul_of_le_minDist_of_mul_eq), which is at least as sharp as the bounds2 q nof [GuruswamiRudraSudan2019, Theorem 4.4.1, part 1] and2 (q - 1) nof its Exercise 4.13. For binary codes of length2 dthis is|C| ≤ 2 n(Cslib.Code.card_le_two_mul_of_le_minDist_of_card_eq), attained by the Hadamard code together with its complements [GuruswamiRudraSudan2019, Exercise 4.14]. - Below that distance, shortening gives the asymptotic Plotkin bound on the rate
[GuruswamiRudraSudan2019, Corollary 4.4.2], in
CslibFrontier.Foundations.Data.Code.Plotkin.Asymptotic.
Main results #
Cslib.Code.card_mul_sub_le_of_le_minDist,Cslib.Code.card_le_div_of_le_minDist: the Plotkin bound.Cslib.Code.card_mul_sub_le_pow_mul_of_le_minDist: the Plotkin bound for shortened codes.Cslib.Code.card_le_mul_of_le_minDist_of_mul_eq,Cslib.Code.card_le_two_mul_of_le_minDist_of_card_eq: the Plotkin bound at relative distance1 - 1 / q.
References #
The ordered pairs of words of C that agree at the coordinate i, counted by their common
letter there.
The column bound. At every coordinate, at least a 1 / q fraction of the ordered pairs
of words of C agree, where q = |α|.
For words that agree outside T, the Hamming distance plus the number of coordinates of T
where they agree is |T|.
Double counting for words that agree outside T: the distances plus the agreements in
T, summed over the ordered pairs of words of C, add up to |T| |C|².
The total distance of a code whose words agree outside T:
q ∑ Δ(x, y) + |T| |C|² ≤ q |T| |C|², the sum over the ordered pairs of words of C, where
q = |α|. In other words, the average distance is at most (1 - 1 / q) |T|.
The distances between distinct words of a code of minimum distance at least d, summed over
the ordered pairs of codewords, add up to at least |C| (|C| - 1) d.
The Plotkin bound for codes that agree outside T. If the words of a code C of minimum
distance at least d over q letters agree outside a set T of coordinates, then
|C| (q d - (q - 1) |T|) ≤ q d.
The Plotkin bound for shortened codes. For a code C of length n and minimum distance
at least d over q letters, and any m ≤ n, |C| (q d - (q - 1) m) ≤ q ^ (n - m) q d:
fixing the letters at n - m coordinates leaves a code that agrees outside the other m
coordinates, to which the Plotkin bound applies [GuruswamiRudraSudan2019, proof of
Corollary 4.4.2].
The Plotkin bound [Plo60], [GuruswamiRudraSudan2019, Theorem 4.4.1, part 2]: a code
C of length n and minimum distance at least d over q letters satisfies
|C| (q d - (q - 1) n) ≤ q d. It bounds |C| when d > (1 - 1 / q) n and says nothing
otherwise.
The Plotkin bound [Plo60], [GuruswamiRudraSudan2019, Theorem 4.4.1, part 2], quotient
form: if d > (1 - 1 / q) n, a code of length n and minimum distance at least d over q
letters has at most q d / (q d - (q - 1) n) codewords.
The Plotkin bound at relative distance 1 - 1 / q. A code of length n and minimum
distance at least d > 0 over q letters with q d = (q - 1) n has at most q n codewords.
Shortening one coordinate and applying the Plotkin bound gives this; it sharpens the bound 2 q n
of [GuruswamiRudraSudan2019, Theorem 4.4.1, part 1] and, for q ≥ 3, the bound 2 (q - 1) n of its
Exercise 4.13.
The binary Plotkin bound at relative distance one half. A binary code of length n = 2 d
and minimum distance at least d > 0 has at most 2 n codewords; the Hadamard code together with
its complements attains this [GuruswamiRudraSudan2019, Exercise 4.14].