Cover's enumerative coding for weight-bounded Boolean words #
Cover's lexicographic rank (Cslib.BitString.coverRank) and greedy threshold decoder
(Cslib.BitString.coverDecode) establish an explicit bijection between words z : Fin q → Bool of
Hamming weight at most e and indices below the Hamming-ball size
B(q, e) = ∑ j ∈ range (e + 1), q.choose j (Cslib.BitString.ballSize).
Main definitions #
Cslib.BitString.ballSize: the size∑ j ∈ range (e + 1), q.choose jof the binary Hamming ball of radiuseinFin q → Bool.Cslib.BitString.coverRank: Cover's lexicographic rank of a weight-bounded Boolean word.Cslib.BitString.coverDecode: Cover's greedy threshold decoder recovering a word of weight at mostefrom its rank belowballSize q e.
Main results #
Cslib.BitString.ballSize_succ_succ: Pascal recurrence for Hamming-ball sizes.Cslib.BitString.card_filter_weight_le_eq_ballSize: the number of words inFin q → Boolof weight at mosteequalsballSize q e.Cslib.BitString.coverRank_lt_ballSize,Cslib.BitString.weight_coverDecode_le,Cslib.BitString.coverRank_coverDecode,Cslib.BitString.coverDecode_coverRank: mutual inverse and weight bounds for Cover's enumerative coding.
References #
- [T. M. Cover, Enumerative source encoding][Cover1973]
- [Threshold Circuits as Decision Trees and Finite-State Programs, Section 4] [26]
Size B(q, e) = ∑ j ∈ range (e + 1), q.choose j of the Hamming ball of radius e in
{0, 1}^q.
Instances For
@[simp]
The Hamming ball of any radius in the cube of dimension 0 has one point.
@[simp]
The Hamming ball of radius 0 has one point.
Every decoded word coverDecode q e t has Hamming weight at most e.
@[simp]
Ranking a decoded word coverDecode q e t for t < ballSize q e recovers t.