Classical Information Review
Classical information theory explains how predictable data can be compressed and how messages can survive a noisy channel. These are different tasks: compression removes redundancy, while error correction adds carefully chosen redundancy. This review develops both for finite alphabets, independent identically distributed (iid) sources, and discrete memoryless channels, then explains what changes when secrecy or computational cost matters.
Helpful background. Probability spaces and conditional probability supply the distributions used below. The mathematical derivations of entropy and relative entropy give a fuller account of the information measures.
Sources, Alphabets, and Distributions
Section titled “Sources, Alphabets, and Distributions”Let a discrete source produce a random variable taking values in a finite alphabet with probability mass function
The alphabet lists possible symbols; the distribution gives their ensemble frequencies. Neither specifies what the symbols mean. A binary alphabet could encode logical values, detector clicks, source labels, error flags, or decisions. Semantic importance must enter through the task or loss function rather than being inferred from probability alone.
For an iid source block ,
This factorization is an assumption. A stationary source need not be independent, a device can drift, and a channel can have memory. When correlations matter, reporting only the one-symbol marginal discards operationally relevant structure.
The realized sequence is not the distribution . Entropy is an ensemble average, while the information content varies from one realization to another. Likewise, an empirical frequency observed in one finite block is an estimator of a source parameter, not automatically the parameter itself.
Entropy, Divergence, and Mutual Information
Section titled “Entropy, Divergence, and Mutual Information”This page uses base- logarithms, so entropies and divergences are reported in bits, with by continuity. For , the Shannon entropy is
For a pair , the compact dictionary is
and
Entropy measures average uncertainty under a declared ensemble. Conditional entropy measures the uncertainty remaining after the conditioning variable is known. Mutual information measures statistical dependence: it is zero exactly when for finite alphabets. It does not by itself establish causation, usefulness, secrecy, or an achievable communication rate.
For distributions and on the same alphabet,
If for some with , then . The divergence is directed and is not a metric. The identity
connects dependence to distinguishability from the product model. For example, a perfectly copied random bit has , while independent bits have zero mutual information. These statements concern correlation, not a causal direction.
Stochastic Channels and Data Processing
Section titled “Stochastic Channels and Data Processing”A finite classical channel is a conditional distribution from an input alphabet to an output alphabet . This page writes inputs as columns and outputs as rows, so every input column is normalized:
For an input law , the channel induces
and
The conditional law is not a complete communication system. It does not specify the input distribution, encoder, decoder, blocklength, assistance, cost, or criterion for success.
If is a Markov chain, so that is produced from without additional access to , then the data-processing inequality gives
Postprocessing can preserve or discard information about , but it cannot create dependence on that was absent from . This statement assumes the declared Markov structure; hidden side information can invalidate an informal application of the inequality.
Worked example: a binary symmetric channel
Section titled “Worked example: a binary symmetric channel”Take a uniform binary input and a binary symmetric channel with crossover probability . With rows indexed by output and columns by input ,
Each column sums to one. Symmetry and the uniform input make uniform, so bit. Given either input, the output flips with probability , hence
where
Therefore
For a BSC, symmetry makes the uniform input capacity achieving, so this value also equals
The capacity is an optimized asymptotic limit for this memoryless channel. It is not an achieved finite-block rate, a gate rate, or hardware throughput.
Source Coding and Compression
Section titled “Source Coding and Compression”A lossless source code represents a source block by a bit string from which the decoder can reconstruct that block. For a one-symbol binary prefix code with codeword lengths , the Kraft inequality requires
and the mean length is
For any binary prefix code, . Conversely, one can choose integer lengths on the source support and construct a prefix code with . Coding blocks of iid symbols gives . These are expected lengths for lossless variable-length coding, not the lengths of every realized string. The code must also be known to the decoder.
Compression changes the representation of source data. It does not protect the resulting bits against a noisy channel. Conversely, adding redundancy for error correction generally increases the transmitted blocklength. Keeping these two operations separate prevents the common claim that “coding” must either always compress or always expand data.
Worked example: a biased Bernoulli source
Section titled “Worked example: a biased Bernoulli source”Let and . Then
For iid symbols, the first-order entropy benchmark is
This can be compared with the bits needed by the raw one-bit-per-symbol representation. It is not the encoded length of every realized block. A binary single-symbol prefix code still needs one bit for each of the two symbols and therefore has mean length one bit per symbol. Approaching the entropy requires block or arithmetic-style coding, together with finite-block, model, header, and implementation overhead.
Channel Coding and Reliable Decoding
Section titled “Channel Coding and Reliable Decoding”A channel code uses redundancy to convey one of messages through channel uses. For a discrete memoryless channel,
An encoder maps each message to a codeword . A decoder maps the received word to an estimate or, when allowed, an erasure or abort. If , the code rate is
For a discrete memoryless channel, the Shannon capacity is
In its asymptotic form, the noisy-channel coding theorem separates rates below capacity, for which sequences of codes can drive error toward zero, from rates above capacity, which are not reliably achievable under the theorem’s assumptions. The theorem does not select a practical code, fix a decoder’s computational cost, or give the latency and throughput of a finite device.
Source and channel rates use different denominators. A source code reports bits per source symbol; a channel code reports message bits per channel use. Connecting them requires an explicit interface. Under the assumptions of a source–channel separation theorem, one may compress and then protect the compressed bits, but those assumptions and both blocklengths must be declared rather than hidden in a single “compression rate.”
Finite Blocks, Error Criteria, and Rates
Section titled “Finite Blocks, Error Criteria, and Rates”For equiprobable messages, the average decoding error is
whereas the maximal error is
Always for equiprobable messages. A code can protect common or easy messages well while leaving one message much less reliable, so an unqualified “error rate” is insufficient. A one-shot or selected finite-block result must also remain distinct from an asymptotic sequence-of-codes claim.
For a BSC with fixed crossover , the normal approximation to the best achievable rate at blocklength and fixed error target is
where is the upper tail probability of a standard normal variable and
is the channel dispersion. For , , and , the first two terms give approximately message bits per channel use, below the capacity . This estimates the optimal finite-block rate; it neither constructs a code nor guarantees that a chosen practical code achieves the estimate. Polyanskiy, Poor, and Verdú develop the bounds and asymptotics behind this approximation.
To convert a rate into delivered bits per second, we also need the channel-use rate, decoding time, and any retries or discarded blocks. Capacity, finite-block coding performance, and hardware throughput answer different questions.
Keys, Randomness, and Security Boundaries
Section titled “Keys, Randomness, and Security Boundaries”A key can have high Shannon entropy and still be known to an adversary. Security requires a relation among the key, adversarial information, protocol transcript, and intended ideal resource—not merely a marginal distribution for .
For a classical key and adversarial record , marginal uniformity is represented by . Independence would additionally require . A useful classical distance from an ideal uniform independent key is
If this distance is large, an adversary can distinguish the real joint distribution from the ideal resource even when is maximal. A nominal key length also says nothing by itself about freshness, authentication, leakage during reconciliation, implementation compromise, or safe composition with another protocol.
The one-time pad illustrates the boundary sharply: information-theoretic secrecy needs a uniform secret key independent of the message and adversary, at least as long as the message, and never reused. Quantum key distribution develops security against quantum side information, finite-key effects, and authentication assumptions.
Comparing classical and quantum computations
Section titled “Comparing classical and quantum computations”A comparison must ask both algorithms to solve the same problem with comparable input access and accuracy. Producing an entire vector, estimating one scalar, and drawing one sample are different tasks. An already prepared quantum state and an explicit classical data file also expose different information; preparing the state may itself be costly.
For example, an algorithm that processes an amplitude-encoded vector using few gates need not load an arbitrary classical vector equally quickly. Include the state or data-structure construction, repeated preparations, measurements, and classical processing when assessing total cost. A separation in oracle queries remains a result about that oracle model until these other costs have been analyzed.
Continue to quantum oracles for access models, query complexity for query bounds, and algorithmic benchmarking for comparisons of complete implementations. Communication with quantum systems develops the quantum counterparts of the channel-coding questions above.
Exercises
Section titled “Exercises”1. Decoding an erased bit
Section titled “1. Decoding an erased bit”Let . Use a binary erasure channel with erasure probability , the identity encoder, blocklength one, output alphabet , and a decoder that maps an erasure to . Write the channel probabilities and compute the average and maximal decoding errors under this source distribution.
Solution
The source alphabet is with
With outputs ordered as and inputs ordered as , the nonzero channel probabilities are
with . For each fixed input , summing over the three outputs gives one, consistent with the page’s output-row/input-column orientation. The identity encoder sends itself in one channel use. The decoder is
If , both a received and an erasure decode to , so the conditional error is zero. If , an erasure is decoded incorrectly, so the conditional error is . Therefore
and
The nominal uncoded rate is one source symbol per channel use, but that statement is meaningful only with the declared blocklength, decoder, source distribution, and error criterion.
2. Relative entropy and support
Section titled “2. Relative entropy and support”For and , compute , , , and using base- logarithms.
Solution
Using ,
whereas
Only the first component contributes to :
For the reverse divergence, assigns positive probability to the second symbol while assigns it probability zero. The support condition therefore gives
The last result is not obtained by treating division by zero informally; it follows from the extended-value definition when the support of the first distribution is not contained in the support of the second.
3. Exact dyadic prefix code
Section titled “3. Exact dyadic prefix code”For symbol probabilities
consider the codewords , , , and . Check directly that no word is a prefix of another, calculate the Kraft sum, and compare mean length with entropy. Does a Kraft sum at most one prove that an arbitrary supplied code is prefix free?
Solution
The codeword lengths are . The Kraft sum is
The displayed code is prefix free: no listed codeword is the beginning of another. Its mean length is
Because each probability is dyadic and , the entropy is
Exact equality is possible here because the ideal lengths are integers satisfying Kraft equality. A general one-symbol distribution has noninteger ideal lengths and need not admit .
The Kraft inequality guarantees that some prefix code with the specified lengths exists. It does not prove that a particular set of strings is prefix free: the strings and have Kraft sum , yet the first is a prefix of the second.
4. Three-fold repetition at finite blocklength
Section titled “4. Three-fold repetition at finite blocklength”Send one message bit through three independent uses of a BSC with crossover probability , and decode by majority vote. Compute the block error and code rate, then compare the result with uncoded transmission.
Solution
Majority decoding fails when exactly two or all three channel outputs flip. Independence gives
One message bit uses three channel uses, so
Uncoded transmission has error at rate one message bit per channel use. Repetition lowers the error to but also lowers the rate by a factor of three and increases latency. This one finite code does not establish capacity or an asymptotic optimum.
5. Cascaded BSC and data processing
Section titled “5. Cascaded BSC and data processing”Cascade BSCs with crossover probabilities and . For a uniform input, compute the effective crossover and the mutual information before and after the second channel.
Solution
The final bit differs from the input exactly when one of the two channels flips and the other does not. Thus
For a uniform input to a BSC,
After the first channel,
After the second channel,
The variables form the Markov chain , and the numerical result explicitly satisfies
The second channel has discarded information about ; it has not created a new observation of .
6. Uniform but completely leaked key
Section titled “6. Uniform but completely leaked key”Let be a uniform bit and let an adversary hold . Compute and the total-variation distance from the ideal independent distribution .
Solution
The marginal key distribution is uniform, so
The real joint distribution has
and zero probability on and . Because is also marginally uniform, the ideal product distribution assigns probability to each of the four pairs. Therefore
The key has maximal marginal entropy but is completely known to the adversary. The marginal entropy ignores the adversary’s information; secrecy requires a joint-state criterion.
References
Section titled “References”- Cover, T. M., and J. A. Thomas. Elements of Information Theory, 2nd edition. Wiley, 2006. doi:10.1002/047174882X.
- MacKay, D. J. C. Information Theory, Inference, and Learning Algorithms. Cambridge University Press, 2003. Chapters 4–11.
- Polyanskiy, Y., H. V. Poor, and S. Verdú. “Channel coding rate in the finite blocklength regime.” IEEE Transactions on Information Theory 56, 2307–2359 (2010). doi:10.1109/TIT.2010.2043769; author’s manuscript.
- Shannon, C. E. “A mathematical theory of communication.” Bell System Technical Journal 27, 379–423 and 623–656 (1948). Part I, doi:10.1002/j.1538-7305.1948.tb01338.x; Part II, doi:10.1002/j.1538-7305.1948.tb00917.x.
- Shannon, C. E. “Communication theory of secrecy systems.” Bell System Technical Journal 28, 656–715 (1949). doi:10.1002/j.1538-7305.1949.tb00928.x.