Documentation

ShannonInfo.BitGuessing

The bits of a string a guesser reads from a short message #

Let z be uniform on Fin N → Bool and let φ z be a message about z from a finite alphabet V. A guesser of bit k that reads the message and only the bits before k is right on at most N / 2 + √(N ln |V| / 2) of the N bits on average over z: the message carries at most ln |V| nats about the string, the chain rule for relative entropy spends them across the bits in order, Pinsker's inequality bounds each bit's advantage by the square root of half its share, and the Cauchy–Schwarz inequality sums the N square roots.

Main definitions #

Main results #

The proof #

The proof is an induction on the number of bits that splits off the first bit and carries a nonnegative weight on pairs of a message and a string in place of the uniform law. The information of a weight is N · mass · ln 2 plus the entropy sum of the masses of the messages minus that of the weights, which is the divergence of the weight from the product of its message marginal and the uniform law on the string. It is the divergence of the first bit's conditional law from the even coin, averaged over the messages, plus the information of the two weights of the remaining bits, which is the chain rule. Pinsker's inequality for one bit and the Cauchy–Schwarz inequality combine the first bit with the two remaining parts. For the indicator weight of the graph of φ the information is the entropy of the message, at most ln |V| by Gibbs' inequality.

References #

def BitGuessing.Causal {N : ℕ} {V : Type} (g : Fin N → V → (Fin N → Bool) → Bool) :

A family of guessers is causal when the guess of bit k reads only the earlier bits.

Equations
Instances For
    theorem BitGuessing.sum_hits_le {N : ℕ} {V : Type} [Fintype V] (φ : (Fin N → Bool) → V) (g : Fin N → V → (Fin N → Bool) → Bool) (hg : Causal g) :
    (∑ z : Fin N → Bool, ∑ k : Fin N, if g k (φ z) z = z k then 1 else 0) ≤ 2 ^ N * (↑N / 2 + √(↑N * Real.log ↑(Fintype.card V) / 2))

    The bits a short message lets a causal guesser predict. Let z be uniform on Fin N → Bool and φ z a message from a finite alphabet V. A guesser of bit k, from the message and the bits before k, is right on the bits k of at most N / 2 + √(N ln |V| / 2) of the N positions on average over z. Proved from the chain rule for relative entropy, which spends the information of the message across the bits in order, and Pinsker's inequality for each bit, with the Cauchy–Schwarz inequality to sum the square roots.