Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 30 3 c Solution Created 2026-10-03 Updated 2026-10-14
To correct every pattern of errors by nearest-codeword decoding, it suffices to have minimum Hamming distance : the corresponding radius- Hamming balls are disjoint. For , the relative distance tends to , so the asymptotic Gilbert–Varshamov bound guarantees code rate at least in the limit. Therefore its immediate strict-rate guarantee isThe binary entropy is strictly increasing from zero to one on , since on . Let denote the inverse on this interval. The asymptotic condition becomes
There is also a finite-length boundary refinement for the precise requirement of correcting errors. If , then each weight for is at least . Expanding gives the entropy bound for a Hamming ballThe case follows directly from . Taking and using monotonicity of the binary entropy, the Gilbert–Varshamov bound yieldsThus the worst-case correction guarantee from the Gilbert–Varshamov bound even includes for the exact radius , with the number of messages rounded to an integer when necessary. No positive-rate guarantee of this form is obtained for ; one must not extend the increasing-entropy calculation past . Failure of this sufficient bound does not rule out better codes.
By contrast, the Shannon second coding theorem gives vanishing error probability on the binary symmetric channel wheneverThe factor of two comes from demanding disjoint correction balls for every error pattern of a prescribed weight. This is a worst-case distance requirement, and the Gilbert–Varshamov bound is itself only a sufficient existence bound. The Shannon second coding theorem controls the probability of decoding failure for the random channel; rare bad patterns may remain.
Finally, the number of actual errors has binomial distribution with mean . Correcting exactly its mean does not itself imply error probability tending to zero. To get that conclusion from the distance construction when , choose with and , and correct errors. The weak law of large numbers then makes the probability of exceeding the correction radius tend to zero.
Binary symmetric channel capacity and Gilbert–Varshamov worst-case correction rate
. Details. Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 73 1 d Solution Created 2026-10-03 Updated 2026-10-14
Assume the two response labels are distinct and the error probability is the same for each stimulus. Then the stimulus-response map is a binary symmetric channel:with the two incorrect conditional probabilities equal to . Equal stimulus probabilities give . In bits, the Shannon entropy of the response is therefore . For either stimulus the response entropy is the binary entropywith . Thus , and the mutual information isIt is maximal, equal to one bit, at and also at . The latter response is always opposite to the ideal label but still specifies the stimulus perfectly after relabelling. It is minimal, equal to zero, at , when both response distributions are identical and the response is independent of the stimulus. If error is conventionally restricted to , the maximum occurs only at zero.
The symmetric-error assumption matters. A single overall error probability would not determine this information if the two stimuli had different conditional error rates or if the response included additional outcomes.
Past exam of the mathematics course of the University of Cambridge 2008 ii Paper 1 12G Solution Created 2026-09-24 Updated 2026-10-14
For a binary symmetric channel with crossover probability , Shannon's noisy coding theorem gives capacity bits per use, where . For any rate below capacity there are block codes with block length tending to infinity and decoding error tending to zero. Conversely, vanishing-error transmission cannot have asymptotic rate above capacity. At the capacity is zero; the formula also covers by complementing the output.
For discrete random variables, mutual information isThe formula is symmetric. To prove nonnegativity, apply to for positive joint masses. Multiplication by and summation gives . Hence , with equality precisely for independence. The channel information capacity is , over input distributions.
For the ternary channel every conditional output row has entropy , independent of the input. Therefore . Uniform input produces uniform output, since the matrix is doubly stochastic, and attains the bound. ThusUse at the endpoints. At the noiseless capacity is ; at all output rows are uniform and capacity is zero.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 48 3 b Solution Created 2026-10-03 Updated 2026-10-14
Write a qubit density operator as , with Bloch vector . The depolarizing channel sends to . Its output eigenvalues are , so its Von Neumann entropy is minimized at . DefineThe minimum output entropy is , since binary entropy is symmetric under . The usual probabilistic-mixture convention has . The argument also holds throughout the physical qubit CPTP range , where this still lies in .
To handle multiple channel uses, let a classical message select a product input with probability . Memorylessness gives product outputs . Additivity of Von Neumann entropy on tensor products gives . The average output acts on qubits, so . Thus the Holevo quantity obeys the product-input block bound for a qubit depolarizing channelThe Holevo bound says the classical mutual information obtained by any measurement, including a joint measurement on all outputs, is at most .
For a reliable code with equiprobable messages and decoding error , Fano's inequality gives . Consequently . Letting the error tend to zero proves .
The bound is tight: equal use of and computational-basis output measurements produce a binary symmetric channel with crossover probability . Ordinary classical coding achieves bits per use.
Past exam of the mathematics course of the University of Cambridge 2010 ii Paper 1 12H Solution Created 2026-09-24 Updated 2026-10-14
A binary symmetric channel flips each transmitted bit independently with probability . A length- channel code specifies input words and a decoding rule; its rate is , and its error probability is the probability of a wrongly decoded message. The channel capacity is the supremum of asymptotically achievable rates with vanishing error. For , put , with . The Shannon second coding theorem here statesWe prove achievability and the converse rather than using the formula as a substitute for a coding argument. Output complementation reduces to , so first assume .
Fix . Choose such that and . Independently choose uniformly random input words. Decode a received word to the unique codeword within Hamming distance , declaring error if there is none or more than one. The weak law of large numbers says the empirical fraction of independent Bernoulli- errors tends in probability to , so exceeding this distance has probability tending to zero.
For any independently chosen competing codeword, its probability of lying in this ball is , whereIndeed follows by bounding the probability of exactly successes in a binomial experiment with parameter by one, and increases on . A union bound therefore bounds the ensemble-average decoding error bySome deterministic code is at least as good as this average. Expurgating the half of messages with greatest individual error makes the maximum message error at most twice the original average, and changes the rate by at most . This proves achievability even for maximum-error probability.
For the converse, take uniform messages and any deterministic code/decoder. The independent noise word has probability . Its normalized negative log-probability tends in probability to by the same law. Thus, outside an event of probability tending to zero, each noise word has probability at most . The decoder's disjoint decision regions contain at most received words in total. HenceAt rates bounded above capacity by a positive amount, choose smaller and obtain success probability tending to zero. This establishes the strong converse as well as the ordinary impossibility of reliable transmission above .
When the output is independent of the input, so success probability for uniform messages is at most and . At or the channel is noiseless or deterministically inverted; all words can be distinguished, so . These endpoints complete the theorem.
Past exam of the mathematics course of the University of Cambridge 2017 ii Paper 1 3G Solution Created 2026-09-24 Updated 2026-10-05
The ideal observer performs maximum a posteriori decoding: for received word , it maximizes , equivalently . Maximum-likelihood decoding maximizes the latter conditional likelihood alone. Minimum-distance decoding minimizes the Hamming distance . Ties may be resolved arbitrarily among maximizers.
For independent errors in a binary symmetric channel,For , its ratio on increasing the distance by one is . Thus maximum-likelihood decoding and minimum-distance decoding select exactly the same codewords. At the allowed endpoint , they agree on a possible observation ; impossible observations have zero likelihood for every codeword, so an arbitrary maximum-likelihood tie rule need not agree with minimum distance. This qualification is needed for the literal assumption .
For the specified observation, the Hamming distances from 000 and 111 are two and one. Their likelihoods are and , respectively. After multiplying by the priors, their joint probabilities are and , so their posterior probabilities are and . Therefore
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 2 3H Solution Created 2026-09-24 Updated 2026-10-03
The binary symmetric channel with crossover probability has channel matrixMaximum-likelihood decoding chooses a codeword maximizing , while minimum-distance decoding chooses one minimizing the Hamming distance . For a block of length sent through a binary symmetric channel,When , the final factor decreases strictly with the distance. Thus maximum-likelihood and minimum-distance decoding agree.
For the length-three repetition code , majority decoding is wrong exactly when at least two bits flip. Therefore
Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 3 3G ii Solution Created 2026-09-24 Updated 2026-10-03
At , the output of the binary symmetric channel is independent of its input. It conveys no mutual information, and therefore
Past exam of the mathematics course of the University of Cambridge 2021 ii Paper 1 3K iii Solution Created 2026-09-24 Updated 2026-09-25
For a chosen coordinate and symbol , the shortened code retains the words having that symbol in the chosen coordinate and then deletes that coordinate. For the last coordinate,At least one of the two coordinate fibres contains at least words. Choose that fibre and, if necessary, discard surplus words. Because all retained words agree in the deleted coordinate, their mutual distances do not change. Hence one can always obtainWithout discarding words, its size is that of the chosen fibre and its minimum distance is at least .
For the final calculation, the given code is the whole space , so its parity extension is the length-four even-weight binary code. In a binary symmetric channel, parity fails to notice a nonzero error exactly when an even number of bits flips. The possible error weights are therefore two and four. Their total probability isThis excludes the weight-zero event, since it is not an undetected error.
Past exam of the mathematics course of the University of Cambridge 2021 ii Paper 2 3K Solution Created 2026-09-23 Updated 2026-09-25
For a binary symmetric channel with crossover probability , the capacity iswhere is the binary entropy. Shannon second coding theorem says that for every transmission rate and every , sufficiently long block codes exist with rate at least and decoding-error probability below ; conversely, a sequence of codes whose error tends to zero cannot have limiting rate above .
For the general channel let and be its input and output. Every conditional output distribution is a permutation of , hencefor every input distribution. Since ,The uniform input makes every output probability equal to : the column-permutation assumption and the total sum imply that all column sums are equal to one. It therefore attains , proving
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 1 11I a Solution Created 2026-09-24 Updated 2026-09-25
A binary symmetric channel independently flips each input bit with probability , so, with rows indexed by the input and columns by the output, its channel matrix isIf , complementing every received bit converts the channel into one with crossover probability without changing its information-carrying ability. The case has identical rows and capacity zero, so it suffices to study .
The Shannon second coding theorem states that for every rate below the channel capacity there are arbitrarily long codes whose decoding error tends to zero, whereas no sequence of codes with rate above capacity can have vanishing error. It also identifiesFor the present channel,The output entropy is at most one bit, with equality for a uniform input. Hence the binary symmetric channel capacity isbits per channel use.
Past exam of the mathematics course of the University of Cambridge 2024 ii Paper 1 11K a Solution Created 2026-09-24 Updated 2026-09-25
For a received word , the ideal-observer rule chooses a message maximizing the posterior probabilityMaximum-likelihood decoding chooses maximizingand minimum-distance decoding chooses a codeword minimizing its Hamming distance from .
Bayes' formula givesEqual message priors therefore make ideal-observer and maximum-likelihood decoding identical. On a binary symmetric channel, if , thenFor , this strictly decreases with , so maximum likelihood and minimum distance agree.
Past exam of the mathematics course of the University of Cambridge 2025 ii Paper 2 3K Solution Created 2026-09-23 Updated 2026-09-25
The received word has Hamming distances from and from , soAfter multiplying by the priors, the unnormalized posterior probabilities are and . Thus the ideal observer decodes as , while maximum-likelihood and minimum-distance decoding both choose .
The ideal observer minimizes average error but needs priors and channel statistics. Maximum likelihood needs the channel law but not priors, and can be suboptimal for unequal codeword probabilities. Minimum distance is simple and agrees with maximum likelihood for a binary symmetric channel with crossover probability below , but ignores unequal priors and general channel asymmetry.
Repetition code Created 2026-10-03 Updated 2026-10-14
A binary repetition code represents one bit by repeating it times, using codewords and . Their Hamming distance is , and the code rate is . For odd , the majority function recovers the input whenever fewer than half the positions have flipped. Even allows a tied vote, so a decoder must specify how it handles that case.
For , the received words decode to zero; decode to one. The decoder therefore corrects every single flip. This guarantee concerns the number of flipped positions, independent of any probabilistic model.
If each position passes independently through a binary symmetric channel with crossover probability , a decoded error requires at least two flips. The binomial distribution givesAt , the uncoded error probability is , while the three-bit code's decoded error probability is . This improvement costs three transmitted bits per message bit. For , ; for , one should first exploit the known tendency to invert symbols rather than applying the same majority rule blindly.
Independent flips are an essential assumption for the displayed formula. If a single common disturbance flips all three positions together with probability , repetition provides no improvement. More efficient error-correcting codes distribute redundancy across larger message blocks; repetition is useful as a transparent example of the geometry and the reliability–rate tradeoff.
A binary code rate is guaranteed with correction of every error pattern of Hamming weight at most when and . Choose minimum Hamming distance . The Gilbert–Varshamov bound and entropy bound for a Hamming ball give at least codewords. To deduce vanishing error probability for a binary symmetric channel with crossover probability , use strict inequality in the rate condition and a correction radius ; the weak law of large numbers then controls the tail. Correcting exactly the mean number of errors does not by itself ensure reliable transmission.
// Target: algebra.bigb

