The distance of random linear codes #
A k-by-n generating matrix G over 𝔽₂ encodes x ∈ 𝔽₂ᵏ as the combination x ᵥ* G of
its rows. For a fixed nonzero x, this combination is uniformly distributed when G is uniform:
every word y ∈ 𝔽₂ⁿ is hit by a 2⁻ⁿ fraction of the matrices
(Cslib.Code.card_filter_vecMul_eq_mul_two_pow), since G ↦ x ᵥ* G is additive and onto (the
matrix whose row i is y, for some i with x i = 1, is sent to y), so its fibers have
equal size (AddMonoidHom.card_fiber_eq_of_mem_range). A union bound
over the 2ᵏ - 1 nonzero messages and the entropy bound on the volume of a Hamming ball then
give Goldreich's Proposition E.1 (Cslib.Code.one_sub_inv_two_pow_lt_card_filter_le_hammingDist):
if 2 d ≤ n and k + t ≤ n (1 - H₂(d / n)), a uniformly random generating matrix yields a code
of distance at least d with probability greater than 1 - 2⁻ᵗ.
Main results #
Cslib.Code.card_filter_vecMul_eq_mul_two_pow: a fixed nonzero combination of the rows of a uniform matrix is uniform.Cslib.Code.one_sub_inv_two_pow_lt_card_filter_le_hammingDist: Goldreich, Proposition E.1.
References #
- O. Goldreich, Computational Complexity: A Conceptual Perspective,
Proposition E.1 (draft
r6.pdf, Appendix E, PDF p. 96, printed p. 604).
The distance of random linear codes Goldreich, Proposition E.1. If
2 d ≤ n and k + t ≤ n (1 - H₂(d / n)), where H₂(δ) = Real.binEntropy δ / Real.log 2 is the
binary entropy in bits, then a uniformly random k-by-n generating matrix G over 𝔽₂
yields a code of distance at least d (every two messages are encoded d positions apart)
with probability greater than 1 - 2⁻ᵗ.
The source states the hypothesis for large k as n ≥ max(2d, (k + t) / (1 - H₂(d / n)));
this theorem holds at every k where the hypothesis does, so it implies the eventual statement.
The quotient is multiplied out because 1 - H₂(1 / 2) = 0, where the source's bound is infinite
(and Lean's quotient would be 0).