Expander codes: rate and distance #
The expander code of a bipartite graph G : ι → κ → Prop [SS96] has a bit for
every left vertex (variable) and a parity check for every right vertex (check). A word
x : ι → Bool is a codeword when every check sees an even number of ones among its neighbours,
i.e. when it lies in the kernel of the 0/1 incidence matrix
(Cslib.BitString.ExpanderCode.checkMatrix). This is the code C(G) of
[GuruswamiRudraSudan2025, Definition 11.3.1], a binary linear code given as a
Submodule Bool (ι → Bool); when G has small degrees it is a low-density parity-check code.
- Rate [GuruswamiRudraSudan2025, Theorem 11.3.6, dimension part]: the code has at least
2 ^ (n - m)codewords, wheren = |ι|andm = |κ|(Cslib.BitString.ExpanderCode.two_pow_sub_le_card_code), so its ratelog₂ |C(G)| / nis at least1 - m / n, and at least1 - c / dwhenGis(c, d)-biregular (Cslib.BitString.ExpanderCode.one_sub_div_le_rate_of_isBiregular). - Distance [GuruswamiRudraSudan2025, Theorem 11.3.6]: if left degrees are at most
cand all sets of at mostkvariables expand by a factorα > c / 2, distinct codewords differ in more thankpositions (Cslib.BitString.ExpanderCode.lt_hammingDist). The setSwhere they differ would have a unique neighbour, a check seeing exactly one difference, which a codeword cannot violate. Refining the argument on ak-subset ofSgives2 α k ≤ c · d(x, w)(Cslib.BitString.ExpanderCode.two_mul_mul_le_hammingDist), i.e. distance at least2 γ (1 - ε) nforα = c (1 - ε)andk = γ n[GuruswamiRudraSudan2025, Theorem 11.3.8] [GuruswamiSharma2010, Theorem 4].
The source states these for c-left-regular graphs with k = γ n; here left degrees need only be
at most c (Cslib.Bipartite.IsLeftBounded) and k is any natural number. Flip decoding is in
CslibFrontier.Foundations.Data.Code.FlipDecoding.
Main definitions #
Cslib.BitString.ExpanderCode.checkMatrix: the incidence matrix of the checks.Cslib.BitString.ExpanderCode.code: the expander (parity-check) code of a bipartite graph.Cslib.BitString.ExpanderCode.syndrome,Cslib.BitString.ExpanderCode.unsat: the values of the checks on a word, and the set of violated checks.
Main results #
Cslib.BitString.ExpanderCode.mem_unsat_iff: a check is violated iff it sees an odd number of errors.Cslib.BitString.ExpanderCode.card_unsat_le: at mostc · d(y, w)checks are violated.Cslib.BitString.ExpanderCode.two_pow_sub_le_card_code,Cslib.BitString.ExpanderCode.one_sub_card_div_card_le_rate,Cslib.BitString.ExpanderCode.one_sub_div_le_rate_of_isBiregular: the rate.Cslib.BitString.ExpanderCode.lt_hammingDist,Cslib.BitString.ExpanderCode.lt_minDist,Cslib.BitString.ExpanderCode.two_mul_mul_le_hammingDist: the distance.
References #
The expander code of a bipartite graph [SS96] [GuruswamiRudraSudan2025, Definition 11.3.1]: the words on which every check, the sum of the bits of its neighbours, vanishes.
A check is violated by y iff it sees an odd number of errors, the positions where y
differs from a codeword w.
If left degrees are at most c, a word at distance e from a codeword violates at most
c e checks.
Rate #
Rate [GuruswamiRudraSudan2025, proof of Theorem 11.3.6] [GuruswamiSharma2010, §1]: with
n variables and m checks the code, the solution space of m homogeneous linear equations, has
dimension at least n - m, i.e. at least 2 ^ (n - m) codewords.
Rate in real form: log₂ |C(G)| / n ≥ 1 - m / n.
Rate of a biregular expander code: if G is (c, d)-biregular, the rate
log₂ |C(G)| / n is at least 1 - c / d.
Distance #
Distance of expander codes [GuruswamiRudraSudan2025, Theorem 11.3.6]. If left degrees are
at most c and sets of at most k variables expand by a factor α > c / 2, distinct codewords
differ in more than k positions.
The minimum distance of the expander code exceeds k.
Improved distance of expander codes [GuruswamiRudraSudan2025, Theorem 11.3.8]
[GuruswamiSharma2010, Theorem 4]. Under the hypotheses of lt_hammingDist, distinct codewords
satisfy 2 α k ≤ c · d(x, w). With α = c (1 - ε) and k = γ n this is the source's distance
bound 2 γ (1 - ε) n.