The binary symmetric channel #
The binary symmetric channel BSC_p with crossover probability p ∈ [0, 1] flips every bit of
its input independently with probability p [Guruswami, Rudra and Sudan, Section 6.2]
[GRS19]; it is the symmetric channel on two symbols of
Shannon, Section 16, of capacity 1 - h₂(p) bits per use. Here it is the probability
mass function Cslib.BitString.bsc p x on received words y : ι → Bool, the translate by x of
the noise Cslib.BitString.bscNoise p, an independent product (Cslib.Probability.PMF.pi) of
coins Cslib.Probability.PMF.coin p showing true with probability p. It delivers y with
probability p ^ d (1 - p) ^ (n - d), where d is the Hamming distance of x and y
(Cslib.BitString.bsc_apply_toReal); the noise has the law of a random mask of rate p
(Cslib.BitString.bscNoise_apply_toReal), so its weight is binomially distributed and exceeds
r ≥ n p - 1 with probability at most exp (-2 (r + 1 - n p) ^ 2 / n) by Hoeffding's
inequality (Cslib.BitString.bscNoise_toOuterMeasure_lt_weight_toReal_le).
A code with message set M is an encoder E : M → (ι → Bool) with a decoder
D : (ι → Bool) → M, and Cslib.BitString.decodingError p E D m is the probability that D
fails to recover m from the channel output on E m. A decoder is a nearest-codeword decoder
(Cslib.BitString.IsNearestDecoder) if it always returns a message whose codeword is closest to
the received word; such decoders exist for every finite nonempty message set, and for p ≤ 1 / 2
they are maximum-likelihood decoders (Cslib.BitString.bsc_apply_toReal_le_of_isNearestDecoder).
Achievability of the capacity 1 - h₂(p) by random codes is in
CslibFrontier.Probability.BitString.BinarySymmetricChannel.Achievability.
Main definitions #
Cslib.BitString.bscNoise: the noise ofBSC_p, independent bit flips.Cslib.BitString.bsc: the binary symmetric channel.Cslib.BitString.decodingError: the error probability of a code onBSC_pat a message.Cslib.BitString.IsNearestDecoder: nearest-codeword decoding.
Main results #
Cslib.BitString.bscNoise_eq_pi,Cslib.BitString.bsc_eq_map: the noise is a product of independent coins and the output is the input plus the noise.Cslib.BitString.bscNoise_apply_toReal,Cslib.BitString.bsc_apply_toReal: the masses of the noise and of the channel output.Cslib.BitString.exists_isNearestDecoder: nearest-codeword decoders exist.Cslib.BitString.bsc_apply_toReal_le_of_isNearestDecoder: nearest-codeword decoding is maximum-likelihood decoding forp ≤ 1 / 2.Cslib.BitString.decodingError_def,Cslib.BitString.decodingError_eq_bernoulliAverage: the error probability as a probability of the channel output and as an average over the noise.Cslib.BitString.decodingError_zero_eq_zero,Cslib.BitString.IsNearestDecoder.leftInverse: a noiseless channel never confuses the messages of an injective code.Cslib.BitString.decodingError_nonneg,Cslib.BitString.decodingError_le_one,Cslib.BitString.decodingError_symm: error probabilities lie in[0, 1], and complementing the received word exchangesBSC_pandBSC_{1 - p}.Cslib.BitString.bscNoise_toOuterMeasure_lt_weight_toReal,Cslib.BitString.bscNoise_toOuterMeasure_lt_weight_toReal_le: the number of flipped bits is binomial, with a Hoeffding upper tail.
References #
The channel #
The noise of the binary symmetric channel: every coordinate is flipped independently with
probability p.
The noise of BSC_p is the product of independent coins of bias p, one per coordinate.
The noise of BSC_p has the law of a random mask of rate p.
The binary symmetric channel BSC_p on words ι → Bool: on input x it delivers
x + e, where the noise e flips every bit independently with probability p.
The channel delivers y on input x with probability p ^ d (1 - p) ^ (n - d), where d is
the Hamming distance of x and y.
The likelihood p ^ d (1 - p) ^ (n - d) of BSC_p decreases with the distance d when
p ≤ 1 / 2.
The number of bits flipped by BSC_p is binomially distributed: more than r of the n bits
flip with probability ∑_{r < k ≤ n} C(n, k) p ^ k (1 - p) ^ (n - k).
Hoeffding's bound on the number of flipped bits: if n p ≤ r + 1, more than r of the
n bits flip with probability at most exp (-2 (r + 1 - n p) ^ 2 / n).
Codes, decoders and their errors #
The probability that the decoder D fails to recover the message m when its codeword
E m is sent through BSC_p.
The error probability is the probability, under the channel output on E m, that D does not
return m.
Nearest-codeword decoding is maximum-likelihood decoding on BSC_p for p ≤ 1 / 2: the
decoded codeword is at least as likely to produce the received word as any other codeword.
The error probability of a code at m is the probability, over the noise e of BSC_p, that
D does not decode E m + e to m.
Error probabilities are nonnegative.
Error probabilities are at most one.
Flipping every received bit turns BSC_p into BSC_{1 - p}: a decoder D errs on BSC_p
exactly as often as the decoder that first complements the received word errs on BSC_{1 - p}.
Over the noiseless channel BSC_0, a decoder that inverts the encoder never errs.