Documentation

CslibFrontier.Probability.BitString.BinarySymmetricChannel.Converse

Shannon's coding theorem for the binary symmetric channel: the weak converse #

No code transmits reliably over the binary symmetric channel BSC_p at a rate above its capacity 1 - h₂(p), where h₂(p) = Real.binEntropy p / Real.log 2 is the binary entropy in bits: the weak converse of Shannon's noisy-channel coding theorem for BSC_p, in the form of Cover and Thomas, Theorem 7.9.1 specialized to BSC_p.

A code is an encoder E : M → (ι → Bool) with any decoder D : (ι → Bool) → M, and its average error probability is Pe = 𝔼 m, decodingError p E D m, the error probability of a uniformly random message. Sending a uniform message W through BSC_p gives a joint law of W and the received word Y. Then:

Since log₂ |M| = H(W) = I(W; Y) + H(W | Y), every code satisfies log₂ |M| ≤ n (1 - h₂(p)) + h₂(Pe) + Pe log₂ (|M| - 1) (Cslib.BitString.logb_card_le_add_fano) and hence (1 - Pe) log₂ |M| ≤ n (1 - h₂(p)) + 1 (Cslib.BitString.one_sub_expect_decodingError_mul_logb_card_le), the source's R ≤ Pe R + 1/n + C. At a rate R > 1 - h₂(p) the average error is therefore at least (R - (1 - h₂(p))) / (2 R) once n ≥ 2 / (R - (1 - h₂(p))) (Cslib.BitString.le_expect_decodingError_of_lt_rate, Cslib.BitString.eventually_le_expect_decodingError). The maximal error is at least the average.

The results hold for every p ∈ [0, 1] and every deterministic decoder, not only nearest-codeword decoders. With Cslib.BitString.eventually_exists_code_decodingError_le they show that 1 - h₂(p) is the capacity of BSC_p for p < 1 / 2. The strong converse (the error tends to 1 above capacity, Guruswami, Rudra and Sudan, Theorem 6.3.1(2)) is in CslibFrontier.Probability.BitString.BinarySymmetricChannel.StrongConverse, and the capacity theorem for every p in CslibFrontier.Probability.BitString.BinarySymmetricChannel.Capacity. General discrete memoryless channels and channels with feedback are not formalized here.

Main results #

References #

Entropy of the noise #

The noise of BSC_p on n bits has entropy n h₂(p).

theorem Cslib.BitString.entropy_bsc {ι : Type u_1} [Fintype ι] (p : ↑unitInterval) (x : ι → Bool) :

Whatever is sent, the output of BSC_p on n bits has entropy n h₂(p).

Mutual information across the channel #

theorem Cslib.BitString.mutualInfo_bind_bsc_le {ι : Type u_1} [Fintype ι] {Ω : Type u_3} [Finite Ω] (p : ↑unitInterval) (ν : PMF Ω) (E : Ω → ι → Bool) :
Probability.PMF.mutualInfo (ν.bind fun (m : Ω) => PMF.map (fun (x : ι → Bool) => (m, x)) (bsc p (E m))) ≤ ↑(Fintype.card ι) * (1 - Real.binEntropy ↑p / Real.log 2)

n uses of BSC_p carry at most n (1 - h₂(p)) bits: if a message W drawn from any law ν is encoded by E and sent through BSC_p, the mutual information of W and the received word is at most n (1 - h₂(p)).

theorem Cslib.BitString.mutualInfo_uniformOfFintype_bind_bsc {ι : Type u_1} [Fintype ι] [DecidableEq ι] (p : ↑unitInterval) :
Probability.PMF.mutualInfo ((Probability.PMF.uniformOfFintype (ι → Bool)).bind fun (x : ι → Bool) => PMF.map (fun (x_1 : ι → Bool) => (x, x_1)) (bsc p x)) = ↑(Fintype.card ι) * (1 - Real.binEntropy ↑p / Real.log 2)

On a uniformly random input, n uses of BSC_p carry exactly n (1 - h₂(p)) bits, so the bound Cslib.BitString.mutualInfo_bind_bsc_le is attained: 1 - h₂(p) is the capacity of BSC_p per channel use Cover and Thomas, Section 7.1.

The converse #

theorem Cslib.BitString.logb_card_le_add_fano {ι : Type u_1} [Fintype ι] {M : Type u_2} [Fintype M] [Nonempty M] (p : ↑unitInterval) (E : M → ι → Bool) (D : (ι → Bool) → M) :
Real.logb 2 ↑(Fintype.card M) ≤ ↑(Fintype.card ι) * (1 - Real.binEntropy ↑p / Real.log 2) + Real.binEntropy (Finset.univ.expect fun (m : M) => decodingError p E D m) / Real.log 2 + (Finset.univ.expect fun (m : M) => decodingError p E D m) * Real.logb 2 (↑(Fintype.card M) - 1)

The converse with Fano's inequality: every code E : M → (ι → Bool) for BSC_p with a decoder D and average error probability Pe satisfies log₂ |M| ≤ n (1 - h₂(p)) + h₂(Pe) + Pe log₂ (|M| - 1), where n = |ι|.

theorem Cslib.BitString.one_sub_expect_decodingError_mul_logb_card_le {ι : Type u_1} [Fintype ι] {M : Type u_2} [Fintype M] [Nonempty M] (p : ↑unitInterval) (E : M → ι → Bool) (D : (ι → Bool) → M) :
(1 - Finset.univ.expect fun (m : M) => decodingError p E D m) * Real.logb 2 ↑(Fintype.card M) ≤ ↑(Fintype.card ι) * (1 - Real.binEntropy ↑p / Real.log 2) + 1

The weak converse for BSC_p Cover and Thomas, Theorem 7.9.1: every code E : M → (ι → Bool) with a decoder D and average error probability Pe satisfies (1 - Pe) log₂ |M| ≤ n (1 - h₂(p)) + 1. For a code of rate R = log₂ |M| / n this is R ≤ Pe R + 1 / n + (1 - h₂(p)).

theorem Cslib.BitString.le_expect_decodingError_of_lt_rate {ι : Type u_1} [Fintype ι] {M : Type u_2} [Fintype M] [Nonempty M] (p : ↑unitInterval) {R : ℝ} (hR : 1 - Real.binEntropy ↑p / Real.log 2 < R) (hM : R * ↑(Fintype.card ι) ≤ Real.logb 2 ↑(Fintype.card M)) (hn : 2 ≤ (R - (1 - Real.binEntropy ↑p / Real.log 2)) * ↑(Fintype.card ι)) (E : M → ι → Bool) (D : (ι → Bool) → M) :
(R - (1 - Real.binEntropy ↑p / Real.log 2)) / (2 * R) ≤ Finset.univ.expect fun (m : M) => decodingError p E D m

Above capacity the error is bounded away from zero, finite form: if R > 1 - h₂(p), a code has log₂ |M| ≥ R n messages and n ≥ 2 / (R - (1 - h₂(p))), then its average error probability is at least (R - (1 - h₂(p))) / (2 R), for every decoder.

theorem Cslib.BitString.eventually_le_expect_decodingError (p : ↑unitInterval) {R : ℝ} (hR : 1 - Real.binEntropy ↑p / Real.log 2 < R) :
∀ᶠ (n : ℕ) in Filter.atTop, ∀ (E : Fin (2 ^ ⌈R * ↑n⌉₊) → BitString n) (D : BitString n → Fin (2 ^ ⌈R * ↑n⌉₊)), (R - (1 - Real.binEntropy ↑p / Real.log 2)) / (2 * R) ≤ Finset.univ.expect fun (m : Fin (2 ^ ⌈R * ↑n⌉₊)) => decodingError p E D m

Shannon's noisy-channel coding theorem for the binary symmetric channel, weak converse, in its asymptotic form: for every p ∈ [0, 1] and every rate R > 1 - h₂(p), for all sufficiently large n every code with 2 ^ ⌈R n⌉₊ codewords of length n has average error probability at least (R - (1 - h₂(p))) / (2 R) > 0, under every decoder.