Binary rate-distortion function 2026-10-14
For a stationary source of independent and identically distributed fair bits, with Hamming distortion and binary reconstruction alphabet,The binary entropy convention is . Once , always reconstructing zero meets the distortion constraint without sending any bits. The formula must not be extended to : a looser constraint cannot increase the required rate.[ref]
Chapter 25: Evaluating R(D). Lossy Source-Channel Separation. §25.1.1, Bernoulli Source, printed p. 255
The short argument identifies both sides of the optimum. For any feasible binary reconstruction, put , using exclusive or. Knowing makes and determine one another, so the conditional entropy obeyswhen . The last step uses the increase of binary entropy on that interval. Hence . Conversely, choose with an independent Bernoulli random variable of parameter . This binary symmetric channel has expected distortion and mutual information , attaining the bound.
Binary symmetric channel Created 2026-09-24 Updated 2026-10-14
A binary symmetric channel is a discrete memoryless channel that flips each transmitted bit with fixed crossover probability . For one use, write , where is exclusive or and is a Bernoulli random variable with parameter , independent of the input . Thus preserves the bit and flips it. Different uses have independent noise under this model.
With row labels and column labels , its transition matrix isEach row sums to one, and exchanging both binary labels leaves the rule unchanged, explaining symmetric. For , a prescribed three-bit input produces with probability and with probability . The received does not itself announce the changed position: it could also arise from input with no flips.
The binary symmetric channel capacity quantifies how well a block code can overcome this uncertainty, and input distribution optimization for a binary symmetric channel shows why a fair input attains the best information rate. A completely noisy binary symmetric channel has and carries no input information; a known flip on every use, , is instead reversible.
Binary symmetric channel capacity Created 2026-09-24 Updated 2026-10-14
A binary symmetric channel independently flips each transmitted bit with crossover probability . Its channel capacity isin bits per use, where is binary entropy and the endpoint convention is . Knowing the input leaves just the uncertainty of the flip, so for every input probability distribution. Since the output is a bit, , and thus . A fair input produces a fair output and reaches the bound. This is the two-symbol case of weakly symmetric channel capacity; Eytan Modiano, MIT 16.36, Channel Capacity and Coding, slides 4–5 gives this calculation.
For crossover probabilities , the resulting channel capacities are approximately , , and bits per use. At , the communication channel is noiseless; at , the output is independent of the input and the capacity is zero. At , every bit is inverted, a known reversible rule, and capacity is one again. More generally , because inverting every received bit exchanges the two crossover probabilities. The existing mutual information figure shows this full symmetric curve.
An uncoded transmission illustrates why the raw bit-error probability is not itself channel capacity. At , transmitting 100 uncoded bits succeeds on all of them with probability . The probability of at least one error is therefore approximately . A suitable block code changes which received words count as recoverable evidence of a message; simply repeating uncoded transmission at rate one does not obtain the reliability promised at rates below .
Bit-position information in a binary channel Created 2026-10-25 Updated 2026-10-31
Suppose a fair input bit is independent of a publicly known channel-position label . At position , let the channel be a binary symmetric channel with error probability . Forgetting gives a binary symmetric channel with error . ThereforeThe chain rule for mutual information and show that their difference is the nonnegative conditional mutual information . Equivalently, the inequality follows from concavity of binary entropy. For with equal position weights, the known-position value is bits and the pooled value is bits. These quantities answer different statistical questions.
Channel capacity Created 2026-09-24 Updated 2026-10-14
Channel capacity is the best reliable information rate available through a specified communication channel. For a discrete memoryless channel with finite input and output alphabets, fixed transition probabilities , and no input-cost constraint, it isin bits per channel use, when the mutual information uses base-two logarithms. The maximization varies the input probability distribution, while keeping the communication channel fixed. A large input alphabet or a large output information entropy alone does not determine how much information gets through: the receiver needs information about the input, rather than merely unpredictable output.
The operational meaning comes from the Shannon second coding theorem. A block code represents one of possible messages by a word of length , giving a rate bits per use. Take the message label from the uniform distribution on a finite set of those choices when measuring average decoding-error probability. For every fixed rate , there are sequences of such block codes whose decoding-error probability tends to zero as grows; a rate above cannot have vanishing decoding-error probability. This is an asymptotic limit, rather than a promise that an arbitrary finite block code at a rate below works well. See MIT 18.310, Shannon's Noisy Coding Theorem, sections 1–2.
For a binary symmetric channel with crossover probability , the binary symmetric channel capacity is approximately bits per use. Thus a binary code rate lies below the limit, while lies above it. At , two transmitted symbols represent one message bit on average; the redundancy helps distinguish messages after noise. This does not split individual physical symbols into fractional pieces.
The result is useful because it separates two tasks. Computing channel capacity establishes the target imposed by the transition probabilities; constructing an effective block code attempts to approach that target with acceptable delay and decoding effort. The surprise is that reliability can improve indefinitely without forcing every positive rate to disappear. In his 1948 paper, Shannon defines noisy channel capacity in section 12 and develops its operational significance in section 13, Theorem 11. His original formulation uses information per unit time; the fixed-duration channel-use convention here expresses the same rate question per symbol. [ref].
Completely noisy binary symmetric channel Created 2026-09-24 Updated 2026-09-24
At crossover probability , the two rows of the transition matrix of a binary symmetric channel coincide. Its output is then independent of its input and its capacity is zero.
Correlated binary variables 2026-10-18
Data processing inequality 2026-10-14
For finite discrete random variables, suppose is a Markov chain: the final channel uses only , so and have conditional independence given . In terms of the joint probability mass function,and hence . Then the two data processing inequalities areAll mutual informations here use base-two logarithms. Thus deterministic or randomized processing cannot increase the information shared with an unprocessed variable.[ref]
https://web.stanford.edu/class/cs229t/scribe_notes/12_05_final.pdf. Stanford CS229T/STATS231, Theorem 2.1 and its chain-rule proof
For a concrete cascade, take a fair bit and Bernoulli random variables with probabilities , of being one. Assume are jointly independent random variables, and pass through two binary symmetric channels:The second noise is independent of both and , so this is a Markov chain. Both and are fair bits. The net exclusive or error is one exactly when one noise flips the bit and the other does not:Using the binary entropy , the three mutual informations are fully determined:All numbers are in bits. The two losses are and . Thus the cascade retains less information about the original source than either individual channel shares between its own input and output.
With fixed and , the effective error is . At , and ; at , is independent of the previous variables and . The diagram plots these endpoints and the computed example.
The data processing inequality is useful for testing what a proposed decoder or data summary could possibly reveal: if its only input is , even randomized processing cannot provide more mutual information about than already contains. The Markov chain hypothesis matters. In the exclusive or example from conditional mutual information, allowing a processor to use both and reveals exactly; that processor has additional input, so the conclusion for processing alone does not apply.
The chain rule for mutual information proves both inequalities and identifies their exact gaps. First expand the information about in the two observation orders:Therefore . Next use as the variable being learned:Symmetry of mutual information gives . Both signs follow from the nonnegativity of conditional mutual information; the first gap also gives equality in data processing inequality.
Discrete memoryless channel Created 2026-09-24 Updated 2026-10-14
A discrete memoryless channel models transmission through finite input and output alphabets using fixed conditional probabilities . For each input , these nonnegative numbers sum to one over the output symbols. Discrete refers to the symbols, and memoryless means that the noise of one use does not remember earlier uses.
For a fixed input word sent without feedback, the output law isThis is conditional independence of the outputs given the prescribed input word. It does not require an encoder to choose independent input symbols: the codewords of a block code deliberately impose relationships among them. Those relationships let a decoder distinguish possible messages after noise.
The binary symmetric channel and binary erasure channel make two different memoryless noise models with a binary input. One hides flipped bits; the other marks missing bits. Their different channel capacities show why the whole transition matrix matters, as the flips versus erasures in a binary channel demonstrate.
Flips versus erasures in a binary channel 2026-10-14
A binary erasure channel marks its failed transmissions with a special output symbol, whereas a binary symmetric channel changes a bit without announcing whether it changed. At the same nominal failure probability , the two communication channels therefore leave different uncertainty. With a fair input, an unerased output determines the input exactly, while the erasure flag leaves one bit of conditional entropy. Thus and for the binary erasure channel. This is the binary case of capacity of a finite-alphabet erasure channel.
For the binary symmetric channel at , neither possible received symbol rules out either input, and . Its channel capacity is only . A receiver benefits from knowing where information was lost, even when the fraction of affected transmissions is the same.
This comparison concerns the specified transition probabilities, rather than a general ordering of every error mechanism. In particular, at , an erasure flag conveys no input information, while deterministic inversion still conveys a full bit. Reporting only an error percentage loses the distinction between hidden corruption, announced loss, and a predictable reversible transformation.
Let for the input bit of a binary symmetric channel with crossover probability . The law of total probability givesConsequently its mutual information isHere specifies the noise and specifies the input bias; they are different choices. At and , the output has , giving and bits. With the same noise and the fair input , the output becomes fair and bits, attaining binary symmetric channel capacity.
For , binary entropy reaches one only at output mass , and the equation forces . Thus the maximizing input is unique in those cases. For , every input produces the same fair output and zero mutual information, so every input bias is optimal and none transmits information. A fixed input or also carries zero mutual information for every : noise can make its output unpredictable without creating an unknown message to recover.
Mutual information Created 2026-09-24 Updated 2026-10-14
For finite discrete random variables, mutual information is the reduction of information entropy provided by observing the other variable:The last expression makes the symmetry visible. It is nonnegative and is zero exactly when and are independent random variables. One way to see both facts iswhere is the Kullback-Leibler divergence with base-two logarithms. The Gibbs inequality gives nonnegativity; equality means that the joint probability distribution factors. The statement extends to more general distributions via relative entropy, but differences of infinite information entropies must not be used as if they were finite numbers.
A binary symmetric channel gives a useful example. Let be a fair bit, let be an independent Bernoulli random variable with error probability , and set , where is exclusive or. The output is also a fair bit, but knowing the input leaves just the error uncertainty:Here is binary entropy. At , , so the output carries about bits of mutual information about the input per use. This is an average uncertainty reduction, not a claim that each observed symbol can be divided into fractional physical bits.
Binary entropy and retained information distinguish noisy transmission from predictable bit inversion
. Details. At , every output is equally likely for either input, so . At , the output is always the inverted input: knowing this rule lets the receiver recover the input exactly, so again. A high raw error rate need not mean low mutual information when the errors are predictable. For this particular channel the fair input is optimal, giving the binary symmetric channel capacity .
Mutual information detects dependence that ordinary correlation can miss. Let be uniform on and . Symmetry gives , hence zero covariance and zero correlation, while is completely determined by . Thus . This distinction is useful whenever a relationship is nonlinear: knowing one variable can reveal another without a linear trend.
Past exam of the communication Theory course of the University of Oxford 2007 4 a Solution 2026-10-31
With equally likely codewords, the prior factor in the ideal-observer criterion is constant, so it agrees with maximum likelihood. On the binary symmetric channel,For this is strictly decreasing in Hamming distance, so the likelihood maximizers are precisely the nearest codewords. With the same tie convention all three decoders therefore agree. At every possible received word equals its transmitted codeword, and the rules agree on all positive-probability outputs; outputs having zero probability need no posterior assignment.
Past exam of the communication Theory course of the University of Oxford 2008 2 c ii Solution 2026-10-31
Let be the original input, the output of the first channel, and the final output. The independent erasure flag is observable from . The mutual information chain rule, conditioning on that flag, givesThe same uniform input maximizes as in the binary symmetric channel. ThusThis scaling works because the erasure event is independent of both the input and the first channel noise.
Past exam of the communication Theory course of the University of Oxford 2008 2 c i Solution 2026-10-31
The capacity of a discrete memoryless channel is , in bits per channel use. For the binary symmetric channel with crossover probability , and . A uniform input makes the output uniform, attainingFor the binary erasure channel, let be its erasure indicator. This flag is visible in the output and independent of the input. If there is no erasure, the output reveals the input; otherwise it reveals nothing. Consequentlyagain attained by a uniform input. These formulas include crossover probabilities zero and one, and complete erasure.
There are two possible messages and three channel uses, givingConditional on either transmitted message, a decoding error occurs exactly when at least two of the three bits are flipped. The discrete memoryless channel makes these flips independent, each with probability . Their count therefore has a binomial distribution with parameters . Majority-vote decoding of a repetition code givesInterchanging the two bit values leaves the binary symmetric channel and majority decision unchanged, so as well. Both the maximum conditional error and the average error, for any message prior, are therefore . The probability of correct decoding for each message is . These are finite-block error probabilities; a channel-capacity statement alone would not determine them.
The actual resource is a two-component Bell resource in dense coding. Applying the same local encoder togives a superposition of the intended Bell state with amplitude magnitude and its phase-label partner with amplitude magnitude . A Bell-basis measurement therefore reports the wrong Bell state with probability , independently of . With our labeling, only the phase bit flips:The first bit of each pair passes through a binary symmetric channel with error ; the second bit is correct. A uniformly chosen bit from the full stream consequently has
This bit error probability depends on the Bell labeling. The Bell-label Hamming distance and bit errors rule multiplies the wrong-symbol probability by the number of bit positions changed. For example, relabel as . Both wrong-state partner pairs then differ in two bits, giving bit error probability instead of . The physical wrong-Bell-state probability remains .
For the entropy-matched independent source in part 2, the transmitted bit stream is fair, and consecutive two-bit labels are uniform. Write the binary entropy as . If a bit position is chosen uniformly and its phase/parity position is forgotten, the pooled corresponding-bit pair is a binary symmetric channel with error . Its mutual information is
The bit-position information in a binary channel distinguishes this pooled quantity from the information in the decoded blocks. Alice and Bob know which bit is first in each Bell label. Conditioned on that position , the first bit gives bits and the second gives one bit. ThusEquivalently, the joint mutual information between the two-bit input and output labels is bits per transmitted Bell label for the prescribed Bell measurement. Pooling without the position loses usable side information; it is not interchangeable with this block rate. The stated fair-input values use the optimal source distribution above; biased source bits require their actual joint distribution.
Write for the true DNA methylation status and for its observation. The observation likelihood function is a binary symmetric channel, soFor the loop suggested in the practical, set and add when , or otherwise. The following independent implementation combines these terms without multiplying many small numbers:
import numpy as np
def methylation_score(pattern, observed):
"""Conditional-product score used by the practical's natural loop filling."""
pattern=np.asarray(pattern,dtype=int);observed=np.asarray(observed,dtype=int)
if pattern[0]!=1 or pattern[-1]!=1:return -np.inf
neighbour_sum=pattern[:-2]+pattern[2:]
p=np.array([.1,.5,.9])[neighbour_sum]
prior_terms=np.where(pattern[1:-1]==1,p,1-p)
observation_terms=np.where(pattern==observed,.8,.2)
return float(np.log(prior_terms).sum()+np.log(observation_terms).sum())
log_likelihood = methylation_score
print(f"{log_likelihood(obs, obs):.2f}")The conditional-product log score at the observed pattern is . The endpoint observations are included once each, while the endpoint statuses are fixed rather than assigned an additional prior probability.
There is a modeling qualification: multiplying the specified neighbour conditional probabilities gives a pseudolikelihood, not generally the joint probability distribution having those conditional probabilities. Thus the function above defines the practical's conditional-product target; the pure observation log-likelihood at would instead be .
If the neighbour probabilities are intended literally as full conditionals of a Markov random field, a coherent alternative has edge weights and for , with both endpoints fixed. Given two equal neighbours, the matching centre has conditional odds ; mixed neighbours give equal weights. Consequently its unnormalized posterior probability has log scoreFor this alternative, before the constant associated with conditioning the endpoints. It can be implemented as follows, but its numerical results must not be mixed with the conditional-product results in the remaining parts:
def joint_methylation_score(pattern,observed):
"""Coherent nearest-neighbour model with the specified full conditionals."""
pattern=np.asarray(pattern,dtype=int);observed=np.asarray(observed,dtype=int)
if pattern[0]!=1 or pattern[-1]!=1:return -np.inf
edges=np.where(pattern[1:]==pattern[:-1],.75,.25)
emissions=np.where(pattern==observed,.8,.2)
return float(np.log(edges).sum()+np.log(emissions).sum()) Past exam of the mathematics course of the University of Cambridge 2005 ii Paper 4 4J Solution Created 2026-09-24 Updated 2026-10-14
Reliable transmission at rate means that there is a sequence of binary block codes of lengths , message counts with , and decoding error probabilities tending to zero. The Shannon second coding theorem identifies the supremum of reliable rates with the channel capacity.
For a binary symmetric channel, the conditional entropy of the output given any input bit is . The output entropy is at most one bit and attains one for uniform input, so the maximum mutual information isAll rates strictly below are achievable, and rates above are not reliable; this states the supremum without claiming achievability of every boundary rate under every convention.
For very small , the capacity is close to one, with . At , the output is independent of the input and capacity is zero. For , flipping every received bit converts the channel to crossover probability ; its capacity is unchanged because . At the deterministic bit flip is perfectly reversible.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 30 3 b Solution Created 2026-10-03 Updated 2026-10-14
The Shannon second coding theorem says that a memoryless channel permits transmission at any fixed code rate with error probability tending to zero as block length tends to infinity. Conversely, a sequence of codes with error probability tending to zero cannot have a limiting rate above . The channel capacity, in bits per use, isFor a finite discrete memoryless channel with transition probabilities , the supremum is a maximum and its mutual information isFor a general memoryless channel, mutual information is the relative entropy of the joint input-output law with respect to the product of its marginal laws; the same supremum is taken over the admissible input laws.
For the binary symmetric channel, write with independent noise having Bernoulli distribution of parameter . Given either input bit, the output conditional entropy is . ThusAn input with uniform distribution makes the output have uniform distribution, attaining . The binary symmetric channel capacity is therefore






