Log-sum inequality Created 2026-09-24 Updated 2026-09-24
For nonnegative , with and , the log-sum inequality isIt proves both Gibbs inequality and the data processing inequality for relative entropy.
Past exam of the mathematics course of the University of Cambridge 2007 ii Paper 1 4G Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2009 ii Paper 1 12H iii Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2009 ii Paper 1 12H i Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 216 4 a Solution Created 2026-10-03 Updated 2026-10-06
Write . Mean-field variational inference minimizes the reverse Kullback-Leibler divergenceEach is a probability density function; without further parametric restrictions, the optimization is over all such product probability distributions. Equivalently it maximizes the evidence lower bound for any unnormalized posterior density . Its difference from is exactly the Kullback-Leibler divergence.
Fix and writeAssume and that the displayed expected values and objective decomposition are well defined. The optimal factor isIndeed, the part of the objective depending on isThe remaining term is fixed. Gibbs inequality gives nonnegativity of the Kullback-Leibler divergence, with equality precisely at almost everywhere. This proves global optimality of that coordinate update; it does not assert global optimality of a sequence of coordinate updates for the full nonconvex product-family problem.
The printed upper index in the list of remaining coordinates is inconsistent with the dimension ; the natural interpretation is . Also, if the exponential expression has zero or infinite normalizing constant, or the expected values are undefined, the usual coordinate formula needs additional support or integrability hypotheses. A restricted parametric factor family need not contain this unrestricted optimal factor.
Past exam of the mathematics course of the University of Cambridge 2017 ii Paper 2 11G Solution Created 2026-09-24 Updated 2026-10-05
For a discrete random variable with probabilities , its Shannon entropy in bits is , with . Gibbs inequality states thatwith equality exactly when . If , the left side is infinite. Otherwise apply to for :Equality requires on the support and no remaining mass outside it. In particular, comparison with the uniform probability distribution on two outcomes gives binary Shannon entropy at most .
Write . For , grouping the last two outcomes givesEquality holds if ; if it also holds, and then both are zero. Thus equality holds exactly when .
For the discrete memoryless channel, assume and , and set . Both conditional output probability distributions have Shannon entropy . The third output has probability regardless of the input; the first two have total probability . Their Shannon entropy is maximized by making them equal, which a uniform input achieves. Hence the channel capacity isand thereforeThe usual zero-times-log convention includes , when . If , the rows coincide and every input achieves zero mutual information; otherwise the uniform input is the unique maximizing input.
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 1 3H Solution Created 2026-09-24 Updated 2026-10-03
Let a memoryless source have probabilities , and let a uniquely decodable -ary code have word lengths and mean length . The Shannon source coding theorem statesand that some prefix code satisfies
For the lower bound, the Kraft inequality gives . Set . The Gibbs inequality, or nonnegativity of relative entropy, givesTherefore .
Past exam of the mathematics course of the University of Cambridge 2021 ii Paper 1 11K Solution Created 2026-09-24 Updated 2026-10-03
Take every logarithm in base two. The information entropy of iswith . If the codeword has length , then its expected codeword length is
For any decipherable code, the Kraft inequality givesDefine the probability distribution . By Gibbs inequality,Since ,
Conversely, choose the integer lengthsThen , so their Kraft sum is at most one and the converse part of Kraft's inequality supplies a binary prefix code. Moreover,Thus the minimum expected length satisfies the Shannon noiseless coding theorem
For a decipherable code with arbitrary lengths , apply the lower bound to the uniform source . Its entropy is and its expected length is . Hencethe total length lower bound for a decipherable binary code.
Now consider the cumulative construction. Since and cannot have the same first binary digits: numbers sharing those digits lie in one half-open dyadic interval of length . Also, implies . Therefore no earlier codeword is a prefix of a later one, and no later, weakly longer codeword can be a prefix of an earlier one. The cumulative Shannon code is thus a prefix code, hence decipherable.
An optimal code minimizes expected codeword length over all decipherable codes for the specified source probabilities. The cumulative construction need not be optimal. For example, ifthen and the construction gives codewords and , with expected length . The prefix code has expected length , so the constructed code is not optimal. In general, Huffman coding produces an optimal prefix code.
Past exam of the mathematics course of the University of Cambridge 2022 iii Paper 224 4 c Solution Created 2026-09-28 Updated 2026-10-03
A distribution on must have . For , put and letFor any mass function with mean , Gibbs inequality givesThus the geometric distribution uniquely maximizes entropy. For , the only admissible law is the point mass at one, which is the limiting geometric case .
Past exam of the mathematics course of the University of Cambridge 2022 iii Paper 224 4 d Solution 2026-09-28
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 224 3 c Solution 2026-09-28
Write , , andOn the support of , define the probability mass functionFor any real length function satisfying the Kraft inequality, put and . The Gibbs inequality givesEquality holds for the ideal weighted lengthsThus the smallest average weighted description length isWhen has full support, the displayed attains this minimum. If some strings have zero probability, the same value is the infimum over finite lengths and is attained by the extended-real ideal assignment there; finite codewords of arbitrarily large length approach it.
Past exam of the mathematics course of the University of Cambridge 2025 iii Paper 224 1 c Solution Created 2026-09-24 Updated 2026-09-25
Past exam of the mathematics course of the University of Cambridge 2025 iii Paper 224 4 b Solution Created 2026-09-24 Updated 2026-09-25